Authored by 张凯

Merge branch 'master-mj' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-mj-joke

@@ -928,7 +928,7 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -928,7 +928,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
928 let content = laytpl(res.body).render(JSON.stringify(params)); 928 let content = laytpl(res.body).render(JSON.stringify(params));
929 if (params.ident && params.ident == 1) { 929 if (params.ident && params.ident == 1) {
930 type = 2; 930 type = 2;
931 - content = ['/vue3/index.html#/vue3/pieDetailLine?' + urlParams, 'no']; 931 + content = ['/monitor-web/vue3/index.html#/vue3/pieDetailLine?' + urlParams, 'no'];
932 } 932 }
933 //End LSQ 2022/1/17 933 //End LSQ 2022/1/17
934 layer.open({ 934 layer.open({
@@ -2758,7 +2758,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -2758,7 +2758,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
2758 } 2758 }
2759 }); 2759 });
2760 if ($('.layui-show').find(".detail-left-panel").length == 0) { 2760 if ($('.layui-show').find(".detail-left-panel").length == 0) {
2761 - var leftUrl = common.domainName + '/api-web/detail/findRelationGroupByResId'; 2761 + var leftUrl = common.domainName + '/api-web/detail/findRelationGroupByResId?&accessToken='+common.getMjToken();
2762 admin.req({ 2762 admin.req({
2763 url: leftUrl, 2763 url: leftUrl,
2764 data: {resId: resId}, 2764 data: {resId: resId},
  1 +/**
  2 + * @desc 动环
  3 + * @author joke
  4 + * @date 2021/5/20 23:11
  5 + **/
  6 +layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols', 'echarts', 'sessions', "commonDetail", 'tableTree', 'soulTable', 'mxClient'], function (exports) {
  7 + var $ = layui.$;
  8 + var laytpl = layui.laytpl;
  9 + var tree = layui.tree;
  10 + var form = layui.form;
  11 + var view = layui.view;
  12 + var table = layui.table;
  13 + var admin = layui.admin;
  14 + var commonCols = layui.commonCols;
  15 + var soulTable = layui.soulTable;
  16 + var tableTree = layui.tableTree;
  17 + var common = layui.common;
  18 + var commonDetail = layui.commonDetail;
  19 + var mxClient = layui.mxClient;
  20 + var busId = '';//当前业务Id
  21 + var appId = '';
  22 + var curTreeNode = '';
  23 + var curDhResType = '';//当前动环所在的资源类型
  24 + var currRoomId = '';
  25 + //对外暴露的接口
  26 + exports('dh_info_sx', function (data) {
  27 + var sessions = layui.sessions;
  28 + var accessToken = sessions.getToken().access_token;
  29 + var resId = '';
  30 + var showFlag = common.getUrlParam("show");
  31 + if (showFlag && showFlag == '0') {
  32 + resId = common.getUrlParam("resId");
  33 + } else {
  34 + resId = data.resId;
  35 + }
  36 +
  37 + getResMap(resId);
  38 + renderActiveAlarms("dh_info_alarms", resId);
  39 +
  40 + function getResMap(resId) {
  41 + $('#dh_info_baseinfo').html('')
  42 + admin.req({
  43 + url: common.domainName + '/api-web/home/dhInfo_sx/getCollResultByResId?resId=' + resId
  44 + , type: 'GET'
  45 + }).done(function (res) {
  46 + $('#dh_InfoContent .lastCollTime').html(res.str);
  47 + var propertys = res.data;
  48 + var dataArr = common.splieceGroup(propertys, 3);
  49 +
  50 + var li = "";
  51 + //先遍历分组后的,在遍历组内的数组
  52 + $.each(dataArr, function (i, v) {
  53 + var span = '';
  54 + $.each(v, function (j, ar) {
  55 + var valueStr = '';
  56 + var valueColor;
  57 + if (ar.value != 'null'){
  58 + valueStr = ar.kpiValue;
  59 + if (ar.kpiValue != 'true' && ar.kpiValue != 'false'){
  60 + if (ar.kpiValue != 'max'){
  61 + if (parseFloat(ar.kpiValue) > parseFloat(ar.max)){
  62 + valueColor = 'red';
  63 + }
  64 + }
  65 + if (ar.kpiValue != 'min'){
  66 + if (parseFloat(ar.kpiValue) < parseFloat(ar.min)){
  67 + valueColor = 'red';
  68 + }
  69 + }
  70 + }
  71 + }
  72 + span += ' <span style="font-weight: bold;text-align: right;padding-right: 20px">' + ar.kpiName + '</span>' +
  73 + '<span title="' + valueStr + '" style="overflow: hidden;text-overflow: ellipsis;padding-left:20px;text-align:left;white-space: nowrap;color: '+valueColor+'">'
  74 + + valueStr +' ' + ar.unit +'</span>';
  75 + });
  76 + //补充空白区域
  77 + var lastLength = v.length
  78 + if (lastLength == 1){
  79 + span += '<span style="padding-right: 20px;"></span><span style="padding-left:20px;"></span><span style="padding-right: 20px;"></span><span style="padding-left:20px;"></span>'
  80 + }else if (lastLength == 2 ){
  81 + span += '<span style="padding-right: 20px;"></span><span style="padding-left:20px;"></span>'
  82 + }
  83 + li += '<li>' + span + '</li>'
  84 + $('#dh_info_baseinfo').html(li);
  85 + });
  86 + }).error(function (error) {
  87 + console.log(error);
  88 + });
  89 + }
  90 +
  91 +
  92 + function renderActiveAlarms(tableId, resId) {
  93 + var alarmlist = table.render({
  94 + elem: '#' + tableId
  95 + , url: common.domainName + '/api-web/home/alarm/alarmListPage'
  96 + , where: {
  97 + access_token: accessToken,
  98 + resId: resId
  99 + }
  100 + , height: 'auto'
  101 + , page: {
  102 + layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
  103 + , theme: '#1E9FFF'
  104 + }
  105 + , limit: 5
  106 + , even: true
  107 + , cols: [[
  108 + {
  109 + field: 'LAY_INDEX', title: '序号', align: 'center', width: 100,
  110 + templet: function (d) {
  111 + return '<span>' + d.LAY_INDEX + '</span>';
  112 + }
  113 + }
  114 + , {
  115 + field: 'alarmLevel', title: '告警级别', align: 'center', width: 120, sort: true,
  116 + templet: function (d) {
  117 + if (d.alarmLevel == 3) {
  118 + return '<span class="layui-table-warn" style="width: 100%;">严重</span>';
  119 + } else if (d.alarmLevel == 2) {
  120 + return '<span class="layui-table-close" style="width: 100%;">重要</span>';
  121 + } else if (d.alarmLevel == 1) {
  122 + return '<span class="layui-table-normal" style="width: 100%;">一般</span>';
  123 + }
  124 + }
  125 + }
  126 + , {field: 'alarmContent', title: '告警内容', align: 'center'}
  127 + , {field: 'updateTime', title: '告警时间', align: 'center', width: '15%'}
  128 + ]],
  129 + done: function () {
  130 + $('[lay-id="' + tableId + '"] [data-warn-zbmc]').on('click', function () {
  131 + var name = $(this).data("name");
  132 + var params = {
  133 + resId: $(this).data("resid"),
  134 + kpiId: $(this).data("kpi"),
  135 + flag: $(this).data("flag"),
  136 + ident: $(this).data("ident"),
  137 + warning: $(this).data("warning"),
  138 + name: name
  139 + };
  140 + common.openLineChart(name, params);
  141 + });
  142 +
  143 + }
  144 + });
  145 +
  146 + }
  147 + });
  148 +});
@@ -17,6 +17,7 @@ layui.define(['element', 'admin', 'form', 'echarts', 'commonDetail'], function ( @@ -17,6 +17,7 @@ layui.define(['element', 'admin', 'form', 'echarts', 'commonDetail'], function (
17 var startTime = ''; 17 var startTime = '';
18 var endTime = ''; 18 var endTime = '';
19 var showTab = true; 19 var showTab = true;
  20 + var accessToken = common.getMjToken();
20 if (!data) { 21 if (!data) {
21 resourceId = common.getUrlParam('resId'); //资源ID 22 resourceId = common.getUrlParam('resId'); //资源ID
22 kpiId = common.getUrlParam('kpiId'); //指标ID 23 kpiId = common.getUrlParam('kpiId'); //指标ID
@@ -125,7 +126,7 @@ layui.define(['element', 'admin', 'form', 'echarts', 'commonDetail'], function ( @@ -125,7 +126,7 @@ layui.define(['element', 'admin', 'form', 'echarts', 'commonDetail'], function (
125 function renderLineChart() { 126 function renderLineChart() {
126 zshiLoadIndex = layer.load(2);//加载loading 127 zshiLoadIndex = layer.load(2);//加载loading
127 var url = common.domainName + '/api-web/detail/performance/line/chart?interval=' + interval + '&startTime=' 128 var url = common.domainName + '/api-web/detail/performance/line/chart?interval=' + interval + '&startTime='
128 - + startTime + '&endTime=' + endTime + '&resId=' + resourceId + '&kpiIds=' + kpiId + '&subResId=' + flag; 129 + + startTime + '&endTime=' + endTime + '&resId=' + resourceId + '&kpiIds=' + kpiId + '&subResId=' + flag+'&accessToken='+accessToken;
129 //获取性能曲线图数据 130 //获取性能曲线图数据
130 admin.req({ 131 admin.req({
131 url: url 132 url: url
@@ -183,14 +183,29 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -183,14 +183,29 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
183 var bizId = $(this).data("id"); 183 var bizId = $(this).data("id");
184 var topoId = $(this).data("topoid"); 184 var topoId = $(this).data("topoid");
185 var resNum = $(this).data("resnum"); 185 var resNum = $(this).data("resnum");
  186 + var classify = $(this).data("classify");
186 // render(topoId,bizId); 187 // render(topoId,bizId);
187 currentBizId = $(this).data("id"); 188 currentBizId = $(this).data("id");
188 189
189 $("#mainindex_menubox").show(100); 190 $("#mainindex_menubox").show(100);
190 - $("#mainindex_menubox").css({  
191 - 'top': e.pageY + 'px',  
192 - 'left': e.pageX + 'px'  
193 - }); 191 +
  192 + let maxWidth = document.body.offsetWidth;
  193 + if(maxWidth - e.pageX < 120){
  194 + $("#mainindex_menubox").css({
  195 + 'top': e.pageY + 'px',
  196 + 'right': '50px',
  197 + 'left': ''
  198 + });
  199 + } else {
  200 + $("#mainindex_menubox").css({
  201 + 'top': e.pageY + 'px',
  202 + 'right': '',
  203 + 'left': e.pageX + 'px'
  204 + });
  205 + }
  206 +
  207 +
  208 +
194 209
195 //子菜单点击事件 210 //子菜单点击事件
196 $("#mainindex_menubox ul>li").unbind("click").on("click", function () { 211 $("#mainindex_menubox ul>li").unbind("click").on("click", function () {
@@ -203,7 +218,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -203,7 +218,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
203 window.parent.postMessage({ 218 window.parent.postMessage({
204 type: 'custom-jump-menu-event', 219 type: 'custom-jump-menu-event',
205 message: { 220 message: {
206 - 'type':"JumpToAlarmManagement" 221 + 'type':"JumpToAlarmManagement",
  222 + params:{
  223 + "tag": "BUS",
  224 + "id": bizId,
  225 + classify: classify
  226 + }
207 } 227 }
208 }, '*') 228 }, '*')
209 } 229 }
@@ -235,7 +255,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -235,7 +255,12 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
235 type: 'custom-jump-menu-event', 255 type: 'custom-jump-menu-event',
236 message: { 256 message: {
237 'path':'', 257 'path':'',
238 - 'type':"JumpToListView" 258 + 'type':"JumpToListView",
  259 + params:{
  260 + "tag":"BUS",
  261 + "id":bizId,
  262 + classify: classify
  263 + }
239 } 264 }
240 }, '*') 265 }, '*')
241 } 266 }
@@ -273,37 +298,42 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -273,37 +298,42 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
273 $("#indexbizhealth [data-index-banner-item='type'] .gj-detail-info li").unbind('click').on("click", function () { 298 $("#indexbizhealth [data-index-banner-item='type'] .gj-detail-info li").unbind('click').on("click", function () {
274 var level = $(this).data("level"); 299 var level = $(this).data("level");
275 var _bizId = $(this).data("bizid"); 300 var _bizId = $(this).data("bizid");
  301 + var classify = $(this).data("classify");
276 var _resType = $(this).data("restype"); 302 var _resType = $(this).data("restype");
277 var alarmTotal = $(this).find("b").text(); 303 var alarmTotal = $(this).find("b").text();
278 if (alarmTotal === '0') { 304 if (alarmTotal === '0') {
279 layer.msg('暂无该类型资源', {icon: 0}); 305 layer.msg('暂无该类型资源', {icon: 0});
280 return false; 306 return false;
281 } 307 }
282 - if (level && level === 'all') {  
283 - $(this).attr("lay-href", "/alarm/activewarning/bizId=" + _bizId)  
284 - } else {  
285 - /*var restype = '';  
286 - if (_resType) {  
287 - if (_resType == 'HOST') {  
288 - _resType = 'operatingSystem'  
289 - $(this).attr("data-restype", "operatingSystem"); 308 +
  309 + window.top.postMessage({
  310 + type: 'custom-jump-menu-event',
  311 + message: {
  312 + 'path':'',
  313 + 'type':"JumpToListView",
  314 + params:{
  315 + "tag":"BUS",
  316 + "id":_bizId,
  317 + classify: classify
290 } 318 }
291 - restype = "/restype=" + _resType  
292 - }  
293 - $('[lay-id="/biz/list"]').find('.layui-tab-close').trigger('click');  
294 - $(this).attr("lay-href", "/biz/list/bizId=" + _bizId + restype);  
295 - admin.sideFlexible();*/  
296 - let win = window.parent;  
297 - if (win) {  
298 - window.parent.postMessage({  
299 - type: 'custom-jump-menu-event',  
300 - message: {  
301 - 'path':'',  
302 - 'type':"JumpToListView"  
303 - }  
304 - }, '*')  
305 } 319 }
306 - } 320 + }, '*');
  321 +
  322 + // if (level && level === 'all') {
  323 + // // $(this).attr("lay-href", "/alarm/activewarning/bizId=" + _bizId)
  324 + // } else {
  325 + // /*var restype = '';
  326 + // if (_resType) {
  327 + // if (_resType == 'HOST') {
  328 + // _resType = 'operatingSystem'
  329 + // $(this).attr("data-restype", "operatingSystem");
  330 + // }
  331 + // restype = "/restype=" + _resType
  332 + // }
  333 + // $('[lay-id="/biz/list"]').find('.layui-tab-close').trigger('click');
  334 + // $(this).attr("lay-href", "/biz/list/bizId=" + _bizId + restype);
  335 + // admin.sideFlexible();*/
  336 + // }
307 }); 337 });
308 //点击告警数字,跳转至告警页面 338 //点击告警数字,跳转至告警页面
309 $("#indexbizhealth [data-index-banner-item='type'] .index-banner-item-tips").unbind('click').on("click", function () { 339 $("#indexbizhealth [data-index-banner-item='type'] .index-banner-item-tips").unbind('click').on("click", function () {
@@ -563,7 +593,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -563,7 +593,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
563 type: 'custom-jump-menu-event', 593 type: 'custom-jump-menu-event',
564 message: { 594 message: {
565 'path':'', 595 'path':'',
566 - 'type':"JumpToAlarmManagement" 596 + 'type':"JumpToAlarmManagement",
  597 + params:{
  598 + "level" : level,
  599 + "restype" : _resType
  600 + }
567 } 601 }
568 }, '*') 602 }, '*')
569 }); 603 });
@@ -586,7 +620,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -586,7 +620,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
586 type: 'custom-jump-menu-event', 620 type: 'custom-jump-menu-event',
587 message: { 621 message: {
588 'path':'', 622 'path':'',
589 - 'type':"JumpToListView" 623 + 'type':"JumpToListView",
  624 + params:{
  625 + "tag":"RES",
  626 + "id":_resType
  627 + }
590 } 628 }
591 }, '*') 629 }, '*')
592 630
@@ -614,11 +652,22 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions @@ -614,11 +652,22 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions
614 document.body.appendChild(alink); 652 document.body.appendChild(alink);
615 alink.click(); 653 alink.click();
616 document.body.removeChild(alink);*/ 654 document.body.removeChild(alink);*/
  655 +
  656 + var alarmLevelSelect = $('#select-content-ul .select-list.listActive').data('val');
  657 + var alarmLevelVal = '';
  658 + if (alarmLevelSelect != 4) {
  659 + alarmLevelVal = alarmLevelSelect;
  660 + } else {
  661 + alarmLevelVal = '';
  662 + }
617 window.top.postMessage({ 663 window.top.postMessage({
618 type: 'custom-jump-menu-event', 664 type: 'custom-jump-menu-event',
619 message: { 665 message: {
620 - 'path':'',  
621 - 'type':"JumpToAlarmManagement" 666 + 'type' : "JumpToAlarmManagement",
  667 + params:{
  668 + "restype" : restype,
  669 + "alarmLevelVal" : alarmLevelVal
  670 + }
622 } 671 }
623 }, '*') 672 }, '*')
624 }); 673 });
@@ -509,7 +509,7 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi @@ -509,7 +509,7 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi
509 container.style.position = 'absolute'; 509 container.style.position = 'absolute';
510 container.style.overflow = 'hidden'; 510 container.style.overflow = 'hidden';
511 container.style.width = '100%'; 511 container.style.width = '100%';
512 - container.style.background = 'url("/src/lib/mxgraph/editors/images/grid.gif")'; 512 + container.style.background = 'url("/monitor-web/src/lib/mxgraph/editors/images/grid.gif")';
513 513
514 // Workaround for Internet Explorer ignoring certain styles 514 // Workaround for Internet Explorer ignoring certain styles
515 if (mxClient.IS_QUIRKS) { 515 if (mxClient.IS_QUIRKS) {
@@ -540,80 +540,80 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi @@ -540,80 +540,80 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi
540 }; 540 };
541 541
542 //基础图标 542 //基础图标
543 - addVertex('组卡片', '/src/style/img/mxcell/default-icon-card.png', 120, 160, 'shape=swimlane;startSize=20;', null);  
544 - addVertex('组', '/src/style/img/mxcell/default-icon-dashed-card.png', 120, 160, 'shape=swimlane;startSize=0;dashed=1;', null);  
545 - addVertex('矩形', '/src/style/img/mxcell/default-icon-rounded.png', 100, 40, 'shape=rounded;strokeWidth=1;', null);  
546 - addVertex('圆形', '/src/style/img/mxcell/default-icon-ellipse.png', 64, 64, 'shape=ellipse', null);  
547 - addVertex('菱形', '/src/style/img/mxcell/default-icon-rhombus.png', 64, 64, 'shape=rhombus', null);  
548 - addVertex('三角形', '/src/style/img/mxcell/default-icon-triangle.png', 64, 64, 'shape=triangle', null);  
549 - addVertex('圆柱形', '/src/style/img/mxcell/default-icon-cylinder.png', 64, 64, 'shape=cylinder', null);  
550 - // addVertex('用户','/src/style/img/mxcell/default-icon-actor.png', 64, 64, 'shape=actor',null);  
551 - addVertex('文本', '/src/style/img/mxcell/default-icon-text.png', 100, 50, 'strokeColor=none;fillColor=none;', "middle"); 543 + addVertex('组卡片', '/monitor-web/src/style/img/mxcell/default-icon-card.png', 120, 160, 'shape=swimlane;startSize=20;', null);
  544 + addVertex('组', '/monitor-web/src/style/img/mxcell/default-icon-dashed-card.png', 120, 160, 'shape=swimlane;startSize=0;dashed=1;', null);
  545 + addVertex('矩形', '/monitor-web/src/style/img/mxcell/default-icon-rounded.png', 100, 40, 'shape=rounded;strokeWidth=1;', null);
  546 + addVertex('圆形', '/monitor-web/src/style/img/mxcell/default-icon-ellipse.png', 64, 64, 'shape=ellipse', null);
  547 + addVertex('菱形', '/monitor-web/src/style/img/mxcell/default-icon-rhombus.png', 64, 64, 'shape=rhombus', null);
  548 + addVertex('三角形', '/monitor-web/src/style/img/mxcell/default-icon-triangle.png', 64, 64, 'shape=triangle', null);
  549 + addVertex('圆柱形', '/monitor-web/src/style/img/mxcell/default-icon-cylinder.png', 64, 64, 'shape=cylinder', null);
  550 + // addVertex('用户','/monitor-web/src/style/img/mxcell/default-icon-actor.png', 64, 64, 'shape=actor',null);
  551 + addVertex('文本', '/monitor-web/src/style/img/mxcell/default-icon-text.png', 100, 50, 'strokeColor=none;fillColor=none;', "middle");
552 552
553 553
554 toolbar.addLine(); 554 toolbar.addLine();
555 555
556 //业务图标 556 //业务图标
557 - // addVertex('平台','/src/style/img/mxcell/cloud_plat.png', 64, 64,  
558 - // 'shape=image;image=/src/style/img/mxcell/cloud_plat.png','CLOUD_PLAT');  
559 - addVertex('阿里云', '/src/style/img/mxcell/icon_ali_cloud.png', 64, 64,  
560 - 'shape=image;image=/src/style/img/mxcell/icon_ali_cloud.png', 'ALI_CLOUD');  
561 - addVertex('华为云', '/src/style/img/mxcell/icon_huawei_cloud.png', 64, 64,  
562 - 'shape=image;image=/src/style/img/mxcell/icon_huawei_cloud.png', 'HUAWEI_CLOUD');  
563 - addVertex('虚拟化平台', '/src/style/img/mxcell/icon_virtualization_vmware.png', 64, 64,  
564 - 'shape=image;image=/src/style/img/mxcell/icon_virtualization_vmware.png', 'VIRTUALIZATION_VMWARE');  
565 - addVertex('服务器', '/src/style/img/mxcell/icon_host.png', 64, 64,  
566 - 'shape=image;image=/src/style/img/mxcell/icon_host.png', 'HOST');  
567 - addVertex('小型机', '/src/style/img/mxcell/icon_host_minicomputer_server.png', 64, 64,  
568 - 'shape=image;image=/src/style/img/mxcell/icon_host_minicomputer_server.png', 'HOST_MINICOMPUTER_SERVER');  
569 - addVertex('x86物理服务器', '/src/style/img/mxcell/icon_host_x86server.png', 64, 64,  
570 - 'shape=image;image=/src/style/img/mxcell/icon_host_x86server.png', 'HOST_X86SERVER');  
571 - addVertex('x86虚拟服务器', '/src/style/img/mxcell/icon_host_x86virtual.png', 64, 64,  
572 - 'shape=image;image=/src/style/img/mxcell/icon_host_x86virtual.png', 'HOST_X86VIRTUAL');  
573 - addVertex('Weblogic', '/src/style/img/mxcell/icon_middleware_weblogic.png', 64, 64,  
574 - 'shape=image;image=/src/style/img/mxcell/icon_middleware_weblogic.png', 'MIDDLEWARE_WEBLOGIC');  
575 - addVertex('NGINX', '/src/style/img/mxcell/icon_middleware_nginx.png', 64, 64,  
576 - 'shape=image;image=/src/style/img/mxcell/icon_middleware_nginx.png', 'MIDDLEWARE_NGINX');  
577 - addVertex('KafKa', '/src/style/img/mxcell/icon_middleware_kafka.png', 64, 64,  
578 - 'shape=image;image=/src/style/img/mxcell/icon_middleware_kafka.png', 'MIDDLEWARE_KAFKA');  
579 - addVertex('集群', '/src/style/img/mxcell/icon_cluster.png', 64, 64,  
580 - 'shape=image;image=/src/style/img/mxcell/icon_cluster.png', 'CLUSTER');  
581 - addVertex('数据库', '/src/style/img/mxcell/icon_database.png', 64, 64,  
582 - 'shape=image;image=/src/style/img/mxcell/icon_database.png', 'DATABASE');  
583 - addVertex('ORACLE数据库', '/src/style/img/mxcell/icon_database_oracle.png', 64, 64,  
584 - 'shape=image;image=/src/style/img/mxcell/icon_database_oracle.png', 'DATABASE_ORACLE');  
585 - addVertex('MySQL数据库', '/src/style/img/mxcell/icon_database_mysql.png', 64, 64,  
586 - 'shape=image;image=/src/style/img/mxcell/icon_database_mysql.png', 'DATABASE_MYSQL');  
587 - addVertex('Redis', '/src/style/img/mxcell/icon_database_redis.png', 64, 64,  
588 - 'shape=image;image=/src/style/img/mxcell/icon_database_redis.png', 'DATABASE_REDIS');  
589 - addVertex('华为云防火墙', '/src/style/img/mxcell/icon_huawei_cloud_firewall.png', 64, 64,  
590 - 'shape=image;image=/src/style/img/mxcell/icon_huawei_cloud_firewall.png', 'HUAWEI_CLOUD_FIREWALL');  
591 - addVertex('防火墙', '/src/style/img/mxcell/icon_netsafe_firewall.png', 64, 64,  
592 - 'shape=image;image=/src/style/img/mxcell/icon_netsafe_firewall.png', 'NETSAFE_FIREWALL');  
593 - addVertex('路由器', '/src/style/img/mxcell/icon_nethardware_router.png', 64, 64,  
594 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_router.png', 'NETHARDWARE_ROUTER');  
595 - addVertex('交换机', '/src/style/img/mxcell/icon_nethardware_switchboard.png', 64, 64,  
596 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_switchboard.png', 'NETHARDWARE_SWITCHBOARD');  
597 - addVertex('华为云交换机', '/src/style/img/mxcell/icon_huawei_cloud_switchboard.png', 64, 64,  
598 - 'shape=image;image=/src/style/img/mxcell/icon_huawei_cloud_switchboard.png', 'HUAWEI_CLOUD_SWITCHBOARD');  
599 - addVertex('SAN交换机', '/src/style/img/mxcell/icon_nethardware_san_switchboard.png', 64, 64,  
600 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_san_switchboard.png', 'NETHARDWARE_SAN_SWITCHBOARD');  
601 - addVertex('DNS', '/src/style/img/mxcell/icon_nethardware_dns.png', 64, 64,  
602 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_dns.png', 'NETHARDWARE_DNS');  
603 - addVertex('网关', '/src/style/img/mxcell/icon_nethardware_gateway.png', 64, 64,  
604 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_gateway.png', 'NETHARDWARE_GATEWAY');  
605 - addVertex('ADS', '/src/style/img/mxcell/icon_nethardware_ads.png', 64, 64,  
606 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_ads.png', 'NETHARDWARE_ADS');  
607 - addVertex('负载均衡', '/src/style/img/mxcell/icon_nethardware_loadbalancing.png', 64, 64,  
608 - 'shape=image;image=/src/style/img/mxcell/icon_nethardware_loadbalancing.png', 'NETHARDWARE_LOADBALANCING');  
609 - addVertex('入侵检测', '/src/style/img/mxcell/icon_netsafe_ipsids.png', 64, 64,  
610 - 'shape=image;image=/src/style/img/mxcell/icon_netsafe_ipsids.png', 'NETSAFE_IPSIDS');  
611 - addVertex('IPS', '/src/style/img/mxcell/icon_netsafe_ips.png', 64, 64,  
612 - 'shape=image;image=/src/style/img/mxcell/icon_netsafe_ips.png', 'NETSAFE_IPS');  
613 - addVertex('IDS', '/src/style/img/mxcell/icon_netsafe_ids.png', 64, 64,  
614 - 'shape=image;image=/src/style/img/mxcell/icon_netsafe_ids.png', 'NETSAFE_IDS');  
615 - addVertex('广域网', '/src/style/img/mxcell/icon_cloud.png', 64, 64,  
616 - 'shape=image;image=/src/style/img/mxcell/icon_cloud.png', null); 557 + // addVertex('平台','/monitor-web/src/style/img/mxcell/cloud_plat.png', 64, 64,
  558 + // 'shape=image;image=/monitor-web/src/style/img/mxcell/cloud_plat.png','CLOUD_PLAT');
  559 + addVertex('阿里云', '/monitor-web/src/style/img/mxcell/icon_ali_cloud.png', 64, 64,
  560 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_ali_cloud.png', 'ALI_CLOUD');
  561 + addVertex('华为云', '/monitor-web/src/style/img/mxcell/icon_huawei_cloud.png', 64, 64,
  562 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_huawei_cloud.png', 'HUAWEI_CLOUD');
  563 + addVertex('虚拟化平台', '/monitor-web/src/style/img/mxcell/icon_virtualization_vmware.png', 64, 64,
  564 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_virtualization_vmware.png', 'VIRTUALIZATION_VMWARE');
  565 + addVertex('服务器', '/monitor-web/src/style/img/mxcell/icon_host.png', 64, 64,
  566 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host.png', 'HOST');
  567 + addVertex('小型机', '/monitor-web/src/style/img/mxcell/icon_host_minicomputer_server.png', 64, 64,
  568 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host_minicomputer_server.png', 'HOST_MINICOMPUTER_SERVER');
  569 + addVertex('x86物理服务器', '/monitor-web/src/style/img/mxcell/icon_host_x86server.png', 64, 64,
  570 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host_x86server.png', 'HOST_X86SERVER');
  571 + addVertex('x86虚拟服务器', '/monitor-web/src/style/img/mxcell/icon_host_x86virtual.png', 64, 64,
  572 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_host_x86virtual.png', 'HOST_X86VIRTUAL');
  573 + addVertex('Weblogic', '/monitor-web/src/style/img/mxcell/icon_middleware_weblogic.png', 64, 64,
  574 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_middleware_weblogic.png', 'MIDDLEWARE_WEBLOGIC');
  575 + addVertex('NGINX', '/monitor-web/src/style/img/mxcell/icon_middleware_nginx.png', 64, 64,
  576 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_middleware_nginx.png', 'MIDDLEWARE_NGINX');
  577 + addVertex('KafKa', '/monitor-web/src/style/img/mxcell/icon_middleware_kafka.png', 64, 64,
  578 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_middleware_kafka.png', 'MIDDLEWARE_KAFKA');
  579 + addVertex('集群', '/monitor-web/src/style/img/mxcell/icon_cluster.png', 64, 64,
  580 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_cluster.png', 'CLUSTER');
  581 + addVertex('数据库', '/monitor-web/src/style/img/mxcell/icon_database.png', 64, 64,
  582 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database.png', 'DATABASE');
  583 + addVertex('ORACLE数据库', '/monitor-web/src/style/img/mxcell/icon_database_oracle.png', 64, 64,
  584 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database_oracle.png', 'DATABASE_ORACLE');
  585 + addVertex('MySQL数据库', '/monitor-web/src/style/img/mxcell/icon_database_mysql.png', 64, 64,
  586 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database_mysql.png', 'DATABASE_MYSQL');
  587 + addVertex('Redis', '/monitor-web/src/style/img/mxcell/icon_database_redis.png', 64, 64,
  588 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_database_redis.png', 'DATABASE_REDIS');
  589 + addVertex('华为云防火墙', '/monitor-web/src/style/img/mxcell/icon_huawei_cloud_firewall.png', 64, 64,
  590 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_huawei_cloud_firewall.png', 'HUAWEI_CLOUD_FIREWALL');
  591 + addVertex('防火墙', '/monitor-web/src/style/img/mxcell/icon_netsafe_firewall.png', 64, 64,
  592 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_firewall.png', 'NETSAFE_FIREWALL');
  593 + addVertex('路由器', '/monitor-web/src/style/img/mxcell/_nethardware_router.png', 64, 64,
  594 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_router.png', 'NETHARDWARE_ROUTER');
  595 + addVertex('交换机', '/monitor-web/src/style/img/mxcell/icon_nethardware_switchboard.png', 64, 64,
  596 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_switchboard.png', 'NETHARDWARE_SWITCHBOARD');
  597 + addVertex('华为云交换机', '/monitor-web/src/style/img/mxcell/icon_huawei_cloud_switchboard.png', 64, 64,
  598 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_huawei_cloud_switchboard.png', 'HUAWEI_CLOUD_SWITCHBOARD');
  599 + addVertex('SAN交换机', '/monitor-web/src/style/img/mxcell/icon_nethardware_san_switchboard.png', 64, 64,
  600 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_san_switchboard.png', 'NETHARDWARE_SAN_SWITCHBOARD');
  601 + addVertex('DNS', '/monitor-web/src/style/img/mxcell/icon_nethardware_dns.png', 64, 64,
  602 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_dns.png', 'NETHARDWARE_DNS');
  603 + addVertex('网关', '/monitor-web/src/style/img/mxcell/icon_nethardware_gateway.png', 64, 64,
  604 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_gateway.png', 'NETHARDWARE_GATEWAY');
  605 + addVertex('ADS', '/monitor-web/src/style/img/mxcell/icon_nethardware_ads.png', 64, 64,
  606 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_ads.png', 'NETHARDWARE_ADS');
  607 + addVertex('负载均衡', '/monitor-web/src/style/img/mxcell/icon_nethardware_loadbalancing.png', 64, 64,
  608 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_nethardware_loadbalancing.png', 'NETHARDWARE_LOADBALANCING');
  609 + addVertex('入侵检测', '/monitor-web/src/style/img/mxcell/icon_netsafe_ipsids.png', 64, 64,
  610 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_ipsids.png', 'NETSAFE_IPSIDS');
  611 + addVertex('IPS', '/monitor-web/src/style/img/mxcell/icon_netsafe_ips.png', 64, 64,
  612 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_ips.png', 'NETSAFE_IPS');
  613 + addVertex('IDS', '/monitor-web/src/style/img/mxcell/icon_netsafe_ids.png', 64, 64,
  614 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_netsafe_ids.png', 'NETSAFE_IDS');
  615 + addVertex('广域网', '/monitor-web/src/style/img/mxcell/icon_cloud.png', 64, 64,
  616 + 'shape=image;image=/monitor-web/src/style/img/mxcell/icon_cloud.png', null);
617 617
618 618
619 var button = mxUtils.button('Create toolbar entry from selection', function (evt) { 619 var button = mxUtils.button('Create toolbar entry from selection', function (evt) {
@@ -633,7 +633,7 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi @@ -633,7 +633,7 @@ layui.define(['common', 'layer', 'form', 'mxClient', 'admin', 'reslist', 'reskpi
633 } 633 }
634 634
635 // Creates the image which is used as the drag icon (preview) 635 // Creates the image which is used as the drag icon (preview)
636 - var img = toolbar.addMode(null, '/src/lib/mxgraph/editors/images/outline.gif', funct); 636 + var img = toolbar.addMode(null, '/monitor-web/src/lib/mxgraph/editors/images/outline.gif', funct);
637 mxUtils.makeDraggable(img, graph, funct); 637 mxUtils.makeDraggable(img, graph, funct);
638 } 638 }
639 }); 639 });
@@ -229,6 +229,9 @@ layui.extend({ @@ -229,6 +229,9 @@ layui.extend({
229 if (href.indexOf('?AuthKey=') != -1 && href.indexOf('&AuthVal=') != -1 && pathURL !== '/page/forwardMj') { 229 if (href.indexOf('?AuthKey=') != -1 && href.indexOf('&AuthVal=') != -1 && pathURL !== '/page/forwardMj') {
230 return location.hash = "/page/forwardMj"; 230 return location.hash = "/page/forwardMj";
231 } 231 }
  232 + // 加载换肤
  233 + layui.use('common', ()=>{layui. common.loadTheme()});
  234 +
232 //跳转到告警页面 235 //跳转到告警页面
233 let params = new URLSearchParams(location.search); 236 let params = new URLSearchParams(location.search);
234 let [bizId] = [params.get('bizId')]; 237 let [bizId] = [params.get('bizId')];
@@ -348,15 +348,15 @@ @@ -348,15 +348,15 @@
348 <!-- <b>{{item.resNUm}}</b>--> 348 <!-- <b>{{item.resNUm}}</b>-->
349 <!-- <div>资源量</div>--> 349 <!-- <div>资源量</div>-->
350 <!-- </li>--> 350 <!-- </li>-->
351 - <li data-bizid="{{item.busId}}" data-restype="HOST"> 351 + <li data-bizid="{{item.busId}}" data-restype="HOST" data-classify="{{item.classify}}">
352 <b>{{item.hostNum}}</b> 352 <b>{{item.hostNum}}</b>
353 <div>操作系统</div> 353 <div>操作系统</div>
354 </li> 354 </li>
355 - <li data-bizid="{{item.busId}}" data-restype="MIDDLEWARE"> 355 + <li data-bizid="{{item.busId}}" data-restype="MIDDLEWARE" data-classify="{{item.classify}}">
356 <b>{{item.middwareNum}}</b> 356 <b>{{item.middwareNum}}</b>
357 <div>中间件</div> 357 <div>中间件</div>
358 </li> 358 </li>
359 - <li data-bizid="{{item.busId}}" data-restype="DATABASE"> 359 + <li data-bizid="{{item.busId}}" data-restype="DATABASE" data-classify="{{item.classify}}">
360 <b>{{item.databaseNum}}</b> 360 <b>{{item.databaseNum}}</b>
361 <div>数据库</div> 361 <div>数据库</div>
362 </li> 362 </li>
@@ -376,11 +376,7 @@ @@ -376,11 +376,7 @@
376 <div class="flex-bottom"> 376 <div class="flex-bottom">
377 377
378 <div style="width: calc(100% - 200px);"> 378 <div style="width: calc(100% - 200px);">
379 - {{# if(d.data[0] && d.data[0].bizList ) { }}  
380 - <span class="index-banner-count">业务共 {{d.data[0].bizList.length}} </span>  
381 - {{# }else{ }}  
382 - <span class="index-banner-count">业务共 0 </span>  
383 - {{# } }} 379 + <span class="index-banner-count">业务共 {{d.str}} </span>
384 </div> 380 </div>
385 381
386 <div class="div-select select-margin " style="width: 100px"> 382 <div class="div-select select-margin " style="width: 100px">
  1 +<!--动环平台-->
  2 +<article class="page-container">
  3 + <div class="page-panel">
  4 + <div class="main">
  5 + <div class="layui-card template_detail_content" id="dh_InfoContent">
  6 + <div class="layui-card-body">
  7 + <div class="lay-row">
  8 + <div class="lay-row-item lay-row-item--auto-width">
  9 + <h5 class="lay-row-title"><span style="color: #666">最近采集时间:<span class="lastCollTime"
  10 + style="color: #666"></span></span>
  11 + </h5>
  12 + <h5 class="lay-row-title">信息展示</h5>
  13 + <ul class="info-table" id="dh_info_baseinfo"></ul>
  14 + </div>
  15 + </div>
  16 + <div class="lay-row">
  17 + <div class="lay-row-item">
  18 + <h5 class="lay-row-title">实时告警动态</h5>
  19 + <div id="dh_info_alarms"></div>
  20 + </div>
  21 + </div>
  22 + </div>
  23 + </div>
  24 + </div>
  25 + </div>
  26 +</article>
  27 +<textarea id="dh_info_param_id" style="display: none;">{{d}}</textarea>
  28 +<script>
  29 + layui.use('dh_info_sx', function (fn) {
  30 + var $ = layui.$;
  31 + var parm = $("#dh_info_param_id").val();
  32 + if (parm.indexOf('{{d') != -1) {
  33 + fn();
  34 + } else {
  35 + fn(JSON.parse(parm));
  36 + }
  37 + });
  38 +</script>
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <script src="public/lib/echarts/echarts.min.js"></script> 23 <script src="public/lib/echarts/echarts.min.js"></script>
24 <script type="text/javascript"> 24 <script type="text/javascript">
25 let version = (new Date()).getTime(); 25 let version = (new Date()).getTime();
26 - let basrUrl = '/vue3/src/'; 26 + let basrUrl = '/monitor-web/vue3/src/';
27 window.__ver = '?v=' + version; 27 window.__ver = '?v=' + version;
28 window.__basrUrl = basrUrl 28 window.__basrUrl = basrUrl
29 </script> 29 </script>
@@ -244,7 +244,7 @@ export default { @@ -244,7 +244,7 @@ export default {
244 keys.value = resourceId + ":" + kpiId + ":" + flag; 244 keys.value = resourceId + ":" + kpiId + ":" + flag;
245 kpiName.value = params.name;//指标名称 245 kpiName.value = params.name;//指标名称
246 let url = '/api-web/detail/performance/line/chart?interval=' + interval.value + '&startTime=' 246 let url = '/api-web/detail/performance/line/chart?interval=' + interval.value + '&startTime='
247 - + startTime.value + '&endTime=' + endTime.value + '&resId=' + resourceId + '&kpiIds=' + kpiId + '&subResId=' + flag; 247 + + startTime.value + '&endTime=' + endTime.value + '&resId=' + resourceId + '&kpiIds=' + kpiId + '&subResId=' + flag+'&accessToken='+localStorage.getItem("accessToken");
248 proxy.$http.get(url, {}, function (res) { 248 proxy.$http.get(url, {}, function (res) {
249 kpiUnit.value = res.data.kpiUnit == null ? "" : res.data.kpiUnit; 249 kpiUnit.value = res.data.kpiUnit == null ? "" : res.data.kpiUnit;
250 if (res.data && res.data.names.length == 0) { 250 if (res.data && res.data.names.length == 0) {
@@ -967,7 +967,7 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -967,7 +967,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
967 let content = laytpl(res.body).render(JSON.stringify(params)); 967 let content = laytpl(res.body).render(JSON.stringify(params));
968 if (params.ident && params.ident == 1) { 968 if (params.ident && params.ident == 1) {
969 type = 2; 969 type = 2;
970 - content = ['/vue3/index.html#/vue3/pieDetailLine?' + urlParams, 'no']; 970 + content = ['/monitor-web/vue3/index.html#/vue3/pieDetailLine?' + urlParams, 'no'];
971 } 971 }
972 //End LSQ 2022/1/17 972 //End LSQ 2022/1/17
973 layer.open({ 973 layer.open({