|
|
//tencent_cloud_plat_physicshost(腾讯云宿主机)详情页js
|
|
|
layui.define(['commonDetail','common'], function (exports) {
|
|
|
var commonDetail = layui.commonDetail;
|
|
|
var common = layui.common;
|
|
|
//对外暴露的接口
|
|
|
exports('tencent_cloud_plat_physicshost', function (data) {
|
|
|
var resId = '';
|
|
|
var showFlag = common.getUrlParam("show");
|
|
|
if(showFlag && showFlag == '0'){
|
|
|
resId = common.getUrlParam("resId");
|
|
|
}else{
|
|
|
resId = data.resId;
|
|
|
}
|
|
|
commonDetail.bindTips();
|
|
|
|
|
|
//基本信息指标
|
|
|
var baseKpi = "KPIE13DD9A3,KPIF74D9D2B,KPID7BE5E90,KPI4419E8A1,KPI2DC9105C,KPI82B78CAC,KPI0E1DC44E,KPI1635BB9B,KPIBDF93F9C";
|
|
|
//网络资源指标
|
|
|
var netresKpi = "KPI3793A3FE,KPI7311A2F0";
|
|
|
//计算资源指标
|
|
|
var comresKpi = "KPI8DBA891C,KPI19A7770E,KPIC5BEEC49";
|
|
|
//存储资源指标
|
|
|
var storesKpi = "KPIBA50E567,KPI50331084,KPI2C8A6D17";
|
|
|
|
|
|
reload();
|
|
|
|
|
|
//渲染页面
|
|
|
function reload() {
|
|
|
//资源状态
|
|
|
commonDetail.renderResHealth("tencent_cloud_plat_physicshost_health_state", resId);
|
|
|
//基本信息
|
|
|
commonDetail.renderTextCols("tencent_cloud_plat_physicshost_baseinfo",resId,baseKpi,2,);
|
|
|
//网络资源信息
|
|
|
commonDetail.renderText("tencent_cloud_plat_physicshost_netresinfo",resId,netresKpi);
|
|
|
//计算资源信息
|
|
|
commonDetail.renderText("tencent_cloud_plat_physicshost_comresinfo",resId,comresKpi);
|
|
|
//存储资源信息
|
|
|
commonDetail.renderText("tencent_cloud_plat_physicshost_storesinfo",resId,storesKpi);
|
|
|
//CPU使用率
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_CPU_linechart",resId,"KPI7054BC34","CPU使用率","cpu");
|
|
|
//内存总量
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_mem_linechart",resId,"KPIC8EAE5A2","内存总量","mem");
|
|
|
//内存使用量
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_memused_linechart",resId,"KPI592C5FCA","内存使用量","mem");
|
|
|
//SWAP总量
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_swap_linechart",resId,"KPI08D9BF12","SWAP总量","swap");
|
|
|
//SWAP已使用大小
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_swapused_linechart",resId,"KPICBE88F2D","SWAP已使用大小","swap");
|
|
|
//硬盘读流量
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_disk_read_flow_linechart",resId,"KPICF4940F7","硬盘读流量","disk_read_flow");
|
|
|
//硬盘写流量
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_disk_write_flow_linechart",resId,"KPI6C16A077","硬盘写流量","disk_write_flow");
|
|
|
//硬盘读IOPS
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_disk_read_iops_linechart",resId,"KPIE7E304C4","硬盘读IOPS","disk_read_iops");
|
|
|
//硬盘写IOPS
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_disk_write_iops_linechart",resId,"KPI28E8B622","硬盘写IOPS","disk_write_iops");
|
|
|
//root分区使用率
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_root_zone_linechart",resId,"KPI23E06DA3","root分区使用率","root_zone");
|
|
|
//data分区使用率
|
|
|
commonDetail.renderLineCharat("tencent_cloud_plat_physicshost_data_zone_linechart",resId,"KPI751A1F4C","data分区使用率","data_zone");
|
|
|
//活动告警
|
|
|
commonDetail.renderActiveAlarms("tencent_cloud_plat_physicshost_active_alarm",resId);
|
|
|
}
|
|
|
|
|
|
//定时任务
|
|
|
var timer = setInterval(function () {
|
|
|
reload()
|
|
|
},commonDetail.timerTime);
|
|
|
commonDetail.detailTimer.push(timer);
|
|
|
|
|
|
});
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|