...
|
...
|
@@ -45,11 +45,11 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd |
|
|
field: 'shouldBack', title: '应备份数量', align: 'center', drag: false,
|
|
|
}, {
|
|
|
field: 'success', title: '备份成功数量', align: 'center', drag: false,
|
|
|
templet: '<div><span data-date="{{d.createDate}}" data-status="成功" class="layui-table-link view-failCount-collectValue" style="color: green;font-size: 14px">{{d.success}}</span></div>'
|
|
|
templet: '<div><span data-date="{{d.createDate}}" data-status="成功" class="layui-table-link view-failCount-collectValue" style="color: green!important;">{{d.success}}</span></div>'
|
|
|
|
|
|
}, {
|
|
|
field: 'fail', title: '备份失败数量', align: 'center', drag: false,
|
|
|
templet: '<div><span data-date="{{d.createDate}}" data-status="失败" class="layui-table-link view-failCount-collectValue" style="color: red;font-size: 14px">{{d.fail}}</span></div>'
|
|
|
templet: '<div><span data-date="{{d.createDate}}" data-status="失败" class="layui-table-link view-failCount-collectValue" style="color: red!important;">{{d.fail}}</span></div>'
|
|
|
|
|
|
}, {
|
|
|
field: 'inback', title: '备份中数量', align: 'center', drag: false,
|
...
|
...
|
@@ -63,8 +63,8 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd |
|
|
$('.view-failCount-collectValue').on('click', function () {
|
|
|
var createDate = $(this).data("date");
|
|
|
var status = $(this).data("status");
|
|
|
var title = '备份失败列表'
|
|
|
common.openWin('backup/failList', title, {createDate: createDate, status: status}, ['确定', '取消'])
|
|
|
var title = status=="失败"?'备份失败列表':'备份成功列表';
|
|
|
common.openWin('backup/failList', title, {createDate: createDate, status: status}, ['确定', '取消'],null,null,['95%', '90%'])
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -72,7 +72,6 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd |
|
|
|
|
|
function initStatusTable() {
|
|
|
var loading = layer.load(2)
|
|
|
var mycars = new Array();
|
|
|
var url = common.domainName + '/api-web/backupview/countLastHalfMonthBackStatus'
|
|
|
$.ajax({
|
|
|
url: url,
|
...
|
...
|
@@ -81,23 +80,16 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd |
|
|
success: function (res) {
|
|
|
layer.close(loading);
|
|
|
var data = res.data;
|
|
|
var tr = '<div style="line-height: 26px;padding: 15px;text-align:center;color: #999;">暂无数据</div>';
|
|
|
if(data.length==0){
|
|
|
/*
|
|
|
$(".backupCountStatus-table").append(tr);
|
|
|
*/
|
|
|
}else {
|
|
|
$("#status_table").find("thead").empty();
|
|
|
$("#status_table").find("tbody").empty();
|
|
|
|
|
|
var htr = "<tr><th style='color: #151b26;font-weight: bold!important;'>序号</th><th width='200' style='color: #151b26;font-weight: bold!important;'>系统名称</th><th style='color: #151b26;font-weight: bold!important;'>等保等级</th><th width='200' style='color: #151b26;font-weight: bold!important;'>数据库名称</th><th style='color: #151b26;font-weight: bold!important;'>IP地址</th>"
|
|
|
$.each(data[0].backlist[0], function (j, f) {
|
|
|
if (j != "resId" && j != "resName" && j != "ip") {
|
|
|
htr += "<th style='color: #151b26;font-weight: bold!important;'>" + j + "</th>"
|
|
|
}
|
|
|
var htr = "<tr><th style='color: #151b26;font-weight: bold!important;'>序号</th><th style='color: #151b26;font-weight: bold!important;'>系统名称</th><th style='color: #151b26;font-weight: bold!important;'>等保等级</th><th style='color: #151b26;font-weight: bold!important;'>数据库名称</th><th style='color: #151b26;font-weight: bold!important;'>IP地址</th>"
|
|
|
$.each(res.object, function (j, f) {
|
|
|
htr += "<th style='color: #151b26;font-weight: bold!important;'>" + f + "</th>"
|
|
|
});
|
|
|
htr += "</tr>"
|
|
|
htr += "</tr>";
|
|
|
$("#status_table").find("thead").append(htr);
|
|
|
$("#status_table").find("tbody").empty();
|
|
|
if(data.length==0){
|
|
|
|
|
|
}else {
|
|
|
$.each(data, function (i, e) {
|
|
|
var evaluationLevel = '';
|
|
|
var tr = '';
|
...
|
...
|
@@ -140,19 +132,19 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd |
|
|
$.each(e.backlist[j], function (h, n) {
|
|
|
if (h != "resId") {
|
|
|
if (/失败/.test(n)) {
|
|
|
tr += '<td style="text-align: center"><i class="layui-icon layui-icon-close" style="font-size: 20px; color: #ff252c;"></i></td>'
|
|
|
tr += '<td style="text-align: center"><i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important;"></i></td>'
|
|
|
} else if (/成功/.test(n)) {
|
|
|
tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-ok" style="font-size: 20px; color: #1dff1c;"></i></p><p style="margin-top: 8px;text-align: center">主楼+综改</p></td>'
|
|
|
tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important;"></i></p><p style="margin-top: 8px;text-align: center">主楼+综改</p></td>'
|
|
|
} else if (/备份中/.test(n)) {
|
|
|
tr += '<td style="text-align: center"><span style="color:#ffe40e">' + n + '</span></td>'
|
|
|
tr += '<td style="text-align: center"><span style="color:#ffe40e!important;">' + n + '</span></td>'
|
|
|
} else if (/未备份/.test(n)) {
|
|
|
tr += '<td style="text-align: center"><span style="color:magenta">' + n + '</span></td>'
|
|
|
tr += '<td style="text-align: center"><span style="color:magenta!important;">' + n + '</span></td>'
|
|
|
} else if (/历史存放/.test(n)) {
|
|
|
tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-log" style="font-size: 20px; color: #1e9fff;"></i></p><p style="margin-top: 8px;text-align: center">综改</p></td>'
|
|
|
tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-log" style="font-size: 20px!important; color: #1e9fff!important;"></i></p><p style="margin-top: 8px;text-align: center">综改</p></td>'
|
|
|
} else if (/全备/.test(n)) {
|
|
|
tr += '<td style="text-align: center"><span style="color:#1DFF1C">' + n + '</span></td>'
|
|
|
tr += '<td style="text-align: center"><span style="color:#1DFF1C!important;">' + n + '</span></td>'
|
|
|
} else if (/已失效/.test(n)){
|
|
|
tr += '<td style="text-align: center"><span style="color:#FF252C">' + n + '</span></td>'
|
|
|
tr += '<td style="text-align: center"><span style="color:#FF252C!important;">' + n + '</span></td>'
|
|
|
}else {
|
|
|
tr += '<td style="text-align: center">' + n + '</td>'
|
|
|
|
...
|
...
|
|