Merge branch 'dev-3.3' of git.mesalab.cn:nezha/nezha-fronted into dev-3.3
This commit is contained in:
@@ -83,24 +83,24 @@ loading-hide{
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
width: 8px;
|
||||
background: $--background-color-empty;
|
||||
background: $--color-primary;
|
||||
animation: ldsFacebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
|
||||
}
|
||||
.ldsFacebook div:nth-child(1) {
|
||||
left: 8px;
|
||||
background: $--background-color-empty;
|
||||
background: $--color-primary;
|
||||
filter: invert(50%);
|
||||
animation-delay: -0.24s;
|
||||
}
|
||||
.ldsFacebook div:nth-child(2) {
|
||||
left: 20px;
|
||||
background: $--background-color-empty;
|
||||
background: $--color-primary;
|
||||
filter: invert(50%);
|
||||
animation-delay: -0.12s;
|
||||
}
|
||||
.ldsFacebook div:nth-child(3) {
|
||||
left: 32px;
|
||||
background: $--background-color-empty;
|
||||
background: $--color-primary;
|
||||
filter: invert(50%);
|
||||
animation-delay: 0s;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ loading-hide{
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
width: 38px;
|
||||
//margin: -25px 0 0 -25px;
|
||||
}
|
||||
|
||||
@@ -129,33 +129,34 @@ loading-hide{
|
||||
position: absolute;
|
||||
display: block;
|
||||
bottom: 10px;
|
||||
width: 9px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
background: $--color-primary;
|
||||
opacity: 1;
|
||||
-webkit-animation: bars1 1.5s infinite ease-in-out;
|
||||
animation: bars1 1.5s infinite ease-in-out;
|
||||
}
|
||||
|
||||
.bars1 span:nth-child(2) {
|
||||
left: 11px;
|
||||
left: 8px;
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.bars1 span:nth-child(3) {
|
||||
left: 22px;
|
||||
left: 16px;
|
||||
-webkit-animation-delay: 0.4s;
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.bars1 span:nth-child(4) {
|
||||
left: 33px;
|
||||
left: 24px;
|
||||
-webkit-animation-delay: 0.6s;
|
||||
animation-delay: 0.6s;
|
||||
}
|
||||
|
||||
.bars1 span:nth-child(5) {
|
||||
left: 44px;
|
||||
left: 32px;
|
||||
-webkit-animation-delay: 0.8s;
|
||||
animation-delay: 0.8s;
|
||||
}
|
||||
@@ -167,15 +168,15 @@ loading-hide{
|
||||
transform: translateY(0px);
|
||||
-webkit-transform: translateY(0px);
|
||||
transform: translateY(0px);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
opacity: 0.25;
|
||||
}
|
||||
25% {
|
||||
height: 30px;
|
||||
-webkit-transform: translateY(15px);
|
||||
transform: translateY(15px);
|
||||
-webkit-transform: translateY(15px);
|
||||
transform: translateY(15px);
|
||||
background: #000000;
|
||||
height: 24px;
|
||||
-webkit-transform: translateY(12px);
|
||||
transform: translateY(12px);
|
||||
-webkit-transform: translateY(12px);
|
||||
transform: translateY(12px);
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
height: 5px;
|
||||
@@ -183,7 +184,7 @@ loading-hide{
|
||||
transform: translateY(0px);
|
||||
-webkit-transform: translateY(0px);
|
||||
transform: translateY(0px);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
opacity: 0.25;
|
||||
}
|
||||
100% {
|
||||
height: 5px;
|
||||
@@ -191,7 +192,7 @@ loading-hide{
|
||||
transform: translateY(0px);
|
||||
-webkit-transform: translateY(0px);
|
||||
transform: translateY(0px);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes bars1 {
|
||||
@@ -199,25 +200,25 @@ loading-hide{
|
||||
height: 5px;
|
||||
-webkit-transform: translateY(0px);
|
||||
transform: translateY(0px);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
opacity: 0.25;
|
||||
}
|
||||
25% {
|
||||
height: 30px;
|
||||
-webkit-transform: translateY(15px);
|
||||
transform: translateY(15px);
|
||||
background: #000000;
|
||||
height: 24px;
|
||||
-webkit-transform: translateY(12px);
|
||||
transform: translateY(12px);
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
height: 5px;
|
||||
-webkit-transform: translateY(0px);
|
||||
transform: translateY(0px);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
opacity: 0.25;
|
||||
}
|
||||
100% {
|
||||
height: 5px;
|
||||
-webkit-transform: translateY(0px);
|
||||
transform: translateY(0px);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
opacity: 0.25;
|
||||
}
|
||||
}
|
||||
/** END of bars1 */
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "nz-icon"; /* Project id 2030432 */
|
||||
src: url('iconfont.woff2?t=1654150085783') format('woff2'),
|
||||
url('iconfont.woff?t=1654150085783') format('woff'),
|
||||
url('iconfont.ttf?t=1654150085783') format('truetype');
|
||||
src: url('iconfont.woff2?t=1654482769343') format('woff2'),
|
||||
url('iconfont.woff?t=1654482769343') format('woff'),
|
||||
url('iconfont.ttf?t=1654482769343') format('truetype');
|
||||
}
|
||||
|
||||
.nz-icon {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -98,6 +98,7 @@ import { getGroupHeight, getLayoutPosition, isGroup } from './chart/tools'
|
||||
import panelChart from '@/components/chart/panelChart'
|
||||
import bus from '@/libs/bus'
|
||||
import groupData from '@/components/chart/tempGroup'
|
||||
import { lineChartMove } from '@/components/common/js/common'
|
||||
|
||||
export default {
|
||||
name: 'chartList',
|
||||
@@ -435,6 +436,9 @@ export default {
|
||||
this.$store.commit('setChartListId', `chartList${this.timestamp}`)
|
||||
window.addEventListener('resize', this.resize)
|
||||
}
|
||||
if (!document.onmousemove) { // 添加鼠标移动事件监听
|
||||
document.onmousemove = lineChartMove
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
window.removeEventListener('resize', this.resize)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div id="chart-temp-sync" @click="chartBySync"><i class="nz-icon nz-icon-sync"></i>{{ $t('overall.syncChart') }}</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-has="'panel_view'">
|
||||
<div id="chart-export-html" @click="exportType"><i class="nz-icon nz-icon-download1"></i>{{ $t('overall.snapshoot') }}</div>
|
||||
<div id="chart-export-html" @click="exportType"><i class="nz-icon nz-icon-kuaizhao"></i>{{ $t('overall.snapshoot') }}</div>
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</top-tool-more-options>
|
||||
@@ -80,7 +80,7 @@
|
||||
<div id="chart-temp-sync" @click="chartBySync"><i class="nz-icon nz-icon-sync"></i>{{ $t('overall.syncChart') }}</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-has="'panel_view'">
|
||||
<div id="chart-export-html" @click="exportType"><i class="nz-icon nz-icon-download1"></i>{{ $t('overall.snapshoot') }}</div>
|
||||
<div id="chart-export-html" @click="exportType"><i class="nz-icon nz-icon-kuaizhao"></i>{{ $t('overall.snapshoot') }}</div>
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</top-tool-more-options>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import bus from '@/libs/bus'
|
||||
import moment from 'moment-timezone'
|
||||
import i18n from '@/components/common/i18n'
|
||||
export default {
|
||||
methods: {
|
||||
@@ -79,5 +80,16 @@ export default {
|
||||
return str
|
||||
}
|
||||
},
|
||||
momentTz (timestamp, fmt) { // moment 转化时间戳为str
|
||||
const offset = localStorage.getItem('nz-sys-timezone')
|
||||
const format = fmt || localStorage.getItem('nz-default-dateFormat')
|
||||
return moment.tz(timestamp, offset).format(format)
|
||||
},
|
||||
momentStrToTimestamp (str, fmt) {
|
||||
const offset = localStorage.getItem('nz-sys-timezone')
|
||||
const format = fmt || localStorage.getItem('nz-default-dateFormat')
|
||||
const date = moment.tz(str, format, offset).valueOf()
|
||||
return date
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
:resizable="false"
|
||||
align="center"
|
||||
type="selection"
|
||||
width="36">
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="item.label"
|
||||
@@ -75,14 +75,14 @@
|
||||
:resizable="false"
|
||||
align="center"
|
||||
type="selection"
|
||||
width="36">
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="item.label"
|
||||
v-for="(item,index) in tableTitle"
|
||||
:key="index"
|
||||
>
|
||||
<template slot-scope="scope" v-if="!item.slot">{{scope.row[item.prop]}}</template>
|
||||
<template slot-scope="scope" v-if="!item.slot">{{scope.row[item.prop].name || scope.row[item.prop]}}</template>
|
||||
<slot :name="item.prop" v-else></slot>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -23,17 +23,19 @@
|
||||
<el-form-item :prop="'labels.' + index + '.value'">
|
||||
<template v-slot:label>
|
||||
<div class="form__labels-label">
|
||||
<span>{{item.name}}</span>
|
||||
<span>{{$t('endpoint.labelKey')}}</span>
|
||||
<div>
|
||||
<el-checkbox v-model="item.action" :false-label="0" :label="$t('overall.delete')" :true-label="1" size="small" style="padding-right: 20px;"></el-checkbox>
|
||||
<span @click="removeLabels(index)"><i class="nz-icon nz-icon-minus"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item :prop="'labels.' + index + '.key'" class="param-box-row-key" :rules="[{ pattern: /[a-zA-Z_][a-zA-Z0-9_]*/, message: $t('overall.ASCIIKey') ,trigger: 'blur'}]">
|
||||
<el-form-item :prop="'labels.' + index + '.key'" :rules="[{ required: true,message: $t('validate.required'),trigger: 'blur'},{ pattern: /[a-zA-Z_][a-zA-Z0-9_]*/, message: $t('overall.ASCIIKey') ,trigger: 'blur'}]">
|
||||
<el-input v-model="item.key" placeholder="key" size="mini" ></el-input>
|
||||
</el-form-item>
|
||||
<span class="param-box-row-eq">=</span>
|
||||
<el-form-item :prop="'labels.' + index + '.value'" class="param-box-row-value">
|
||||
<div class="form__labels-label" style="margin-top: 10px" v-if="!item.action">
|
||||
<span>{{$t('endpoint.labelValue')}}</span>
|
||||
</div>
|
||||
<el-form-item :prop="'labels.' + index + '.value'" :rules="[{ required: !item.action,message: $t('validate.required'),trigger: 'blur'}]" v-if="!item.action">
|
||||
<el-input v-model="item.value" placeholder="value" size="mini"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -116,7 +118,11 @@ export default {
|
||||
url: 'monitor/endpoint',
|
||||
editData: {
|
||||
editType: 1,
|
||||
labels: [],
|
||||
labels: [{
|
||||
action: 0,
|
||||
key: '',
|
||||
value: ''
|
||||
}],
|
||||
enable: 1
|
||||
},
|
||||
transfer: {
|
||||
@@ -197,7 +203,11 @@ export default {
|
||||
endpointBatch () {
|
||||
// this.getTableData()
|
||||
this.editData.enable = 1
|
||||
this.editData.labels = []
|
||||
this.editData.labels = [{
|
||||
action: 0,
|
||||
key: '',
|
||||
value: ''
|
||||
}]
|
||||
},
|
||||
esc (refresh) {
|
||||
this.$emit('close', refresh)
|
||||
@@ -219,6 +229,8 @@ export default {
|
||||
if (res.code === 200) {
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })
|
||||
this.esc(true)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
{{findServerType(scope.row[item.prop]).text}}
|
||||
</span>
|
||||
<span v-else-if="item.prop === 'checkTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
||||
<span v-else-if="item.prop === 'ts'">{{scope.row[item.prop]?timeFormate(computeTimezoneTime(scope.row[item.prop])):'-'}}</span>
|
||||
<span v-else-if="item.prop === 'ts'">{{scope.row[item.prop]?momentTz(scope.row[item.prop]):'-'}}</span>
|
||||
<span v-else-if="item.prop === 'status'">
|
||||
<el-popover :content="$t('asset.assetStatPre')+(scope.row.checkTime?utcTimeToTimezoneStr(scope.row.checkTime):$t('asset.assetStatDown'))" placement="right" trigger="hover" width="200">
|
||||
<div slot="reference" style="width: 60px">
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<div id="chart-temp-sync" @click="chartBySync"><i class="nz-icon nz-icon-sync"></i>{{ $t('overall.syncChart') }}</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-has="'panel_view'">
|
||||
<div id="chart-export-html" @click="exportType"><i class="nz-icon nz-icon-download1"></i>{{ $t('overall.snapshoot') }}</div>
|
||||
<div id="chart-export-html" @click="exportType"><i class="nz-icon nz-icon-kuaizhao"></i>{{ $t('overall.snapshoot') }}</div>
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</top-tool-more-options>
|
||||
@@ -160,7 +160,6 @@ import chartTempBox from '@/components/common/rightBox/chartTempBox'
|
||||
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||
import { fromRoute } from '@/components/common/js/constants'
|
||||
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
|
||||
import { lineChartMove } from '@/components/common/js/common'
|
||||
import routerPathParams from '@/components/common/mixin/routerPathParams'
|
||||
import htmlToPdfMixin from '@/components/common/mixin/htmlToPdfMixin'
|
||||
import exportHtmlMixin from '@/components/common/mixin/exportHtml'
|
||||
@@ -996,9 +995,6 @@ export default {
|
||||
this.onScroll()
|
||||
document.querySelector('#tableList').addEventListener('mouseenter', this.tableListEnter)
|
||||
document.querySelector('#tableList').addEventListener('mouseleave', this.tableListLeave)
|
||||
if (!document.onmousemove) { // 添加鼠标移动事件监听
|
||||
document.onmousemove = lineChartMove
|
||||
}
|
||||
if (this.nowTimeType) {
|
||||
this.nowTimeType.start_time = this.searchTime[0]
|
||||
this.nowTimeType.end_time = this.searchTime[1]
|
||||
|
||||
Reference in New Issue
Block a user