Skip to content

Commit

Permalink
取消加载更多按钮,直接显示全部数据
Browse files Browse the repository at this point in the history
添加按Key前缀显示的4个按钮
  • Loading branch information
Clinkzzzzzz committed Jul 21, 2020
1 parent 74ecae9 commit af67639
Showing 1 changed file with 39 additions and 11 deletions.
50 changes: 39 additions & 11 deletions joyqueue-console/joyqueue-portal/src/views/setting/broker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default {
}
}
},
btns: {
operates: {
type: Array,
default: function () {
return [
Expand Down Expand Up @@ -193,6 +193,33 @@ export default {
}, `${ip}:${port}`)
}
},
{
title: '内存百分比/存储百分比',//bufferPoolMonitorInfo.used%bufferPoolMonitorInfo.maxMemorySize store.freeSpace%store.totalSpace
key: 'bufferPoolMonitorInfo.maxMemorySize',
width: '9%',
formatter (item) {
if (item.bufferPoolMonitorInfo) {
let res1 = 0, res2 = 0
let a = parseFloat(item.bufferPoolMonitorInfo.maxMemorySize)
let b = parseFloat(item.bufferPoolMonitorInfo.used)
res1=Number(b/a*100).toFixed(1)
a = parseFloat(item.store.freeSpace)
b = parseFloat(item.store.totalSpace)
res2=Number((b-a)/b*100).toFixed(1)
return res1+ '% / ' + res2+'%'
}
}
},
{
title: '出队/入队',
key: 'enQueue.count',
width: '9%',
formatter (item) {
if (item.enQueue&&item.deQueue) {
return item.deQueue.count + '/' + item.enQueue.count
}
}
},
{
title: '机房 (编码/名称)',
key: 'dataCenter.code',
Expand All @@ -203,17 +230,18 @@ export default {
}
}
},
{
/* {
title: '启动时间',
key: 'startupTime',
width: '15%'
},
},*/
{
title: '版本',
title: '启动时间/版本',
key: 'startupInfo.version',
width: '15%',
width: '20%',//15
render: (h, params) => {
let html = []
html.push(params.item.startupTime+'/')
let spin = h('d-spin', {
attrs: {
size: 'small'
Expand Down Expand Up @@ -247,21 +275,21 @@ export default {
}
},
{
title: '重试方式',
title: '重试方式/权限',
key: 'retryType',
width: '10%',
width: '18%',//10
render: (h, params) => {
return brokerRetryTypeRender(h, params.item.retryType)
return h('div',[brokerRetryTypeRender(h, params.item.retryType),brokerPermissionTypeRender(h, params.item.permission)])
}
},
{
/* {
title: '权限',
key: 'permission',
width: '8%',
render: (h, params) => {
return brokerPermissionTypeRender(h, params.item.permission)
}
}
}*/
]
}
}
Expand All @@ -275,7 +303,7 @@ export default {
tableData: {
rowData: [],
colData: this.colData,
btns: this.btns
operates: this.operates
},
brokerId: -1,
multipleSelection: [],
Expand Down

0 comments on commit af67639

Please sign in to comment.