问题3 、8 、11,通知查询,和资源列表显示字段修改
Showing
2 changed files
with
32 additions
and
4 deletions
@@ -334,7 +334,9 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -334,7 +334,9 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
334 | field: 'resName', title: '资源名称', minWidth: 250, sort: true, | 334 | field: 'resName', title: '资源名称', minWidth: 250, sort: true, |
335 | templet: '#resindex_resName' | 335 | templet: '#resindex_resName' |
336 | }, | 336 | }, |
337 | - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 337 | + {field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'}, |
338 | + {field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'}, | ||
339 | + {field: 'storageSetRate', title: '存储分配率', align: 'center', minWidth: 120, templet: '#storageSetRateTpl'}, | ||
338 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 340 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
339 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 341 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
340 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 342 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -349,7 +351,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -349,7 +351,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
349 | field: 'resName', title: '资源名称', minWidth: 250, sort: true, | 351 | field: 'resName', title: '资源名称', minWidth: 250, sort: true, |
350 | templet: '#resindex_resName' | 352 | templet: '#resindex_resName' |
351 | }, | 353 | }, |
352 | - {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 354 | + {field: 'cpuSetRate', title: 'CPU分配率', align: 'center', minWidth: 120, templet: '#cpuSetRateTpl'}, |
355 | + {field: 'memorySetRate', title: '内存分配率', align: 'center', minWidth: 120, templet: '#memorySetRateTpl'}, | ||
353 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 356 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
354 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 357 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
355 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 358 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -365,6 +368,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -365,6 +368,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
365 | templet: '#resindex_resName' | 368 | templet: '#resindex_resName' |
366 | }, | 369 | }, |
367 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 370 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
371 | + {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, | ||
372 | + {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, | ||
368 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 373 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
369 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 374 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
370 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 375 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -380,6 +385,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -380,6 +385,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
380 | templet: '#resindex_resName' | 385 | templet: '#resindex_resName' |
381 | }, | 386 | }, |
382 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 387 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
388 | + {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, | ||
389 | + {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, | ||
383 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 390 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
384 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 391 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
385 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 392 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -395,6 +402,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -395,6 +402,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
395 | templet: '#resindex_resName' | 402 | templet: '#resindex_resName' |
396 | }, | 403 | }, |
397 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 404 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
405 | + {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, | ||
406 | + {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, | ||
398 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 407 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
399 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 408 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
400 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 409 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -410,6 +419,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -410,6 +419,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
410 | templet: '#resindex_resName' | 419 | templet: '#resindex_resName' |
411 | }, | 420 | }, |
412 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 421 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
422 | + {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, | ||
423 | + {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, | ||
413 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 424 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
414 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 425 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
415 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 426 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -425,6 +436,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -425,6 +436,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
425 | templet: '#resindex_resName' | 436 | templet: '#resindex_resName' |
426 | }, | 437 | }, |
427 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 438 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
439 | + {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, | ||
440 | + {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, | ||
428 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 441 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
429 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 442 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
430 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 443 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -440,6 +453,10 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -440,6 +453,10 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
440 | templet: '#resindex_resName' | 453 | templet: '#resindex_resName' |
441 | }, | 454 | }, |
442 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, | 455 | {field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true}, |
456 | + {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_130, templet: '#cpuRateTpl', sort: true}, | ||
457 | + {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.memorySize}} GB</div>'}, | ||
458 | + {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_130, templet: '#memoryRateTpl', sort: true}, | ||
459 | + {field: 'ptName', title: '所属平台', minWidth: x_130, align: 'center', sort: true}, | ||
443 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, | 460 | {field: 'resTypeName', title: '资源类型', width: 101, align: 'center'}, |
444 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, | 461 | {field: 'adminName', title: '负责人', width: 123, align: 'center', sort: true}, |
445 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, | 462 | {field: 'adminPhone', title: '负责人电话', width: 118, align: 'center', sort: true}, |
@@ -66,7 +66,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | @@ -66,7 +66,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | ||
66 | {title: '序号', align: "center", type: 'numbers',width: '3%'} | 66 | {title: '序号', align: "center", type: 'numbers',width: '3%'} |
67 | , {field: 'type', title: '通知类型', align: 'center', sort: true, width:130, | 67 | , {field: 'type', title: '通知类型', align: 'center', sort: true, width:130, |
68 | templet: function (d){ | 68 | templet: function (d){ |
69 | - switch (d.type){ | 69 | + if(d.type) { |
70 | + switch (d.type) { | ||
70 | case 10: | 71 | case 10: |
71 | return '告警通知' | 72 | return '告警通知' |
72 | break; | 73 | break; |
@@ -82,7 +83,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | @@ -82,7 +83,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | ||
82 | case 99: | 83 | case 99: |
83 | return '测试通知' | 84 | return '测试通知' |
84 | break; | 85 | break; |
86 | + default: | ||
87 | + return '告警通知' | ||
88 | + break; | ||
85 | } | 89 | } |
90 | + }else { | ||
91 | + return '告警通知' | ||
92 | + } | ||
86 | }} | 93 | }} |
87 | , {field: 'way', title: '通知方式', align: 'center', sort: true, width:120, | 94 | , {field: 'way', title: '通知方式', align: 'center', sort: true, width:120, |
88 | templet: function (d){ | 95 | templet: function (d){ |
@@ -96,10 +103,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | @@ -96,10 +103,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | ||
96 | case 'message': | 103 | case 'message': |
97 | return '<div class="small-icon small-icon-msg"></div>' | 104 | return '<div class="small-icon small-icon-msg"></div>' |
98 | break; | 105 | break; |
106 | + default: | ||
107 | + return '<div class="small-icon small-icon-wechat"></div>' | ||
108 | + break; | ||
109 | + | ||
99 | } | 110 | } |
100 | }} | 111 | }} |
101 | // , {field: 'targetId', title: '通知对象', align: 'center', sort: true, width:180} | 112 | // , {field: 'targetId', title: '通知对象', align: 'center', sort: true, width:180} |
102 | - , {field: 'content', title: '通知内容', align: 'right', sort: true, minWidth: 300,} | 113 | + , {field: 'content', title: '通知内容', align: 'left', sort: true, minWidth: 300,} |
103 | , {field: 'nickname', title: '通知用户', align: 'center', sort: true, width:200} | 114 | , {field: 'nickname', title: '通知用户', align: 'center', sort: true, width:200} |
104 | , {field: 'noticeTime', title: '通知时间', align: 'center', sort: true, width:180} | 115 | , {field: 'noticeTime', title: '通知时间', align: 'center', sort: true, width:180} |
105 | // , {field: 'createTime',title: '入库时间',align: 'center', sort: true,width:180} | 116 | // , {field: 'createTime',title: '入库时间',align: 'center', sort: true,width:180} |
-
Please register or login to post a comment