Authored by 鲁尚清

Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web into …

…master-v32-lushangqing
# 代码包路径
````
【前端】hg-monitor-web-base\src\main\resources\static\src\views\reportView
````
### 说明
````
集成积木报表
````
### 菜单配置说明
````
菜单URL:reportView/index/reportCode=dddd
dddd = 展示的报表编号
````
... ...
... ... @@ -334,7 +334,9 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
field: 'resName', title: '资源名称', minWidth: 250, sort: true,
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'},
{field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'},
{field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storageSetRateTpl'},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -349,7 +351,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
field: 'resName', title: '资源名称', minWidth: 250, sort: true,
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'},
{field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -365,6 +368,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -380,6 +385,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -395,6 +402,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -410,6 +419,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -425,6 +436,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -440,6 +453,10 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.memorySize}} GB</div>'},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'ptName', title: '所属平台', minWidth: x_130, align: 'center', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ... @@ -455,6 +472,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
templet: '#resindex_resName'
},
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
{field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},
{field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},
... ...
... ... @@ -46,6 +46,8 @@ layui.define(['admin', 'table', 'common','sessions','commonDetail'], function (e
$("#hostminicomputer_jbxx").html(li);
}
});
//活动告警
commonDetail.renderActiveAlarms('hostminicomputer_alarmlist',resId);
// 小型机分区信息
table.render({
... ...
... ... @@ -66,7 +66,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
{title: '序号', align: "center", type: 'numbers',width: '3%'}
, {field: 'type', title: '通知类型', align: 'center', sort: true, width:130,
templet: function (d){
switch (d.type){
if(d.type) {
switch (d.type) {
case 10:
return '告警通知'
break;
... ... @@ -82,7 +83,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
case 99:
return '测试通知'
break;
default:
return '告警通知'
break;
}
}else {
return '告警通知'
}
}}
, {field: 'way', title: '通知方式', align: 'center', sort: true, width:120,
templet: function (d){
... ... @@ -96,10 +103,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
case 'message':
return '<div class="small-icon small-icon-msg"></div>'
break;
default:
return '<div class="small-icon small-icon-wechat"></div>'
break;
}
}}
// , {field: 'targetId', title: '通知对象', align: 'center', sort: true, width:180}
, {field: 'content', title: '通知内容', align: 'right', sort: true, minWidth: 300,}
, {field: 'content', title: '通知内容', align: 'left', sort: true, minWidth: 300,}
, {field: 'nickname', title: '通知用户', align: 'center', sort: true, width:200}
, {field: 'noticeTime', title: '通知时间', align: 'center', sort: true, width:180}
// , {field: 'createTime',title: '入库时间',align: 'center', sort: true,width:180}
... ...
... ... @@ -1261,8 +1261,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
})
}
if(subflag && !resTypeSelectExclude.includes(resType)){
if(/ALI_CLOUD_/.test(resType) || /HUAWEI_CLOUD_/.test(resType)) {
return
}
$("#res_sub_restype").parent().parent().removeClass("hide");
$(".top-head-info").removeClass("hide");
var url = `${common.domainName}/api-web/bResource/finsResTypeListByParentId?resType=${resType}`
admin.req({
url: url
... ...
<title>报表</title>
<script type="text/html" template>
{{#
var viewURL = sessionStorage.getItem('jimuReport') + '/page/reportCode?access_token='+localStorage.getItem('access_token');
layui.use(['sessions','common','admin'], function () {
var $ = layui.$;
var common = layui.common;
var admin = layui.admin;
var arr = [];
window.location.hash.split('/').forEach(function (v, i) {
if (v.indexOf('=') != -1 && v.indexOf('reportCode') != -1) {
viewURL = viewURL.replaceAll('reportCode',v.split('=')[1])
}
});
$('#actionListIframe').attr('src',viewURL);
});
}}
<iframe id="actionListIframe" src="{{viewURL}}" frameborder="0" class="layadmin-iframe"></iframe>
</script>
... ...
... ... @@ -23,6 +23,12 @@
<div id="hostminicomputerpartitionlist"></div>
</div>
</div>
<div class="lay-row">
<div class="lay-row-item">
<h5 class="lay-row-title">实时告警动态</h5>
<div id="hostminicomputer_alarmlist"></div>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -564,9 +564,9 @@
<a class="layui-icon layui-icon-rate-solid" data-favid="{{d.favId}}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" data-id="{{d.resId}}" lay-tips="移出收藏夹"></a>
{{# } }}
<a class="layui-icon reslist-view-topo hide" data-resid="{{d.resId}}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont">&#XE515;</i></a>
{{# if (d.resCategory == 'share' && d.hardwareFlag && d.hardwareFlag.endsWith("Y")) { }}
<!--{{# if (d.resCategory == 'share' && d.hardwareFlag && d.hardwareFlag.endsWith("Y")) { }}
<a class="layui-icon reslist-assets-details hide" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont">&#XE517;</i></a>
{{# } }}
{{# } }}-->
</div>
</script>
... ...
... ... @@ -287,29 +287,29 @@ export default {
return {resId: v.resId, kpiId: v.kpiId, kpiFlg: v.flag}
});
// let p = {
// timeScope: timeScope,
// frequency: form.value.scene.frequency,
// resource: resList,
// type : 'avg'
// }
let p = {
"timeScope": timeScope,
"frequency": form.value.scene.frequency,
"resource": [
{
"resId": "F6F24DADC01ADE5DD9583144BE6E8E15",
"kpiId": "KPI20352505",
"kpiFlg": "mem"
},
{
"resId": "C5DC239D719ACAB61231ACED7CE68CD1",
"kpiId": "KPI7054BC34",
"kpiFlg": "cpu"
}
],
"type": "avg"
timeScope: timeScope,
frequency: form.value.scene.frequency,
resource: resList,
type : 'avg'
}
// let p = {
// "timeScope": timeScope,
// "frequency": form.value.scene.frequency,
// "resource": [
// {
// "resId": "F6F24DADC01ADE5DD9583144BE6E8E15",
// "kpiId": "KPI20352505",
// "kpiFlg": "mem"
// },
// {
// "resId": "C5DC239D719ACAB61231ACED7CE68CD1",
// "kpiId": "KPI7054BC34",
// "kpiFlg": "cpu"
// }
// ],
// "type": "avg"
// }
proxy.$http.post(`/api-web/ContrastAnalysis/getLineData`, p, function (res) {
if (res && res.map) {
... ...
... ... @@ -59,31 +59,31 @@ export default {
return {resId: v.resId, kpiId: v.kpiId, kpiFlg: v.flag}
});
// let p = {
// "timeScope": v.node.timeScope,
// "frequency": v.node.frequency,
// "resource": resList,
// "type": "avg"
// }
let p = {
"timeScope": 'DAY',
"frequency": '15',
"resource": [
{
"resId": "F6F24DADC01ADE5DD9583144BE6E8E15",
"kpiId": "KPI20352505",
"kpiFlg": "mem"
},
{
"resId": "C5DC239D719ACAB61231ACED7CE68CD1",
"kpiId": "KPI7054BC34",
"kpiFlg": "cpu"
}
],
"timeScope": v.node.timeScope,
"frequency": v.node.frequency,
"resource": resList,
"type": "avg"
}
// let p = {
// "timeScope": 'DAY',
// "frequency": '15',
// "resource": [
// {
// "resId": "F6F24DADC01ADE5DD9583144BE6E8E15",
// "kpiId": "KPI20352505",
// "kpiFlg": "mem"
// },
// {
// "resId": "C5DC239D719ACAB61231ACED7CE68CD1",
// "kpiId": "KPI7054BC34",
// "kpiFlg": "cpu"
// }
// ],
// "type": "avg"
// }
proxy.$http.post(`/api-web/ContrastAnalysis/getLineData`, p, function (res) {
if (res && res.map) {
let map = res.map;
... ...