Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx
Showing
5 changed files
with
35 additions
and
11 deletions
@@ -15,6 +15,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -15,6 +15,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
15 | var writeBackDirctiveList = (data && data.writeBackDirctiveList) ? data.writeBackDirctiveList : []; | 15 | var writeBackDirctiveList = (data && data.writeBackDirctiveList) ? data.writeBackDirctiveList : []; |
16 | var systemType = (data && data.systemType) ? data.systemType : ''; | 16 | var systemType = (data && data.systemType) ? data.systemType : ''; |
17 | var protocol = (data && data.protocol) ? data.protocol : ''; | 17 | var protocol = (data && data.protocol) ? data.protocol : ''; |
18 | + var xjType = (data && data.xjType) ? data.xjType : ''; | ||
18 | var accessToken = sessions.getToken()['access_token']; | 19 | var accessToken = sessions.getToken()['access_token']; |
19 | var loginName = localStorage.getItem("lgn"); | 20 | var loginName = localStorage.getItem("lgn"); |
20 | var restoreVersionTable = {}; | 21 | var restoreVersionTable = {}; |
@@ -107,7 +108,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -107,7 +108,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
107 | , where: { | 108 | , where: { |
108 | access_token: accessToken, | 109 | access_token: accessToken, |
109 | dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), | 110 | dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), |
110 | - collScope: $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), | 111 | + collScope: (data && data.protocol) ? data.protocol : $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), |
111 | systemType: systemType, | 112 | systemType: systemType, |
112 | syncFlag: $("#dirctiveSearchForm").find("select[name='syncFlag']").val() | 113 | syncFlag: $("#dirctiveSearchForm").find("select[name='syncFlag']").val() |
113 | } | 114 | } |
@@ -417,6 +418,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -417,6 +418,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
417 | }).done(function (res) { | 418 | }).done(function (res) { |
418 | xmSelect.render({ | 419 | xmSelect.render({ |
419 | el: '#dir_dirctiveProtocol' | 420 | el: '#dir_dirctiveProtocol' |
421 | + ,initValue: protocol.split(',') | ||
420 | , filterable: true | 422 | , filterable: true |
421 | , tips: '=采集协议=' | 423 | , tips: '=采集协议=' |
422 | , name: 'dirctiveProtocol' | 424 | , name: 'dirctiveProtocol' |
@@ -545,17 +547,29 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -545,17 +547,29 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
545 | //刷新表格 | 547 | //刷新表格 |
546 | function reloadTable() { | 548 | function reloadTable() { |
547 | var formData = form.val('dirctive-form'); | 549 | var formData = form.val('dirctive-form'); |
548 | - dirctiveTable.reload({ | ||
549 | - page: { | ||
550 | - curr: 1 | ||
551 | - } | ||
552 | - ,where: { | 550 | + var wheres={}; |
551 | + if(xjType=='xjType'){ | ||
552 | + wheres={ | ||
553 | access_token: accessToken, | 553 | access_token: accessToken, |
554 | dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), | 554 | dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), |
555 | collScope: $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), | 555 | collScope: $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), |
556 | + systemType: 2, | ||
557 | + syncFlag: formData.syncFlag | ||
558 | + } | ||
559 | + }else{ | ||
560 | + wheres= { | ||
561 | + access_token: accessToken, dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), | ||
562 | + collScope: $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), | ||
556 | systemType: formData.systemType, | 563 | systemType: formData.systemType, |
557 | syncFlag: formData.syncFlag | 564 | syncFlag: formData.syncFlag |
558 | } | 565 | } |
566 | + } | ||
567 | + | ||
568 | + dirctiveTable.reload({ | ||
569 | + page: { | ||
570 | + curr: 1 | ||
571 | + } | ||
572 | + ,where: wheres | ||
559 | }); | 573 | }); |
560 | } | 574 | } |
561 | }); | 575 | }); |
@@ -489,10 +489,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'setStep' | @@ -489,10 +489,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'setStep' | ||
489 | var $that = $(this); | 489 | var $that = $(this); |
490 | var $parent = $($that.parents(".proto-tags-box")) | 490 | var $parent = $($that.parents(".proto-tags-box")) |
491 | var protocol = $that.data("protocol"); | 491 | var protocol = $that.data("protocol"); |
492 | + var resType = $that.data("restype"); | ||
492 | var params = { | 493 | var params = { |
493 | writeBackDirctiveList: $.map($parent.find('.res-tags'), element => $(element).data('dirctiveid')), | 494 | writeBackDirctiveList: $.map($parent.find('.res-tags'), element => $(element).data('dirctiveid')), |
494 | systemType: '2', | 495 | systemType: '2', |
495 | - protocol: protocol | 496 | + protocol: protocol, |
497 | + xjType :'xjType' | ||
496 | } | 498 | } |
497 | $('[lay-id="/baseconfig/dirctive/index"]').find('.layui-tab-close').trigger('click'); | 499 | $('[lay-id="/baseconfig/dirctive/index"]').find('.layui-tab-close').trigger('click'); |
498 | layer.open({ | 500 | layer.open({ |
@@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
84 | </div> | 84 | </div> |
85 | <div class="layui-row" style="padding: 10px 0"> | 85 | <div class="layui-row" style="padding: 10px 0"> |
86 | <div class="res-tags-box"> | 86 | <div class="res-tags-box"> |
87 | - <a class="inspection-taskaddres-btn" data-restype="{{resType}}" data-protocol="{{protocol}}" ><i class="layui-icon layui-icon-add-1" ></i>新增资源 </a> | 87 | + <a class="inspection-taskaddres-btn" data-restype="{{resType}}" data-protocol="{{protocol}}" ><i class="layui-icon layui-icon-add-1" ></i>新增资源</a> |
88 | <div class="div-res-tags"> | 88 | <div class="div-res-tags"> |
89 | {{# layui.each(e,function(j,k){ }} | 89 | {{# layui.each(e,function(j,k){ }} |
90 | <label class="res-tags" data-resid="{{k.resId}}">{{k.resName}} <a class="close-icon"><i class="layui-icon layui-icon-close"></i></a></label> | 90 | <label class="res-tags" data-resid="{{k.resId}}">{{k.resName}} <a class="close-icon"><i class="layui-icon layui-icon-close"></i></a></label> |
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | </div> | 94 | </div> |
95 | <div class="layui-row" style="padding: 10px 0"> | 95 | <div class="layui-row" style="padding: 10px 0"> |
96 | <div class="proto-tags-box"> | 96 | <div class="proto-tags-box"> |
97 | - <a class="inspection-taskaddprotocol-btn" data-protocol="{{protocol}}"><i class="layui-icon layui-icon-add-1"></i>新增指令 </a> | 97 | + <a class="inspection-taskaddprotocol-btn" data-protocol="{{protocol}}"><i class="layui-icon layui-icon-add-1"></i>新增指令</a> |
98 | <div class="div-proto-tags"> | 98 | <div class="div-proto-tags"> |
99 | 99 | ||
100 | </div> | 100 | </div> |
@@ -51,6 +51,14 @@ export default { | @@ -51,6 +51,14 @@ export default { | ||
51 | }, | 51 | }, |
52 | }, | 52 | }, |
53 | { | 53 | { |
54 | + text: '最近6小时', | ||
55 | + value: () => { | ||
56 | + const end = new Date(); | ||
57 | + const start = formatDate(6,'h'); | ||
58 | + return [start, end] | ||
59 | + }, | ||
60 | + }, | ||
61 | + { | ||
54 | text: '最近1天', | 62 | text: '最近1天', |
55 | value: () => { | 63 | value: () => { |
56 | const end = new Date(); | 64 | const end = new Date(); |
@@ -238,7 +246,7 @@ export default { | @@ -238,7 +246,7 @@ export default { | ||
238 | 246 | ||
239 | const oneDay=()=>{ | 247 | const oneDay=()=>{ |
240 | const end = getDateTime(new Date()); | 248 | const end = getDateTime(new Date()); |
241 | - const start = formatDate(1,'d'); | 249 | + const start = formatDate(6,'h'); |
242 | dateValue.value=[start,end] | 250 | dateValue.value=[start,end] |
243 | changeDate(dateValue.value) | 251 | changeDate(dateValue.value) |
244 | } | 252 | } |
@@ -50,7 +50,7 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { | @@ -50,7 +50,7 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { | ||
50 | dataRenderingBase("arms_time_lineChart", resId, "KPI678F9FC3", "响应时间/每分钟", null); | 50 | dataRenderingBase("arms_time_lineChart", resId, "KPI678F9FC3", "响应时间/每分钟", null); |
51 | // Start Wang 2022/2/24 9:29 解决:arms采集结果展示(详情页面开发) | 51 | // Start Wang 2022/2/24 9:29 解决:arms采集结果展示(详情页面开发) |
52 | // 节点详情 | 52 | // 节点详情 |
53 | - commonDetail.renderTable("arms_node_detail",false,resId,"KPI452C0F78,KPI5769F327,KPI8B2CCCCF,KPI678F9FC3,KPI649E288B,KPI8DC835B1,KPI4D6871EA,KPICC063E40,KPIFC03301B",'节点详情',`detail`,'KPIFC03301B'); | 53 | + commonDetail.renderTable("arms_node_detail",false,resId,"KPI452C0F78,KPI5769F327,KPI8B2CCCCF,KPI678F9FC3,KPI649E288B,KPI8DC835B1,KPI4D6871EA,KPICC063E40,KPIFC03301B",'节点详情',`detail`,'KPIFC03301B','desc'); |
54 | // End Wang 2022/2/24 9:30 | 54 | // End Wang 2022/2/24 9:30 |
55 | //活动告警 | 55 | //活动告警 |
56 | commonDetail.renderActiveAlarms("arms_active_alram", resId); | 56 | commonDetail.renderActiveAlarms("arms_active_alram", resId); |
-
Please register or login to post a comment