perf: geteway

This commit is contained in:
feng
2022-11-29 20:04:41 +08:00
parent bb910aa447
commit f50191d538
2 changed files with 17 additions and 8 deletions

View File

@@ -46,6 +46,11 @@ export default {
}
}
},
username: {
el: {
type: 'text'
}
},
password: {
component: UpdateToken
},
@@ -69,6 +74,10 @@ export default {
},
url: `/api/v1/assets/gateways/`,
hasDetailInMsg: false,
afterGetFormValue(formValue) {
formValue.username = formValue.username_display
return formValue
},
getNextRoute(res, method) {
const domain = res.domain
const route = {
@@ -91,7 +100,6 @@ export default {
}
},
mounted() {
console.log('---', this.object)
},
methods: {
}

View File

@@ -55,21 +55,22 @@ export default {
return {
tableConfig: {
url: `/api/v1/assets/gateways/?domain=${this.$route.params.id}`,
columns: ['name', 'ip', 'port', 'protocol', 'username', 'comment', 'actions'],
columns: ['name', 'address', 'port', 'username_display', 'comment', 'actions'],
columnsMeta: {
name: {
sortable: 'custom',
formatter: DisplayFormatter
},
ip: {
address: {
width: '140px'
},
port: {
width: '60px'
},
protocol: {
sortable: 'custom',
width: '100px'
width: '120px',
label: this.$t('assets.SshPort'),
formatter: (row) => {
console.log('row', row)
return row.protocols ? row.protocols[0].port : '-'
}
},
actions: {
formatterArgs: {