perf: 使用 mini 接口 (#945)

* perf: 使用 mini 接口

* perf: 资产列表默认展示平台和协议

* perf: 添加排序

Co-authored-by: 吴小白 <296015668@qq.com>
This commit is contained in:
fit2bot
2021-07-29 14:57:20 +08:00
committed by GitHub
parent 05c06e4fc2
commit cb5fe0f2a0
2 changed files with 7 additions and 3 deletions

View File

@@ -76,7 +76,7 @@ export default {
select2Config: select2Config,
dialogSelect2Config: select2Config,
tableConfig: {
url: '/api/v1/assets/assets/',
url: '/api/v1/assets/assets/?fields_size=mini',
hasTree: true,
canSelect: this.canSelect,
columns: [

View File

@@ -112,7 +112,7 @@ export default {
],
columnsShow: {
min: ['hostname', 'ip', 'actions'],
default: ['hostname', 'ip', 'hardware_info', 'connectivity', 'actions']
default: ['hostname', 'ip', 'platform', 'protocols', 'hardware_info', 'connectivity', 'actions']
},
columnsMeta: {
hostname: {
@@ -120,7 +120,11 @@ export default {
formatterArgs: {
route: 'AssetDetail'
},
showOverflowTooltip: true
showOverflowTooltip: true,
sortable: true
},
platform: {
sortable: true
},
protocols: {
formatter: function(row) {