pref:endpoint panel 搜索框调整 & alert setting 页面优化
1.endpoint pannel 搜索框调整 2.alerts settings 列表option 中操作位置调整+只显示图标
This commit is contained in:
@@ -301,7 +301,7 @@ li{
|
|||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.nz-tab-style-light {
|
.nz-tab-style-light {
|
||||||
border-bottom: 3px solid $global-text-color-active;
|
border-bottom: 3px solid $global-text-color-active;
|
||||||
color: #333;
|
color: #333;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
@@ -312,7 +312,7 @@ li{
|
|||||||
.nz-tab-style-light-right{
|
.nz-tab-style-light-right{
|
||||||
margin-left:30px;
|
margin-left:30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* begin--nz-tab组件*/
|
/* begin--nz-tab组件*/
|
||||||
.nz-tab {
|
.nz-tab {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -336,7 +336,7 @@ li{
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end--nz-tab组件*/
|
/* end--nz-tab组件*/
|
||||||
|
|
||||||
/* end--通用*/
|
/* end--通用*/
|
||||||
@@ -1084,3 +1084,16 @@ li{
|
|||||||
color: $box-title-color;
|
color: $box-title-color;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
/*列表中状态字段 的小圆点*/
|
||||||
|
.active-icon{
|
||||||
|
margin-top:20px;
|
||||||
|
width:10px;
|
||||||
|
height:10px;
|
||||||
|
border-radius:50%;
|
||||||
|
}
|
||||||
|
.red {
|
||||||
|
background-color:#ff6347;
|
||||||
|
}
|
||||||
|
.green {
|
||||||
|
background-color:lightGreen;
|
||||||
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ const en = {
|
|||||||
title:'New asset',//'新增资产'
|
title:'New asset',//'新增资产'
|
||||||
sn:'SN',//SN
|
sn:'SN',//SN
|
||||||
host:'Host',//'Host'
|
host:'Host',//'Host'
|
||||||
state:'Status',//'状态'
|
state:'State',//'状态'
|
||||||
selectTip:'Please select',//'请选择'
|
selectTip:'Please select',//'请选择'
|
||||||
inStock: 'In stock',//'在库'
|
inStock: 'In stock',//'在库'
|
||||||
notInStock: 'Not in stock',//'出库'
|
notInStock: 'Not in stock',//'出库'
|
||||||
|
|||||||
@@ -67,14 +67,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span @click="del(scope.row)" class="content-right-option" :id="'alert-del-'+scope.row.id"><i
|
<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'alert-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
||||||
class="el-icon-delete"></i> <span>{{$t('overall.delete')}}</span></span>
|
|
||||||
|
<span :title="$t('overall.edit')" @click="toEdit(scope.row)" class="content-right-option" :id="'alert-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span @click="toEdit(scope.row)" class="content-right-option" :id="'alert-edit-'+scope.row.id"><i
|
|
||||||
class="nz-icon nz-icon-edit"></i> <span>{{$t('overall.edit')}}</span></span>
|
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'alert-del-'+scope.row.id"><i class="el-icon-delete"></i></span>
|
||||||
|
|
||||||
<span @click="detail(scope.row)" class="content-right-option" :id="'alert-detail-'+scope.row.id"><i
|
|
||||||
class="nz-icon nz-icon-view"></i> <span>{{$t('overall.view')}}</span></span>
|
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'severity'">
|
<span v-else-if="item.prop == 'severity'">
|
||||||
<span v-if="scope.row[item.prop] == 'high'"><i class="el-icon-arrow-up"></i> {{severityData[1].value}}</span>
|
<span v-if="scope.row[item.prop] == 'high'"><i class="el-icon-arrow-up"></i> {{severityData[1].value}}</span>
|
||||||
|
|||||||
@@ -728,17 +728,5 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.active-icon{
|
|
||||||
margin-top:20px;
|
|
||||||
width:10px;
|
|
||||||
height:10px;
|
|
||||||
border-radius:50%;
|
|
||||||
}
|
|
||||||
.red {
|
|
||||||
background-color:#ff6347;
|
|
||||||
}
|
|
||||||
.green {
|
|
||||||
background-color:lightGreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -62,15 +62,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="content-right-options">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span @click="del(scope.row)" class="content-right-option" :id="'account-del-'+scope.row.id"><i
|
<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'account-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
||||||
class="el-icon-delete"></i> <span>{{$t('overall.delete')}}</span></span>
|
|
||||||
|
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'account-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span @click="edit(scope.row)" class="content-right-option" :id="'account-edit-'+scope.row.id"><i
|
|
||||||
class="nz-icon nz-icon-edit"></i> <span>{{$t('overall.edit')}}</span></span>
|
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'account-del-'+scope.row.id"><i class="el-icon-delete"></i></span>
|
||||||
|
|
||||||
<span @click="detail(scope.row)" class="content-right-option" :id="'account-detail-'+scope.row.id"><i
|
|
||||||
class="nz-icon nz-icon-view"></i> <span>{{$t('overall.view')}}</span></span>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'lang'">
|
<span v-else-if="item.prop == 'lang'">
|
||||||
{{scope.row[item.prop] == 'en' ? 'English' : ''}}
|
{{scope.row[item.prop] == 'en' ? 'English' : ''}}
|
||||||
|
|||||||
@@ -64,18 +64,20 @@
|
|||||||
{{scope.row[item.prop] == '2' ? 'Per-Datacenter' : ''}}
|
{{scope.row[item.prop] == '2' ? 'Per-Datacenter' : ''}}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="item.prop == 'status'">
|
<span v-else-if="item.prop == 'status'">
|
||||||
{{scope.row[item.prop] == '1' ? $t('overall.available') : ''}}
|
<el-popover placement="right" width="50" trigger="hover" :content="(scope.row[item.prop] == '1'?$t('overall.available'):$t('overall.unavailable'))+'['+(scope.row.checkTime&&scope.row.checkTime!=''?(new Date(scope.row.checkTime).getHours()+':'+new Date(scope.row.checkTime).getMinutes()):'null')+']'">
|
||||||
{{scope.row[item.prop] == '0' ? $t('overall.unavailable') : ''}}
|
<div slot="reference" style="width: 20px">
|
||||||
|
<div :class="{'active-icon green':scope.row[item.prop] == '1','active-icon red':scope.row[item.prop] == '0'}"></div>
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
<!-- {{scope.row[item.prop] == '1' ? $t('overall.available') : ''}}-->
|
||||||
|
<!-- {{scope.row[item.prop] == '0' ? $t('overall.unavailable') : ''}}-->
|
||||||
</span>
|
</span>
|
||||||
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span @click="del(scope.row)" class="content-right-option" :id="'prom-del-'+scope.row.id"><i
|
<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'prom-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
||||||
class="el-icon-delete"></i> <span>{{$t('overall.delete')}}</span></span>
|
|
||||||
|
<span :title="$t('overall.edit')" @click="toEdit(scope.row)" class="content-right-option" :id="'prom-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
||||||
<span @click="toEdit(scope.row)" class="content-right-option" :id="'prom-edit-'+scope.row.id"><i
|
|
||||||
class="nz-icon nz-icon-edit"></i> <span>{{$t('overall.edit')}}</span></span>
|
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'prom-del-'+scope.row.id"><i class="el-icon-delete"></i></span>
|
||||||
|
|
||||||
<span @click="detail(scope.row)" class="content-right-option" :id="'prom-detail-'+scope.row.id"><i
|
|
||||||
class="nz-icon nz-icon-view"></i> <span>{{$t('overall.view')}}</span></span>
|
|
||||||
</div>
|
</div>
|
||||||
<span v-else>{{scope.row[item.prop]}}</span>
|
<span v-else>{{scope.row[item.prop]}}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -260,7 +262,7 @@
|
|||||||
}, {
|
}, {
|
||||||
label: this.$t('config.promServer.checkTime'),
|
label: this.$t('config.promServer.checkTime'),
|
||||||
prop: 'checkTime',
|
prop: 'checkTime',
|
||||||
show: true
|
show: false
|
||||||
}, {
|
}, {
|
||||||
label: this.$t('config.account.option'),
|
label: this.$t('config.account.option'),
|
||||||
prop: 'option',
|
prop: 'option',
|
||||||
|
|||||||
@@ -23,6 +23,12 @@
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
|
<div class="top-tool-search relative-position" >
|
||||||
|
<el-input ref="queryPanel" @clear="clearInput" id="queryPanel" @focus="focusInput" @blur="blurInput" v-model="filter.searchName" class="query-input-inactive" size="mini" clearable >
|
||||||
|
<i slot="suffix" class="el-input__icon el-icon-search" @click="(queryFocus ?search():focusInput())"></i>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="panel-calendar margin-r-20">
|
<div class="panel-calendar margin-r-20">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-date-picker prefix-icon=" " class="nz-dashboard-picker" size="mini" ref="calendar"
|
<el-date-picker prefix-icon=" " class="nz-dashboard-picker" size="mini" ref="calendar"
|
||||||
@@ -52,10 +58,10 @@
|
|||||||
</button>
|
</button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 2020-02-14 使用普通搜索框-->
|
||||||
<div class="top-tool-search">
|
<!-- <div class="top-tool-search">-->
|
||||||
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search"></search-input>
|
<!-- <search-input ref="searchInput" :searchMsg="searchMsg" @search="search"></search-input>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<button @click="toAddChart"
|
<button @click="toAddChart"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-82">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-82">
|
||||||
@@ -246,6 +252,7 @@
|
|||||||
//removeModal: false, // 删除弹出
|
//removeModal: false, // 删除弹出
|
||||||
//deleteObj: {}, // 删除对象
|
//deleteObj: {}, // 删除对象
|
||||||
//---图表相关参数--end
|
//---图表相关参数--end
|
||||||
|
queryFocus:false, //搜索框是否获得焦点
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -492,22 +499,26 @@
|
|||||||
this.pageObj.pageSize = val;
|
this.pageObj.pageSize = val;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
search: function (searchObj) {
|
// search: function (searchObj) {
|
||||||
this.searchLabel = {};
|
// this.searchLabel = {};
|
||||||
let containTitle = false;
|
// let containTitle = false;
|
||||||
for (let item in searchObj) {
|
// for (let item in searchObj) {
|
||||||
if (searchObj[item]) {
|
// if (searchObj[item]) {
|
||||||
this.$set(this.searchLabel, item, searchObj[item]);
|
// this.$set(this.searchLabel, item, searchObj[item]);
|
||||||
if (item === 'name') {
|
// if (item === 'name') {
|
||||||
this.filter.searchName = searchObj[item]; //此处就一个条件
|
// this.filter.searchName = searchObj[item]; //此处就一个条件
|
||||||
containTitle = true;
|
// containTitle = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (!containTitle) {
|
// if (!containTitle) {
|
||||||
this.filter.searchName = '';
|
// this.filter.searchName = '';
|
||||||
}
|
// }
|
||||||
this.filter.panelId = this.showPanel.id;
|
// this.filter.panelId = this.showPanel.id;
|
||||||
|
// this.getData(this.filter);
|
||||||
|
// },
|
||||||
|
search:function(){
|
||||||
|
this.filter.panelId=this.showPanel.id;
|
||||||
this.getData(this.filter);
|
this.getData(this.filter);
|
||||||
},
|
},
|
||||||
// 滚动事件触发下拉加载
|
// 滚动事件触发下拉加载
|
||||||
@@ -520,6 +531,26 @@
|
|||||||
this.$refs.chartList.pageDataList(true, this.showPanel.id);
|
this.$refs.chartList.pageDataList(true, this.showPanel.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
focusInput:function(){
|
||||||
|
let classVal=document.getElementById('queryPanel').parentElement.getAttribute("class");
|
||||||
|
classVal=classVal.replace('query-input-inactive','');
|
||||||
|
document.getElementById('queryPanel').parentElement.setAttribute("class",classVal );
|
||||||
|
this.$refs.queryPanel.focus();
|
||||||
|
this.queryFocus=true;
|
||||||
|
},
|
||||||
|
blurInput:function(){
|
||||||
|
if(!this.filter.searchName || this.filter.searchName == ''){
|
||||||
|
setTimeout(function(){
|
||||||
|
let classVal=document.getElementById('queryPanel').parentElement.getAttribute("class");
|
||||||
|
classVal='query-input-inactive '+classVal;
|
||||||
|
document.getElementById('queryPanel').parentElement.setAttribute("class",classVal );
|
||||||
|
this.queryFocus=true;
|
||||||
|
},100)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearInput:function(){
|
||||||
|
this.$refs.queryPanel.focus();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
@@ -744,5 +775,18 @@
|
|||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
/* 列表搜索框 样式重写*/
|
||||||
|
.relative-position{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.query-input-inactive{
|
||||||
|
left:213px;
|
||||||
|
width: 18%;
|
||||||
|
margin-top: 1px;
|
||||||
|
}
|
||||||
|
.query-input-inactive .el-input__inner{
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -158,9 +158,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--时间选择器-->
|
<!--时间选择器-->
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
<div class="top-tool-search" >
|
<div class="top-tool-search relative-position" >
|
||||||
<!-- <metric-search :metrics="metricList" :labels="labelList" v-if="tableShow == 3" @expression-change="tableFilter"></metric-search>-->
|
<!-- <metric-search :metrics="metricList" :labels="labelList" v-if="tableShow == 3" @expression-change="tableFilter"></metric-search>-->
|
||||||
<el-input ref="elementQuery" @clear="clearInput" id="elementQuery" @focus="focusInput" @blur="blurInput" v-model="queryExpression" suffix-icon="el-icon-search" size="mini" clearable :placeholder="$t('project.endpoint.promExpr')" ></el-input>
|
<el-input ref="elementQuery" @clear="clearInput" id="elementQuery" @focus="focusInput" @blur="blurInput" v-model="queryExpression" class="query-input-inactive" size="mini" clearable :placeholder="$t('project.endpoint.promExpr')" >
|
||||||
|
<i slot="suffix" class="el-input__icon el-icon-search" @click="focusInput"></i>
|
||||||
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="margin-r-20 margin-t-m1">
|
<div class="margin-r-20 margin-t-m1">
|
||||||
<button @click="changeTime(-10)" class="nz-btn nz-btn-size-normal nz-btn-style-light"><i class="el-icon-d-arrow-left"></i></button>
|
<button @click="changeTime(-10)" class="nz-btn nz-btn-size-normal nz-btn-style-light"><i class="el-icon-d-arrow-left"></i></button>
|
||||||
@@ -1185,27 +1187,29 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryInputInitStyle:function(){
|
|
||||||
document.getElementById('elementQuery').parentElement.style.width='40px';
|
|
||||||
document.getElementById('elementQuery').parentElement.style.float='right';
|
|
||||||
},
|
|
||||||
focusInput:function(){
|
focusInput:function(){
|
||||||
document.getElementById('elementQuery').parentElement.style='';
|
let classVal=document.getElementById('elementQuery').parentElement.getAttribute("class");
|
||||||
|
classVal=classVal.replace('query-input-inactive','');
|
||||||
|
document.getElementById('elementQuery').parentElement.setAttribute("class",classVal );
|
||||||
|
this.$refs.elementQuery.focus();
|
||||||
},
|
},
|
||||||
blurInput:function(){
|
blurInput:function(){
|
||||||
if(!this.queryExpression || this.queryExpression == ''){
|
if(!this.queryExpression || this.queryExpression == ''){
|
||||||
setTimeout(this.queryInputInitStyle(),100)
|
setTimeout(function(){
|
||||||
|
let classVal=document.getElementById('elementQuery').parentElement.getAttribute("class");
|
||||||
|
classVal='query-input-inactive '+classVal;
|
||||||
|
document.getElementById('elementQuery').parentElement.setAttribute("class",classVal );
|
||||||
|
},100)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearInput:function(){
|
clearInput:function(){
|
||||||
this.blurInput();
|
this.$refs.elementQuery.foucs();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.currentProject = this.$store.state.currentProject;
|
this.currentProject = this.$store.state.currentProject;
|
||||||
this.getModuleList();
|
this.getModuleList();
|
||||||
this.getMetricsTableData();
|
this.getMetricsTableData();
|
||||||
this.getSuggestMetric()
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getPanelData();
|
this.getPanelData();
|
||||||
@@ -1504,4 +1508,19 @@
|
|||||||
line-height: 37px;
|
line-height: 37px;
|
||||||
}
|
}
|
||||||
/* end--覆盖分页组件样式*/
|
/* end--覆盖分页组件样式*/
|
||||||
|
|
||||||
|
/* 列表搜索框 样式重写*/
|
||||||
|
.relative-position{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.query-input-inactive{
|
||||||
|
left:213px;
|
||||||
|
width: 18%;
|
||||||
|
}
|
||||||
|
.query-input-inactive .el-input__inner{
|
||||||
|
height: 26px;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user