Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev-lushangqing
Showing
12 changed files
with
265 additions
and
101 deletions
@@ -30,6 +30,24 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | @@ -30,6 +30,24 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | ||
30 | ,range: true | 30 | ,range: true |
31 | }); | 31 | }); |
32 | var resType = localStorage.getItem("currentResType"); | 32 | var resType = localStorage.getItem("currentResType"); |
33 | + | ||
34 | + // 获取合并通知开关是否开启 | ||
35 | + getNoticeMergeFlag(); | ||
36 | + function getNoticeMergeFlag(){ | ||
37 | + admin.req({ | ||
38 | + url: common.domainName + '/api-web/manage/ddic/findSucDdics/noticeMergeFlag' | ||
39 | + , method: 'POST' | ||
40 | + , async: false | ||
41 | + , success: function (res) { | ||
42 | + $.each(res.data, function (i, v) { | ||
43 | + if(v.ddicCode == 'on'){ | ||
44 | + $('#noticeMergeTab').show(); | ||
45 | + } | ||
46 | + }); | ||
47 | + } | ||
48 | + }) | ||
49 | + } | ||
50 | + | ||
33 | //编辑 | 51 | //编辑 |
34 | if(data && data.id){ | 52 | if(data && data.id){ |
35 | admin.req({ | 53 | admin.req({ |
@@ -48,6 +66,14 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | @@ -48,6 +66,14 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | ||
48 | $("#alarmPolicyType").val(res.object.policyType); | 66 | $("#alarmPolicyType").val(res.object.policyType); |
49 | } | 67 | } |
50 | }); | 68 | }); |
69 | + // 获取通知合并策略的表达式 | ||
70 | + admin.req({ | ||
71 | + url:domainName + '/api-web/policyMerge/get?noticeMergePolicyId='+data.id | ||
72 | + ,done:function (res){ | ||
73 | + $("#noticeMergeFlagExpr").val(res.data[0].noticeMergeExpr); | ||
74 | + } | ||
75 | + }); | ||
76 | + | ||
51 | }else{ | 77 | }else{ |
52 | $("#seriousTimes").val('00:00:00 - 23:59:59'); | 78 | $("#seriousTimes").val('00:00:00 - 23:59:59'); |
53 | $("#importantTimes").val('00:00:00 - 23:59:59'); | 79 | $("#importantTimes").val('00:00:00 - 23:59:59'); |
@@ -179,7 +205,85 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | @@ -179,7 +205,85 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | ||
179 | data.seriousTimes = $("#seriousTimes").val(); | 205 | data.seriousTimes = $("#seriousTimes").val(); |
180 | data.importantTimes = $("#importantTimes").val(); | 206 | data.importantTimes = $("#importantTimes").val(); |
181 | data.commonlyTimes = $("#commonlyTimes").val(); | 207 | data.commonlyTimes = $("#commonlyTimes").val(); |
208 | + var that = this; | ||
182 | 209 | ||
210 | + if(!data.kpiId){ | ||
211 | + layer.msg("请先选择指标!", { | ||
212 | + icon: 7 | ||
213 | + , time: 3000 | ||
214 | + }); | ||
215 | + return false; | ||
216 | + } | ||
217 | + | ||
218 | + if(!data.kpiId || data.kpiId == ''){ | ||
219 | + layer.msg("请先选择指标!", { | ||
220 | + icon: 7 | ||
221 | + , time: 3000 | ||
222 | + }); | ||
223 | + return false; | ||
224 | + } | ||
225 | + | ||
226 | + if(!data.alarmContentExpr || data.alarmContentExpr == ''){ | ||
227 | + layer.msg("请先填写告警内容描述表达式!", { | ||
228 | + icon: 7 | ||
229 | + , time: 3000 | ||
230 | + }); | ||
231 | + return false; | ||
232 | + } | ||
233 | + | ||
234 | + if(!data.alarmContentExpr || data.alarmContentExpr == ''){ | ||
235 | + layer.msg("请先填写告警内容描述表达式!", { | ||
236 | + icon: 7 | ||
237 | + , time: 3000 | ||
238 | + }); | ||
239 | + return false; | ||
240 | + } | ||
241 | + | ||
242 | + var importantPolicy = data.seriousPolicy; | ||
243 | + var importantExpr = data.importantPolicy; | ||
244 | + var commonlyPolicy = data.commonlyPolicy; | ||
245 | + if((!importantPolicy || importantPolicy == '') && (!importantExpr || importantExpr == '') && (!commonlyPolicy || commonlyPolicy == '')){ | ||
246 | + layer.msg("严重、重要和一般告警的表达式必须有一项不为空!", { | ||
247 | + icon: 7 | ||
248 | + , time: 3000 | ||
249 | + }); | ||
250 | + return false; | ||
251 | + } | ||
252 | + | ||
253 | + if(!data.noticeMergeFlagExpr || data.noticeMergeFlagExpr == ''){ | ||
254 | + layer.msg("请先填写通知合并策略描述表达式!", { | ||
255 | + icon: 7 | ||
256 | + , time: 3000 | ||
257 | + }); | ||
258 | + return false; | ||
259 | + } | ||
260 | + | ||
261 | + | ||
262 | + /** | ||
263 | + * 保存通知合并策略 | ||
264 | + */ | ||
265 | + var noticeMergeFlagExpr = $("#noticeMergeFlagExpr").val() | ||
266 | + function saveNoticeMerge(id){ | ||
267 | + var noticeMergeData = { | ||
268 | + "mergePolicyId": id, | ||
269 | + "mergePolicyName": data.alarmPolicyName, | ||
270 | + "mergePolicyDesc": data.alarmPolicyName, | ||
271 | + "noticeMergeExpr": noticeMergeFlagExpr, | ||
272 | + "policyType": data.policyType, | ||
273 | + "kpiId": data.kpiId | ||
274 | + } | ||
275 | + admin.req({ | ||
276 | + url : domainName + '/api-web/policyMerge/save?access_token='+accessToken | ||
277 | + ,data:JSON.stringify(noticeMergeData) | ||
278 | + ,type:'post' | ||
279 | + ,contentType: "application/json; charset=utf-8" | ||
280 | + ,done:function (res){ | ||
281 | + if(!res.success){ | ||
282 | + layer.msg(res.msg ? res.msg : '通知合并策略保存失败', { offset: '15px' , icon: 7 , time: 1000 }); | ||
283 | + } | ||
284 | + } | ||
285 | + }); | ||
286 | + } | ||
183 | charToExpr(data, 'alarmContentExpr'); | 287 | charToExpr(data, 'alarmContentExpr'); |
184 | charToExpr(data, 'cleanPolicy'); | 288 | charToExpr(data, 'cleanPolicy'); |
185 | charToExpr(data, 'commonlyExpr'); | 289 | charToExpr(data, 'commonlyExpr'); |
@@ -187,6 +291,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | @@ -187,6 +291,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | ||
187 | charToExpr(data, 'seriousExpr'); | 291 | charToExpr(data, 'seriousExpr'); |
188 | 292 | ||
189 | form.on('submit(add-alarmpolicy-form)',function () { | 293 | form.on('submit(add-alarmpolicy-form)',function () { |
294 | + delete data.noticeMergeFlagExpr; | ||
190 | admin.req({ | 295 | admin.req({ |
191 | url : domainName + '/api-web/alarmPolicy/save?access_token='+accessToken | 296 | url : domainName + '/api-web/alarmPolicy/save?access_token='+accessToken |
192 | ,data:JSON.stringify(data) | 297 | ,data:JSON.stringify(data) |
@@ -194,6 +299,9 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | @@ -194,6 +299,9 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | ||
194 | ,contentType: "application/json; charset=utf-8" | 299 | ,contentType: "application/json; charset=utf-8" |
195 | ,done:function (res){ | 300 | ,done:function (res){ |
196 | if(res.success){ | 301 | if(res.success){ |
302 | + // 保存通知合并策略 | ||
303 | + saveNoticeMerge(res.str); | ||
304 | + | ||
197 | localStorage.setItem("detailPageOfcustomPolicyId",res.str) | 305 | localStorage.setItem("detailPageOfcustomPolicyId",res.str) |
198 | layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 },function (){ | 306 | layer.msg(res.msg, { offset: '15px' , icon: 1 , time: 1000 },function (){ |
199 | localStorage.removeItem("currentResType"); | 307 | localStorage.removeItem("currentResType"); |
@@ -263,4 +371,4 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | @@ -263,4 +371,4 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun | ||
263 | $('#add-alarmpolicy-form').find('[name="policyType"]').attr("disabled","disabled"); | 371 | $('#add-alarmpolicy-form').find('[name="policyType"]').attr("disabled","disabled"); |
264 | } | 372 | } |
265 | }); | 373 | }); |
266 | -}); | ||
374 | +}); |
@@ -660,6 +660,7 @@ layui.define(['xmSelect', 'md5'], function (exports) { | @@ -660,6 +660,7 @@ layui.define(['xmSelect', 'md5'], function (exports) { | ||
660 | layer.open(Object.assign({ | 660 | layer.open(Object.assign({ |
661 | title: [name, 'font-size:18px;'], | 661 | title: [name, 'font-size:18px;'], |
662 | type: 1, | 662 | type: 1, |
663 | + id:(new Date()).getTime(), | ||
663 | area: area, | 664 | area: area, |
664 | resize: false, | 665 | resize: false, |
665 | shadeClose: true,//开启遮罩层 | 666 | shadeClose: true,//开启遮罩层 |
@@ -338,14 +338,38 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' | @@ -338,14 +338,38 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' | ||
338 | setDefault('select-content-ul',warnVal,'#warn-text-view'); | 338 | setDefault('select-content-ul',warnVal,'#warn-text-view'); |
339 | setDefault('select-content-ul-bus',busVal,'#bus-text-view'); | 339 | setDefault('select-content-ul-bus',busVal,'#bus-text-view'); |
340 | 340 | ||
341 | + var resourceHealthTips ; | ||
342 | + $("#resource-health-tips").hover(function() { | ||
343 | + openMsg(); | ||
344 | + }, function() { | ||
345 | + layer.close(resourceHealthTips); | ||
346 | + }); | ||
347 | + function openMsg() { | ||
348 | + resourceHealthTips = layer.tips("<span style='color:#585858;'>" + | ||
349 | + "按照积分制方式计算健康状态,即图标颜色:<br>" + | ||
350 | + " • 告警:1个严重告警计10分;1个重要告警计5分;1个一般告警计1分<br>" + | ||
351 | + " • 所有计分累加<br>" + | ||
352 | + " 起始分为0分,最后得分为计分和;<br>" + | ||
353 | + "<br>" + | ||
354 | + "得分与健康状态关系:<br>" + | ||
355 | + " • 0:状态正常,无告警,颜色为<a style='color: #00a522'>绿色</a><br>" + | ||
356 | + " • 大于0且小于等于10:普通问题,最多1个严重告警,颜色为<a style='color: #a4910a'>深黄</a><br>" + | ||
357 | + " • 大于10且小于等于30:一般问题,最多3个严重告警,颜色为<a style='color: #e2c705'>黄色</a><br>" + | ||
358 | + " • 大于30且小于等于50:严重问题,最多5个严重告警,颜色为<a style='color: #ffaf00'>橙色</a><br>" + | ||
359 | + " • 大于50且小于等于100:比较严重,最多10个严重告警,颜色为<a style='color: #f65f0b'>深橙</a><br>" + | ||
360 | + " • 大于100:非常严重,10个严重告警以上,颜色为<a style='color: #d81e06'>红色<br>" + | ||
361 | + "</span>", | ||
362 | + '#resource-health-tips',{tips:[2,'#F0F0F0'], time:0,area: ['auto', 'auto']}); | ||
363 | + } | ||
364 | + | ||
341 | // Start 告警级别默认为严重告警,点击左下角选择告警级别,页面的小红点切换不同告警的数量,item根据告警数量进行排序 LSQ 2021/12/29 19:37 | 365 | // Start 告警级别默认为严重告警,点击左下角选择告警级别,页面的小红点切换不同告警的数量,item根据告警数量进行排序 LSQ 2021/12/29 19:37 |
342 | - $(".select-total").hide(); | 366 | + $(".select-serious").hide(); |
343 | $(".select-important").hide(); | 367 | $(".select-important").hide(); |
344 | $(".select-normal").hide(); | 368 | $(".select-normal").hide(); |
345 | var itemArr=$(".index-banner-item"); | 369 | var itemArr=$(".index-banner-item"); |
346 | itemArr.map((index,item)=>{ | 370 | itemArr.map((index,item)=>{ |
347 | - if($(item).data('serious')=='0'){ | ||
348 | - $(item).find('.select-serious').hide(); | 371 | + if($(item).data('total')=='0'){ |
372 | + $(item).find('.select-total').hide(); | ||
349 | } | 373 | } |
350 | $(item).css('order',$(item).data('serious')) | 374 | $(item).css('order',$(item).data('serious')) |
351 | }) | 375 | }) |
@@ -62,13 +62,13 @@ | @@ -62,13 +62,13 @@ | ||
62 | </fieldset> | 62 | </fieldset> |
63 | <div class="layui-tab layui-tab-card"> | 63 | <div class="layui-tab layui-tab-card"> |
64 | <ul class="layui-tab-title"> | 64 | <ul class="layui-tab-title"> |
65 | - <li class="layui-this">告警内容</li> | 65 | + <li class="layui-this"><span style="color:red">*</span>告警内容</li> |
66 | <li>严重</li> | 66 | <li>严重</li> |
67 | <li>重要</li> | 67 | <li>重要</li> |
68 | - <li>一般</li> | 68 | + <li>一般告警</li> |
69 | <li>过滤</li> | 69 | <li>过滤</li> |
70 | <li>消除</li> | 70 | <li>消除</li> |
71 | -<!-- <li>告警内容表达式</li>--> | 71 | + <li id="noticeMergeTab" style="display: none"><span style="color:red">*</span>通知合并策略</li> |
72 | </ul> | 72 | </ul> |
73 | <div class="layui-tab-content"> | 73 | <div class="layui-tab-content"> |
74 | <div class="layui-tab-item layui-show content-tab-item"> | 74 | <div class="layui-tab-item layui-show content-tab-item"> |
@@ -355,50 +355,19 @@ | @@ -355,50 +355,19 @@ | ||
355 | </div> | 355 | </div> |
356 | </div> | 356 | </div> |
357 | </div> | 357 | </div> |
358 | -<!-- <div class="layui-tab-item">--> | ||
359 | -<!-- <div class="content-box-group">--> | ||
360 | -<!-- <div class="box-group-left">告警内容表达式</div>--> | ||
361 | -<!-- <div class="box-group-right">--> | ||
362 | -<!-- <div class="layui-form-item">--> | ||
363 | -<!-- <div class="layui-input-block">--> | ||
364 | -<!-- <input type="radio" name="alarmcotent-policy-type" data-flag="alarmcotent" value="1" title="基础" checked lay-filter="alarm-policy-rule-type">--> | ||
365 | -<!-- <input type="radio" name="alarmcotent-policy-type" data-flag="alarmcotent" value="2" title="正则" lay-filter="alarm-policy-rule-type">--> | ||
366 | -<!-- <input type="radio" name="alarmcotent-policy-type" data-flag="alarmcotent" value="3" title="自定义"lay-filter="alarm-policy-rule-type">--> | ||
367 | -<!-- </div>--> | ||
368 | -<!-- </div>--> | ||
369 | -<!-- <div class="layui-form-item cont-base" id="alarmcotent-policy-box">--> | ||
370 | -<!-- <div class="layui-input-inline smallwith">--> | ||
371 | -<!-- <select class="alarmcotent_condition">--> | ||
372 | -<!-- <option value="0">大于</option>--> | ||
373 | -<!-- <option value="1">小于</option>--> | ||
374 | -<!-- <option value="2">等于</option>--> | ||
375 | -<!-- <option value="3">大于等于</option>--> | ||
376 | -<!-- <option value="4">小于等于</option>--> | ||
377 | -<!-- <option value="5">字符串等于</option>--> | ||
378 | -<!-- <option value="6">字符串包含</option>--> | ||
379 | -<!-- <option value="7">字符串前匹配</option>--> | ||
380 | -<!-- <option value="8">字符串后匹配</option>--> | ||
381 | -<!-- </select>--> | ||
382 | -<!-- </div>--> | ||
383 | -<!-- <div class="layui-input-inline smallwith">--> | ||
384 | -<!-- <input type="tel" autocomplete="off" class="layui-input" flag="alarmcotent_value">--> | ||
385 | -<!-- </div>--> | ||
386 | -<!-- <div class="layui-form-mid layui-word-aux"><i data-id="alarmcotent-policy-box" class="layui-icon oper-icon policy-input-add"></i></div>--> | ||
387 | -<!-- <div class="layui-form-mid layui-word-aux"><i data-id="alarmcotent-policy-box" class="layui-icon oper-icon policy-input-del hide"></i></div>--> | ||
388 | -<!-- </div>--> | ||
389 | -<!-- <div class="layui-form-item cont-base">--> | ||
390 | -<!-- <div class="layui-input-block">--> | ||
391 | -<!-- <a class="layui-btn layui-btn-sm layui-btn-normal createpolicybtn" data-flag="alarmcotent">生成策略</a>--> | ||
392 | -<!-- </div>--> | ||
393 | -<!-- </div>--> | ||
394 | -<!-- <div class="layui-form-item cont-other">--> | ||
395 | -<!-- <div class="layui-input-block">--> | ||
396 | -<!-- <textarea placeholder="请输入内容" class="layui-textarea" name="alarmContentExpr" id="alarmcotentPolicy"></textarea>--> | ||
397 | -<!-- </div>--> | ||
398 | -<!-- </div>--> | ||
399 | -<!-- </div>--> | ||
400 | -<!-- </div>--> | ||
401 | -<!-- </div>--> | 358 | + <div class="layui-tab-item content-tab-item"> |
359 | + <!-- 通知合并策略 --> | ||
360 | + <div class="content-box-group"> | ||
361 | + <div class="box-group-left" style="text-align: center">通知合并策略<br/>描述表达式</div> | ||
362 | + <div class="box-group-right"> | ||
363 | + <div class="layui-form-item"> | ||
364 | + <div class="layui-input-block"> | ||
365 | + <textarea placeholder="请输入内容" class="layui-textarea" id="noticeMergeFlagExpr" name="noticeMergeFlagExpr"></textarea> | ||
366 | + </div> | ||
367 | + </div> | ||
368 | + </div> | ||
369 | + </div> | ||
370 | + </div> | ||
402 | </div> | 371 | </div> |
403 | </div> | 372 | </div> |
404 | 373 | ||
@@ -408,4 +377,4 @@ | @@ -408,4 +377,4 @@ | ||
408 | layui.use('alarmpolicyAdd', function (fn) { | 377 | layui.use('alarmpolicyAdd', function (fn) { |
409 | fn({{d}}); | 378 | fn({{d}}); |
410 | }); | 379 | }); |
411 | -</script> | ||
380 | +</script> |
1 | <article> | 1 | <article> |
2 | - <style> | ||
3 | - label.task-choose-resname { | ||
4 | - color: #fff; | ||
5 | - background-color: #1e9fff; | ||
6 | - min-height: 27px; | ||
7 | - font-size: 12px; | ||
8 | - display: inline-block; | ||
9 | - margin-top: 5px; | ||
10 | - line-height: 27px; | ||
11 | - padding-left: 8px; | ||
12 | - min-width: 223px; | ||
13 | - margin-left: 15px; | ||
14 | - } | ||
15 | - </style> | ||
16 | <div class="layui-card"> | 2 | <div class="layui-card"> |
17 | <form class="layui-form layui-form-pane" lay-filter="form-task-bindchecktemp" | 3 | <form class="layui-form layui-form-pane" lay-filter="form-task-bindchecktemp" |
18 | onsubmit="return false;"> | 4 | onsubmit="return false;"> |
@@ -47,7 +33,7 @@ | @@ -47,7 +33,7 @@ | ||
47 | <button class="layui-btn layui-btn-primary hide" id="btn-task-bindchecktemp-unselectres"><i | 33 | <button class="layui-btn layui-btn-primary hide" id="btn-task-bindchecktemp-unselectres"><i |
48 | class="layui-icon"></i>取消选择 | 34 | class="layui-icon"></i>取消选择 |
49 | </button> | 35 | </button> |
50 | - <div id="txt-task-bindchecktemp-res"></div> | 36 | + <div id="txt-task-bindchecktemp-res" style="position: absolute;margin-top: -27px;margin-left: 120px"></div> |
51 | </div> | 37 | </div> |
52 | </div> | 38 | </div> |
53 | </div> | 39 | </div> |
@@ -83,4 +69,4 @@ | @@ -83,4 +69,4 @@ | ||
83 | layui.use('taskbindchecktemp', function (fn) { | 69 | layui.use('taskbindchecktemp', function (fn) { |
84 | fn({{ d }}); | 70 | fn({{ d }}); |
85 | }); | 71 | }); |
86 | -</script> | ||
72 | +</script> |
@@ -34,6 +34,7 @@ | @@ -34,6 +34,7 @@ | ||
34 | <option value="1">中</option> | 34 | <option value="1">中</option> |
35 | <option value="2">良</option> | 35 | <option value="2">良</option> |
36 | <option value="3">优</option> | 36 | <option value="3">优</option> |
37 | + <option value="none">未监控</option> | ||
37 | </select> | 38 | </select> |
38 | </div> | 39 | </div> |
39 | </div> | 40 | </div> |
@@ -54,6 +55,7 @@ | @@ -54,6 +55,7 @@ | ||
54 | <option value="">=连接状态=</option> | 55 | <option value="">=连接状态=</option> |
55 | <option value="normal">成功</option> | 56 | <option value="normal">成功</option> |
56 | <option value="unnormal">失败</option> | 57 | <option value="unnormal">失败</option> |
58 | + <option value="9">未监控</option> | ||
57 | </select> | 59 | </select> |
58 | </div> | 60 | </div> |
59 | </div> | 61 | </div> |
@@ -126,6 +128,7 @@ | @@ -126,6 +128,7 @@ | ||
126 | <option value="1">中</option> | 128 | <option value="1">中</option> |
127 | <option value="2">良</option> | 129 | <option value="2">良</option> |
128 | <option value="3">优</option> | 130 | <option value="3">优</option> |
131 | + <option value="none">未监控</option> | ||
129 | </select> | 132 | </select> |
130 | </div> | 133 | </div> |
131 | </div> | 134 | </div> |
@@ -226,6 +229,17 @@ | @@ -226,6 +229,17 @@ | ||
226 | 229 | ||
227 | <span><i class="layui-badge-dot layui-bg-red"></i>中</span> | 230 | <span><i class="layui-badge-dot layui-bg-red"></i>中</span> |
228 | </li> | 231 | </li> |
232 | + <li> | ||
233 | + {{# if(item.healthNone != null){ | ||
234 | + if(item.healthNone == '0'){ | ||
235 | + }} | ||
236 | + <div><span class="layui-badge layui-bg-gray">{{ item.healthNone }}</span></div> | ||
237 | + {{# } else { }} | ||
238 | + <div><span class="layui-badge" style="background: gray">{{ item.healthNone }}</span></div> | ||
239 | + {{# } } }} | ||
240 | + | ||
241 | + <span><i class="layui-badge-dot" style="background: gray"></i>未监控</span> | ||
242 | + </li> | ||
229 | </ul> | 243 | </ul> |
230 | </div> | 244 | </div> |
231 | </div> | 245 | </div> |
@@ -268,16 +282,18 @@ | @@ -268,16 +282,18 @@ | ||
268 | <div class="num"> | 282 | <div class="num"> |
269 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="biz_resStatus" id="normal_biz">0</span>/ | 283 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="biz_resStatus" id="normal_biz">0</span>/ |
270 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="biz_resStatus" id="worse_biz">0</span>/ | 284 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="biz_resStatus" id="worse_biz">0</span>/ |
271 | - <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="biz_resStatus" id="worst_biz">0</span> | 285 | + <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="biz_resStatus" id="worst_biz">0</span>/ |
286 | + <span class="gray" lay-tips="健康状态: 未监控" data-value="none" data-target="biz_resStatus" id="healthNone_biz">0</span> | ||
272 | </div> | 287 | </div> |
273 | </div> | 288 | </div> |
274 | <div class="info-box-count"> | 289 | <div class="info-box-count"> |
275 | <i></i> | 290 | <i></i> |
276 | <label>资源状态</label> | 291 | <label>资源状态</label> |
277 | <div class="num"> | 292 | <div class="num"> |
278 | - <span class="blue" lay-tips="资源状态:未监控" data-value="new" data-target="biz_state" id="newstate_biz">0</span>/ | ||
279 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="biz_state" id="monitorstate_biz">0</span>/ | 293 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="biz_state" id="monitorstate_biz">0</span>/ |
280 | - <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="biz_state" id="stopstate_biz">0</span> | 294 | + <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="biz_state" id="stopstate_biz">0</span>/ |
295 | + <span class="gray" lay-tips="资源状态:未监控" data-value="new" data-target="biz_state" id="newstate_biz">0</span> | ||
296 | + | ||
281 | </div> | 297 | </div> |
282 | </div> | 298 | </div> |
283 | <div class="info-box-count"> | 299 | <div class="info-box-count"> |
@@ -285,7 +301,8 @@ | @@ -285,7 +301,8 @@ | ||
285 | <label>连接状态</label> | 301 | <label>连接状态</label> |
286 | <div class="num"> | 302 | <div class="num"> |
287 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="bizlink_state" id="linksuccess_biz">0</span>/ | 303 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="bizlink_state" id="linksuccess_biz">0</span>/ |
288 | - <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="bizlink_state" id="linkfail_biz">0</span> | 304 | + <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="bizlink_state" id="linkfail_biz">0</span>/ |
305 | + <span class="gray" lay-tips="连接状态:未监控" data-value="9" data-target="bizlink_state" id="linkNone_biz">0</span> | ||
289 | </div> | 306 | </div> |
290 | </div> | 307 | </div> |
291 | <!-- <div class="info-box-count"> | 308 | <!-- <div class="info-box-count"> |
@@ -316,6 +333,7 @@ | @@ -316,6 +333,7 @@ | ||
316 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="biz_treetable_resStatus" id="tree_normal_biz">0</span>/ | 333 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="biz_treetable_resStatus" id="tree_normal_biz">0</span>/ |
317 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="biz_treetable_resStatus" id="tree_worse_biz">0</span>/ | 334 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="biz_treetable_resStatus" id="tree_worse_biz">0</span>/ |
318 | <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="biz_treetable_resStatus" id="tree_worst_biz">0</span> | 335 | <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="biz_treetable_resStatus" id="tree_worst_biz">0</span> |
336 | + <span class="red" lay-tips="健康状态: 未监控" data-value="none" data-target="biz_treetable_resStatus" id="tree_healthNone_biz">0</span> | ||
319 | </div> | 337 | </div> |
320 | </div> | 338 | </div> |
321 | <div class="info-box-count"> | 339 | <div class="info-box-count"> |
@@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
28 | <option value="1">中</option> | 28 | <option value="1">中</option> |
29 | <option value="2">良</option> | 29 | <option value="2">良</option> |
30 | <option value="3">优</option> | 30 | <option value="3">优</option> |
31 | + <option value="none">未监控</option> | ||
31 | </select> | 32 | </select> |
32 | </div> | 33 | </div> |
33 | </div> | 34 | </div> |
@@ -37,6 +38,7 @@ | @@ -37,6 +38,7 @@ | ||
37 | <option value="">=连接状态=</option> | 38 | <option value="">=连接状态=</option> |
38 | <option value="normal">成功</option> | 39 | <option value="normal">成功</option> |
39 | <option value="unnormal">失败</option> | 40 | <option value="unnormal">失败</option> |
41 | + <option value="9">未监控</option> | ||
40 | </select> | 42 | </select> |
41 | </div> | 43 | </div> |
42 | </div> | 44 | </div> |
@@ -216,16 +218,17 @@ | @@ -216,16 +218,17 @@ | ||
216 | <div class="num"> | 218 | <div class="num"> |
217 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="biz_reslist_resStatus" data-field="normal">0</span>/ | 219 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="biz_reslist_resStatus" data-field="normal">0</span>/ |
218 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="biz_reslist_resStatus" data-field="worse">0</span>/ | 220 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="biz_reslist_resStatus" data-field="worse">0</span>/ |
219 | - <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="biz_reslist_resStatus" data-field="worst">0</span> | 221 | + <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="biz_reslist_resStatus" data-field="worst">0</span>/ |
222 | + <span class="gray" lay-tips="连接状态:未监控" data-value="none" data-target="biz_reslist_resStatus" data-field="healthNone">0</span> | ||
220 | </div> | 223 | </div> |
221 | </div> | 224 | </div> |
222 | <div class="info-box-count"> | 225 | <div class="info-box-count"> |
223 | <i></i> | 226 | <i></i> |
224 | <label>资源状态</label> | 227 | <label>资源状态</label> |
225 | <div class="num"> | 228 | <div class="num"> |
226 | - <span class="blue" lay-tips="资源状态:未监控" data-value="new" data-target="biz_reslist_state" data-field="newstate">0</span>/ | ||
227 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="biz_reslist_state" data-field="monitorstate">0</span>/ | 229 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="biz_reslist_state" data-field="monitorstate">0</span>/ |
228 | - <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="biz_reslist_state" data-field="stopstate">0</span> | 230 | + <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="biz_reslist_state" data-field="stopstate">0</span>/ |
231 | + <span class="gray" lay-tips="资源状态:未监控" data-value="new" data-target="biz_reslist_state" data-field="newstate">0</span> | ||
229 | </div> | 232 | </div> |
230 | </div> | 233 | </div> |
231 | <div class="info-box-count div-link-state" style="display: none"> | 234 | <div class="info-box-count div-link-state" style="display: none"> |
@@ -233,7 +236,8 @@ | @@ -233,7 +236,8 @@ | ||
233 | <label>连接状态</label> | 236 | <label>连接状态</label> |
234 | <div class="num"> | 237 | <div class="num"> |
235 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="biz_reslist_link_state" data-field="linksuccess">0</span>/ | 238 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="biz_reslist_link_state" data-field="linksuccess">0</span>/ |
236 | - <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="biz_reslist_link_state" data-field="linkfail">0</span> | 239 | + <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="biz_reslist_link_state" data-field="linkfail">0</span>/ |
240 | + <span class="gray" lay-tips="连接状态:未监控" data-value="9" data-target="biz_reslist_link_state" data-field="linkNone">0</span> | ||
237 | </div> | 241 | </div> |
238 | </div> | 242 | </div> |
239 | <!-- <div class="info-box-count"> | 243 | <!-- <div class="info-box-count"> |
@@ -52,6 +52,7 @@ | @@ -52,6 +52,7 @@ | ||
52 | <option value="1">中</option> | 52 | <option value="1">中</option> |
53 | <option value="2">良</option> | 53 | <option value="2">良</option> |
54 | <option value="3">优</option> | 54 | <option value="3">优</option> |
55 | + <option value="none">未监控</option> | ||
55 | </select> | 56 | </select> |
56 | </div> | 57 | </div> |
57 | </div> | 58 | </div> |
@@ -72,6 +73,7 @@ | @@ -72,6 +73,7 @@ | ||
72 | <option value="">=连接状态=</option> | 73 | <option value="">=连接状态=</option> |
73 | <option value="normal">成功</option> | 74 | <option value="normal">成功</option> |
74 | <option value="unnormal">失败</option> | 75 | <option value="unnormal">失败</option> |
76 | + <option value="9">未监控</option> | ||
75 | </select> | 77 | </select> |
76 | </div> | 78 | </div> |
77 | </div> | 79 | </div> |
@@ -230,6 +232,17 @@ | @@ -230,6 +232,17 @@ | ||
230 | 232 | ||
231 | <span><i class="layui-badge-dot layui-bg-red"></i>中</span> | 233 | <span><i class="layui-badge-dot layui-bg-red"></i>中</span> |
232 | </li> | 234 | </li> |
235 | + <li> | ||
236 | + {{# if(item.healthNone != null){ | ||
237 | + if(item.healthNone == '0'){ | ||
238 | + }} | ||
239 | + <div><span class="layui-badge layui-bg-gray">{{ item.healthNone }}</span></div> | ||
240 | + {{# } else { }} | ||
241 | + <div><span class="layui-badge" style="background: gray">{{ item.healthNone }}</span></div> | ||
242 | + {{# } } }} | ||
243 | + | ||
244 | + <span><i class="layui-badge-dot" style="background: gray"></i>未监控</span> | ||
245 | + </li> | ||
233 | </ul> | 246 | </ul> |
234 | </div> | 247 | </div> |
235 | </div> | 248 | </div> |
@@ -431,16 +444,18 @@ | @@ -431,16 +444,18 @@ | ||
431 | <div class="num"> | 444 | <div class="num"> |
432 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="domain_resStatus" id="normal_domain"></span>/ | 445 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="domain_resStatus" id="normal_domain"></span>/ |
433 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="domain_resStatus" id="worse_domain"></span>/ | 446 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="domain_resStatus" id="worse_domain"></span>/ |
434 | - <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="domain_resStatus" id="worst_domain"></span> | 447 | + <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="domain_resStatus" id="worst_domain"></span>/ |
448 | + <span class="gray" lay-tips="健康状态: 未监控" data-value="none" data-target="domain_resStatus" id="healthNone_domain">0</span> | ||
435 | </div> | 449 | </div> |
436 | </div> | 450 | </div> |
437 | <div class="info-box-count"> | 451 | <div class="info-box-count"> |
438 | <i></i> | 452 | <i></i> |
439 | <label>资源状态</label> | 453 | <label>资源状态</label> |
440 | <div class="num"> | 454 | <div class="num"> |
441 | - <span class="blue" lay-tips="资源状态:未监控" data-value="new" data-target="domain_state" id="newstate_domain"></span>/ | ||
442 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="domain_state" id="monitorstate_domain"></span>/ | 455 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="domain_state" id="monitorstate_domain"></span>/ |
443 | - <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="domain_state" id="stopstate_domain"></span> | 456 | + <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="domain_state" id="stopstate_domain"></span>/ |
457 | + <span class="gray" lay-tips="资源状态:未监控" data-value="new" data-target="domain_state" id="newstate_domain"></span> | ||
458 | + | ||
444 | </div> | 459 | </div> |
445 | </div> | 460 | </div> |
446 | <div class="info-box-count"> | 461 | <div class="info-box-count"> |
@@ -448,7 +463,8 @@ | @@ -448,7 +463,8 @@ | ||
448 | <label>连接状态</label> | 463 | <label>连接状态</label> |
449 | <div class="num"> | 464 | <div class="num"> |
450 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="domainlink_state" id="linksuccess_domain"></span>/ | 465 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="domainlink_state" id="linksuccess_domain"></span>/ |
451 | - <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="domainlink_state" id="linkfail_domain"></span> | 466 | + <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="domainlink_state" id="linkfail_domain"></span>/ |
467 | + <span class="gray" lay-tips="连接状态:未监控" data-value="9" data-target="domainlink_state" id="linkNone_domain">0</span> | ||
452 | </div> | 468 | </div> |
453 | </div> | 469 | </div> |
454 | <!-- <div class="info-box-count"> | 470 | <!-- <div class="info-box-count"> |
@@ -293,7 +293,7 @@ | @@ -293,7 +293,7 @@ | ||
293 | 293 | ||
294 | <div class="index-banner-title"> | 294 | <div class="index-banner-title"> |
295 | <i class="{{bizClas}}"></i> | 295 | <i class="{{bizClas}}"></i> |
296 | - <span>{{item.title}}<a class="layui-icon bizcard-view-topo {{isBiz ? '' : 'hide'}}" data-busid="{{item.busId}}" style="color: #FEB61E; margin-left: 10px" lay-tips="查看业务拓扑"><i class="iconfont"></i></a></span> | 296 | + <span><a id="resource-health-tips" style="color: #01AAED;">{{item.title}}</a><a class="layui-icon bizcard-view-topo {{isBiz ? '' : 'hide'}}" data-busid="{{item.busId}}" style="color: #FEB61E; margin-left: 10px" lay-tips="查看业务拓扑"><i class="iconfont"></i></a></span> |
297 | <div class="index-banner-title-desc"><span>{{item.countTxt}}</span></div> | 297 | <div class="index-banner-title-desc"><span>{{item.countTxt}}</span></div> |
298 | </div> | 298 | </div> |
299 | <div class="index-banner-group-list"> | 299 | <div class="index-banner-group-list"> |
@@ -78,6 +78,7 @@ | @@ -78,6 +78,7 @@ | ||
78 | <option value="1">中</option> | 78 | <option value="1">中</option> |
79 | <option value="2">良</option> | 79 | <option value="2">良</option> |
80 | <option value="3">优</option> | 80 | <option value="3">优</option> |
81 | + <option value="none">未监控</option> | ||
81 | </select> | 82 | </select> |
82 | </div> | 83 | </div> |
83 | </div> | 84 | </div> |
@@ -98,6 +99,7 @@ | @@ -98,6 +99,7 @@ | ||
98 | <option value="">=连接状态=</option> | 99 | <option value="">=连接状态=</option> |
99 | <option value="normal">成功</option> | 100 | <option value="normal">成功</option> |
100 | <option value="unnormal">失败</option> | 101 | <option value="unnormal">失败</option> |
102 | + <option value="9">未监控</option> | ||
101 | </select> | 103 | </select> |
102 | </div> | 104 | </div> |
103 | </div> | 105 | </div> |
@@ -336,6 +338,17 @@ | @@ -336,6 +338,17 @@ | ||
336 | 338 | ||
337 | <span><i class="layui-badge-dot layui-bg-red"></i>中</span> | 339 | <span><i class="layui-badge-dot layui-bg-red"></i>中</span> |
338 | </li> | 340 | </li> |
341 | + <li> | ||
342 | + {{# if(item.healthNone != null){ | ||
343 | + if(item.healthNone == '0'){ | ||
344 | + }} | ||
345 | + <div><span class="layui-badge layui-bg-gray">{{ item.healthNone }}</span></div> | ||
346 | + {{# } else { }} | ||
347 | + <div><span class="layui-badge" style="background: gray">{{ item.healthNone }}</span></div> | ||
348 | + {{# } } }} | ||
349 | + | ||
350 | + <span><i class="layui-badge-dot" style="background: gray"></i>未监控</span> | ||
351 | + </li> | ||
339 | </ul> | 352 | </ul> |
340 | </div> | 353 | </div> |
341 | </div> | 354 | </div> |
@@ -365,16 +378,18 @@ | @@ -365,16 +378,18 @@ | ||
365 | <div class="num"> | 378 | <div class="num"> |
366 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="resStatus " id="normal_res">0</span>/ | 379 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="resStatus " id="normal_res">0</span>/ |
367 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="resStatus" id="worse_res">0</span>/ | 380 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="resStatus" id="worse_res">0</span>/ |
368 | - <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="resStatus" id="worst_res">0</span> | 381 | + <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="resStatus" id="worst_res">0</span>/ |
382 | + <span class="gray" lay-tips="健康状态: 未监控" data-value="none" data-target="resStatus" id="healthNone_res">0</span> | ||
369 | </div> | 383 | </div> |
370 | </div> | 384 | </div> |
371 | <div class="info-box-count"> | 385 | <div class="info-box-count"> |
372 | <i></i> | 386 | <i></i> |
373 | <label>资源状态</label> | 387 | <label>资源状态</label> |
374 | <div class="num"> | 388 | <div class="num"> |
375 | - <span class="blue" lay-tips="资源状态:未监控" data-value="new" data-target="state" id="newstate_res">0</span>/ | 389 | + |
376 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="state" id="monitorstate_res">0</span>/ | 390 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="state" id="monitorstate_res">0</span>/ |
377 | - <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="state" id="stopstate_res">0</span> | 391 | + <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="state" id="stopstate_res">0</span>/ |
392 | + <span class="gray" lay-tips="资源状态:未监控" data-value="new" data-target="state" id="newstate_res">0</span> | ||
378 | </div> | 393 | </div> |
379 | </div> | 394 | </div> |
380 | <div class="info-box-count"> | 395 | <div class="info-box-count"> |
@@ -382,7 +397,8 @@ | @@ -382,7 +397,8 @@ | ||
382 | <label>连接状态</label> | 397 | <label>连接状态</label> |
383 | <div class="num"> | 398 | <div class="num"> |
384 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="link_state" id="linksuccess_res">0</span>/ | 399 | <span class="green" lay-tips="连接状态:成功" data-value="normal" data-target="link_state" id="linksuccess_res">0</span>/ |
385 | - <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="link_state" id="linkfail_res">0</span> | 400 | + <span class="red" lay-tips="连接状态:失败" data-value="unnormal" data-target="link_state" id="linkfail_res">0</span>/ |
401 | + <span class="gray" lay-tips="连接状态:未监控" data-value="9" data-target="bizlink_state" id="linkNone_res">0</span> | ||
386 | </div> | 402 | </div> |
387 | </div> | 403 | </div> |
388 | <!-- <div class="info-box-count"> | 404 | <!-- <div class="info-box-count"> |
@@ -412,16 +428,17 @@ | @@ -412,16 +428,17 @@ | ||
412 | <div class="num"> | 428 | <div class="num"> |
413 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="treetable_resStatus" id="tree_normal_res">0</span>/ | 429 | <span class="green" lay-tips="健康状态:优" data-value="3" data-target="treetable_resStatus" id="tree_normal_res">0</span>/ |
414 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="treetable_resStatus" id="tree_worse_res">0</span>/ | 430 | <span class="orange" lay-tips="健康状态: 良" data-value="2" data-target="treetable_resStatus" id="tree_worse_res">0</span>/ |
415 | - <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="treetable_resStatus" id="tree_worst_res">0</span> | 431 | + <span class="red" lay-tips="健康状态: 中" data-value="1" data-target="treetable_resStatus" id="tree_worst_res">0</span>/ |
432 | + <span class="gray" lay-tips="健康状态: 未监控" data-value="1" data-target="treetable_resStatus" id="tree_healthNone_res">0</span> | ||
416 | </div> | 433 | </div> |
417 | </div> | 434 | </div> |
418 | <div class="info-box-count"> | 435 | <div class="info-box-count"> |
419 | <i></i> | 436 | <i></i> |
420 | <label>资源状态</label> | 437 | <label>资源状态</label> |
421 | <div class="num"> | 438 | <div class="num"> |
422 | - <span class="blue" lay-tips="资源状态:未监控" data-value="new" data-target="treetable_res_state" id="tree_newstate_res">0</span>/ | ||
423 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="treetable_res_state" id="tree_monitorstate_res">0</span>/ | 439 | <span class="green" lay-tips="资源状态:监控中" data-value="monitor" data-target="treetable_res_state" id="tree_monitorstate_res">0</span>/ |
424 | - <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="treetable_res_state" id="tree_stopstate_res">0</span> | 440 | + <span class="red" lay-tips="资源状态:暂停监控" data-value="stop" data-target="treetable_res_state" id="tree_stopstate_res">0</span>/ |
441 | + <span class="gray" lay-tips="资源状态:未监控" data-value="new" data-target="treetable_res_state" id="tree_newstate_res">0</span> | ||
425 | </div> | 442 | </div> |
426 | </div> | 443 | </div> |
427 | <!--<div class="info-box-count"> | 444 | <!--<div class="info-box-count"> |
@@ -45,20 +45,35 @@ export default { | @@ -45,20 +45,35 @@ export default { | ||
45 | getUrl(); | 45 | getUrl(); |
46 | //start lsq 监听跨域iframe子页面向父页面发送数据(子页面点击名称进入详情页) 2022-03-15 | 46 | //start lsq 监听跨域iframe子页面向父页面发送数据(子页面点击名称进入详情页) 2022-03-15 |
47 | window.addEventListener('message',function(e){ | 47 | window.addEventListener('message',function(e){ |
48 | - if(e.data.type=='detail'){ | 48 | + let data = e.data; |
49 | + if(data.type=='detail'){ | ||
49 | proxy.$global.openDetail(e.data.data.resId, e.data.data.resType, proxy); | 50 | proxy.$global.openDetail(e.data.data.resId, e.data.data.resType, proxy); |
50 | - }else if(e.data.type=='topology'){ | 51 | + }else if(data.type=='topology'){ |
52 | + let resId = data.data.resId; | ||
53 | + if(!resId){ | ||
54 | + // 针对业务的跳转 | ||
55 | + let busId = e.data.data.busId; | ||
56 | + if(busId){ | ||
57 | + let url = `${sessionStorage.getItem("graphEditorOrigin")}/jgraph/grapheditor/viewer.html?access_token=${localStorage.getItem('access_token')}&id=${busId}&layout=organic` | ||
58 | + proxy.$global.layui.layer.open({ | ||
59 | + type: 2, | ||
60 | + id : 'topology_' + (new Date()).getTime(), | ||
61 | + content: url, | ||
62 | + area: ['90%', '90%'], | ||
63 | + title: '' | ||
64 | + }); | ||
65 | + } | ||
66 | + return; | ||
67 | + } | ||
51 | //子页面点击拓扑图标进入拓扑页面 | 68 | //子页面点击拓扑图标进入拓扑页面 |
52 | proxy.$global.viewResTopo(e.data.data.resId); | 69 | proxy.$global.viewResTopo(e.data.data.resId); |
53 | } else if(e.data.type == 'openJimu' || e.data.type == 'openAJ') { | 70 | } else if(e.data.type == 'openJimu' || e.data.type == 'openAJ') { |
54 | // 打开报表页面 | 71 | // 打开报表页面 |
55 | - let data = e.data.data; | ||
56 | let resId = data.resId; | 72 | let resId = data.resId; |
57 | let kpiId = data.kpiId; | 73 | let kpiId = data.kpiId; |
58 | let flag = data.flag; | 74 | let flag = data.flag; |
59 | let reportCode = data.reportCode; | 75 | let reportCode = data.reportCode; |
60 | - let title = data.title; | ||
61 | - | 76 | + let title = data.data.title; |
62 | let url ; | 77 | let url ; |
63 | let params = `resId=${resId}&kpiId=${kpiId}&flag=${flag}&access_token=${localStorage.getItem('access_token')}` | 78 | let params = `resId=${resId}&kpiId=${kpiId}&flag=${flag}&access_token=${localStorage.getItem('access_token')}` |
64 | if(e.data.type == 'openJimu'){ | 79 | if(e.data.type == 'openJimu'){ |
@@ -753,15 +753,18 @@ | @@ -753,15 +753,18 @@ | ||
753 | if(d.hostState == 'active' || d.hostState == 'connected' || d.hostState == '正常' ){ | 753 | if(d.hostState == 'active' || d.hostState == 'connected' || d.hostState == '正常' ){ |
754 | linkStateHtml = '<button type="button" class="layui-btn layui-btn-radius layui-bg-green layui-btn-xs p-0-15 cant-click">成功</button>'; | 754 | linkStateHtml = '<button type="button" class="layui-btn layui-btn-radius layui-bg-green layui-btn-xs p-0-15 cant-click">成功</button>'; |
755 | linkStateTips += `<li class='li-link-state-tips-red'>自动发现: 连接成功</li>`; | 755 | linkStateTips += `<li class='li-link-state-tips-red'>自动发现: 连接成功</li>`; |
756 | - }else{ | 756 | + }else if(d.hostState == '' && d.linkState == '未监控'){ |
757 | + linkStateHtml = '<button type="button" class="layui-btn layui-btn-radius layui-bg-gray layui-btn-xs p-0-15 cant-click">未监控</button>'; | ||
758 | + linkStateTips += `<li class='li-link-state-tips-red'>未监控</li>`; | ||
759 | + }else { | ||
757 | linkStateHtml = `<button type="button" | 760 | linkStateHtml = `<button type="button" |
758 | - id="${d.resId}_bizdanger" | ||
759 | - data-message="${d.message}" | ||
760 | - data-state="${d.state}" | ||
761 | - data-id="${d.resId}_bizdanger" | ||
762 | - class="layui-btn layui-btn-danger layui-bg-red layui-btn-radius layui-btn-xs p-0-15 cant-click"> | 761 | + id="${d.resId}_bizdanger" |
762 | + data-message="${d.message}" | ||
763 | + data-state="${d.state}" | ||
764 | + data-id="${d.resId}_bizdanger" | ||
765 | + class="layui-btn layui-btn-danger layui-bg-red layui-btn-radius layui-btn-xs p-0-15 cant-click"> | ||
763 | 失败 | 766 | 失败 |
764 | - </button>`; | 767 | + </button>`; |
765 | if(d.hostState!=''){ | 768 | if(d.hostState!=''){ |
766 | linkStateTips += `<li class='li-link-state-tips-red'>自动发现: 连接失败</li>`; | 769 | linkStateTips += `<li class='li-link-state-tips-red'>自动发现: 连接失败</li>`; |
767 | }else{ | 770 | }else{ |
@@ -875,6 +878,9 @@ | @@ -875,6 +878,9 @@ | ||
875 | {{# if(d.health === '3'){ }} | 878 | {{# if(d.health === '3'){ }} |
876 | <button type="button" class="layui-btn layui-btn-radius layui-bg-green layui-btn-xs p-0-15 cant-click">优</button> | 879 | <button type="button" class="layui-btn layui-btn-radius layui-bg-green layui-btn-xs p-0-15 cant-click">优</button> |
877 | {{# } }} | 880 | {{# } }} |
881 | + {{# if(d.health === 'none'){ }} | ||
882 | + <button type="button" class="layui-btn layui-btn-radius layui-bg-gray layui-btn-xs p-0-15 cant-click">未监控</button> | ||
883 | + {{# } }} | ||
878 | </script> | 884 | </script> |
879 | <!--主机状态--> | 885 | <!--主机状态--> |
880 | <script type="text/html" id="hostStateTpl"> | 886 | <script type="text/html" id="hostStateTpl"> |
@@ -915,7 +921,7 @@ | @@ -915,7 +921,7 @@ | ||
915 | {{# | 921 | {{# |
916 | switch (d.state) { | 922 | switch (d.state) { |
917 | case "new" : | 923 | case "new" : |
918 | - }} <button type="button" class="layui-btn layui-btn-warm layui-bg-blue layui-btn-radius layui-btn-xs p-0-15 cant-click">未监控</button> {{# | 924 | + }} <button type="button" class="layui-btn layui-btn-warm layui-bg-gray layui-btn-radius layui-btn-xs p-0-15 cant-click">未监控</button> {{# |
919 | break; | 925 | break; |
920 | case "monitor" : | 926 | case "monitor" : |
921 | }} <button type="button" class="layui-btn layui-btn-warm layui-bg-green layui-btn-radius layui-btn-xs p-0-15 cant-click">监控中</button> {{# | 927 | }} <button type="button" class="layui-btn layui-btn-warm layui-bg-green layui-btn-radius layui-btn-xs p-0-15 cant-click">监控中</button> {{# |
-
Please register or login to post a comment