Authored by 张凯

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

@@ -337,30 +337,31 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', @@ -337,30 +337,31 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
337 {field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'}, 337 {field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'},
338 {field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'}, 338 {field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'},
339 {field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storageSetRateTpl'}, 339 {field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storageSetRateTpl'},
340 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
341 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
342 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
343 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
344 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'}, 340 + {field: 'resTypeName', title: '资源类型', minWidth: 101, align: 'center'},
  341 + {field: 'adminName', title: '负责人', minWidth: 120, align: 'center', sort: true},
  342 + {field: 'adminPhone', title: '负责人电话', minWidth: 120, align: 'center', sort: true},
  343 + {field: 'state', title: '资源状态', minWidth: 120, align: 'center', sort: true, templet: '#resStateTpl'},
  344 + {field: 'health', title: '健康状态', minWidth: 120, align: 'center', sort: true, templet: '#healthTpl'},
345 345
346 - {field: 'hostState', title: '主机状态', align: 'center', minWidth: x_110, templet: '#hostStateTpl', sort: true},  
347 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true} 346 + {field: 'clusterState', title: '资源池状态', align: 'center', minWidth: x_120,templet:'#clusterStateTpl'},
  347 + //{field: 'hostState', title: '主机状态', align: 'center', minWidth: x_110, templet: '#hostStateTpl', sort: true},
  348 + {field: 'lastColTime', title: '最近采集时间', minWidth: 160, align: 'center', sort: true}
348 ], 349 ],
349 "HUAWEI_CLOUD_CLUSTER": [ 350 "HUAWEI_CLOUD_CLUSTER": [
350 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 351 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
351 { 352 {
352 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 353 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
353 templet: '#resindex_resName' 354 templet: '#resindex_resName'
354 }, 355 },
355 - {field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'},  
356 - {field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'},  
357 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
358 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
359 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
360 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
361 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
362 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
363 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 356 + {field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: x_120, templet: '#cpuSetRateTpl'},
  357 + {field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: x_120, templet: '#memorySetRateTpl'},
  358 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  359 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  360 + {field: 'adminPhone', title: '负责人电话', minWidth: x_120, align: 'center', sort: true},
  361 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  362 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  363 + {field: 'lastColTime', title: '最近采集时间', minWidth: 160, align: 'center', sort: true}
  364 + // {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_120, templet: '#linkStateTpl', sort: true}
364 ], 365 ],
365 "HUAWEI_CLOUD_PHYSICSHOST": [ 366 "HUAWEI_CLOUD_PHYSICSHOST": [
366 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 367 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
@@ -400,58 +401,58 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', @@ -400,58 +401,58 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
400 "HUAWEI_CLOUD_STORAGE": [ 401 "HUAWEI_CLOUD_STORAGE": [
401 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 402 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
402 { 403 {
403 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 404 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
404 templet: '#resindex_resName' 405 templet: '#resindex_resName'
405 }, 406 },
406 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 407 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
407 {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, 408 {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
408 {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 409 {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
409 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
410 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
411 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
412 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
413 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
414 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
415 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 410 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  411 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  412 + {field: 'adminPhone', title: '负责人电话', minWidth: x_120, align: 'center', sort: true},
  413 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  414 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  415 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
  416 + {field: 'runState', title: '运行状态', minWidth: x_120, align: 'center', sort: true,templet: '#runStateTpl'}
416 ], 417 ],
417 "HUAWEI_CLOUD_SWITCHBOARD": [ 418 "HUAWEI_CLOUD_SWITCHBOARD": [
418 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 419 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
419 { 420 {
420 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 421 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
421 templet: '#resindex_resName' 422 templet: '#resindex_resName'
422 }, 423 },
423 - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 424 + {field: 'ip', title: 'IP地址', minWidth: x_110, align: 'center', sort: true},
424 // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, 425 // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
425 // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 426 // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
426 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
427 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
428 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
429 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
430 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
431 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
432 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 427 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  428 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  429 + {field: 'adminPhone', title: '负责人电话', minWidth: x_120, align: 'center', sort: true},
  430 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  431 + {field: 'health', title: '健康状态', minWdth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  432 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
  433 + // {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}
433 ], 434 ],
434 "HUAWEI_CLOUD_FIREWALL": [ 435 "HUAWEI_CLOUD_FIREWALL": [
435 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 436 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
436 { 437 {
437 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 438 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
438 templet: '#resindex_resName' 439 templet: '#resindex_resName'
439 }, 440 },
440 - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 441 + {field: 'ip', title: 'IP地址', minWidth: x_120, align: 'center', sort: true},
441 // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, 442 // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
442 // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 443 // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
443 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
444 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
445 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
446 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
447 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
448 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
449 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 444 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  445 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  446 + {field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
  447 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  448 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  449 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true}
  450 + //{field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}
450 ], 451 ],
451 "ALI_CLOUD_ECS": [ 452 "ALI_CLOUD_ECS": [
452 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 453 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
453 { 454 {
454 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 455 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
455 templet: '#resindex_resName' 456 templet: '#resindex_resName'
456 }, 457 },
457 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 458 {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
@@ -459,60 +460,61 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', @@ -459,60 +460,61 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
459 {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.memorySize}} GB</div>'}, 460 {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.memorySize}} GB</div>'},
460 {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 461 {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
461 {field: 'ptName', title: '所属平台', minWidth: x_130, align: 'center', sort: true}, 462 {field: 'ptName', title: '所属平台', minWidth: x_130, align: 'center', sort: true},
462 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
463 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
464 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
465 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
466 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
467 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
468 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 463 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  464 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  465 + {field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
  466 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  467 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  468 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
  469 + {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_120, templet: '#linkStateTpl', sort: true}
469 ], 470 ],
470 "ALI_CLOUD_RDS": [ 471 "ALI_CLOUD_RDS": [
471 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 472 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
472 { 473 {
473 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 474 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
474 templet: '#resindex_resName' 475 templet: '#resindex_resName'
475 }, 476 },
476 - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, 477 + {field: 'ip', title: 'IP地址', minWidth: x_130, align: 'center', sort: true},
477 {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, 478 {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true},
478 {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, 479 {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true},
479 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
480 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
481 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
482 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
483 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
484 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
485 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 480 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  481 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  482 + {field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
  483 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  484 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  485 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
  486 + // {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}
486 ], 487 ],
487 "ALI_CLOUD_SLB": [ 488 "ALI_CLOUD_SLB": [
488 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 489 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
489 { 490 {
490 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 491 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
491 templet: '#resindex_resName' 492 templet: '#resindex_resName'
492 }, 493 },
493 - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},  
494 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
495 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
496 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
497 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
498 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
499 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
500 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 494 + {field: 'ip', title: 'IP地址', minWidth: x_130, align: 'center', sort: true},
  495 + {field: 'resTypeName', title: '资源类型', minWidth: x_120, align: 'center'},
  496 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  497 + {field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
  498 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  499 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  500 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
  501 + {field: 'runState', title: '运行状态', minWidth: x_120, align: 'center', sort: true,templet: '#runStateTpl'}
  502 + //{field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}
501 ], 503 ],
502 "ALI_CLOUD_OSS": [ 504 "ALI_CLOUD_OSS": [
503 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 505 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
504 { 506 {
505 - field: 'resName', title: '资源名称', minWidth: 250, sort: true, 507 + field: 'resName', title: '资源名称', minWidth: x_250, sort: true,
506 templet: '#resindex_resName' 508 templet: '#resindex_resName'
507 }, 509 },
508 - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},  
509 - {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'},  
510 - {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true},  
511 - {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true},  
512 - {field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},  
513 - {field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},  
514 - {field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},  
515 - {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true} 510 + // {field: 'ip', title: 'IP地址', minWidth: x_130, align: 'center', sort: true},
  511 + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
  512 + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
  513 + {field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
  514 + {field: 'state', title: '资源状态', minWidth: x_120, align: 'center', sort: true, templet: '#resStateTpl'},
  515 + {field: 'health', title: '健康状态', minWidth: x_120, align: 'center', sort: true, templet: '#healthTpl'},
  516 + {field: 'lastColTime', title: '最近采集时间', minWidth: x_120, align: 'center', sort: true},
  517 + // {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}
516 ], 518 ],
517 "ALI_ARMS": [ 519 "ALI_ARMS": [
518 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'}, 520 //{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
@@ -2620,9 +2622,9 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', @@ -2620,9 +2622,9 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
2620 return false; 2622 return false;
2621 } 2623 }
2622 // 阿里云,华为云不能点击 2624 // 阿里云,华为云不能点击
2623 - if(resType == 'ALI_CLOUD_PLAT' || resType == 'HUAWEI_CLOUD_PLAT'){  
2624 - return false;  
2625 - } 2625 + // if(resType == 'ALI_CLOUD_PLAT' || resType == 'HUAWEI_CLOUD_PLAT'){
  2626 + // return false;
  2627 + // }
2626 return true; 2628 return true;
2627 }, 2629 },
2628 2630
@@ -3298,8 +3298,13 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -3298,8 +3298,13 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
3298 admin.req({ 3298 admin.req({
3299 url: common.domainName + url 3299 url: common.domainName + url
3300 }).done(function (res) { 3300 }).done(function (res) {
3301 - var data = res.data;  
3302 - var li = ""; 3301 + if(res.data && res.data.length > 0){
  3302 + var data = res.data;
  3303 + var li = "";
  3304 + }else{
  3305 + var li ='<div style="text-align:center;">'
  3306 + + '<i style="line-height: 150px; padding:20px;font-style:normal;">'+"暂无数据"+'</i>' + '</div>'
  3307 + }
3303 $.each(data, function (i, v) { 3308 $.each(data, function (i, v) {
3304 var valueStr = ''; 3309 var valueStr = '';
3305 if (v.value != 'null'){ 3310 if (v.value != 'null'){
  1 +/**
  2 +* @desc 华为云集群
  3 +* @author joke
  4 +* @date 2020/4/12 23:35
  5 +**/
  6 +layui.define(['commonDetail','common'], function (exports) {
  7 + var commonDetail = layui.commonDetail;
  8 + var common = layui.common;
  9 + //对外暴露的接口
  10 + exports('huawei_cloud_plat', function (data) {
  11 + var resId = '';
  12 + var showFlag = common.getUrlParam("show");
  13 + if(showFlag && showFlag == '0'){
  14 + resId = common.getUrlParam("resId");
  15 + }else{
  16 + resId = data.resId;
  17 + }
  18 + commonDetail.bindTips();
  19 + //基本信息
  20 + var jbxxKpi = "KPIE13DD9A3,KPI9E5E1B3E,KPIF74D9D2B,KPI1584BE1C,KPI5B7998C9";
  21 +
  22 + reload()
  23 +
  24 + //渲染页面
  25 + function reload() {
  26 + //资源状态
  27 + commonDetail.renderResHealth("huawei_cloud_plat_state",resId);
  28 + //基本信息
  29 + commonDetail.renderText("huawei_cloud_plat_baseinfo",resId,jbxxKpi);
  30 + //存储空间使用率走势(12小时)
  31 + commonDetail.renderLineCharat("huawei_cloud_plat_storage_linechart",resId,"KPI5E148DBE","存储空间使用率","storage");
  32 + // CPU使用率走势(12小时)
  33 + commonDetail.renderLineCharat("huawei_cloud_plat_cpu_linechart",resId,"KPI7054BC34","CPU使用率","cpu");
  34 + // 内存使用率走势(12小时)
  35 + commonDetail.renderLineCharat("huawei_cloud_plat_memeryuse_linechart",resId,"KPI31CB8D97","内存使用率","mem");
  36 + // 存储分配率走势(12小时)
  37 + commonDetail.renderLineCharat("huawei_cloud_plat_allot_linechart",resId,"KPI46BAA9BE","存储分配率","");
  38 + // CPU分配率走势(12小时)
  39 + commonDetail.renderLineCharat("huawei_cloud_plat_cpuset_linechart",resId,"KPIBFA3F5CD","CPU分配率","");
  40 + // 内存分配率走势(12小时)
  41 + commonDetail.renderLineCharat("huawei_cloud_plat_memeryset_linechart",resId,"KPIC40A80AC","内存分配率","");
  42 + //活动告警
  43 + commonDetail.renderActiveAlarms("huawei_cloud_plat_alarms",resId);
  44 + }
  45 +
  46 + //定时任务
  47 + var timer = setInterval(function () {
  48 + reload()
  49 + },commonDetail.timerTime);
  50 + commonDetail.detailTimer.push(timer);
  51 +
  52 + });
  53 +});
@@ -1031,14 +1031,14 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' @@ -1031,14 +1031,14 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
1031 noClick($(this)); 1031 noClick($(this));
1032 }); 1032 });
1033 //华为云,阿里云不让点击,并且提示暂无监控信息 1033 //华为云,阿里云不让点击,并且提示暂无监控信息
1034 - var $hds = $('span[data-restype="HUAWEI_CLOUD_PLAT"]');  
1035 - $.each($hds, function (i, v) {  
1036 - noClick($(this));  
1037 - });  
1038 - var $hds = $('span[data-restype="ALI_CLOUD_PLAT"]');  
1039 - $.each($hds, function (i, v) {  
1040 - noClick($(this));  
1041 - }); 1034 + // var $hds = $('span[data-restype="HUAWEI_CLOUD_PLAT"]');
  1035 + // $.each($hds, function (i, v) {
  1036 + // noClick($(this));
  1037 + // });
  1038 + // var $hds = $('span[data-restype="ALI_CLOUD_PLAT"]');
  1039 + // $.each($hds, function (i, v) {
  1040 + // noClick($(this));
  1041 + // });
1042 1042
1043 soulTable.render(this) 1043 soulTable.render(this)
1044 1044
  1 +<!--华为云集群-->
  2 +<article class="page-container template">
  3 + <div class="page-panel">
  4 + <div class="main">
  5 + <div class="layui-card template_detail_content">
  6 + <div class="layui-card-body">
  7 + <div class="lay-row">
  8 + <div class="lay-row-item">
  9 + <h5 class="lay-row-title">资源状态</h5>
  10 + <div class="res-state" id="huawei_cloud_plat_state"></div>
  11 + </div>
  12 + <div class="lay-row-item lay-row-item--auto-width">
  13 + <h5 class="lay-row-title">基本信息<i data-id="huawei_cloud_plat_baseinfo" class="iconfont detail_base_info">&#xe61e;</i></h5>
  14 + <ul class="info-table" id="huawei_cloud_plat_baseinfo"></ul>
  15 + </div>
  16 + <div class="lay-row-item lay-row-item--auto-width">
  17 + <div class="lay-row-item">
  18 + <h5 class="lay-row-title">存储使用率走势(12小时)</h5>
  19 + <div id="huawei_cloud_plat_storage_linechart" class="detail_line_chart"></div>
  20 + </div>
  21 + </div>
  22 + <div class="lay-row-item lay-row-item--auto-width">
  23 + <h5 class="lay-row-title">存储分配率走势(12小时)</h5>
  24 + <div id="huawei_cloud_plat_allot_linechart" class="detail_line_chart"></div>
  25 + </div>
  26 + </div>
  27 + <div class="lay-row">
  28 + <div class="lay-row-item">
  29 + <h5 class="lay-row-title">CPU使用率走势(12小时)</h5>
  30 + <div id="huawei_cloud_plat_cpu_linechart" class="detail_line_chart"></div>
  31 + </div>
  32 + <div class="lay-row-item">
  33 + <h5 class="lay-row-title">内存使用率走势(12小时)</h5>
  34 + <div id="huawei_cloud_plat_memeryuse_linechart" class="detail_line_chart"></div>
  35 + </div>
  36 + <div class="lay-row-item">
  37 + <h5 class="lay-row-title">CPU分配率走势(12小时)</h5>
  38 + <div id="huawei_cloud_plat_cpuset_linechart" class="detail_line_chart"></div>
  39 + </div>
  40 + <div class="lay-row-item">
  41 + <h5 class="lay-row-title">内存分配率走势(12小时)</h5>
  42 + <div id="huawei_cloud_plat_memeryset_linechart" class="detail_line_chart"></div>
  43 + </div>
  44 + </div>
  45 + <div class="lay-row">
  46 + <div class="lay-row-item">
  47 + <h5 class="lay-row-title">实时告警动态</h5>
  48 + <div id="huawei_cloud_plat_alarms"></div>
  49 + </div>
  50 + </div>
  51 + </div>
  52 + </div>
  53 + </div>
  54 + </div>
  55 +</article>
  56 +<textarea id="huawei_cloud_plat_param_id" style="display: none;">{{d}}</textarea>
  57 +<script>
  58 + layui.use('huawei_cloud_plat', function (fn) {
  59 + var $ = layui.$;
  60 + var parm = $("#huawei_cloud_plat_param_id").val();
  61 + if(parm.indexOf('{{d') != -1){
  62 + fn();
  63 + }else{
  64 + fn(JSON.parse(parm));
  65 + }
  66 + });
  67 +</script>
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </div> 11 </div>
12 <div class="lay-row-item lay-row-item--small"> 12 <div class="lay-row-item lay-row-item--small">
13 <h5 class="lay-row-title">维保信息</h5> 13 <h5 class="lay-row-title">维保信息</h5>
14 - <ul class="info-table" id="huawei_cloud_storage_wbinfo"></ul> 14 + <div class="info-table" id="huawei_cloud_storage_wbinfo"></div>
15 </div> 15 </div>
16 </div> 16 </div>
17 <div class="lay-row"> 17 <div class="lay-row">
@@ -55,4 +55,7 @@ custom-class="config-dialog" @@ -55,4 +55,7 @@ custom-class="config-dialog"
55 } 55 }
56 .select-all .el-button{ 56 .select-all .el-button{
57 height:42px; 57 height:42px;
  58 +}
  59 +.button-more{
  60 + position: absolute;right: 0;top: 33px;z-index: 1;background: #f5f7fa;width: 80px; padding: 10px;
58 } 61 }
@@ -92,8 +92,43 @@ @@ -92,8 +92,43 @@
92 <!--列表--> 92 <!--列表-->
93 <div v-if="activeBtn == 'list'"> 93 <div v-if="activeBtn == 'list'">
94 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" 94 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
95 - :showBorder="false" :showSelection="false"  
96 - :showPage="false" :height="height - 54"></cm-table-page> 95 + :showBorder="false" :showSelection="false" :showTools="isEditName"
  96 + :showPage="false" :height="height - 54">
  97 + <template #default="{row,prop,column}">
  98 + <div class="fileName-div" style="display: flex; align-items: center;" v-if="isEditName && prop == 'fileName'" @click="getFile(row)">
  99 + <i :class="['iconfont', iconclass[row.type] == undefined ? 'icon-wenjian' : iconclass[row.type]]" style="font-size: 22px;margin-right: 10px;"></i>
  100 + <div>
  101 + <span @click.stop="editFileName(row,index)" v-if="isInput!=row.id">{{row.fileName}}</span>
  102 + </div>
  103 +
  104 + <el-input @click.stop="" @blur="reNameFile(row,true)" v-if="isInput==row.id" type="text" v-model="row.fileName"></el-input>
  105 + </div>
  106 + </template>
  107 +
  108 + <template #tools="{scope}" >
  109 + <div >
  110 + <el-button type="text" size="small" @click.prevent="getFile(scope.row)">
  111 + <i class="el-icon-view"/>查看 <i @mouseenter="moreShow=scope.row.id" :class="{'el-icon-arrow-down':moreShow!=scope.row.id,'el-icon-arrow-up':moreShow==scope.row.id}"></i>
  112 + </el-button>
  113 + <div class="button-more" v-if="moreShow==scope.row.id" @mouseleave="moreShow=''">
  114 + <ul>
  115 + <li>
  116 + <el-button type="text" size="small" @click.prevent="handleDownloadFile(scope.row,scope.$index)">
  117 + <i class="el-icon-download"/>下载
  118 + </el-button>
  119 + </li>
  120 + <li>
  121 + <el-button type="text" size="small" @click.prevent="handleDelete(scope.row,scope.$index)">
  122 + <i class="el-icon-delete"/>删除
  123 + </el-button>
  124 + </li>
  125 + </ul>
  126 +
  127 + </div>
  128 +
  129 + </div>
  130 + </template>
  131 + </cm-table-page>
97 </div> 132 </div>
98 <div v-if="activeBtn == 'view'" style="background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}"> 133 <div v-if="activeBtn == 'view'" style="background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}">
99 <div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;"> 134 <div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;">
@@ -46,6 +46,11 @@ export default { @@ -46,6 +46,11 @@ export default {
46 isSelect:{ 46 isSelect:{
47 type:Boolean, 47 type:Boolean,
48 default:false 48 default:false
  49 + },
  50 + //是否编辑文件名称
  51 + isEditName:{
  52 + type:Boolean,
  53 + default:false
49 } 54 }
50 }, 55 },
51 data() { 56 data() {
@@ -67,6 +72,8 @@ export default { @@ -67,6 +72,8 @@ export default {
67 }, 72 },
68 setup(props, {attrs, slots, emit}) { 73 setup(props, {attrs, slots, emit}) {
69 const {proxy} = Vue.getCurrentInstance(); 74 const {proxy} = Vue.getCurrentInstance();
  75 + //是否编辑文档名称
  76 + const isInput=Vue.ref();
70 let height = Vue.ref(window.innerHeight - 20); 77 let height = Vue.ref(window.innerHeight - 20);
71 let iconclass = { 78 let iconclass = {
72 'folder': 'icon-wenjianjia', 79 'folder': 'icon-wenjianjia',
@@ -173,7 +180,8 @@ export default { @@ -173,7 +180,8 @@ export default {
173 // return `<i class="iconfont ${cls}" style="font-size: 22px;margin-right: 10px;"></i><input value="${inputFileName}"></input>` 180 // return `<i class="iconfont ${cls}" style="font-size: 22px;margin-right: 10px;"></i><input value="${inputFileName}"></input>`
174 return `<i class="iconfont ${cls}" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>` 181 return `<i class="iconfont ${cls}" style="font-size: 22px;margin-right: 10px;"></i><span>${row.fileName}</span>`
175 } 182 }
176 - }, { 183 + },
  184 + {
177 prop: 'createUser', 185 prop: 'createUser',
178 label: '提交人', 186 label: '提交人',
179 sortable: true, 187 sortable: true,
@@ -184,8 +192,8 @@ export default { @@ -184,8 +192,8 @@ export default {
184 sortable: true, 192 sortable: true,
185 width: '180px' 193 width: '180px'
186 } 194 }
187 - /* ,{  
188 - prop: '', 195 + /*,{
  196 + prop: 'handle',
189 label: '操作', 197 label: '操作',
190 sortable: false, 198 sortable: false,
191 width: '180px', 199 width: '180px',
@@ -330,6 +338,31 @@ export default { @@ -330,6 +338,31 @@ export default {
330 } 338 }
331 } 339 }
332 340
  341 + /*
  342 + * 单个删除文档
  343 + * lu
  344 + * */
  345 + let handleDelete =(row,index)=>{
  346 + dataList.value.filter((v)=>{
  347 + if(v.id==row.id){
  348 + v.checked = true
  349 + }
  350 + })
  351 + deleteDocument(row.id,row.type)
  352 + }
  353 + /*
  354 + * 下载单个文档
  355 + * lu
  356 + * */
  357 + let handleDownloadFile=(row,index)=>{
  358 + dataList.value.filter((v)=>{
  359 + if(v.id==row.id){
  360 + v.checked = true
  361 + }
  362 + })
  363 + downloadFile();
  364 + }
  365 + const moreShow=Vue.ref();//更多按钮是否显示
333 366
334 /** 367 /**
335 * 将文档放入回收站 368 * 将文档放入回收站
@@ -702,17 +735,55 @@ export default { @@ -702,17 +735,55 @@ export default {
702 proxy.$global.showMsg(msg, 'warning'); 735 proxy.$global.showMsg(msg, 'warning');
703 } 736 }
704 } 737 }
  738 + isInput.value='';
705 }) 739 })
706 reNameFileFlg.value[item.id] = false; 740 reNameFileFlg.value[item.id] = false;
707 } 741 }
708 742
709 } 743 }
  744 + /*表格列表添加文件大小列
  745 + *lu
  746 + * */
  747 + let addColumns=()=>{
  748 + let newColumns= {
  749 + prop: 'fileSize',
  750 + label:'文件大小',
  751 + width:'120px',
  752 + render:function (row){
  753 + let fileSizeB=0;
  754 + if(row.fileSize){
  755 + fileSizeB=row.fileSize;
  756 +
  757 + }
  758 + let fileSize=filterType(fileSizeB)
  759 + return `<span>${fileSize}</span>`
  760 + }
  761 +
  762 + }
  763 + if(props.isEditName){
  764 + columns.value.splice(1,0,newColumns)
  765 +
  766 + }
  767 + }
  768 + /*文件大小单位转换
  769 + * lu
  770 + * */
  771 + let filterType=(val)=>{
  772 + if (val==0) return "0 B";
  773 + let k=1024;
  774 + let sizes=["B","KB","GB","TB","PB","EB","ZB","YB"];
  775 + let i=Math.floor(Math.log(val) / Math.log(k));
  776 + return (val/Math.pow(k,i)).toPrecision(3) + " "+sizes[i];
  777 + }
710 778
711 779
712 /** 780 /**
713 * 挂载完 781 * 挂载完
714 */ 782 */
715 Vue.onMounted(() => { 783 Vue.onMounted(() => {
  784 + //表格列表添加文件大小列
  785 + addColumns();
  786 +
716 getUserList(); 787 getUserList();
717 // 预览模式 不展示左侧树 788 // 预览模式 不展示左侧树
718 if (!props.isView) { 789 if (!props.isView) {
@@ -782,8 +853,15 @@ export default { @@ -782,8 +853,15 @@ export default {
782 },function (){},false) 853 },function (){},false)
783 } 854 }
784 855
  856 + //点击文件名称编辑
  857 + const editFileName=(item)=>{
  858 + isInput.value=item.id;
  859 + }
  860 +
785 return { 861 return {
786 /* viewEdit,*/ 862 /* viewEdit,*/
  863 + editFileName,
  864 + isInput,
787 iconclass, 865 iconclass,
788 layout, 866 layout,
789 height, 867 height,
@@ -832,7 +910,12 @@ export default { @@ -832,7 +910,12 @@ export default {
832 editType, 910 editType,
833 selectAll, 911 selectAll,
834 isAllSelect, 912 isAllSelect,
835 - selectText 913 + selectText,
  914 + handleDelete,
  915 + handleDownloadFile,
  916 + moreShow,
  917 + addColumns,
  918 + filterType
836 919
837 } 920 }
838 } 921 }
@@ -941,6 +941,27 @@ @@ -941,6 +941,27 @@
941 <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> 941 <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>
942 </div> 942 </div>
943 </script> 943 </script>
  944 +<!--资源池状态-->
  945 +<script type="text/html" id="clusterStateTpl">
  946 + {{# if(d.clusterState === '正常'){ }}
  947 + <button type="button" class="layui-btn layui-btn-danger layui-bg-green layui-btn-radius layui-btn-xs p-0-15">正常
  948 + </button>
  949 + {{# }else{ }}
  950 + <button type="button" class="layui-btn layui-btn-radius layui-bg-red layui-btn-xs p-0-15">异常</button>
  951 + {{# } }}
  952 +</script>
  953 +<!--运行状态-->
  954 +<script type="text/html" id="runStateTpl">
  955 + {{# if(d.runState === '正常'){ }}
  956 + <button type="button" class="layui-btn layui-btn-danger layui-bg-green layui-btn-radius layui-btn-xs p-0-15">正常
  957 + </button>
  958 + {{# }else{ if(d.runState === '运行中'){ }}
  959 + <button type="button" class="layui-btn layui-btn-danger layui-bg-green layui-btn-radius layui-btn-xs p-0-15">运行中</button>
  960 + {{# }else{ }}
  961 + <button type="button" class="layui-btn layui-btn-radius layui-bg-red layui-btn-xs p-0-15">异常</button>
  962 + {{# } }}
  963 + {{# } }}
  964 +</script>
944 <script type="text/html" id="weblogicIpTpl"> 965 <script type="text/html" id="weblogicIpTpl">
945 <div>{{d.ip?d.ip:""}}</div> 966 <div>{{d.ip?d.ip:""}}</div>
946 </script> 967 </script>
@@ -24,7 +24,7 @@ body @@ -24,7 +24,7 @@ body
24 padding-top: 30px; 24 padding-top: 30px;
25 border: 2px solid #0a93be; 25 border: 2px solid #0a93be;
26 width: 900px; 26 width: 900px;
27 - height: 600px; 27 + min-height: 666px;
28 margin: 0 auto; 28 margin: 0 auto;
29 font-size: 16px; 29 font-size: 16px;
30 border-radius: 5px; 30 border-radius: 5px;
1 -<div v-if="!isDetailShow" class="outlinediv" style="height: 666px"> 1 +<div v-if="!isDetailShow" class="outlinediv" >
2 <!-- <span>湖州灾备一机房平面图</span>--> 2 <!-- <span>湖州灾备一机房平面图</span>-->
3 <div class="huzhouone-topcabinet"> 3 <div class="huzhouone-topcabinet">
4 <table> 4 <table>
1 <div class="container"> 1 <div class="container">
2 - <cm-document :isSelect="true"></cm-document> 2 + <cm-document :isSelect="true" :isEditName="true"></cm-document>
3 </div> 3 </div>