mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 修复一些bug
This commit is contained in:
@@ -13,8 +13,12 @@
|
||||
>
|
||||
<el-form v-if="!showTable" label-position="left" style="padding-left: 50px">
|
||||
<el-form-item :label="$t('common.Import' )" :label-width="'100px'">
|
||||
<el-radio v-model="importOption" class="export-item" label="create">{{ this.$t('common.Create') }}</el-radio>
|
||||
<el-radio v-model="importOption" class="export-item" label="update">{{ this.$t('common.Update') }}</el-radio>
|
||||
<el-radio v-if="canImportCreate" v-model="importOption" class="export-item" label="create">
|
||||
{{ this.$t('common.Create') }}
|
||||
</el-radio>
|
||||
<el-radio v-if="canImportUpdate" v-model="importOption" class="export-item" label="update">
|
||||
{{ this.$t('common.Update') }}
|
||||
</el-radio>
|
||||
<div style="line-height: 1.5">
|
||||
<span class="el-upload__tip">
|
||||
{{ downloadTemplateTitle }}
|
||||
@@ -77,6 +81,14 @@ export default {
|
||||
url: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
},
|
||||
canImportCreate: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
canImportUpdate: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
||||
@@ -455,6 +455,7 @@
|
||||
"Loading": "加载中"
|
||||
},
|
||||
"updateErrorMsg": "更新失败",
|
||||
"ErrorMsg": "错误",
|
||||
"updateSelected": "更新所选",
|
||||
"updateSuccessMsg": "更新成功",
|
||||
"SelectProperties": "选择属性",
|
||||
|
||||
@@ -443,6 +443,7 @@
|
||||
"Loading": "Loading"
|
||||
},
|
||||
"updateErrorMsg": "Update failed",
|
||||
"ErrorMsg": "Error",
|
||||
"updateSelected": "Update selected",
|
||||
"updateSuccessMsg": "Update success",
|
||||
"SelectProperties": "Select properties",
|
||||
|
||||
@@ -23,7 +23,8 @@ export default {
|
||||
resource: 'gatherusertask'
|
||||
},
|
||||
columns: [
|
||||
'name', 'nodes', 'is_periodic', 'periodic_display', 'executed_times', 'actions'
|
||||
'name', 'nodes', 'is_periodic', 'periodic_display',
|
||||
'executed_times', 'actions'
|
||||
],
|
||||
columnsShow: {
|
||||
min: ['name', 'nodes', 'is_periodic', 'periodic_display', 'executed_times', 'actions']
|
||||
@@ -74,7 +75,7 @@ export default {
|
||||
title: vm.$t('xpack.Execute'),
|
||||
name: 'execute',
|
||||
type: 'info',
|
||||
can: vm.$hasPerm('xpack.change_gatherusertask'),
|
||||
can: vm.$hasPerm('xpack.add_gatherusertaskexecution'),
|
||||
callback: function(data) {
|
||||
this.$axios.post(
|
||||
`/api/v1/xpack/gathered-user/task-executions/`,
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
<li id="m_move_asset_to_node" v-perms="'assets.move_assettonode'" class="rmenu" tabindex="-1" @click="rMenuMoveAssetToNode">
|
||||
<i class="fa fa-scissors" /> {{ this.$t('tree.MoveAssetToNode') }}
|
||||
</li>
|
||||
<li v-if="$hasPerm('assets.move_assettonode') || $hasPerm('assets.add_assettonode')" class="divider" />
|
||||
<li v-if="$hasPerm('assets.move_assettonode | assets.add_assettonode')" class="divider" />
|
||||
<li id="m_update_node_asset_hardware_info" v-perms="'assets.refresh_assethardwareinfo'" class="rmenu" tabindex="-1" @click="rMenuUpdateNodeAssetHardwareInfo">
|
||||
<i class="fa fa-refresh" /> {{ this.$t('tree.UpdateNodeAssetHardwareInfo') }}
|
||||
</li>
|
||||
<li id="m_test_node_asset_connectivity" v-perms="'assets.test_assetconnectivity'" class="rmenu" tabindex="-1" @click="rMenuTestNodeAssetConnectivity">
|
||||
<i class="fa fa-link" /> {{ this.$t('tree.TestNodeAssetConnectivity') }}
|
||||
</li>
|
||||
<li v-if="$hasPerm('assets.add_assettonode') || $hasPerm('assets.test_assetconnectivity')" class="divider" />
|
||||
<li v-if="$hasPerm('assets.add_assettonode | assets.test_assetconnectivity')" class="divider" />
|
||||
<li id="m_show_asset_only_current_node" class="rmenu" tabindex="-1" @click="rMenuShowAssetOnlyCurrentNode">
|
||||
<i class="fa fa-indent" /> {{ this.$t('tree.ShowAssetOnlyCurrentNode') }}
|
||||
</li>
|
||||
@@ -24,7 +24,7 @@
|
||||
<i class="fa fa-align-justify" /> {{ this.$t('tree.ShowAssetAllChildrenNode') }}
|
||||
</li>
|
||||
<li class="divider" />
|
||||
<li id="m_check_assets_amount" class="rmenu" tabindex="-1" @click="rCheckAssetsAmount">
|
||||
<li id="m_check_assets_amount" v-perms="'assets.change_node'" class="rmenu" tabindex="-1" @click="rCheckAssetsAmount">
|
||||
<i class="fa fa-clone" /> {{ this.$t('tree.CheckAssetsAmount') }}
|
||||
</li>
|
||||
<li id="m_show_node_info" class="rmenu" tabindex="-1" @click="rMenuShowNodeInfo">
|
||||
@@ -385,7 +385,7 @@ export default {
|
||||
{ key: 'fullName', label: this.$t('assets.FullName'), value: res.full_value }
|
||||
]
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('common.getErrorMsg' + ' ' + error))
|
||||
this.$message.error(this.$t('common.ErrorMsg' + ' ' + error))
|
||||
})
|
||||
},
|
||||
rCheckAssetsAmount: function() {
|
||||
@@ -394,7 +394,7 @@ export default {
|
||||
).then(res => {
|
||||
openTaskPage(res['task'])
|
||||
}).catch(error => {
|
||||
this.$message.error(this.$t('common.getErrorMsg' + ' ' + error))
|
||||
this.$message.error(this.$t('common.updateErrorMsg' + ' ' + error))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,9 @@ export default {
|
||||
hasMoreActions: false,
|
||||
canCreate: () => {
|
||||
return this.$hasPerm(`rbac.add_${this.scopeRole}`)
|
||||
},
|
||||
importOptions: {
|
||||
canImportUpdate: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user