mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 资产全局导入提示及批量更新平台
This commit is contained in:
@@ -201,6 +201,8 @@
|
||||
"NoSQLProtocol": "NoSQL Protocol"
|
||||
},
|
||||
"assets": {
|
||||
"BulkUpdatePlatformHelpText": "Modify only assets of the same type",
|
||||
"ImportMessage": "Please go to the page of mapping type to import data",
|
||||
"PushAccount": "Push account",
|
||||
"AuthUsername": "Auth using username",
|
||||
"Secure": "Secure",
|
||||
|
||||
@@ -201,6 +201,8 @@
|
||||
"NoSQLProtocol": "非リレーショナルデータベース"
|
||||
},
|
||||
"assets": {
|
||||
"BulkUpdatePlatformHelpText": "同じタイプの資産のみ変更",
|
||||
"ImportMessage": "ミラータイプのページにデータをインポートしてください",
|
||||
"PushAccount": "アカウント情報をプッシュ",
|
||||
"AuthUsername": "ユーザー名を使用した認証",
|
||||
"Secure": "安全である",
|
||||
|
||||
@@ -202,6 +202,8 @@
|
||||
"NoSQLProtocol": "非关系数据库"
|
||||
},
|
||||
"assets": {
|
||||
"BulkUpdatePlatformHelpText": "只修改相同类型的资产",
|
||||
"ImportMessage": "请前往对映类型的页面导入数据",
|
||||
"PushAccount": "推送账号",
|
||||
"SSHPort": "SSH 端口",
|
||||
"AuthUsername": "使用用户名认证",
|
||||
|
||||
@@ -50,7 +50,11 @@ export default {
|
||||
category: 'all'
|
||||
},
|
||||
headerActions: {
|
||||
hasImport: false
|
||||
handleImportClick: ({ selectedRows }) => {
|
||||
this.$message.warning({
|
||||
message: this.$t('assets.ImportMessage')
|
||||
})
|
||||
}
|
||||
},
|
||||
addExtraMoreActions: [],
|
||||
helpMessage: this.$t('assets.AssetListHelpMessage')
|
||||
|
||||
@@ -35,14 +35,30 @@ export default {
|
||||
data() {
|
||||
const meta = assetFieldsMeta(this)
|
||||
const exclude = ['device', 'cloud', 'web']
|
||||
const platformQuery = this.category === 'all' ? '' : this.category
|
||||
return {
|
||||
tips: this.$t('assets.AssetBulkUpdateTips'),
|
||||
formSetting: {
|
||||
url: '/api/v1/assets/assets/',
|
||||
hasSaveContinue: false,
|
||||
initial: {},
|
||||
fields: ['nodes', 'domain', 'labels', 'is_active', 'comment'],
|
||||
fields: ['platform', 'nodes', 'domain', 'labels', 'is_active', 'comment'],
|
||||
fieldsMeta: {
|
||||
platform: {
|
||||
el: {
|
||||
multiple: false,
|
||||
ajax: {
|
||||
url: `/api/v1/assets/platforms/?category=${platformQuery}`,
|
||||
transformOption: (item) => {
|
||||
return { label: item.name, value: item.id }
|
||||
}
|
||||
}
|
||||
},
|
||||
rules: [
|
||||
{ required: false }
|
||||
],
|
||||
label: this.$t('assets.Platform'),
|
||||
helpText: this.$t('assets.BulkUpdatePlatformHelpText')
|
||||
},
|
||||
nodes: {
|
||||
...meta.nodes,
|
||||
label: this.$t('assets.Node')
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<AssetBulkUpdateDialog
|
||||
:visible.sync="updateSelectedDialogSetting.visible"
|
||||
v-bind="updateSelectedDialogSetting"
|
||||
:category="category"
|
||||
/>
|
||||
<GatewayDialog
|
||||
:cell="GatewayCell"
|
||||
|
||||
Reference in New Issue
Block a user