@@ -987,7 +858,7 @@
import chartDataFormat from '../../../charts/chartDataFormat';
import promqlInput from "../../../page/dashboard/explore/promqlInput";
import {getUUID,resetZIndex} from "../../../common/js/common";
-
+ import nezhaColor from '../../nezhaColor'
var rz={
methods:{
rz(e){
@@ -1214,12 +1085,13 @@
'#1250B0','#1F60C4','#5794F2',
'#E55400','#FA6400','#FF9830',
'#7C2EA3','#8F3BB8','#B877D9',
- ]
+ ]
}
},
mixins:[rz],
components:{
- promqlInput
+ promqlInput,
+ nezhaColor
},
computed:{},
props:{
@@ -1263,10 +1135,10 @@
}
Object.keys(this.topologyData.data).forEach((key)=>{
if(key === 'projectInfo' || key === 'alertInfo' || key==='fontSize' || key === 'align' || key === 'fontColor' || key === 'opacity'){
- this.topologyData.data[key]=(JSON.stringify(dataOption.data[key])?dataOption.data[key]:this.topologyData.data[key]);
- } else {
- this.topologyData.data[key]=(JSON.stringify(dataOption[key])?dataOption[key]:this.topologyData.data[key]);
- }
+ this.topologyData.data[key]=(JSON.stringify(dataOption.data[key])?dataOption.data[key]:this.topologyData.data[key]);
+ } else {
+ this.topologyData.data[key]=(JSON.stringify(dataOption[key])?dataOption[key]:this.topologyData.data[key]);
+ }
});
},
mounted(){
@@ -1401,7 +1273,6 @@
// console.log(val);
this.selection.pen.data.gradientType=val;
this.$forceUpdate()
- console.log(this.selection.pen.gradientType,this.selection.pen.data.gradientType);
if(val===0){
this.selection.pen.bkType=0;
}
@@ -1472,9 +1343,8 @@
this.selection.pen.data[name]=this.colorRGBtoHex(val);
this.onChange();
},
- colorChangeTable(item,val){//改变颜色
- if(!item.showType){return};
- item.color[item.showType]=this.colorRGBtoHex(val);
+ colorChangeTable(item,val,key){//改变颜色
+ item.color[key]=this.colorRGBtoHex(val);
},
changeShowPicker(item,type){
this.$refs['colorPickerBac' + item.level][0].showPicker=true;
@@ -1799,7 +1669,6 @@
/deep/ .el-form-item {
margin-bottom: 10px;
}
-
.half-form-item {
width: calc(50% - 20px);
display: inline-block;
@@ -2050,6 +1919,10 @@
margin-left: 5px;
}
}
+ .gradient-to-color{
+ display: inline-block;
+ width: calc(100% - 70px);
+ }
}
.icon-item {
@@ -2125,7 +1998,7 @@
border-top: 2px solid transparent;
}
/*.color-tab div:first-child{*/
- /*border-right-color: #DCDFE6;*/
+ /*border-right-color: #DCDFE6;*/
/*}*/
.color-tab div:hover{
color: #409EFF;
diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue
index a25fe59e5..6ab4cc020 100644
--- a/nezha-fronted/src/components/common/project/topologyL5.vue
+++ b/nezha-fronted/src/components/common/project/topologyL5.vue
@@ -1825,7 +1825,6 @@
getTopology(this.topologyIndex).render();
},
notModuleIDArrChange(id){
- console.log(id);
this.notModuleIDArr=this.notModuleIDArr.filter(item=>item.id!==id);
},
//保存
diff --git a/nezha-fronted/src/components/common/project/topologyPrev.vue b/nezha-fronted/src/components/common/project/topologyPrev.vue
index 6dd342f23..d446f0871 100644
--- a/nezha-fronted/src/components/common/project/topologyPrev.vue
+++ b/nezha-fronted/src/components/common/project/topologyPrev.vue
@@ -1824,7 +1824,6 @@
getTopology(this.topologyIndex).render();
},
notModuleIDArrChange(id){
- console.log(id);
this.notModuleIDArr=this.notModuleIDArr.filter(item=>item.id!==id);
},
//保存
diff --git a/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue b/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue
index 4c442e802..91cd1ea3c 100644
--- a/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue
@@ -159,7 +159,6 @@
if(obj.linkId==-1){
obj.linkId=null;
}
- console.log(obj);
this.editAlertSilence=Object.assign(this.editAlertSilence,obj);
this.startAtTamp=new Date(this.editAlertSilence.startAt).getTime();
this.endAtTamp=new Date(this.editAlertSilence.endAt).getTime();
@@ -227,7 +226,6 @@
endAtTamp:'',
optionsEndAt:{
disabledDate(date,val){
- console.log( that.startAtTamp,val);
return date.getTime() <= that.startAtTamp - 24*60*60*1000;
},
},
@@ -256,7 +254,6 @@
;
this.prevent_opt.save=true;
this.editAlertSilence.matcher=this.editAlertSilence.ruleId || this.editAlertSilence.linkId ;
- console.log(this.editAlertSilence);
this.$refs.alertSilenceForm.validate((valid)=>{
if(this.endAtTamp < this.startAtTamp){
this.$message({
@@ -328,7 +325,6 @@
})
},
dateChange(val,type){
- console.log(val)
if(type==='startAt'){
this.editAlertSilence.startAt=bus.timeFormate(new Date(val), 'yyyy-MM-dd hh:mm:ss');
this.startAtTamp=new Date(val).getTime();
@@ -357,12 +353,10 @@
},
matcherChange(val){
this.editAlertSilence.matcher=this.editAlertSilence.ruleId || this.editAlertSilence.linkId;
- console.log(this.editAlertSilence,"this.editAlertSilence")
},
silenceChange(val){
this.editAlertSilence.linkId=val.id;
this.editAlertSilence.matcher=this.editAlertSilence.ruleId || this.editAlertSilence.linkId;
- console.log(val);
if(this.editAlertSilence.type==='datacenter'){
this.editAlertSilence.name=val.name;
}
diff --git a/nezha-fronted/src/components/common/rightBox/menuBox.vue b/nezha-fronted/src/components/common/rightBox/menuBox.vue
index 6cb65c1e8..3d0ea7834 100644
--- a/nezha-fronted/src/components/common/rightBox/menuBox.vue
+++ b/nezha-fronted/src/components/common/rightBox/menuBox.vue
@@ -220,7 +220,6 @@
},
inputValid:function(val){
return val.replace(/[,]/g,'')
- console.log(val)
},
},
mounted() {
diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue
index 3ab895f2a..26ec837e4 100644
--- a/nezha-fronted/src/components/page/alert/config.vue
+++ b/nezha-fronted/src/components/page/alert/config.vue
@@ -384,7 +384,6 @@
});
this.tableData = response.data.list;
this.pageObj.total = response.data.total;
- console.info(this.$refs.alertRuleTable)
if (!this.scrollbarWrap) {
this.$nextTick(() => {
this.scrollbarWrap = this.$refs.alertRuleTable.bodyWrapper;
diff --git a/nezha-fronted/src/components/page/alert/list.vue b/nezha-fronted/src/components/page/alert/list.vue
index 44bf076b7..edfc13d58 100644
--- a/nezha-fronted/src/components/page/alert/list.vue
+++ b/nezha-fronted/src/components/page/alert/list.vue
@@ -523,7 +523,6 @@
return num>9?num:'0'+num;
},
exportExcel:function(params){
- console.log('exporter')
for (let item in params) {
if (params[item]) {
if (item == "alertMessageState") {
diff --git a/nezha-fronted/src/components/page/alert/silence.vue b/nezha-fronted/src/components/page/alert/silence.vue
index 72521eb9d..02e5844af 100644
--- a/nezha-fronted/src/components/page/alert/silence.vue
+++ b/nezha-fronted/src/components/page/alert/silence.vue
@@ -327,7 +327,6 @@
this.tools.customTableTitle=localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path)
?JSON.parse(localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path))
:this.tableTitle;
- console.log(this.tools.customTableTitle,this.tableTitle);
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
this.initEvent();
this.getAlertSilence();
@@ -410,7 +409,6 @@
},
openDelMessageBox:function(){
if(this.batchDeleteObjs.length<1) return;
- console.log(this.batchDeleteObjs);
},
showExportDialog(){
this.importBox.show=true;
@@ -439,7 +437,6 @@
this.rightBox.show=true;
},
edit(row){
- console.log(123123123123);
this.$get('alert/silence/'+row.id).then(res=>{
this.alertSilence={...res.data};
this.rightBox.show=true;
diff --git a/nezha-fronted/src/components/page/config/exprTemp.vue b/nezha-fronted/src/components/page/config/exprTemp.vue
index 4c854aba9..073047163 100644
--- a/nezha-fronted/src/components/page/config/exprTemp.vue
+++ b/nezha-fronted/src/components/page/config/exprTemp.vue
@@ -284,7 +284,6 @@
this.tools.customTableTitle=localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path)
?JSON.parse(localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path))
:this.tableTitle;
- console.log(this.tools.customTableTitle,this.tableTitle);
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
this.initEvent();
this.getexprTemp();
@@ -366,7 +365,6 @@
},
openDelMessageBox:function(){
if(this.batchDeleteObjs.length<1) return;
- console.log(this.batchDeleteObjs);
},
showExportDialog(){
this.importBox.show=true;
@@ -396,7 +394,6 @@
this.rightBox.show=true;
},
edit(row){
- console.log(123123123123);
this.$get('expression/tmpl/'+row.id).then(res=>{
this.exprTemp={...res.data};
this.rightBox.show=true;
diff --git a/nezha-fronted/src/components/page/config/promServer.vue b/nezha-fronted/src/components/page/config/promServer.vue
index 7c6c2e03f..b54dc026c 100644
--- a/nezha-fronted/src/components/page/config/promServer.vue
+++ b/nezha-fronted/src/components/page/config/promServer.vue
@@ -347,7 +347,6 @@
return JSON.parse(JSON.stringify(this.blankPromServer));
},
pageNo(val) {
- console.log('page',val)
this.pageObj.pageNo = val;
this.getTableData();
},
diff --git a/nezha-fronted/src/components/page/config/terminallog.vue b/nezha-fronted/src/components/page/config/terminallog.vue
index fef448ccf..5ee48b258 100644
--- a/nezha-fronted/src/components/page/config/terminallog.vue
+++ b/nezha-fronted/src/components/page/config/terminallog.vue
@@ -310,7 +310,6 @@
this.bottomBox.targetTab = 'monitor';
this.bottomBox.terminalLog = JSON.parse(JSON.stringify(record));
this.bottomBox.showSubList = true;
- console.log(record);
},
shutdown(record) {
this.$confirm(this.$t("tip.killTerm"),{
diff --git a/nezha-fronted/src/components/page/dashboard/chartBox.vue b/nezha-fronted/src/components/page/dashboard/chartBox.vue
index ddd7b1209..465526d74 100644
--- a/nezha-fronted/src/components/page/dashboard/chartBox.vue
+++ b/nezha-fronted/src/components/page/dashboard/chartBox.vue
@@ -116,31 +116,9 @@
position: relative;
}
.color-show{
- border: 1px solid #E7EAED;
- border-radius: 4px;
- top: -2px;
- align-items: center;
- width: 28px;
- height: 28px;
- box-sizing: border-box;
display: inline-block;
- vertical-align: middle;
position: relative;
- }
- .color-show-left{
- width: 28px;
- height: 28px;
- border-radius: 4px;
- box-sizing: border-box;
- text-align: center;
- line-height: 28px;
- }
- .color-arrows{
- color: #fff;
- font-weight: bold;
- }
- .color-arrows .nz-icon{
- font-size: 12px;
+ top: 1px;
}
@@ -370,33 +348,8 @@
-
-
- colorChange(mapping,showPicker[index].bac,val)"
- popper-class="no-style-class"
- v-model="showPicker[index].bac?mapping.color.bac:mapping.color.text"
- >
-
-
-
-
-
-
-
-
-
-
Text
-
Background
+
+ {colorChange(mapping,key,val)}" :single="false" :color-val="mapping.color"/>
@@ -416,34 +369,10 @@
-
-
- colorChange(mapping,showPicker[index].bac,val)"
- v-model="showPicker[index].bac?mapping.color.bac:mapping.color.text"
- >
-
-
-
-
-
-
-
-
-
-
Text
-
Background
+
+ {colorChange(mapping,key,val)}" :single="false" :color-val="mapping.color"/>
+
@@ -511,6 +440,7 @@
import {nzNumber} from "../../common/js/validate";
import richTextEditor from "../../charts/richTextEditor";
import selectPanel from "../../common/popBox/selectPanel";
+ import nezhaColor from '../../common/nezhaColor'
import i18n from "../../common/i18n";
var rz = {
@@ -656,6 +586,7 @@
'promql-input': promqlInput,
'rich-text-editor':richTextEditor,
selectPanel,
+ nezhaColor,
},
mounted() {
this.$nextTick(() => {
@@ -1607,12 +1538,8 @@
this.showPicker[index][atr]=true;
// atr=atr.toLowerCase().replace(/( |^)[a-z]/g,(L)=>L.toUpperCase());
},
- colorChange(mapping,flag,val){
- if(flag){
- mapping.color['bac']=this.colorRGBtoHex(val)
- }else{
- mapping.color['text']=this.colorRGBtoHex(val)
- }
+ colorChange(mapping,key,val){
+ mapping.color[key]=val
},
colorRGBtoHex(color) {
let rgb = color.split(',');
diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
index d2cf9f767..f18db40be 100644
--- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
+++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue
@@ -96,6 +96,7 @@
:width="'auto'"
:custom-class="'nz-temp-box'"
:destroy-on-close="true"
+ @closed="tempBoxClose"
center>
Expression
@@ -189,7 +190,6 @@
created(){
this.queryMetrics();
this.getAllOptins();
- console.log(123123123);
},
methods:{
closeDropdown(){
@@ -234,7 +234,6 @@
}
//this.metricStore.push({label:item,value:item,insertText:item})
});
- console.log(metricMap);
for(let key of metricMap.keys()){
let option={
label:key,
@@ -259,7 +258,6 @@
cb(result)
},
metricChange:function(value){
- console.log(value);
if(!value) return;
this.expressionList[this.index]=value;
//this.$refs.editor.setContent(value)
@@ -294,7 +292,6 @@
})
},
lazyLoad(node,data){
- console.log(node,data);
if(data.temp){
if(!data.child){
this.tempBoxShowLoading=true;
@@ -314,11 +311,9 @@
this.dropDownVisible=false
this.$get('/expression/tmpl/'+data.id).then(res=>{
if(res.code===200){
- console.log(res);
res.data.vars.forEach(item=>{
res.data[item]='';
});
- console.log(res.data);
this.tempBox={
...this.tempBox,
...res.data,
@@ -333,7 +328,6 @@
},
tempBoxShowChange(flag){
this.tempBoxShow=flag;
- console.log(this.tempBox);
if(flag){
this.cascaderValue="";
let params={};
@@ -359,7 +353,6 @@
}
this.$post('/expression/tmpl/render',params).then(res=>{
- console.log(res);
if(res.code===200){
this.tempBoxShow=false;
this.expressionList[this.index]=res.data.expression;
@@ -419,7 +412,10 @@
});
- }
+ },
+ tempBoxClose(){
+ this.cascaderValue="";
+ },
diff --git a/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue b/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue
index c1b8afcab..d3220898a 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/chartConfig.vue
@@ -515,7 +515,6 @@
let times=[];
let tzo=(new Date().getTimezoneOffset()/60)*(-1);//系统时区
let time=bus.UTCTimeToConfigTimezone(new Date().getTime()-tzo*60*60*1000);
- console.log(time);
for(let i=0;i<10;i++){
time=time-5*60*1000;
times.push(bus.timeFormate(time,'hh:mm'))
diff --git a/nezha-fronted/src/store/index.js b/nezha-fronted/src/store/index.js
index 392b40c6f..ab6cd5c75 100644
--- a/nezha-fronted/src/store/index.js
+++ b/nezha-fronted/src/store/index.js
@@ -121,7 +121,6 @@ const store = new Vuex.Store({
state.overViewProject=data;
},
setDcDataRefresh(state){
- console.log(123)
state.dcDataRefresh=true;
setTimeout(()=>{
state.dcDataRefresh=false;
diff --git a/nezha-fronted/static/config.json b/nezha-fronted/static/config.json
index c7b0c16ac..66c3c57ef 100644
--- a/nezha-fronted/static/config.json
+++ b/nezha-fronted/static/config.json
@@ -1 +1 @@
-{"baseUrl":"/", "version": "1.2.2020.11.10.14.10"}
+{"baseUrl":"http://192.168.40.42:8080/nz-admin/", "version": "1.2.2020.11.10.14.10"}