Merge branch 'dev-3.2' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.3

This commit is contained in:
zhangyu
2022-03-28 14:24:34 +08:00
19 changed files with 31 additions and 25 deletions

View File

@@ -64,6 +64,11 @@
}
}
.explore {
.el-collapse-item__height{
.el-collapse-item__wrap{
overflow: unset;
}
}
.chart-view__switch {
margin-top: 20px;
border: 1px solid $--border-color-light;

View File

@@ -468,10 +468,10 @@
margin-bottom: 5px;
}
.progress-title{
width: 64px;
min-width: 64px;
}
.progress-content{
width: 20px;
min-width: 20px;
}
.progress-box{
width: 56px;

View File

@@ -19,7 +19,7 @@
:close-delay=10
trigger="hover"
popper-class="chart-warring-popper">
<div class="moreTitle">{{$t('dashboard.panel.moreTitle')}}{{$t('dashboard.panel.showAll')}}{{allDataLength}}</div>
<div class="moreTitle" @click="loadMore">{{$t('dashboard.panel.moreTitle')}}{{$t('dashboard.panel.showAll')}}{{allDataLength}}</div>
<span slot="reference" class="panel-info-corner panel-info-corner--error" @click="loadMore">
<i class="nz-icon nz-icon-warning fa"></i>
<span class="panel-info-corner-inner"></span>

View File

@@ -182,7 +182,7 @@ export default {
<div class="tooltip--row">
<div class="legend-value legend-value-asset">
<div class="map-asset">
<div class="progress-title">Asset ok</div>
<div class="progress-title">${self.$t('panel.assetOk')}</div>
<div class="success-progress progress-box">
<div class="top-progress" style="width: ${(dcStat.asset.ok / dcStat.asset.total) * 100}%"></div>
<div style="width: 100%" class="bottom-progress"></div>
@@ -190,7 +190,7 @@ export default {
<div class="success-progress progress-content">${dcStat.asset.ok}</div>
</div>
<div class="map-asset">
<div class="progress-title">Asset alarm</div>
<div class="progress-title">${self.$t('panel.assetAlarm')}</div>
<div class="error-progress progress-box">
<div class="top-progress" style="width: ${(dcStat.asset.alarm / dcStat.asset.total) * 100}%"></div>
<div style="width: 100%" class="bottom-progress"></div>
@@ -201,7 +201,7 @@ export default {
<div class="partition"></div>
<div class="legend-value legend-value-agent">
<div class="map-asset">
<div class="progress-title">agent up</div>
<div class="progress-title">${self.$t('guide.agent')} ${self.$t('overall.normal')}</div>
<div class="success-progress progress-box">
<div class="top-progress" style="width: ${(dcStat.agent.up / (dcStat.agent.up + dcStat.agent.down)) * 100}%"></div>
<div style="width: 100%" class="bottom-progress"></div>
@@ -209,7 +209,7 @@ export default {
<div class="success-progress progress-content">${dcStat.agent.up}</div>
</div>
<div class="map-asset">
<div class="progress-title">agent down</div>
<div class="progress-title">${self.$t('guide.agent')} ${self.$t('overall.unusual')}</div>
<div class="error-progress progress-box">
<div class="top-progress" style="width: ${(dcStat.agent.down / (dcStat.agent.up + dcStat.agent.down)) * 100}%"></div>
<div style="width: 100%" class="bottom-progress"></div>

View File

@@ -19,7 +19,7 @@
:close-delay=10
trigger="hover"
popper-class="chart-warring-popper">
<div class="moreTitle">{{$t('dashboard.panel.moreTitle')}}{{$t('dashboard.panel.showAll')}}{{allDataLength}}</div>
<div class="moreTitle" @click="loadMore">{{$t('dashboard.panel.moreTitle')}}{{$t('dashboard.panel.showAll')}}{{allDataLength}}</div>
<span slot="reference" class="panel-info-corner panel-info-corner--error" @click="loadMore">
<i class="nz-icon nz-icon-warning fa"></i>
<span class="panel-info-corner-inner"></span>

View File

@@ -47,18 +47,17 @@ export default {
methods: {
showPriority (daysData) {
let style = {}
// let sum = 0
let sum = 0
this.severityDataWeight.forEach(item => {
// sum += Number(daysData[item.name])
sum += Number(daysData[item.name])
if (daysData[item.name] && !style.background) {
style = {
background: item.color
}
}
})
// const height = sum > 0 ? (sum < 10 ? 20 : 24) : 16
// console.log(sum, height)
// style.height = (height + 'px')
const height = sum > 0 ? (sum <= 10 ? 12 : 14) : 10
style.height = (height + 'px')
return style
},
tooltipHover (item, flag, e) {

View File

@@ -249,7 +249,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
width: 150
width: 180
},
/* {
label: this.$t("project.endpoint.lastUpdate"),

View File

@@ -134,7 +134,7 @@ export default {
label: this.$t('alert.alert'),
prop: 'alertNum',
show: true,
width: 150,
width: 120,
sortable: 'custom'
}, {
label: this.$t('alert.config.receiver'),

View File

@@ -119,7 +119,7 @@ export default {
label: this.$t('asset.alertNum'),
prop: 'alertNum',
show: true,
minWidth: 140,
width: 120,
sortable: 'custom'
}, {
label: this.$t('asset.endpointNum2'),

View File

@@ -91,6 +91,7 @@ export default {
}, {
label: this.$t('config.dc.alert'),
prop: 'alertNum',
width: 120,
show: true
}, {
label: this.$t('asset.tel'),

View File

@@ -101,7 +101,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
minWidth: 150,
minWidth: 180,
sortable: 'custom'
},
{

View File

@@ -89,7 +89,7 @@ export default {
label: this.$t('project.module.alerts'),
prop: 'alertNum',
show: true,
width: 200,
width: 120,
sortable: 'custom'
},
{

View File

@@ -114,7 +114,7 @@ export default {
label: this.$t('asset.alertNum'),
prop: 'alertNum',
show: true,
width: 140
width: 120,
}, {
label: this.$t('asset.endpointNum2'),
prop: 'endpointNum',

View File

@@ -228,7 +228,7 @@ export default {
label: this.$t('alert.alert'),
prop: 'alertNum',
show: true,
width: 150,
width: 120,
sortable: 'custom'
}, {
label: this.$t('alert.config.receiver'),

View File

@@ -48,7 +48,7 @@
<span style="cursor: pointer" @click="$emit('showBottomBox', 'alertMessageTab', scope.row)">
<i :class="scope.row.alertNum ? 'red' : 'green'" class="nz-icon nz-icon-overview-alert vertical-align-top;" @mouseenter="tooltipHover(scope.row,true, $event)" @mouseleave="tooltipHover(scope.row,false, $event)"></i>
<div v-if="scope.row.alertNumtooltipShow" class="alert-days-info-tooltip" :style="{left: scope.row.left + 'px',top:scope.row.top + 'px'}">
<div class="tooltip-title">Alert message (active)</div>
<div class="tooltip-title">{{$t('project.topology.alert')}}({{$t('asset.pingActive')}})</div>
<div class="severity-info" style='justify-content: space-between'>
<div class="severity-name">{{$t('overall.result.total')}}</div>
<div class="severity-value">{{scope.row.alertNum}}</div>
@@ -254,7 +254,7 @@ export default {
label: this.$t('asset.alertNum'),
prop: 'alertNum',
show: true,
minWidth: 140,
width: 120,
sortable: 'custom'
}, {
label: this.$t('asset.endpointNum2'),

View File

@@ -174,6 +174,7 @@ export default {
}, {
label: this.$t('config.dc.alert'),
prop: 'alertNum',
width: 120,
show: true
}, {
label: this.$t('asset.tel'),

View File

@@ -262,7 +262,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
minWidth: 150,
minWidth: 180,
sortable: 'custom'
},
{

View File

@@ -148,7 +148,7 @@ export default {
label: this.$t('project.module.alerts'),
prop: 'alertNum',
show: true,
width: 200,
width: 120,
sortable: 'custom'
},
{

View File

@@ -137,7 +137,7 @@ export default {
label: this.$t('project.endpoint.alerts'),
prop: 'alerts',
show: true,
width: 150
width: 180
},
// {
// label: this.$t("project.endpoint.lastUpdate"),