Authored by XuHaoJie

杭州-资源视图-华为云物理机添加主机状态 并修改模板

... ... @@ -376,8 +376,8 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
{field: 'state', title: '资源状态', width: 98, align: 'center', sort: true, templet: '#resStateTpl'},
{field: 'health', title: '健康状态', width: 83, align: 'center', sort: true, templet: '#healthTpl'},
{field: 'lastColTime', title: '最近采集时间', width: 161, align: 'center', sort: true},
// 2021-11-22 徐毫杰 因为华为云物理机下的连接状态展示为空 这个是从数据库b_result_realtime_base里拿来就是空的 赵鹏军要求不展示该列
// {field: 'linkState', title: '连接状态', align: 'center', width: 85, templet: '#linkStateTpl', sort: true}
// 2021-11-22 徐毫杰 连接状态无数据改成展示主机状态
{field: 'hostState', title: '主机状态', align: 'center', minWidth: x_110, templet: '#hostStateTpl', sort: true}
],
"HUAWEI_CLOUD_VIRTUALHOST": [
//{type: 'numbers', title: '序号', align: 'center', fixed: 'left'},
... ...
... ... @@ -810,6 +810,10 @@
<button type="button" class="layui-btn layui-bg-red layui-btn-radius layui-btn-xs p-0-15 cant-click">
断开连接
</button>
{{# }else if(d.hostState != null && d.hostState == '正常'){ }}
<button type="button" class="layui-btn layui-bg-green layui-btn-radius layui-btn-xs p-0-15 cant-click">
正常
</button>
{{# }else{ }}
<button type="button"
class="layui-btn layui-btn-radius layui-bg-gray layui-btn-xs p-0-15 cant-click">{{
... ...