Merge branch 'master-mj' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-mj
Showing
14 changed files
with
105 additions
and
156 deletions
@@ -11,8 +11,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | @@ -11,8 +11,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | ||
11 | var soulTable = layui.soulTable; | 11 | var soulTable = layui.soulTable; |
12 | //对外暴露的接口 | 12 | //对外暴露的接口 |
13 | exports("backDetailList", function (d) { | 13 | exports("backDetailList", function (d) { |
14 | - var accessToken = localStorage.getItem("accessToken"); | ||
15 | - | 14 | + var accessToken = common.getMjToken(); |
16 | createFailTable() | 15 | createFailTable() |
17 | function dateForm(time) { | 16 | function dateForm(time) { |
18 | var unixTimestamp = new Date(time); | 17 | var unixTimestamp = new Date(time); |
@@ -44,14 +43,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | @@ -44,14 +43,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | ||
44 | even: true, | 43 | even: true, |
45 | cols: [[ | 44 | cols: [[ |
46 | { | 45 | { |
47 | - field: 'policyName', title: '策略类型', align: 'center', sort: true, width: 250, drag: false | 46 | + field: 'policyName', title: '策略类型', align: 'center', sort: true, drag: false |
48 | }, { | 47 | }, { |
49 | field: 'agentType', | 48 | field: 'agentType', |
50 | title: '代理类型', | 49 | title: '代理类型', |
51 | align: 'center', | 50 | align: 'center', |
52 | sort: true, | 51 | sort: true, |
53 | drag: false, | 52 | drag: false, |
54 | - width: 200, | ||
55 | templet: ` | 53 | templet: ` |
56 | <div> | 54 | <div> |
57 | {{# | 55 | {{# |
@@ -82,7 +80,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | @@ -82,7 +80,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | ||
82 | align: 'center', | 80 | align: 'center', |
83 | sort: true, | 81 | sort: true, |
84 | drag: false, | 82 | drag: false, |
85 | - width: 200, | ||
86 | templet: ` | 83 | templet: ` |
87 | <div> | 84 | <div> |
88 | {{# | 85 | {{# |
@@ -103,15 +100,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | @@ -103,15 +100,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | ||
103 | </div> | 100 | </div> |
104 | ` | 101 | ` |
105 | }, { | 102 | }, { |
106 | - field: 'client', title: '客户端', align: 'center', drag: false, width: 200, sort: true | 103 | + field: 'client', title: '客户端', align: 'center', drag: false, sort: true |
107 | }, { | 104 | }, { |
108 | - field: 'stroge', title: '存储池', align: 'center', drag: false, width: 200, sort: true | 105 | + field: 'stroge', title: '存储池', align: 'center', drag: false, sort: true |
109 | }, { | 106 | }, { |
110 | field: 'jobStatus', | 107 | field: 'jobStatus', |
111 | title: '备份状态', | 108 | title: '备份状态', |
112 | align: 'center', | 109 | align: 'center', |
113 | drag: false, | 110 | drag: false, |
114 | - width: 160, | ||
115 | sort: true, | 111 | sort: true, |
116 | templet: ` | 112 | templet: ` |
117 | <div> | 113 | <div> |
@@ -133,19 +129,19 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | @@ -133,19 +129,19 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions','soulTable | ||
133 | </div> | 129 | </div> |
134 | ` | 130 | ` |
135 | }, { | 131 | }, { |
136 | - field: 'startTime', title: '开始时间', align: 'center', drag: false, sort: true, width: 160 | 132 | + field: 'startTime', title: '开始时间', align: 'center', drag: false, sort: true |
137 | }, { | 133 | }, { |
138 | - field: 'endTime', title: '结束时间', align: 'center', drag: false, sort: true, width: 160 | 134 | + field: 'endTime', title: '结束时间', align: 'center', drag: false, sort: true |
139 | }, { | 135 | }, { |
140 | - field: 'useTime', title: '运行时间', align: 'center', drag: false, sort: true, width: 130 | 136 | + field: 'useTime', title: '运行时间', align: 'center', drag: false, sort: true |
141 | }, { | 137 | }, { |
142 | - field: 'speed', title: '速度', align: 'center', drag: false, sort: true, width: 110 | 138 | + field: 'speed', title: '速度', align: 'center', drag: false, sort: true |
143 | }, { | 139 | }, { |
144 | - field: 'jobFiles', title: '文件数', align: 'center', drag: false, sort: true, width: 110 | 140 | + field: 'jobFiles', title: '文件数', align: 'center', drag: false, sort: true |
145 | }, { | 141 | }, { |
146 | - field: 'jobBytesMb', title: '数据量', align: 'center', drag: false, sort: true, width: 170 | 142 | + field: 'jobBytesMb', title: '数据量', align: 'center', drag: false, sort: true |
147 | }, { | 143 | }, { |
148 | - field: 'storgeType', title: '存储类型', align: 'center', drag: false, sort: true, width: 110 | 144 | + field: 'storgeType', title: '存储类型', align: 'center', drag: false, sort: true |
149 | } | 145 | } |
150 | ]], | 146 | ]], |
151 | done: function () { | 147 | done: function () { |
@@ -8,7 +8,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'soulTabl | @@ -8,7 +8,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'soulTabl | ||
8 | var session = layui.sessions | 8 | var session = layui.sessions |
9 | //对外暴露的接口 | 9 | //对外暴露的接口 |
10 | exports("backDingjiaList", function (d) { | 10 | exports("backDingjiaList", function (d) { |
11 | - var accessToken = localStorage.getItem("accessToken"); | 11 | + var accessToken = common.getMjToken(); |
12 | var busId = d.busId === null ? '' : d.busId; | 12 | var busId = d.busId === null ? '' : d.busId; |
13 | var flag = d.flag === null ? '' : d.flag; | 13 | var flag = d.flag === null ? '' : d.flag; |
14 | createFailTable(); | 14 | createFailTable(); |
@@ -11,8 +11,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function | @@ -11,8 +11,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function | ||
11 | 11 | ||
12 | //对外暴露的接口 | 12 | //对外暴露的接口 |
13 | exports("backFailList", function (d) { | 13 | exports("backFailList", function (d) { |
14 | - var accessToken = localStorage.getItem("accessToken"); | ||
15 | - | 14 | + var accessToken = common.getMjToken(); |
16 | createFailTable() | 15 | createFailTable() |
17 | function dateForm(time) { | 16 | function dateForm(time) { |
18 | var unixTimestamp = new Date(time); | 17 | var unixTimestamp = new Date(time); |
@@ -10,8 +10,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -10,8 +10,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
10 | //对外暴露的接口 | 10 | //对外暴露的接口 |
11 | var accessToken; | 11 | var accessToken; |
12 | exports('backupCount', function () { | 12 | exports('backupCount', function () { |
13 | - var sessions = layui.sessions; | ||
14 | - var accessToken = localStorage.getItem("accessToken"); | 13 | + var accessToken = common.getMjToken(); |
15 | var period = 'thisMonth'; | 14 | var period = 'thisMonth'; |
16 | initTable(); | 15 | initTable(); |
17 | initStatusTable() | 16 | initStatusTable() |
@@ -84,7 +83,9 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -84,7 +83,9 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
84 | var data = res.data; | 83 | var data = res.data; |
85 | var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>'; | 84 | var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>'; |
86 | if(data.length==0){ | 85 | if(data.length==0){ |
86 | +/* | ||
87 | $(".backupCountStatus-table").append(tr); | 87 | $(".backupCountStatus-table").append(tr); |
88 | +*/ | ||
88 | }else { | 89 | }else { |
89 | $("#status_table").find("thead").empty(); | 90 | $("#status_table").find("thead").empty(); |
90 | $("#status_table").find("tbody").empty(); | 91 | $("#status_table").find("tbody").empty(); |
@@ -98,10 +99,18 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -98,10 +99,18 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
98 | htr += "</tr>" | 99 | htr += "</tr>" |
99 | $("#status_table").find("thead").append(htr); | 100 | $("#status_table").find("thead").append(htr); |
100 | $.each(data, function (i, e) { | 101 | $.each(data, function (i, e) { |
102 | + var evaluationLevel = ''; | ||
101 | var tr = ''; | 103 | var tr = ''; |
102 | var str = ''; | 104 | var str = ''; |
105 | + if(e.businfo.evaluationLevel == 'one-level'){ | ||
106 | + evaluationLevel = '一级'; | ||
107 | + }else if(e.businfo.evaluationLevel == 'two-level'){ | ||
108 | + evaluationLevel = '二级'; | ||
109 | + }else if(e.businfo.evaluationLevel == 'three-level'){ | ||
110 | + evaluationLevel = '三级'; | ||
111 | + } | ||
103 | if (e.rowspan == 0) { | 112 | if (e.rowspan == 0) { |
104 | - str = '<td rowspan=1>' + e.businfo.busTypeName + '</td><td rowspan=1>' + e.businfo.evaluationLevel + '</td>' | 113 | + str = '<td rowspan=1>' + e.businfo.busTypeName + '</td><td rowspan=1>' + evaluationLevel + '</td>' |
105 | tr += '<tr data-id="' + e.businfo.busId + '">' + | 114 | tr += '<tr data-id="' + e.businfo.busId + '">' + |
106 | '<td>' + (i + 1) + '</td>' + | 115 | '<td>' + (i + 1) + '</td>' + |
107 | str + | 116 | str + |
@@ -125,7 +134,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | @@ -125,7 +134,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd | ||
125 | '<td></td>' + | 134 | '<td></td>' + |
126 | '</tr>' | 135 | '</tr>' |
127 | } else { | 136 | } else { |
128 | - str = '<td rowspan="' + e.rowspan + '">' + (i + 1) + '</td><td rowspan="' + e.rowspan + '">' + e.businfo.busTypeName + '</td><td rowspan="' + e.rowspan + '">' + e.businfo.evaluationLevel + '</td>' | 137 | + str = '<td rowspan="' + e.rowspan + '">' + (i + 1) + '</td><td rowspan="' + e.rowspan + '">' + e.businfo.busTypeName + '</td><td rowspan="' + e.rowspan + '">' + evaluationLevel + '</td>' |
129 | tr += '<tr data-id="' + e.businfo.busId + '">' + str | 138 | tr += '<tr data-id="' + e.businfo.busId + '">' + str |
130 | $.each(e.backlist, function (j, f) { | 139 | $.each(e.backlist, function (j, f) { |
131 | $.each(e.backlist[j], function (h, n) { | 140 | $.each(e.backlist[j], function (h, n) { |
@@ -5,8 +5,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -5,8 +5,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
5 | var common = layui.common; | 5 | var common = layui.common; |
6 | //对外暴露的接口 | 6 | //对外暴露的接口 |
7 | exports('backupDingjia', function () { | 7 | exports('backupDingjia', function () { |
8 | - var sessions = layui.sessions; | ||
9 | - var accessToken = localStorage.getItem("accessToken"); | 8 | + var accessToken = common.getMjToken(); |
10 | //加载业务 | 9 | //加载业务 |
11 | loadConditionSelect(); | 10 | loadConditionSelect(); |
12 | //加载表格数据 | 11 | //加载表格数据 |
@@ -9,7 +9,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -9,7 +9,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
9 | var admin = layui.admin; | 9 | var admin = layui.admin; |
10 | //对外暴露的接口 | 10 | //对外暴露的接口 |
11 | exports('backupmain', function () { | 11 | exports('backupmain', function () { |
12 | - var accessToken = localStorage.getItem("accessToken"); | 12 | + var accessToken = common.getMjToken(); |
13 | var today = new Date() | 13 | var today = new Date() |
14 | today = today.getFullYear() + "-" + (today.getMonth() >= 9 ? (today.getMonth() + 1) : "0" + (today.getMonth() + 1)) + "-" + (today.getDate() > 9 ? (today.getDate()) : "0" + (today.getDate())); | 14 | today = today.getFullYear() + "-" + (today.getMonth() >= 9 ? (today.getMonth() + 1) : "0" + (today.getMonth() + 1)) + "-" + (today.getDate() > 9 ? (today.getDate()) : "0" + (today.getDate())); |
15 | var backTime = today; | 15 | var backTime = today; |
@@ -129,15 +129,25 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -129,15 +129,25 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
129 | var data = res.data; | 129 | var data = res.data; |
130 | var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>'; | 130 | var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>'; |
131 | if(data.length==0){ | 131 | if(data.length==0){ |
132 | - $(".layui-tab-item").append(tr); | 132 | + /*$(".layui-show").append(tr); |
133 | + $("#inspectioncount_table_id").find("tbody").empty(); | ||
134 | + $("#inspectioncount_table_id").append(tr);*/ | ||
133 | }else { | 135 | }else { |
134 | $("#inspectioncount_table_id").find("tbody").empty(); | 136 | $("#inspectioncount_table_id").find("tbody").empty(); |
135 | } | 137 | } |
136 | $.each(data, function (i, e) { | 138 | $.each(data, function (i, e) { |
139 | + var evaluationLevel = ''; | ||
137 | var tr = ''; | 140 | var tr = ''; |
138 | var str = ''; | 141 | var str = ''; |
142 | + if(e.businfo.evaluationLevel == 'one-level'){ | ||
143 | + evaluationLevel = '一级'; | ||
144 | + }else if(e.businfo.evaluationLevel == 'two-level'){ | ||
145 | + evaluationLevel = '二级'; | ||
146 | + }else if(e.businfo.evaluationLevel == 'three-level'){ | ||
147 | + evaluationLevel = '三级'; | ||
148 | + } | ||
139 | if (e.rowspan == 0) { | 149 | if (e.rowspan == 0) { |
140 | - str = '<td rowspan=1>' + e.businfo.busTypeName + '</td><td rowspan=1>' + e.businfo.evaluationLevel + '</td>' | 150 | + str = '<td rowspan=1>' + e.businfo.busTypeName + '</td><td rowspan=1>' + evaluationLevel + '</td>' |
141 | tr += '<tr data-id="' + e.businfo.busId + '">' + | 151 | tr += '<tr data-id="' + e.businfo.busId + '">' + |
142 | '<td>' + (i + 1) + '</td>' + | 152 | '<td>' + (i + 1) + '</td>' + |
143 | str + | 153 | str + |
@@ -156,7 +166,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | @@ -156,7 +166,7 @@ layui.define(['table', 'admin', 'form', 'laydate', 'common', 'sessions', 'view', | ||
156 | '<td></td>' + | 166 | '<td></td>' + |
157 | '</tr>' | 167 | '</tr>' |
158 | } else { | 168 | } else { |
159 | - str = '<td rowspan="' + e.rowspan + '">' + (i + 1) + '</td><td rowspan="' + e.rowspan + '">' + e.businfo.busTypeName + '</td><td rowspan="' + e.rowspan + '">' + e.businfo.evaluationLevel + '</td>' | 169 | + str = '<td rowspan="' + e.rowspan + '">' + (i + 1) + '</td><td rowspan="' + e.rowspan + '">' + e.businfo.busTypeName + '</td><td rowspan="' + e.rowspan + '">' + evaluationLevel + '</td>' |
160 | tr += '<tr data-id="' + e.businfo.busId + '">' + str | 170 | tr += '<tr data-id="' + e.businfo.busId + '">' + str |
161 | $.each(e.backlist, function (j, f) { | 171 | $.each(e.backlist, function (j, f) { |
162 | var platform = ''; | 172 | var platform = ''; |
@@ -112,7 +112,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -112,7 +112,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
112 | cols: [[ { | 112 | cols: [[ { |
113 | type: 'numbers', title: '序号' | 113 | type: 'numbers', title: '序号' |
114 | }, { | 114 | }, { |
115 | - field: 'title', title: '维修单编号', align: 'center',width:100, | 115 | + field: 'title', title: '维修单编号', align: 'center', |
116 | templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-devicehitch-title" >{{d.title}}</span></div>' | 116 | templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-devicehitch-title" >{{d.title}}</span></div>' |
117 | }, { | 117 | }, { |
118 | field: 'machineRoomName', title: '机房', align: 'center',templet: function (d) { | 118 | field: 'machineRoomName', title: '机房', align: 'center',templet: function (d) { |
@@ -138,28 +138,28 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -138,28 +138,28 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
138 | return machineRoomName; | 138 | return machineRoomName; |
139 | } | 139 | } |
140 | }, { | 140 | }, { |
141 | - field: 'deviceTypeName', title: '设备类型', align: 'center',width:88 | 141 | + field: 'deviceTypeName', title: '设备类型', align: 'center' |
142 | }, { | 142 | }, { |
143 | - field: 'deviceInfo', title: '设备名称', align: 'center',width:88 | 143 | + field: 'deviceInfo', title: '设备名称', align: 'center' |
144 | },{ | 144 | },{ |
145 | - field: 'hitchDiscover', title: '故障发现人', align: 'center',width:100 | 145 | + field: 'hitchDiscover', title: '故障发现人', align: 'center' |
146 | },{ | 146 | },{ |
147 | - field: 'hitchTime', title: '故障时间', align: 'center',width:88 | 147 | + field: 'hitchTime', title: '故障时间', align: 'center' |
148 | } ,{ | 148 | } ,{ |
149 | - field: 'hitchDesc', title: '故障描述', align: 'center',width:150 | 149 | + field: 'hitchDesc', title: '故障描述', align: 'center' |
150 | },{ | 150 | },{ |
151 | - field: 'projectLeader', title: '设备负责人', align: 'center',width:100 | 151 | + field: 'projectLeader', title: '设备负责人', align: 'center' |
152 | }, { | 152 | }, { |
153 | - field: 'phone', title: '联系方式', align: 'center',width:88 | 153 | + field: 'phone', title: '联系方式', align: 'center' |
154 | }, { | 154 | }, { |
155 | - field: 'repairer', title: '维修人', align: 'center',width:80 | 155 | + field: 'repairer', title: '维修人', align: 'center' |
156 | }, { | 156 | }, { |
157 | - field: 'attachmentList', title: '附件', align: 'center',width:60, | 157 | + field: 'attachmentList', title: '附件', align: 'center', |
158 | templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-devicehitch-attachment">{{d.attachmentList.length}}</span></div>' | 158 | templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-devicehitch-attachment">{{d.attachmentList.length}}</span></div>' |
159 | },{ | 159 | },{ |
160 | field: 'repairPlan', title: '计划维修时间', align: 'center' | 160 | field: 'repairPlan', title: '计划维修时间', align: 'center' |
161 | }, { | 161 | }, { |
162 | - field: 'repairStatus', title: '维修状态', align: 'center',width:88, | 162 | + field: 'repairStatus', title: '维修状态', align: 'center', |
163 | templet:function (d) { | 163 | templet:function (d) { |
164 | if(d.repairStatus=="0"){ | 164 | if(d.repairStatus=="0"){ |
165 | return "未维修" | 165 | return "未维修" |
@@ -168,7 +168,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -168,7 +168,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
168 | } | 168 | } |
169 | } | 169 | } |
170 | }, { | 170 | }, { |
171 | - field: 'applyTime', title: '记录时间', align: 'center',width:95 | 171 | + field: 'applyTime', title: '记录时间', align: 'center' |
172 | } | 172 | } |
173 | ]], | 173 | ]], |
174 | done: function () { | 174 | done: function () { |
@@ -271,6 +271,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -271,6 +271,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
271 | var url = domainName + '/cmdb-CI/cmdbci/findList?page=1&limit=20&objId=' + objectId + '&id=' + d.machineRoomId + '&accessToken=' + accessToken | 271 | var url = domainName + '/cmdb-CI/cmdbci/findList?page=1&limit=20&objId=' + objectId + '&id=' + d.machineRoomId + '&accessToken=' + accessToken |
272 | $.ajax({ | 272 | $.ajax({ |
273 | url: url, | 273 | url: url, |
274 | + async: false, | ||
274 | success: function (res) { | 275 | success: function (res) { |
275 | $.each(res.data, function (i, v) { | 276 | $.each(res.data, function (i, v) { |
276 | machineRoomName = v.shortName; | 277 | machineRoomName = v.shortName; |
@@ -296,6 +297,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -296,6 +297,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
296 | var url = domainName + '/cmdb-CI/supplier/find/' + d.manufacturerId + '?accessToken=' + accessToken | 297 | var url = domainName + '/cmdb-CI/supplier/find/' + d.manufacturerId + '?accessToken=' + accessToken |
297 | $.ajax({ | 298 | $.ajax({ |
298 | url: url, | 299 | url: url, |
300 | + async: false, | ||
299 | success: function (res) { | 301 | success: function (res) { |
300 | if (res.data.cmdbSupplier) { | 302 | if (res.data.cmdbSupplier) { |
301 | manufacturerName = res.data.cmdbSupplier.shortName; | 303 | manufacturerName = res.data.cmdbSupplier.shortName; |
@@ -335,6 +335,7 @@ layui.define(['jquery','tree', 'treeTable', 'table', 'form', 'laydate', 'admin', | @@ -335,6 +335,7 @@ layui.define(['jquery','tree', 'treeTable', 'table', 'form', 'laydate', 'admin', | ||
335 | elem: '#logTable' | 335 | elem: '#logTable' |
336 | , url: domainName + '/api-web/log/detail/listPage' | 336 | , url: domainName + '/api-web/log/detail/listPage' |
337 | , where: getParams() | 337 | , where: getParams() |
338 | + , height: 'full-280' | ||
338 | , cellMinWidth: 80 | 339 | , cellMinWidth: 80 |
339 | , page: { | 340 | , page: { |
340 | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] | 341 | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] |
@@ -418,7 +419,7 @@ layui.define(['jquery','tree', 'treeTable', 'table', 'form', 'laydate', 'admin', | @@ -418,7 +419,7 @@ layui.define(['jquery','tree', 'treeTable', 'table', 'form', 'laydate', 'admin', | ||
418 | , '<div class="layui-tab-item" id="time"><div class="site-demo-laydate"><div class="layui-inline" id="datetimeRange"></div></div></div>' | 419 | , '<div class="layui-tab-item" id="time"><div class="site-demo-laydate"><div class="layui-inline" id="datetimeRange"></div></div></div>' |
419 | , '</div>' | 420 | , '</div>' |
420 | , '</div>'].join('') | 421 | , '</div>'].join('') |
421 | - , style: 'min-width: 370px; height: auto; padding: 0 15px;margin-left:15px; box-shadow: 1px 1px 30px rgb(0 0 0 / 12%);' | 422 | + , style: 'min-width: 370px; height: auto; padding: 0 15px;margin-left:0px; box-shadow: 1px 1px 30px rgb(0 0 0 / 12%);' |
422 | , click: function (data, othis) { | 423 | , click: function (data, othis) { |
423 | $(".layui-dropdown").css("display","block"); | 424 | $(".layui-dropdown").css("display","block"); |
424 | } | 425 | } |
@@ -490,7 +491,7 @@ layui.define(['jquery','tree', 'treeTable', 'table', 'form', 'laydate', 'admin', | @@ -490,7 +491,7 @@ layui.define(['jquery','tree', 'treeTable', 'table', 'form', 'laydate', 'admin', | ||
490 | , range: true | 491 | , range: true |
491 | , btns:['clear', 'confirm'] | 492 | , btns:['clear', 'confirm'] |
492 | , ready: function (date) { | 493 | , ready: function (date) { |
493 | - $('.layui-dropdown').css({'left': 'calc(100% - 620px)'}); | 494 | + // $('.layui-dropdown').css({'left': 'calc(100% - 620px)'}); |
494 | } | 495 | } |
495 | , done: function (value, date, endDate) { | 496 | , done: function (value, date, endDate) { |
496 | $('#time-select-span').text(value); | 497 | $('#time-select-span').text(value); |
@@ -78,9 +78,17 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -78,9 +78,17 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
78 | var data = res.data; | 78 | var data = res.data; |
79 | $("#recoverycount-table").find("tbody").empty(); | 79 | $("#recoverycount-table").find("tbody").empty(); |
80 | $.each(data, function (i, e) { | 80 | $.each(data, function (i, e) { |
81 | + var evaluationLevel = ''; | ||
81 | var tr = ''; | 82 | var tr = ''; |
83 | + if(e.evaluationLevel == 'one-level'){ | ||
84 | + evaluationLevel = '一级'; | ||
85 | + }else if(e.evaluationLevel == 'two-level'){ | ||
86 | + evaluationLevel = '二级'; | ||
87 | + }else if(e.evaluationLevel == 'three-level'){ | ||
88 | + evaluationLevel = '三级'; | ||
89 | + } | ||
82 | var rowspan =e.children!=null && e.children.length > 1 ? e.children.length : 1; | 90 | var rowspan =e.children!=null && e.children.length > 1 ? e.children.length : 1; |
83 | - var str = '<td rowspan="' + rowspan + '">' + (i + 1) + '</td><td rowspan="' + rowspan + '">' + e.busTypeName + '</td><td rowspan="' + rowspan + '">'+ e.evaluationLevel + '</td>' | 91 | + var str = '<td rowspan="' + rowspan + '">' + (i + 1) + '</td><td rowspan="' + rowspan + '">' + e.busTypeName + '</td><td rowspan="' + rowspan + '">'+evaluationLevel + '</td>' |
84 | tr += '<tr data-id="' + e.busId + '">' + str | 92 | tr += '<tr data-id="' + e.busId + '">' + str |
85 | if (e.children!=null && e.children.length > 0){ | 93 | if (e.children!=null && e.children.length > 0){ |
86 | $.each(e.children, function (j, f) { | 94 | $.each(e.children, function (j, f) { |
@@ -139,6 +139,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | @@ -139,6 +139,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat | ||
139 | var url = domainName + '/cmdb-CI/supplier/find/'+d.omanufacturerId+'?accessToken='+accessToken | 139 | var url = domainName + '/cmdb-CI/supplier/find/'+d.omanufacturerId+'?accessToken='+accessToken |
140 | $.ajax({ | 140 | $.ajax({ |
141 | url: url, | 141 | url: url, |
142 | + async: false, | ||
142 | success: function(res){ | 143 | success: function(res){ |
143 | if(res.data.cmdbSupplier){ | 144 | if(res.data.cmdbSupplier){ |
144 | manufacturerName = res.data.cmdbSupplier.shortName; | 145 | manufacturerName = res.data.cmdbSupplier.shortName; |
@@ -43,17 +43,18 @@ | @@ -43,17 +43,18 @@ | ||
43 | </div> | 43 | </div> |
44 | </div> | 44 | </div> |
45 | </form> | 45 | </form> |
46 | + <button class="layui-btn layui-btn-sm layui-btn-normal tab-button" | ||
47 | + id="btn-dingjia-export-excel"> | ||
48 | + <i class="layui-icon"></i>导出到Excel | ||
49 | + </button> | ||
46 | </div> | 50 | </div> |
47 | </div> | 51 | </div> |
48 | <div class="layui-card" style="height: 100%"> | 52 | <div class="layui-card" style="height: 100%"> |
49 | <div class="layui-card-body"> | 53 | <div class="layui-card-body"> |
50 | <div class="layui-tab layui-tab-card" lay-filter="insp-tab"> | 54 | <div class="layui-tab layui-tab-card" lay-filter="insp-tab"> |
51 | - <ul class="layui-tab-title"> | ||
52 | - <button class="layui-btn layui-btn-sm layui-btn-normal tab-button" | ||
53 | - id="btn-dingjia-export-excel"> | ||
54 | - <i class="layui-icon"></i>导出到Excel | ||
55 | - </button> | ||
56 | - </ul> | 55 | + <!-- <ul class="layui-tab-title"> |
56 | + | ||
57 | + </ul>--> | ||
57 | <div class="layui-tab-content"> | 58 | <div class="layui-tab-content"> |
58 | <div class="layui-tab-item layui-show"> | 59 | <div class="layui-tab-item layui-show"> |
59 | <div id="dingjia-head-info" class="statistics-top-head"></div> | 60 | <div id="dingjia-head-info" class="statistics-top-head"></div> |
@@ -44,25 +44,28 @@ | @@ -44,25 +44,28 @@ | ||
44 | class="layui-input" readonly placeholder="其他日期范围"> | 44 | class="layui-input" readonly placeholder="其他日期范围"> |
45 | </div> | 45 | </div> |
46 | </div> | 46 | </div> |
47 | + | ||
47 | </div> | 48 | </div> |
48 | </form> | 49 | </form> |
50 | + <button class="layui-btn layui-btn-sm layui-btn-normal tab-button" | ||
51 | + id="btn-inspStatistics-export-excel" style="float: right"> | ||
52 | + <i class="layui-icon"></i>导出到Excel | ||
53 | + </button> | ||
49 | </div> | 54 | </div> |
55 | + | ||
50 | </div> | 56 | </div> |
51 | <div class="layui-card" style="height: 100%"> | 57 | <div class="layui-card" style="height: 100%"> |
52 | <div class="layui-card-body"> | 58 | <div class="layui-card-body"> |
53 | - <div class="layui-tab layui-tab-card" lay-filter="insp-tab"> | ||
54 | - <ul class="layui-tab-title"> | ||
55 | -<!-- | ||
56 | - <li class="layui-this">数据库备份</li> | ||
57 | ---> | ||
58 | -<!-- | ||
59 | - <li>虚拟机备份</li> | ||
60 | ---> | ||
61 | - <button class="layui-btn layui-btn-sm layui-btn-normal tab-button" | ||
62 | - id="btn-inspStatistics-export-excel"> | ||
63 | - <i class="layui-icon"></i>导出到Excel | ||
64 | - </button> | ||
65 | - </ul> | 59 | + <div class="layui-tab layui-tab-card" lay-filter="insp-tab"> |
60 | + <!-- <ul class="layui-tab-title"> | ||
61 | +<!– | ||
62 | + <li class="layui-this">数据库备份</li> | ||
63 | +–> | ||
64 | +<!– | ||
65 | + <li>虚拟机备份</li> | ||
66 | +–> | ||
67 | + | ||
68 | + </ul>--> | ||
66 | <div class="layui-tab-content"> | 69 | <div class="layui-tab-content"> |
67 | <div class="layui-tab-item layui-show"> | 70 | <div class="layui-tab-item layui-show"> |
68 | <div id="inspection-report-head-info" class="statistics-top-head"></div> | 71 | <div id="inspection-report-head-info" class="statistics-top-head"></div> |
@@ -136,52 +136,30 @@ | @@ -136,52 +136,30 @@ | ||
136 | border-top: dashed 1px grey; | 136 | border-top: dashed 1px grey; |
137 | } | 137 | } |
138 | 138 | ||
139 | - | ||
140 | </style> | 139 | </style> |
141 | <article class="page-container"> | 140 | <article class="page-container"> |
142 | <div class="page-panel"> | 141 | <div class="page-panel"> |
143 | - <div class="main"> | 142 | + <div class="main commonDiv newLog"> |
144 | <div class="layui-card"> | 143 | <div class="layui-card"> |
145 | <div class="layui-card-header"> | 144 | <div class="layui-card-header"> |
146 | <form class="layui-form layui-card-header" lay-filter="form_log_condition" onsubmit="return false;"> | 145 | <form class="layui-form layui-card-header" lay-filter="form_log_condition" onsubmit="return false;"> |
147 | <input type="hidden" id="searchDataRange"> | 146 | <input type="hidden" id="searchDataRange"> |
148 | <input type="hidden" id="searchDataType"> | 147 | <input type="hidden" id="searchDataType"> |
149 | - <!--<div class="display-flex log-header"> | ||
150 | - <div class="title">新搜索</div> | ||
151 | - <div class="layui-inline layui-btn-group time-group tools" id="createTimeBtn" > | ||
152 | - <button type="button" class="layui-btn layui-btn-primary layui-btn-sm">新建</button> | ||
153 | - <button type="button" class="layui-btn layui-btn-primary layui-btn-sm">打开</button> | ||
154 | - <button type="button" class="layui-btn layui-btn-primary layui-btn-sm">保存</button> | 148 | + <div class="layui-form-item newlog-form-item"> |
149 | + <div class="layui-inline"> | ||
150 | + <div style="width: 240px" id="resTypeList"></div> | ||
155 | </div> | 151 | </div> |
156 | - </div>--> | ||
157 | - <!----> | ||
158 | - <div class="layui-row"> | ||
159 | - <div class="layui-col-md2"> | ||
160 | - <div style="width: 120px" id="resTypeList"></div> | ||
161 | - <!--<select id="resTypeList" name="modules" lay-search=""> | ||
162 | - <option value="">直接选择或搜索选择</option> | ||
163 | - <option value="HOST_X86SERVER">服务器</option> | ||
164 | - <option value="DATABASE_">数据库</option> | ||
165 | - <option value="MIDDLEWARE_WEBLOGIC">中间件</option> | ||
166 | - <option value="NETSAFE_">安全设备</option> | ||
167 | - <option value="NETHARDWARE_">网络设备</option> | ||
168 | - </select>--> | 152 | + <div class="layui-inline"> |
153 | + <input type="text" id="searchKeyWords" name="historywarningkw" placeholder="输入关键字,回车搜索" autocomplete="off" class="layui-input"> | ||
169 | </div> | 154 | </div> |
170 | - <div class="layui-col-md9"> | ||
171 | - <div class="layui-row"> | ||
172 | - <div class="layui-col-md8"> | ||
173 | - <input type="text" id="searchKeyWords" name="historywarningkw" placeholder="输入关键字,回车搜索" autocomplete="off" class="layui-input"> | ||
174 | - </div> | ||
175 | - <div class="layui-col-md4"> | ||
176 | - <div class="layui-btn layui-btn-primary" style="margin-bottom: 8px;border-left: 0px" id="time-select"> | 155 | + <div class="layui-inline"> |
156 | + <div class="layui-btn layui-btn-primary" id="time-select"> | ||
177 | <span id="time-select-span"> | 157 | <span id="time-select-span"> |
178 | </span> | 158 | </span> |
179 | - </div> | ||
180 | - </div> | ||
181 | </div> | 159 | </div> |
182 | </div> | 160 | </div> |
183 | - <div class="layui-col-md1"> | ||
184 | - <button class="layui-btn layui-btn-normal" style="margin-bottom: 8px;margin-left: 10px" id="log-search"> | 161 | + <div class="layui-inline query-btn-inline"> |
162 | + <button class="layui-btn layui-btn-normal" id="log-search"> | ||
185 | 搜索 | 163 | 搜索 |
186 | </button> | 164 | </button> |
187 | </div> | 165 | </div> |
@@ -205,70 +183,12 @@ | @@ -205,70 +183,12 @@ | ||
205 | </form> | 183 | </form> |
206 | </div> | 184 | </div> |
207 | 185 | ||
208 | - <div class="layui-card" style="min-height: 200px"> | ||
209 | - <div class="layui-card-body"> | ||
210 | - <div style="display: flex;height: 200px" class="layui-card-echart"> | ||
211 | - <div style="flex-grow: 1"> | ||
212 | - <div class="pie-chart" id="log-echarts"></div> | ||
213 | - </div> | ||
214 | - </div> | ||
215 | - </div> | ||
216 | - </div> | ||
217 | - | ||
218 | - <div class="layui-card"> | ||
219 | - <div class="layui-card-body"> | ||
220 | - <div style="display: flex" class="layui-card-echart"> | ||
221 | - <div style="flex-grow: 1"> | ||
222 | - <div style="display: flex;flex-direction: row"> | ||
223 | - <div style="width: 200px;display: inline-flex"> | ||
224 | - | ||
225 | - </div> | ||
226 | - </div> | ||
227 | - <!--<div class="layui-row alaysis NETHARDWARE_" style="display: none"> | ||
228 | - <div class="layui-col-md12"> | ||
229 | - <div class="layui-btn-group"> | ||
230 | - <button type="button" class="layui-btn layui-btn-xs">自身告警情况</button> | ||
231 | - <button type="button" class="layui-btn layui-btn-xs">设备Trap告警</button> | ||
232 | - <button type="button" class="layui-btn layui-btn-xs">网络配置情况</button> | ||
233 | - </div> | ||
234 | - </div> | ||
235 | - </div> | ||
236 | - <div class="layui-row alaysis HOST_X86SERVER" style="display: none"> | ||
237 | - <div class="layui-col-md12"> | ||
238 | - <div class="layui-btn-group"> | ||
239 | - <button type="button" class="layui-btn layui-btn-xs">运行账号及权限</button> | ||
240 | - <button type="button" class="layui-btn layui-btn-xs">账号登录</button> | ||
241 | - </div> | ||
242 | - </div> | ||
243 | - </div> | ||
244 | - <div class="layui-row alaysis DATABASE_" style="display: none"> | ||
245 | - <div class="layui-col-md12"> | ||
246 | - <div class="layui-btn-group"> | ||
247 | - <button type="button" class="layui-btn layui-btn-xs">批量删除</button> | ||
248 | - <button type="button" class="layui-btn layui-btn-xs">表空间删除</button> | ||
249 | - </div> | ||
250 | - </div> | ||
251 | - </div> | ||
252 | - <div class="layui-row alaysis MIDDLEWARE_WEBLOGIC" style="display: none"> | ||
253 | - <div class="layui-col-md12"> | ||
254 | - <div class="layui-btn-group"> | ||
255 | - <button type="button" class="layui-btn layui-btn-xs">登录信息</button> | ||
256 | - </div> | ||
257 | - </div> | ||
258 | - </div> | ||
259 | - <div class="layui-row alaysis NETSAFE_" style="display: none"> | ||
260 | - <div class="layui-col-md12"> | ||
261 | - <div class="layui-btn-group"> | ||
262 | - <button type="button" class="layui-btn layui-btn-xs">非正常访问</button> | ||
263 | - <button type="button" class="layui-btn layui-btn-xs">策略变动</button> | ||
264 | - </div> | ||
265 | - </div> | ||
266 | - </div>--> | ||
267 | - <table id="logTable" lay-filter="log-table-filter"></table> | ||
268 | - </div> | ||
269 | - </div> | 186 | + <div style="display: flex;height: 200px" class="layui-card-echart"> |
187 | + <div style="flex-grow: 1"> | ||
188 | + <div class="pie-chart" id="log-echarts"></div> | ||
270 | </div> | 189 | </div> |
271 | </div> | 190 | </div> |
191 | + <table id="logTable" lay-filter="log-table-filter"></table> | ||
272 | </div> | 192 | </div> |
273 | </div> | 193 | </div> |
274 | </div> | 194 | </div> |
-
Please register or login to post a comment