Merge branch 'codeCheck' of https://git.mesalab.cn/nezha/nezha-fronted into codeCheck
This commit is contained in:
@@ -19,6 +19,7 @@ const cn = {
|
|||||||
search: "搜索",
|
search: "搜索",
|
||||||
add: "新增",
|
add: "新增",
|
||||||
option: "操作",
|
option: "操作",
|
||||||
|
remark: "描述",
|
||||||
clearAll: "清空",
|
clearAll: "清空",
|
||||||
clear: "清除",
|
clear: "清除",
|
||||||
name: "名称",
|
name: "名称",
|
||||||
@@ -34,7 +35,7 @@ const cn = {
|
|||||||
unavailable: "不可用",
|
unavailable: "不可用",
|
||||||
available: "可用",
|
available: "可用",
|
||||||
createChart: "新增图表",
|
createChart: "新增图表",
|
||||||
createProject: "新增项目",
|
createProject: "新增业务系统",
|
||||||
createAsset: "新增资产",
|
createAsset: "新增资产",
|
||||||
createAlertRule: "新增告警规则",
|
createAlertRule: "新增告警规则",
|
||||||
createAccount: "新增用户名",
|
createAccount: "新增用户名",
|
||||||
@@ -138,6 +139,9 @@ const cn = {
|
|||||||
},
|
},
|
||||||
singleStat:{
|
singleStat:{
|
||||||
label:"SingleStat"
|
label:"SingleStat"
|
||||||
|
},
|
||||||
|
alertList:{
|
||||||
|
label:"告警列表"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
statisticsVal:{
|
statisticsVal:{
|
||||||
@@ -159,6 +163,7 @@ const cn = {
|
|||||||
legendTip: "使用名称或表达式控制时间序列的名称。例如{{hostname}将替换为标签主机名的标签值。",
|
legendTip: "使用名称或表达式控制时间序列的名称。例如{{hostname}将替换为标签主机名的标签值。",
|
||||||
option: "操作",
|
option: "操作",
|
||||||
alertParam:{
|
alertParam:{
|
||||||
|
param:'参数',
|
||||||
select:'选择',
|
select:'选择',
|
||||||
alertRule:'告警规则',
|
alertRule:'告警规则',
|
||||||
level:'级别',
|
level:'级别',
|
||||||
@@ -262,7 +267,7 @@ const cn = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
project: "项目",
|
project: "业务系统",
|
||||||
name: "名称",
|
name: "名称",
|
||||||
module: "组件",
|
module: "组件",
|
||||||
endpoint: "Endpoint"
|
endpoint: "Endpoint"
|
||||||
@@ -803,6 +808,13 @@ const cn = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
|
chart: {
|
||||||
|
basicTitle: "基础信息",
|
||||||
|
alertStat: "告警状态",
|
||||||
|
endpointStat: "Endpoint状态",
|
||||||
|
projectInfo: "业务系统信息",
|
||||||
|
endpointInfo: "Endpoint信息"
|
||||||
|
},
|
||||||
project: {
|
project: {
|
||||||
project: "系统",
|
project: "系统",
|
||||||
projectName: "系统名称",
|
projectName: "系统名称",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="metric-editor" v-clickoutside="clickout" :class="{'metric-editor-rb': styleType == 2}">
|
<div class="metric-editor" v-clickoutside="clickout" :class="{'metric-editor-rb': styleType == 2}">
|
||||||
<div :id="id" class="editor-core" ref="editor" ></div>
|
<div :id="id" class="editor-core" ref="editor" :style="{height: styleType == 2 ? 'auto' : ''}"></div>
|
||||||
<span class="nz-input-append editor-clear" style="display: none" @click="clearContent"><i class="el-icon-circle-close"></i></span>
|
<span class="nz-input-append editor-clear" style="display: none" @click="clearContent"><i class="el-icon-circle-close"></i></span>
|
||||||
<div class="metric-editor-popper" :style="{left:popperPos.left+'px'}">
|
<div class="metric-editor-popper" :style="{left:popperPos.left+'px'}">
|
||||||
<div class="metric-popper-main" v-show="showType&&Object.keys(showSuggestions).length>0">
|
<div class="metric-popper-main" v-show="showType&&Object.keys(showSuggestions).length>0">
|
||||||
@@ -71,6 +71,9 @@
|
|||||||
this.queryMetrics();
|
this.queryMetrics();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
test() {
|
||||||
|
console.info(1)
|
||||||
|
},
|
||||||
userChange:function(char,operation,newContent,oldContent){
|
userChange:function(char,operation,newContent,oldContent){
|
||||||
this.changeSuggestions('type')
|
this.changeSuggestions('type')
|
||||||
this.dealSpecilChar(char,operation);
|
this.dealSpecilChar(char,operation);
|
||||||
@@ -792,7 +795,10 @@
|
|||||||
$temp.getPosition();
|
$temp.getPosition();
|
||||||
$temp.formatContent();
|
$temp.formatContent();
|
||||||
}
|
}
|
||||||
})
|
//监听文本区域的高度
|
||||||
|
let lineHeight = 16;
|
||||||
|
|
||||||
|
});
|
||||||
this.registerKeydown();
|
this.registerKeydown();
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
@@ -904,18 +910,20 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.metric-editor.metric-editor-rb {
|
.metric-editor.metric-editor-rb {
|
||||||
|
min-height: 32px;
|
||||||
|
border-radius: 4px;
|
||||||
|
height: auto;
|
||||||
|
border: 1px solid #DCDFE6;
|
||||||
|
box-sizing: border-box;
|
||||||
.editor-clear {
|
.editor-clear {
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
}
|
}
|
||||||
height: 32px;
|
|
||||||
.ql-container.ql-snow {
|
.ql-container.ql-snow {
|
||||||
border-radius: 4px;
|
border: none;
|
||||||
border: 1px solid #DCDFE6;
|
|
||||||
box-sizing: border-box;
|
|
||||||
.ql-editor {
|
.ql-editor {
|
||||||
padding: 6px 0 !important;
|
padding: 5px 0 !important;
|
||||||
>p {
|
>p {
|
||||||
padding-left: 15px;
|
padding: 0 26px 0 15px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: rgb(96, 98, 102);
|
color: rgb(96, 98, 102);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
|||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.tableLabels = [];
|
this.tableLabels = [];
|
||||||
console.log(111111111111111111111,res)
|
//console.log(111111111111111111111,res)
|
||||||
res.forEach((response, index) => {
|
res.forEach((response, index) => {
|
||||||
if (response.data&&response.status == 'success') {
|
if (response.data&&response.status == 'success') {
|
||||||
let data = response.data.result;
|
let data = response.data.result;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="promqlInput" :style="{height:(errorMsg || appendMsg)?'50px':'36px'}">
|
<div class="promqlInput" :style="{height:(errorMsg || appendMsg)?'50px':'auto'}">
|
||||||
<div class="query-row">
|
<div class="query-row">
|
||||||
<div class="query-input">
|
<div class="query-input">
|
||||||
<!--explore页面的样式-->
|
<!--explore页面的样式-->
|
||||||
<template v-if="styleType == 1">
|
<template v-if="styleType == 1">
|
||||||
<div class="metric-btn" v-if="plugins.indexOf('metric') > -1">
|
<div class="metric-btn" v-if="plugins.indexOf('metric-selector') > -1">
|
||||||
<el-dropdown class="metric-selector" >
|
<el-dropdown class="metric-selector">
|
||||||
<el-dropdown-menu style="display: none"></el-dropdown-menu>
|
<el-dropdown-menu style="display: none"></el-dropdown-menu>
|
||||||
<el-button class="metric-btn nz-btn nz-btn-size-normal nz-btn-style-light" @click="toggleDropdown">Metric <i class="el-icon-arrow-down"></i></el-button>
|
<el-button class="metric-btn nz-btn nz-btn-size-normal nz-btn-style-light" @click="toggleDropdown">Metric <i class="el-icon-arrow-down"></i></el-button>
|
||||||
<el-cascader-panel v-show="dropDownVisible" v-model="cascaderValue" slot="dropdown" ref="metricSelector" :props="{emitPath:false}" :options="metricOptions" @change="metricChange"></el-cascader-panel>
|
<el-cascader-panel v-show="dropDownVisible" v-model="cascaderValue" slot="dropdown" ref="metricSelector" :props="{emitPath:false}" :options="metricOptions" @change="metricChange"></el-cascader-panel>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" @click="dropDownVisible=false">
|
<div class="input-box" @click="dropDownVisible=false" v-if="plugins.indexOf('metric-input') > -1">
|
||||||
<!-- <el-autocomplete :placeholder="$t('dashboard.metricPreview.inputTip')" :fetch-suggestions="filterInput" clearable @clear="clearExpression" :trigger-on-focus="false" v-model="expressionList[index]" @blur="expressionChange" style="width: 100%;height:36px"></el-autocomplete>-->
|
<!-- <el-autocomplete :placeholder="$t('dashboard.metricPreview.inputTip')" :fetch-suggestions="filterInput" clearable @clear="clearExpression" :trigger-on-focus="false" v-model="expressionList[index]" @blur="expressionChange" style="width: 100%;height:36px"></el-autocomplete>-->
|
||||||
<editor :styleType="styleType" :metric-list="metricStore" v-model="expressionList[index]" ref="editor" @on-enter="expressionChange" @on-blur="expressionChange" ></editor>
|
<editor :styleType="styleType" :metric-list="metricStore" v-model="expressionList[index]" ref="editor" @on-enter="expressionChange" @on-blur="expressionChange" ></editor>
|
||||||
<div class="append-msg error" v-if="errorMsg"><span>{{errorMsg}}</span></div>
|
<div class="append-msg error" v-if="errorMsg"><span>{{errorMsg}}</span></div>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<label style="line-height: 30px;" v-else>{{$t("alert.config.expr")}}</label>
|
<label style="line-height: 30px;" v-else>{{$t("alert.config.expr")}}</label>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col style="width: calc(100% - 120px);">
|
<el-col style="width: calc(100% - 120px); height: 100%;">
|
||||||
<div class="input-box" @click="dropDownVisible=false" v-if="plugins.indexOf('metric-input') > -1">
|
<div class="input-box" @click="dropDownVisible=false" v-if="plugins.indexOf('metric-input') > -1">
|
||||||
<editor :styleType="styleType" :metric-list="metricStore" v-model="expressionList[index]" ref="editor" @on-enter="expressionChange" @on-blur="expressionChange" ></editor>
|
<editor :styleType="styleType" :metric-list="metricStore" v-model="expressionList[index]" ref="editor" @on-enter="expressionChange" @on-blur="expressionChange" ></editor>
|
||||||
<div class="append-msg error" v-if="errorMsg"><span>{{errorMsg}}</span></div>
|
<div class="append-msg error" v-if="errorMsg"><span>{{errorMsg}}</span></div>
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
height: 36px;
|
height: 36px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
.promqlInput .query-row{
|
.promqlInput .query-row{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -223,6 +223,7 @@
|
|||||||
}
|
}
|
||||||
.query-input .input-box{
|
.query-input .input-box{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
.metric-btn{
|
.metric-btn{
|
||||||
height: 36px !important;
|
height: 36px !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user