Authored by wangtao
@@ -419,7 +419,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'reslist', 'sessions' @@ -419,7 +419,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'reslist', 'sessions'
419 editMode: 'true', 419 editMode: 'true',
420 resCategory: 'resources' 420 resCategory: 'resources'
421 }, 421 },
422 - height: 'auto', 422 + height: 'full-200',
423 cellMinWidth: 80, 423 cellMinWidth: 80,
424 page: { 424 page: {
425 layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] 425 layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
@@ -471,7 +471,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'reslist', 'sessions' @@ -471,7 +471,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'reslist', 'sessions'
471 471
472 //删除对应的资源权限 472 //删除对应的资源权限
473 function deleteResTemp(alarmTempId,id) { 473 function deleteResTemp(alarmTempId,id) {
474 - debugger  
475 if (typeof (id) != "string") { 474 if (typeof (id) != "string") {
476 var ids = []; 475 var ids = [];
477 var data = table.checkStatus('res_temp_table').data; 476 var data = table.checkStatus('res_temp_table').data;
@@ -880,7 +880,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'laytpl', 'common', 'view', 'se @@ -880,7 +880,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
880 } 880 }
881 //获取选中的数据 881 //获取选中的数据
882 function getCheckData() { 882 function getCheckData() {
883 - debugger  
884 if(mode){ 883 if(mode){
885 let arr = []; 884 let arr = [];
886 $.each($('[data-type="checkbox"] input'),function (i,v) { 885 $.each($('[data-type="checkbox"] input'),function (i,v) {
@@ -501,6 +501,261 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -501,6 +501,261 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
501 }); 501 });
502 }); 502 });
503 }, 503 },
  504 + /**lsq 2022-07-05
  505 + *渲染环形图及链接数
  506 + * @param targetId 环形图区域ID
  507 + * @param resId 资源ID
  508 + * @param kpiId 指标ID,多个指标逗号隔开
  509 + * @param kpiname 指标名称
  510 + * @param titleName 环形图中心名称
  511 + * @param linkTargetId 链接状态区域ID
  512 + * @param linkKpiId 链接状态区域的指标ID,多个指标逗号隔开
  513 + * */
  514 + renderPieChartLink:function(targetId,resId,kpiId,kpiname,titleName,linkTargetId,linkKpiId,flag,isBasic,hasTotal){
  515 + let title='CPU';
  516 + let colorsArr=['#37bca6','#b4d43a','#e85228','#5a5487']
  517 + if(titleName){
  518 + title=titleName
  519 + }
  520 + let allKpi=kpiId;
  521 + let linkKpiIdArr=[];
  522 + var cpuPieChart = null;
  523 + if(linkKpiId){
  524 + allKpi+=','+linkKpiId;
  525 + linkKpiIdArr=linkKpiId.split(',');
  526 + }
  527 + var url = "/api-web/detail/block?resId=" + resId + "&kpiId=" + allKpi + "&hasTotal=" + hasTotal;
  528 + if (flag) {
  529 + url += '&flag=' + flag;
  530 + }
  531 + if (isBasic) {
  532 + url += '&isBasic=' + isBasic;
  533 + }
  534 + admin.req({
  535 + url: common.domainName + url
  536 + }).done(function (res) {
  537 + let linkStr='';
  538 + setTimeout(function () {
  539 + $('#' + targetId).find('.pie-circleStr').remove();
  540 + $('#' + targetId).find('.pie-legend').remove();
  541 + if (res.data && res.data.length > 0) {
  542 + var data = res.data;
  543 + let linkData = [];
  544 + let pieData = [];
  545 + let colors = [];
  546 + data.map((item, i) => {
  547 + if (linkKpiIdArr.indexOf(item.id) != -1) {
  548 + //链接数据
  549 + linkData.push(item);
  550 + } else {
  551 + //百分比数据
  552 + pieData.push(item)
  553 + colors.push(common.colorsArr[i]);
  554 + }
  555 + })
  556 + if (pieData.length > 0) {
  557 + let seriesData = [];
  558 + pieData.map(item => {
  559 + let valArr = item.value.split('%');
  560 + let obj = item;
  561 + obj.value = valArr[0];
  562 + seriesData.push(obj)
  563 + })
  564 +
  565 + // setTimeout(function () {
  566 + $('#' + targetId).find('.pie-circleStr').remove();
  567 + $('#' + targetId).find('.pie-legend').remove();
  568 + //生成环形图
  569 + var option = {
  570 + tooltip: {
  571 + trigger: 'item',
  572 + formatter: function (param) {
  573 + var tips = param.marker + " " + param.name + ":" + param.value + param.data.unit + "</br>";
  574 + return tips;
  575 + },
  576 + axisPointer: {
  577 + type: 'shadow'
  578 + }
  579 + },
  580 + legend: {
  581 + orient: 'vertical',
  582 + x: '45%',
  583 + y: 'center',
  584 + formatter: ' ',
  585 + itemHeight: '4',
  586 + textStyle: {
  587 + fontsize: "12px"
  588 + }
  589 + },
  590 + color: colorsArr,
  591 + series: [
  592 + {
  593 + type: 'pie',
  594 + radius: ['60%', '95%'],
  595 + center: ['20%', '50%'],
  596 + data: seriesData,
  597 + avoidLabelOverlap: false,
  598 + stillShowZeroSum: true,
  599 + label: {
  600 + show: false,
  601 + position: 'center'
  602 + },
  603 + itemStyle: {
  604 + borderColor: "#ffffff",
  605 + borderWidth: '3'
  606 + },
  607 + hoverAnimation: false,
  608 + emphasis: {
  609 + scale: true,
  610 + scaleSize: 10,
  611 + },
  612 + labelLine: {
  613 + show: false
  614 + },
  615 + }
  616 + ]
  617 + };
  618 + if (cpuPieChart === null) {
  619 + cpuPieChart = echarts.init(document.getElementById(targetId));
  620 + } else {
  621 + cpuPieChart.clear();
  622 + $('#' + targetId).html('');
  623 + }
  624 + cpuPieChart.setOption(option);
  625 + //中间圆圈
  626 + let circleStr = `<div class="pie-circleStr"><div class="pie-circleStr-title">` + title + `</div></div>`;
  627 + $('#' + targetId).append(circleStr);
  628 + //右侧详细内容
  629 + let legendStr = ` <div class="pie-legend">`;
  630 + pieData.map((item, i) => {
  631 + let fixedVal=Number(item.value).toFixed(2);
  632 + let paramName = item.name.replace('CPU', '')
  633 + legendStr += `<div class="pie-legend-item">
  634 + <span class="pie-legend-icon" style="background-color: ` + colorsArr[i] + `"></span>
  635 + <span class="pie-legend-label">` + paramName + `:</span>
  636 + <span class="pie-legend-num" data-kpiid="` + item.id + `"
  637 + data-name="` + item.name + `" data-warning="1" data-ident="1"
  638 + data-trend="0" data-flag="` + item.flag + `">
  639 + <span class="pie-num-val">` + fixedVal + item.unit + `</span>
  640 + <a class="detail_row_menu hide" data-id="`+item.id+`" data-kpiid="` + item.id + `"
  641 + data-name="` + item.name + `" data-kpiname="` + item.name + `" data-warning="1" data-ident="1"
  642 + data-trend="0" data-flag="` + item.flag + `" data-unit="` + item.unit + `"
  643 + data-hidem="true" data-canca="true" data-incaing="true" data-restype="` + item.resType + `">
  644 + <img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png">
  645 + </a></span>
  646 + </div>`
  647 + })
  648 + legendStr += '</div>';
  649 + $('#' + targetId).append(legendStr);
  650 + $('.pie-legend-num .pie-num-val').unbind('click').click(function () {
  651 + let kpiId = $(this).parent().data('kpiid');
  652 + let flag = $(this).parent().data('flag');
  653 + let warning = $(this).parent().data('warning');
  654 + let ident = $(this).parent().data('ident');
  655 + let trend = $(this).parent().data('trend');
  656 + let name = $(this).parent().data('name');
  657 + var params = {
  658 + resId: resId,
  659 + kpiId: kpiId,
  660 + flag: flag,
  661 + warning: warning,
  662 + ident: ident,
  663 + trend: trend,
  664 + name: name
  665 + };
  666 + common.openLineChart(name, params);
  667 + })
  668 + //点击扇形区域,打开性能曲线图
  669 + cpuPieChart.on('click', function (params) {
  670 + let data = params.data;
  671 + let kpiId = data.id;
  672 + let flag = data.flag;
  673 + let warning = data.isWarning;
  674 + let ident = 1;
  675 + let trend = 0;
  676 + let name = data.name;
  677 + var params = {
  678 + resId: resId,
  679 + kpiId: kpiId,
  680 + flag: flag,
  681 + warning: warning,
  682 + ident: ident,
  683 + trend: trend,
  684 + name: name
  685 + };
  686 + common.openLineChart(name, params);
  687 + });
  688 + //监听告警压制等操作配置
  689 + $('#' + targetId).find('.pie-legend-num').hover(function () {
  690 + var $that = $(this);
  691 + var $btn = $that.find(".detail_row_menu");
  692 + if ($btn.length > 0) {
  693 + $(".layui-card-body").find(".detail_row_menu:not(.hide)").addClass("hide")
  694 + $btn.removeClass("hide");
  695 + }
  696 + });
  697 + filterSuppressMonitor(resId);
  698 +
  699 + // }, 300)
  700 + }
  701 + if (linkData.length > 0) {
  702 + linkData.map(item => {
  703 + linkStr += `<div class="lay-row-item lay-row-item-num">
  704 + <div class="lay-row-title-label">` + item.name + `</div>
  705 + <div class="lay-row-num" data-kpiid="` + item.id + `"
  706 + data-name="` + item.name + `" data-warning="1" data-ident="1"
  707 + data-trend="0" data-flag="` + item.flag + `"
  708 + ><span class="lay-row-num-val">` + Math.round(item.value) + `</span>
  709 + <a class="detail_row_menu hide" data-id="`+item.id+`" data-kpiid="` + item.id + `"
  710 + data-name="` + item.name + `" data-kpiname="` + item.name + `" data-warning="1" data-ident="1"
  711 + data-trend="0" data-flag="` + item.flag + `" data-unit="` + item.unit + `"
  712 + data-hidem="true" data-canca="true" data-incaing="true" data-restype="` + item.resType + `" >
  713 + <img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png">
  714 + </a></div>
  715 + </div>`
  716 + })
  717 + }
  718 + } else {
  719 + linkStr = '';
  720 + }
  721 + $("#"+linkTargetId).html(linkStr);
  722 +
  723 + //监听编辑状态下的复选框事件
  724 + getCheckedBoxData();
  725 + //监听告警压制等操作配置
  726 + $('#' + linkTargetId).find('.lay-row-item-num .lay-row-num').hover(function () {
  727 + var $that = $(this);
  728 + var $btn = $that.find(".detail_row_menu");
  729 + if ($btn.length > 0) {
  730 + $(".layui-card-body").find(".detail_row_menu:not(.hide)").addClass("hide")
  731 + $btn.removeClass("hide");
  732 + }
  733 + });
  734 + //监听过滤压制等事件
  735 + filterSuppressMonitor(resId);
  736 + //链接数值下探 ,打开性能曲线
  737 + $(".lay-row-item-num .lay-row-num .lay-row-num-val").unbind('click').click(function () {
  738 + let kpiId=$(this).parent().data('kpiid');
  739 + let flag=$(this).parent().data('flag');
  740 + let warning=$(this).parent().data('warning');
  741 + let ident=$(this).parent().data('ident');
  742 + let trend=$(this).parent().data('trend');
  743 + let name=$(this).parent().data('name');
  744 + var params = {
  745 + resId: resId,
  746 + kpiId: kpiId,
  747 + flag: flag,
  748 + warning: warning,
  749 + ident: ident,
  750 + trend: trend,
  751 + name: name
  752 + };
  753 + common.openLineChart(name, params);
  754 + })
  755 +
  756 + })
  757 + })
  758 + },
504 /** 759 /**
505 * 渲染饼状图 760 * 渲染饼状图
506 * @param targetId 饼状图区域ID 761 * @param targetId 饼状图区域ID
@@ -34,6 +34,9 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { @@ -34,6 +34,9 @@ layui.define(['commonDetail','common', 'admin'], function (exports) {
34 var diskkpi = "KPI9D22EAB6,KPI5CA7AA50,KPI98183B26,KPI66BD013F,KPI3E6ED38B,KPI97373ED0,KPI95378FE0"; 34 var diskkpi = "KPI9D22EAB6,KPI5CA7AA50,KPI98183B26,KPI66BD013F,KPI3E6ED38B,KPI97373ED0,KPI95378FE0";
35 // ogg信息 35 // ogg信息
36 var oggkpi = "KPI95C50C7C,KPIEC53A8C4,KPI03937134,KPI1A122D84,KPI16282DF0"; 36 var oggkpi = "KPI95C50C7C,KPIEC53A8C4,KPI03937134,KPI1A122D84,KPI16282DF0";
  37 + //lsq cpu百分比 2022-07-04
  38 + var cpupiekpi = "KPI1E378242,KPI41B4C1B4,KPI6AC0FB43,KPI6F620E2B";
  39 + var linkKpi = "KPI7C714058,KPID152C818,KPIA2EA1646,KPI780EFE90";
37 if (os === 'windows'){ 40 if (os === 'windows'){
38 $($("#x86server_filesysMore").parents(".lay-row-item")).hide(); 41 $($("#x86server_filesysMore").parents(".lay-row-item")).hide();
39 $($("#x86server_inodeMore").parents(".lay-row-item")).hide(); 42 $($("#x86server_inodeMore").parents(".lay-row-item")).hide();
@@ -79,6 +82,8 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { @@ -79,6 +82,8 @@ layui.define(['commonDetail','common', 'admin'], function (exports) {
79 commonDetail.renderLineCharat("x86server_cpu_linechart", resId, "KPI7054BC34", "CPU使用率", "cpu"); 82 commonDetail.renderLineCharat("x86server_cpu_linechart", resId, "KPI7054BC34", "CPU使用率", "cpu");
80 //内存使用率走势(12小时) 83 //内存使用率走势(12小时)
81 commonDetail.renderLineCharat("x86server_memery_linechart", resId, "KPI31CB8D97", "内存使用率", "mem"); 84 commonDetail.renderLineCharat("x86server_memery_linechart", resId, "KPI31CB8D97", "内存使用率", "mem");
  85 + //lsq cpu百分比 2022-07-04
  86 + commonDetail.renderPieChartLink("x86server_cpupie",resId,cpupiekpi,"CPU百分比",'CPU','x86server_linkdata',linkKpi);
82 87
83 if (os === 'windows') { 88 if (os === 'windows') {
84 //磁盘使用情况 89 //磁盘使用情况
@@ -34,6 +34,9 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { @@ -34,6 +34,9 @@ layui.define(['commonDetail','common', 'admin'], function (exports) {
34 // ogg信息 34 // ogg信息
35 var oggkpi = "KPI95C50C7C,KPIEC53A8C4,KPI03937134,KPI1A122D84,KPI16282DF0"; 35 var oggkpi = "KPI95C50C7C,KPIEC53A8C4,KPI03937134,KPI1A122D84,KPI16282DF0";
36 36
  37 + //lsq cpu百分比 2022-07-04
  38 + var cpupiekpi = "KPI1E378242,KPI41B4C1B4,KPI6AC0FB43,KPI6F620E2B";
  39 + var linkKpi = "KPI7C714058,KPID152C818,KPIA2EA1646,KPI780EFE90";
37 x86virtual(); 40 x86virtual();
38 function x86virtual(){ 41 function x86virtual(){
39 //资源状态 42 //资源状态
@@ -52,6 +55,8 @@ layui.define(['commonDetail','common', 'admin'], function (exports) { @@ -52,6 +55,8 @@ layui.define(['commonDetail','common', 'admin'], function (exports) {
52 commonDetail.renderLineCharat("x86virtual_cpu_linechart",resId,"KPI7054BC34","CPU使用率","cpu"); 55 commonDetail.renderLineCharat("x86virtual_cpu_linechart",resId,"KPI7054BC34","CPU使用率","cpu");
53 //内存使用率走势(12小时) 56 //内存使用率走势(12小时)
54 commonDetail.renderLineCharat("x86virtual_memery_linechart",resId,"KPI31CB8D97","内存使用率","mem"); 57 commonDetail.renderLineCharat("x86virtual_memery_linechart",resId,"KPI31CB8D97","内存使用率","mem");
  58 + //lsq cpu百分比 2022-07-04
  59 + commonDetail.renderPieChartLink("x86virtual_cpupie",resId,cpupiekpi,"CPU百分比",'CPU','x86virtual_linkdata',linkKpi);
55 60
56 //磁盘IO读速率 61 //磁盘IO读速率
57 commonDetail.renderLineCharat("x86virtual_disk_ioread_linechart",resId,"KPI97373ED0","磁盘IO读速率","disk", null, 'KPI9D22EAB6'); 62 commonDetail.renderLineCharat("x86virtual_disk_ioread_linechart",resId,"KPI97373ED0","磁盘IO读速率","disk", null, 'KPI9D22EAB6');
@@ -23,7 +23,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -23,7 +23,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
23 var noticeUserChart = echarts.init(document.getElementById('notice_chart_user')); 23 var noticeUserChart = echarts.init(document.getElementById('notice_chart_user'));
24 var noticeTypeChart = echarts.init(document.getElementById('notice_chart_type')); 24 var noticeTypeChart = echarts.init(document.getElementById('notice_chart_type'));
25 // var noticeUserChartNew = echarts.init(document.getElementById('notice_chart_user_new')); 25 // var noticeUserChartNew = echarts.init(document.getElementById('notice_chart_user_new'));
26 - 26 + // lsq 告警指标 2022-07-05
  27 + var alarmKpi= '';
27 //回车搜索 28 //回车搜索
28 $('#notice_search_keyword').keydown(function (e) { 29 $('#notice_search_keyword').keydown(function (e) {
29 if (e.keyCode === 13) { 30 if (e.keyCode === 13) {
@@ -56,7 +57,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -56,7 +57,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
56 busId: busId, 57 busId: busId,
57 resType: resType, 58 resType: resType,
58 usernames:userNames, 59 usernames:userNames,
59 - isSend: $('#notice_search_isSend').val() 60 + isSend: $('#notice_search_isSend').val(),
  61 + alarmKpi: $("#noticeAlarmKpiSearchBox").val(),
  62 + way:$('#noticeWaySearchBox').val()
60 } 63 }
61 , height: 'full-380' 64 , height: 'full-380'
62 , page: { 65 , page: {
@@ -284,7 +287,51 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -284,7 +287,51 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
284 287
285 } 288 }
286 }); 289 });
287 - 290 + // lsq 告警指标下拉列表 2022-07-05
  291 + $.ajax({
  292 + url: common.domainName + '/api-web/manage/kpi/findKpiInAlarm?access_token='+accessToken+'&tableName=b_alarm',
  293 + type: "get",
  294 + success:function (res) {
  295 + var kpis = res.data;
  296 + var html = '<option value="">=指标名称=</option>'
  297 + $.each(kpis,function (i,e) {
  298 + html+='<option value="'+e.kpiId+'">'+e.kpiName+'</option>'
  299 + })
  300 + $("#noticeAlarmKpiSearchBox").html('');
  301 + $("#noticeAlarmKpiSearchBox").append(html);
  302 + form.render();
  303 + }
  304 + })
  305 + //lsq 通知方式下拉列表 2022-07-07
  306 + $.ajax({
  307 + url: domainName + '/api-web/manage/ddic/findSucDdics/notice_type?access_token='+accessToken,
  308 + type: "POST",
  309 + success:function (res) {
  310 + var ways = res.data;
  311 + var html = '<option value="">=通知方式=</option>'
  312 + $.each(ways,function (i,e) {
  313 + html+='<option value="'+e.ddicCode+'">'+e.ddicName+'</option>'
  314 + })
  315 + $("#noticeWaySearchBox").html('');
  316 + $("#noticeWaySearchBox").append(html);
  317 + form.render();
  318 + }
  319 + })
  320 + //lsq 快速检查字典数据 2022-07-05
  321 + $.ajax({
  322 + url: domainName + '/api-web/manage/ddic/findSucDdics/quick_search?access_token='+accessToken,
  323 + type: "POST",
  324 + success:function (res) {
  325 + var quickSearchs = res.data;
  326 + var html = ''
  327 + $.each(quickSearchs,function (i,e) {
  328 + html+=' <span data-code="'+e.ddicCode+'">'+e.ddicName+'</span>'
  329 + })
  330 + $("#quick_search").html('');
  331 + $("#quick_search").append(html);
  332 + form.render();
  333 + }
  334 + })
288 //刷新表格 335 //刷新表格
289 function reloadTable() { 336 function reloadTable() {
290 noticeTable.reload({ 337 noticeTable.reload({
@@ -295,7 +342,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -295,7 +342,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
295 resType: resType, 342 resType: resType,
296 isSend: $('#notice_search_isSend').val(), 343 isSend: $('#notice_search_isSend').val(),
297 usernames:userNames, 344 usernames:userNames,
298 - page: 1 345 + page: 1,
  346 + alarmKpi: $("#noticeAlarmKpiSearchBox").val(),
  347 + way:$('#noticeWaySearchBox').val()
299 } 348 }
300 }); 349 });
301 } 350 }
@@ -529,7 +578,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -529,7 +578,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
529 keyword: $('#notice_search_keyword').val(), 578 keyword: $('#notice_search_keyword').val(),
530 busId: busId, 579 busId: busId,
531 resType: resType, 580 resType: resType,
532 - isSend: $('#notice_search_isSend').val() 581 + isSend: $('#notice_search_isSend').val(),
  582 + alarmKpi: $("#noticeAlarmKpiSearchBox").val(),
  583 + way:$('#noticeWaySearchBox').val()
533 }; 584 };
534 585
535 $.ajax({ 586 $.ajax({
@@ -583,7 +634,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -583,7 +634,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
583 keyword: $('#notice_search_keyword').val(), 634 keyword: $('#notice_search_keyword').val(),
584 busId: busId, 635 busId: busId,
585 resType: resType, 636 resType: resType,
586 - isSend: $('#notice_search_isSend').val() 637 + isSend: $('#notice_search_isSend').val(),
  638 + alarmKpi: $("#noticeAlarmKpiSearchBox").val(),
  639 + way:$('#noticeWaySearchBox').val()
587 }; 640 };
588 var noticeTypeChartNew = echarts.init(document.getElementById('notice_chart_type_new')); 641 var noticeTypeChartNew = echarts.init(document.getElementById('notice_chart_type_new'));
589 $.ajax({ 642 $.ajax({
@@ -1056,7 +1056,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', @@ -1056,7 +1056,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions',
1056 btn: ['完成'], 1056 btn: ['完成'],
1057 content: laytpl(res.body).render(JSON.stringify({username:usernames})), 1057 content: laytpl(res.body).render(JSON.stringify({username:usernames})),
1058 yes: function (index, layero) {//保存业务授权 1058 yes: function (index, layero) {//保存业务授权
1059 - debugger  
1060 var busType = layui.bustype({username:usernames[0], mode: 'bind'}); 1059 var busType = layui.bustype({username:usernames[0], mode: 'bind'});
1061 var busTypeData = busType.getData(); 1060 var busTypeData = busType.getData();
1062 var loding = layer.load(2); 1061 var loding = layer.load(2);
@@ -8040,3 +8040,87 @@ form[lay-filter="activewarning-form"] .layui-inline { @@ -8040,3 +8040,87 @@ form[lay-filter="activewarning-form"] .layui-inline {
8040 white-space: nowrap; 8040 white-space: nowrap;
8041 8041
8042 } 8042 }
  8043 +/*lsq x86新增指标在详情页下的样式 2022-07-04*/
  8044 +.template .lay-row-item-num {
  8045 + background-color: #f8f8f8;
  8046 + display: flex;
  8047 + justify-content: space-around;
  8048 + align-items: center;
  8049 + min-height: 64px;
  8050 +}
  8051 +.template .lay-row-item-num .lay-row-num{
  8052 + text-decoration: underline;
  8053 + font-size: 32px;
  8054 + cursor: pointer;
  8055 +}
  8056 +.cpupie_chart{
  8057 + width:100%;
  8058 +}
  8059 +.cpupie_chart div:first-child{
  8060 + z-index: 99;
  8061 +}
  8062 +.pie-circleStr{
  8063 + position: absolute;
  8064 + top: 0;
  8065 + left: 0;
  8066 + right: 60%;
  8067 + bottom: 0px;
  8068 + display: flex;
  8069 + align-items: center;
  8070 + justify-content: center;
  8071 + font-size: 16px;
  8072 + z-index: 9;
  8073 +}
  8074 +.pie-circleStr-title{
  8075 + border: 1px solid #CCCCCC;
  8076 + height: 55px;
  8077 + width: 55px;
  8078 + border-radius: 50%;
  8079 + display: flex;
  8080 + justify-content: center;
  8081 + align-items: center;
  8082 +}
  8083 +.pie-legend{
  8084 + position: absolute;
  8085 + top: 0;
  8086 + right: 0;
  8087 + left: 55%;
  8088 + height: 115px;
  8089 + display: flex;
  8090 + flex-flow: column;
  8091 + justify-content: center;
  8092 + z-index: 100;
  8093 +}
  8094 +.pie-legend-item{
  8095 + display:flex;
  8096 + align-items: center;
  8097 + font-size: 12px;
  8098 + line-height: 23px;
  8099 +}
  8100 +.pie-legend-icon{
  8101 + width:20px;
  8102 + height:4px;
  8103 + margin-right: 3px;
  8104 + display: none;
  8105 +}
  8106 +.pie-legend-num{
  8107 + cursor: pointer;
  8108 + color:#1e9fff;
  8109 + text-decoration: underline;
  8110 +}
  8111 +/*lsq 通知查询搜索栏 2022-07-05*/
  8112 +.search_button_group{
  8113 + display: flex;
  8114 + justify-content: space-between;
  8115 + padding:6px;
  8116 +}
  8117 +.card_header_search_button{
  8118 + width:330px;
  8119 +}
  8120 +.quick_search span{
  8121 + background-color: #1e9fff;
  8122 + border-radius: 8px;
  8123 + padding: 5px;
  8124 + color: #fff;
  8125 + cursor: pointer;
  8126 +}
@@ -17,9 +17,9 @@ @@ -17,9 +17,9 @@
17 <div class="page-panel"> 17 <div class="page-panel">
18 <div class="main"> 18 <div class="main">
19 <div class="layui-card" style="overflow: hidden"> 19 <div class="layui-card" style="overflow: hidden">
20 - <div class="layui-card-header"> 20 + <div class="layui-card-header" style=" padding: 0 3px;">
21 <div class="layui-status search_panel"> 21 <div class="layui-status search_panel">
22 - <form class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="notice_search_form"> 22 + <form style="padding:5px 0 0 0;" class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="notice_search_form">
23 <div class="layui-form-item"> 23 <div class="layui-form-item">
24 <div class="layui-inline"> 24 <div class="layui-inline">
25 <div class="layui-input-inline layui-input-inline--long"> 25 <div class="layui-input-inline layui-input-inline--long">
@@ -45,21 +45,52 @@ @@ -45,21 +45,52 @@
45 </div> 45 </div>
46 </div> 46 </div>
47 <!--发送状态--> 47 <!--发送状态-->
48 - <div class="layui-inline">  
49 - <div class="layui-input-inline layui-input-inline--long"> 48 + <!--<div class="layui-inline">
  49 + <div class="layui-input-inline layui-input-inline&#45;&#45;long">
50 <select id="notice_search_isSend" lay-filter="notice_search_isSend"> 50 <select id="notice_search_isSend" lay-filter="notice_search_isSend">
51 <option value="1">已发送</option> 51 <option value="1">已发送</option>
52 <option value="">待发送</option> 52 <option value="">待发送</option>
53 </select> 53 </select>
54 </div> 54 </div>
  55 + </div>-->
  56 + <!--lsq 告警指标 2022-07-05-->
  57 + <div class="layui-inline">
  58 + <div class="layui-input-inline">
  59 + <select name="alarmKpi" lay-filter="alarmKpiSearch" lay-search="" id="noticeAlarmKpiSearchBox">
  60 + </select>
  61 + </div>
55 </div> 62 </div>
  63 + <!--lsq 通知方式 2022-07-05-->
56 <div class="layui-inline"> 64 <div class="layui-inline">
57 - <button id="noticeSearchQueryBtn" type="button" class="layui-btn layui-btn-normal" ><i 65 + <div class="layui-input-inline">
  66 + <select name="way" lay-filter="noticeWaySearch" llay-search="" id="noticeWaySearchBox">
  67 + </select>
  68 + </div>
  69 + </div>
  70 + <div class="layui-inline">
  71 + <!-- <button id="noticeSearchQueryBtn" type="button" class="layui-btn layui-btn-normal" ><i
58 class="layui-icon layui-icon-search"></i>查询 72 class="layui-icon layui-icon-search"></i>查询
59 - </button> 73 + </button>-->
60 </div> 74 </div>
61 </div> 75 </div>
62 </form> 76 </form>
  77 +
  78 + </div>
  79 + <div class="search_button_group">
  80 + <div class="quick_search" id="quick_search">
  81 + <span>ip</span>
  82 + <span>ip1</span>
  83 + </div>
  84 +
  85 + <div class="layui-card-header card_header_search_button" >
  86 + <div class="layui-btn-group time-group" id="noticeCount_time_button_id" style="float: right;">
  87 + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" data-period="all">全部</button>
  88 + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm active" data-period="today">今天</button>
  89 + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" data-period="week">本周</button>
  90 + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" data-period="month">本月</button>
  91 + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" data-period="custom">自定义</button>
  92 + </div>
  93 + </div>
63 </div> 94 </div>
64 </div> 95 </div>
65 <div style="display: flex" class="layui-card-echart"> 96 <div style="display: flex" class="layui-card-echart">
@@ -274,9 +274,7 @@ @@ -274,9 +274,7 @@
274 <div class="layui-card"> 274 <div class="layui-card">
275 275
276 <div class="layui-card-body"> 276 <div class="layui-card-body">
277 - <!--  
278 <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search"> 277 <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search">
279 - -->  
280 <div id="resindextree"></div> 278 <div id="resindextree"></div>
281 </div> 279 </div>
282 </div> 280 </div>
@@ -63,6 +63,12 @@ @@ -63,6 +63,12 @@
63 63
64 <div class="lay-row"> 64 <div class="lay-row">
65 <div class="lay-row-item"> 65 <div class="lay-row-item">
  66 + <h5 class="lay-row-title">CPU百分比
  67 + </h5>
  68 + <div id="x86server_cpupie" class="pie-wrap dasboard cpupie_chart">
  69 + </div>
  70 + </div>
  71 + <div class="lay-row-item">
66 <h5 class="lay-row-title">CPU使用率 72 <h5 class="lay-row-title">CPU使用率
67 <a class="detail_row_menu hide"> 73 <a class="detail_row_menu hide">
68 <img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png"> 74 <img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png">
@@ -62,6 +62,12 @@ @@ -62,6 +62,12 @@
62 </div> 62 </div>
63 <div class="lay-row"> 63 <div class="lay-row">
64 <div class="lay-row-item"> 64 <div class="lay-row-item">
  65 + <h5 class="lay-row-title">CPU百分比
  66 + </h5>
  67 + <div id="x86virtual_cpupie" class="pie-wrap dasboard cpupie_chart">
  68 + </div>
  69 + </div>
  70 + <div class="lay-row-item">
65 <h5 class="lay-row-title">CPU使用率 71 <h5 class="lay-row-title">CPU使用率
66 <a class="detail_row_menu hide"> 72 <a class="detail_row_menu hide">
67 <img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png"> 73 <img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png">
@@ -106,6 +112,25 @@ @@ -106,6 +112,25 @@
106 </ul> 112 </ul>
107 </div> 113 </div>
108 </div> 114 </div>
  115 + <!--lsq x86新增的指标信息 2022-07-04-->
  116 + <div class="lay-row" id="x86virtual_linkdata">
  117 + <!--<div class="lay-row-item lay-row-item-num">
  118 + <div class="lay-row-title-label">总链接数</div>
  119 + <div class="lay-row-num">23</div>
  120 + </div>
  121 + <div class="lay-row-item lay-row-item-num">
  122 + <div class="lay-row-title-label">保持状态链接数</div>
  123 + <div class="lay-row-num"></div>
  124 + </div>
  125 + <div class="lay-row-item lay-row-item-num">
  126 + <div class="lay-row-title-label">time_wait状态链接数</div>
  127 + <div class="lay-row-num"></div>
  128 + </div>
  129 + <div class="lay-row-item lay-row-item-num">
  130 + <div class="lay-row-title-label">close_wait状态链接数</div>
  131 + <div class="lay-row-num"></div>
  132 + </div>-->
  133 + </div>
109 <div class="lay-row"> 134 <div class="lay-row">
110 <div class="lay-row-item"> 135 <div class="lay-row-item">
111 <h5 class="lay-row-title">文件系统<span id="x86virtual_filesysDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="x86virtual_filesysMore" class="layui-table-link">更多</span></h5> 136 <h5 class="lay-row-title">文件系统<span id="x86virtual_filesysDownload" class="layui-table-link" style="margin-left: 10px;">下载</span><span id="x86virtual_filesysMore" class="layui-table-link">更多</span></h5>
@@ -19,7 +19,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -19,7 +19,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
19 var admin = layui.admin; 19 var admin = layui.admin;
20 var commonDetail = layui.commonDetail; 20 var commonDetail = layui.commonDetail;
21 var domainName = common.domainName; 21 var domainName = common.domainName;
22 - 22 + var resHealthKeyWord = '';
  23 + var resindexKeyword = '';
23 var resTypeSelectExclude = ['HOST_MINICOMPUTER', 'HOST_MINICOMPUTER_SERVER', 'HOST_BMC', 'HOST_X86SERVER'] 24 var resTypeSelectExclude = ['HOST_MINICOMPUTER', 'HOST_MINICOMPUTER_SERVER', 'HOST_BMC', 'HOST_X86SERVER']
24 25
25 var curTreeNode = ''; 26 var curTreeNode = '';
@@ -55,8 +56,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -55,8 +56,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
55 $('#resindexTable').on('click', '[data-res-card]', function () { 56 $('#resindexTable').on('click', '[data-res-card]', function () {
56 var nodeId = $(this).attr("data-res-card"); 57 var nodeId = $(this).attr("data-res-card");
57 currentResType = nodeId;//将当前点击的资源类型付给参数 58 currentResType = nodeId;//将当前点击的资源类型付给参数
58 - selectedTreeNode('[data-id="' + currentResType + '"]','[data-id="' + currentResType.split('_')[0] + '"]');  
59 - renderList(currentResType,''); 59 + selectedTreeNode('[data-id="' + currentResType + '"]', '[data-id="' + currentResType.split('_')[0] + '"]');
  60 + renderList(currentResType, '');
60 // renderList($(this).data("res-card")); 61 // renderList($(this).data("res-card"));
61 // $("div[data-id='"+nodeId+"']").find(".layui-tree-entry:first span.layui-tree-txt").trigger("click") 62 // $("div[data-id='"+nodeId+"']").find(".layui-tree-entry:first span.layui-tree-txt").trigger("click")
62 }); 63 });
@@ -126,7 +127,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -126,7 +127,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
126 $('#resDetailContent').empty(); 127 $('#resDetailContent').empty();
127 $('#resDetailContent').hide(); 128 $('#resDetailContent').hide();
128 $('#treeTableContent').hide(); 129 $('#treeTableContent').hide();
129 - 130 + $('#resindex_keyword').val(resindexKeyword)
130 //如果是阿里云,则显示阿里云的列表 131 //如果是阿里云,则显示阿里云的列表
131 if(resType && resType == 'ALI_CLOUD_PLAT'){ 132 if(resType && resType == 'ALI_CLOUD_PLAT'){
132 $(".resindexlist").show(); 133 $(".resindexlist").show();
@@ -141,7 +142,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -141,7 +142,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
141 142
142 window.setResizeEvents('autoHeight', autoHeight); 143 window.setResizeEvents('autoHeight', autoHeight);
143 admin.req({ 144 admin.req({
144 - url: common.domainName + '/api-web/home/resource/healthByResType?pResType=' + resType, 145 + url: common.domainName + '/api-web/home/resource/healthByResType?pResType=' + resType +'&keyword=' + resHealthKeyWord,
145 }).done(function (res) { 146 }).done(function (res) {
146 laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) { 147 laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) {
147 resindexTable.html(html); 148 resindexTable.html(html);
@@ -149,40 +150,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -149,40 +150,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
149 }); 150 });
150 } 151 }
151 152
152 - admin.req({  
153 - url: common.domainName + '/api-web/home/resType/getTree?notExist=machineroom&table=resources&exist=HOST_MINICOMPUTER_SERVER',  
154 - type: 'get',  
155 - sync: true,  
156 - done: function (res) {  
157 - layer.close(loading);  
158 - loadResTree(res.data);  
159 - //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始  
160 - if (res.data.length === 0) {  
161 - var resindexTable = $('#resindexTable');  
162 - autoHeight(resindexTable);  
163 - laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) {  
164 - resindexTable.html(html);  
165 - });  
166 - }  
167 - loadParamSelect();  
168 - //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始  
169 - }  
170 - }).error(function () {  
171 - layer.close(loading);  
172 - //joke add 20200407  
173 - //树无数据提示  
174 - tree.render({  
175 - elem: '#resindextree',  
176 - showLine: false,  
177 - data: new Array()  
178 - });  
179 - //右侧无数据提示  
180 - var resindexTable = $('#resindexTable');  
181 - autoHeight(resindexTable);  
182 - laytpl($('#resindexTpl').html()).render({list: new Array()}, function (html) {  
183 - resindexTable.html(html);  
184 - });  
185 - }); 153 +
186 154
187 //不带分页的列表 155 //不带分页的列表
188 function renderTableList(resType) { 156 function renderTableList(resType) {
@@ -243,7 +211,44 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -243,7 +211,44 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
243 }); 211 });
244 } 212 }
245 //左侧树 213 //左侧树
246 - function loadResTree(data) { 214 + function loadResTree(val) {
  215 + admin.req({
  216 + url: common.domainName + '/api-web/home/resType/getTree?notExist=machineroom&table=resources&exist=HOST_MINICOMPUTER_SERVER&keyword='+val,
  217 + type: 'get',
  218 + sync: true,
  219 + done: function (res) {
  220 + layer.close(loading);
  221 + treeList(res.data);
  222 + //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始
  223 + if (res.data.length === 0) {
  224 + var resindexTable = $('#resindexTable');
  225 + autoHeight(resindexTable);
  226 + laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) {
  227 + resindexTable.html(html);
  228 + });
  229 + }
  230 + loadParamSelect();
  231 + //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始
  232 + }
  233 + }).error(function () {
  234 + layer.close(loading);
  235 + //joke add 20200407
  236 + //树无数据提示
  237 + tree.render({
  238 + elem: '#resindextree',
  239 + showLine: false,
  240 + data: new Array()
  241 + });
  242 + //右侧无数据提示
  243 + var resindexTable = $('#resindexTable');
  244 + autoHeight(resindexTable);
  245 + laytpl($('#resindexTpl').html()).render({list: new Array()}, function (html) {
  246 + resindexTable.html(html);
  247 + });
  248 + });
  249 + }
  250 +
  251 + function treeList(data){
247 //默认展开全部一级节点 252 //默认展开全部一级节点
248 $.each(data,function (i,v) { 253 $.each(data,function (i,v) {
249 v.spread = true; 254 v.spread = true;
@@ -309,7 +314,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -309,7 +314,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
309 } 314 }
310 } 315 }
311 } 316 }
312 -  
313 //回选树节点 317 //回选树节点
314 function selectedTreeNode(target,parentTarget) { 318 function selectedTreeNode(target,parentTarget) {
315 var el = $(target).find('.layui-tree-txt').eq(0); 319 var el = $(target).find('.layui-tree-txt').eq(0);
@@ -687,12 +691,20 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -687,12 +691,20 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
687 //回车搜索 691 //回车搜索
688 $('#resindex_keyword').keydown(function (e) { 692 $('#resindex_keyword').keydown(function (e) {
689 if (e.keyCode === 13) { 693 if (e.keyCode === 13) {
  694 + resindexKeyword = $(this).val();
690 // renderList(currentResType); 695 // renderList(currentResType);
691 reloadTable(); 696 reloadTable();
692 return false; 697 return false;
693 } 698 }
694 }); 699 });
695 - 700 + $(".layui-input-search").keydown(function (e) {
  701 + if (e.keyCode === 13) {
  702 + loadResTree($(this).val());
  703 + resHealthKeyWord = $(this).val();
  704 + resindexKeyword = $(this).val();
  705 + }
  706 + });
  707 + loadResTree('');
696 //资源详细信息 708 //资源详细信息
697 function renderDetail(resId, resType) { 709 function renderDetail(resId, resType) {
698 $('#resIndexContent').hide(); 710 $('#resIndexContent').hide();
@@ -950,7 +962,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -950,7 +962,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
950 , url: common.domainName + '/api-web/home/res-list/' + resType 962 , url: common.domainName + '/api-web/home/res-list/' + resType
951 , where: { 963 , where: {
952 access_token: accessToken, 964 access_token: accessToken,
953 - resName: $("#resindex_keyword").val(), 965 + resName: resindexKeyword,
954 busId: bizId, 966 busId: bizId,
955 resHealth: $("#resStatus").val(), 967 resHealth: $("#resStatus").val(),
956 colonlyId: $("#res_colony").val(), 968 colonlyId: $("#res_colony").val(),
@@ -1040,6 +1052,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1040,6 +1052,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1040 $('#resDetailContent').empty(); 1052 $('#resDetailContent').empty();
1041 $('#resDetailContent').hide(); 1053 $('#resDetailContent').hide();
1042 $('#treeTableContent').hide(); 1054 $('#treeTableContent').hide();
  1055 + $('#resindex_keyword').val(resindexKeyword)
1043 //加载查询条件 1056 //加载查询条件
1044 renderSerach(resType); 1057 renderSerach(resType);
1045 1058
@@ -1077,7 +1090,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1077,7 +1090,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1077 , url: common.domainName + '/api-web/home/res-list/' + resType 1090 , url: common.domainName + '/api-web/home/res-list/' + resType
1078 , where: { 1091 , where: {
1079 access_token: accessToken, 1092 access_token: accessToken,
1080 - resName: $("#resindex_keyword").val() !== '' ? $("#resindex_keyword").val() : id, 1093 + resName: resindexKeyword !== '' ? resindexKeyword : id,
1081 busId: bizId, 1094 busId: bizId,
1082 resHealth: $("#resStatus").val(), 1095 resHealth: $("#resStatus").val(),
1083 colonlyId: $("#res_colony").val(), 1096 colonlyId: $("#res_colony").val(),
@@ -1108,8 +1121,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1108,8 +1121,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1108 resTopo(); 1121 resTopo();
1109 1122
1110 commonCols.colsClickEvent(editFlag); 1123 commonCols.colsClickEvent(editFlag);
1111 -  
1112 - loadRightResTypeSelectEvent(curTreeNode.data.id, "normal", res.obj); 1124 + loadRightResTypeSelectEvent(curTreeNode.id ? curTreeNode.id : curTreeNode.data.id, "normal", res.obj);
1113 1125
1114 //表格排序监听 joke add 20200408 1126 //表格排序监听 joke add 20200408
1115 table.on('sort(resListTable)', function (obj) { 1127 table.on('sort(resListTable)', function (obj) {
@@ -1164,7 +1176,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1164,7 +1176,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1164 //加载资源池、集群等查询条件 1176 //加载资源池、集群等查询条件
1165 function renderSerach(resType,subflag) { 1177 function renderSerach(resType,subflag) {
1166 //清空查询条件 joke add 20200409 开始 1178 //清空查询条件 joke add 20200409 开始
1167 - $('#resindex_keyword').val('');  
1168 $('#resStatus').val(''); 1179 $('#resStatus').val('');
1169 // $('#resListBizTypes').val(''); 1180 // $('#resListBizTypes').val('');
1170 if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){ 1181 if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){
@@ -1398,7 +1409,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1398,7 +1409,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1398 //加载右侧资源类型下拉框 1409 //加载右侧资源类型下拉框
1399 function loadRightResTypeSelectEvent(resType, type, obj) { 1410 function loadRightResTypeSelectEvent(resType, type, obj) {
1400 layer.closeAll('tips'); 1411 layer.closeAll('tips');
1401 -  
1402 var str = ''; 1412 var str = '';
1403 var domStr = 'resListContent' 1413 var domStr = 'resListContent'
1404 var fun = reloadTable; 1414 var fun = reloadTable;
@@ -1440,10 +1450,10 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1440,10 +1450,10 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1440 } 1450 }
1441 1451
1442 }); 1452 });
1443 - if(resType == 'HOST_MINICOMPUTER' || resType=='HUAWEI_CLOUD_CLUSTER' || resType=='HUAWEI_CLOUD_COLONY' || resType=='HUAWEI_CLOUD_PHYSICSHOST' || 1453 + if (resType == 'HOST_MINICOMPUTER' || resType == 'HUAWEI_CLOUD_CLUSTER' || resType == 'HUAWEI_CLOUD_COLONY' || resType == 'HUAWEI_CLOUD_PHYSICSHOST' ||
1444 resType == 'HUAWEI_CLOUD_STORAGE' || resType == 'HUAWEI_CLOUD_SWITCHBOARD' || resType == 'HUAWEI_CLOUD_FIREWALL' || resType == 'ALI_CLOUD_RDS' 1454 resType == 'HUAWEI_CLOUD_STORAGE' || resType == 'HUAWEI_CLOUD_SWITCHBOARD' || resType == 'HUAWEI_CLOUD_FIREWALL' || resType == 'ALI_CLOUD_RDS'
1445 - || resType == 'ALI_CLOUD_SLB' || resType == 'ALI_CLOUD_OSS'||resType=='VIRTUALIZATION_VMWARE_VHOST'||resType=='MIDDLEWARE_WEBLOGIC'  
1446 - ){//屏蔽连接状态 1455 + || resType == 'ALI_CLOUD_SLB' || resType == 'ALI_CLOUD_OSS' || resType == 'VIRTUALIZATION_VMWARE_VHOST' || resType == 'MIDDLEWARE_WEBLOGIC'
  1456 + ) {//屏蔽连接状态
1447 $('.info-box-count').eq(3).hide(); 1457 $('.info-box-count').eq(3).hide();
1448 $('#link_state_div').hide(); 1458 $('#link_state_div').hide();
1449 } 1459 }
@@ -1459,7 +1469,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1459,7 +1469,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1459 } 1469 }
1460 , where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式) 1470 , where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式)
1461 access_token: accessToken, 1471 access_token: accessToken,
1462 - resName: $("#resindex_keyword").val(), 1472 + resName: resindexKeyword,
1463 busId: bizId, 1473 busId: bizId,
1464 resHealth: $("#resStatus").val(), 1474 resHealth: $("#resStatus").val(),
1465 colonlyId: $("#res_colony").val(), 1475 colonlyId: $("#res_colony").val(),