perf: 网关优化

This commit is contained in:
feng
2022-12-02 17:20:58 +08:00
parent 7a315a056a
commit 59bbd4d743
4 changed files with 38 additions and 1 deletions

View File

@@ -99,6 +99,8 @@
"NoSQLProtocol": "NoSQL Protocol"
},
"assets": {
"sshkeyAccount": "ssh key account",
"passwordAccount": "Password account",
"SelectTemplate": "Select template",
"InAssetDetail": "Update account information in asset details",
"SecretType": "Secret type",

View File

@@ -104,6 +104,8 @@
"NoSQLProtocol": "非リレーショナルデータベース"
},
"assets": {
"sshkeyAccount": "SSHキー",
"passwordAccount": "パスワード",
"SelectTemplate": "テンプレートの選択",
"InAssetDetail": "資産詳細でのアカウント情報の更新",
"SecretType": "機密タイプ",

View File

@@ -103,6 +103,8 @@
"NoSQLProtocol": "非关系数据库"
},
"assets": {
"sshkeyAccount": "密钥账号",
"passwordAccount": "密码账号",
"Category": "类别",
"AccountDetail": "账号详情",
"Accounts": "账号列表",

View File

@@ -54,7 +54,10 @@ export default {
return {
tableConfig: {
url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}`,
columns: ['name', 'address', 'platform', 'connectivity', 'is_active', 'actions'],
columns: [
'name', 'address', 'platform', 'password_account',
'ssh_key_account', 'connectivity', 'is_active', 'actions'
],
columnsMeta: {
name: {
sortable: 'custom',
@@ -69,6 +72,34 @@ export default {
address: {
width: '140px'
},
password_account: {
label: this.$t('assets.passwordAccount'),
formatter: function(row) {
const [accountInfo] = row.effective_accounts.filter(
item => item.secret_type === 'password'
)
if (!accountInfo) return <span>-</span>
const to = {
name: 'AssetAccountDetail',
params: { id: accountInfo.id }
}
return <router-link to={ to } >{ accountInfo.username }</router-link>
}
},
ssh_key_account: {
label: this.$t('assets.sshkeyAccount'),
formatter: function(row) {
const [accountInfo] = row.effective_accounts.filter(
item => item.secret_type === 'ssh_key'
)
if (!accountInfo) return <span>-</span>
const to = {
name: 'AssetAccountDetail',
params: { id: accountInfo.id }
}
return <router-link to={ to } >{ accountInfo.username }</router-link>
}
},
actions: {
formatterArgs: {
updateRoute: 'GatewayUpdate',