Merge branch 'dev-3.5' of git.mesalab.cn:nezha/nezha-fronted into dev-3.5

This commit is contained in:
zyh
2022-09-14 10:15:47 +08:00
2 changed files with 15 additions and 7 deletions

View File

@@ -150,7 +150,7 @@ export default {
tableFilter () {
const tableDatas = JSON.parse(this.tableDataCopy)
this.tableData = tableDatas.filter((item) => {
const element = item.commandLine
const element = item.commandLine ? item.commandLine : item.name
return element.indexOf(this.queryExpression) !== -1
})
},

View File

@@ -38,14 +38,14 @@
</template>
<template slot-scope="scope" :column="item">
<template v-if="item.prop === 'commandLine'">
<div style="height:100%;display: flex;align-items: center;">
<el-popover trigger="hover" placement="right-start" v-if="typeof scope.row.state != 'undefined' && scope.row.state != null">
<div style="height:24px;display: flex;align-items: center;">
<el-popover trigger="hover" placement="top" v-if="typeof scope.row.state != 'undefined' && scope.row.state != null">
<div>
<span class="metirc-tip-list">{{$t('overall.state')}}&nbsp;:&nbsp;&nbsp;</span><span>{{ scope.row.state }}</span>
</div>
<div slot="reference"><div class="bar active-icon " :style="{'background-color':comBgc[scope.row.state]}"></div></div>
</el-popover>
<span style="margin-left: 6px;line-height: 100%;">{{scope.row[item.prop] || '-'}}</span>
<div class="process-name" :title="scope.row[item.prop] || scope.row.name">{{scope.row[item.prop] || scope.row.name}}</div>
</div>
</template>
<template v-else-if="item.prop === 'startTime'">
@@ -92,7 +92,7 @@ export default {
return {
tableTitle: [
{
label: this.$t('config.terminallog.cmd.cmd'),
label: this.$t('overall.process'),
prop: 'commandLine',
show: true,
minWidth: 300,
@@ -116,13 +116,13 @@ export default {
minWidth: 150,
sortable: 'custom'
}, {
label: '%' + this.$t('asset.process.cpu'),
label: this.$t('asset.process.cpu'),
prop: 'cpuUsage',
show: true,
minWidth: 200,
sortable: 'custom'
}, {
label: '%' + this.$t('asset.process.mem'),
label: this.$t('asset.process.mem'),
prop: 'memUsage',
show: true,
minWidth: 200,
@@ -190,6 +190,14 @@ export default {
margin-right: 0px;
line-height: 100%;
}
.process-name{
height: 100%;
margin-left: 6px;
line-height: 24px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#container {
width: 120px;
min-width: 120px;