...
|
...
|
@@ -3329,6 +3329,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont"></i></a>`;
|
|
|
//lsq 2022-04-25 增加ping详情提交按钮
|
|
|
title += `<a class="layui-icon res-view-ping" data-id=${resId} data-resname=${resName} data-ip=${ip} data-restypename=${resTypeName} data-adminname=${adminName} lay-tips="历史数据" style="margin-left: 10px;position:relative;top:-3px;"> <img width="20" src="/src/style/img/ping.png" ></a>`;
|
|
|
title += `<a class="layui-icon res-view-history" data-id=${resId} data-resname=${res.resName} data-ip=${ip} data-restypename=${res.resTypeName} data-adminname=${res.adminName} lay-tips="快照历史记录" style="top: -3px;float: right;"> <img width="20" src="/src/style/img/snapshothistory.png" ></a>`;
|
|
|
title += `<a class="layui-icon res-view-addSnapshot" data-id=${resId} lay-tips="创建快照" style="top: -3px;float: right; margin-right: 10px"> <img width="20" src="/src/style/img/snapshotadd.png" ></a>`;
|
|
|
if (resCategory === 'share' && hardwareFlag.endsWith("Y")) {
|
|
|
/*
|
|
|
title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont"></i></a>`;
|
...
|
...
|
@@ -3354,6 +3356,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont"></i></a>`;
|
|
|
//lsq 2022-04-25 增加ping详情提交按钮
|
|
|
title += `<a class="layui-icon res-view-ping" data-id=${resId} data-resname=${res.resName} data-ip=${ip} data-restypename=${res.resTypeName} data-adminname=${res.adminName} lay-tips="历史数据" style="margin-left: 10px;position:relative;top:-3px;"> <img width="20" src="/src/style/img/ping.png" ></a>`;
|
|
|
title += `<a class="layui-icon res-view-history" data-id=${resId} data-resname=${res.resName} data-ip=${ip} data-restypename=${res.resTypeName} data-adminname=${res.adminName} lay-tips="快照历史记录" style="top: -3px;float: right;"> <img width="20" src="/src/style/img/snapshothistory.png" ></a>`;
|
|
|
title += `<a class="layui-icon res-view-addSnapshot" data-id=${resId} lay-tips="创建快照" style="top: -3px;float: right; margin-right: 10px"> <img width="20" src="/src/style/img/snapshotadd.png" ></a>`;
|
|
|
if (resCategory === 'share' && hardwareFlag.endsWith("Y")) {
|
|
|
/*
|
|
|
title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont"></i></a>`;
|
...
|
...
|
@@ -3645,7 +3649,39 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele |
|
|
});
|
|
|
});
|
|
|
//end lsq 2022-04-24
|
|
|
|
|
|
$('a.res-view-addSnapshot').unbind('click').on('click', function () {
|
|
|
var resId = $(this).data('id');
|
|
|
layer.confirm('将创建该资源的所有快照信息,请确认', {
|
|
|
btn: ['确定', '取消'] //按钮
|
|
|
}, function () {
|
|
|
admin.req({
|
|
|
url: common.domainName + '/api-web/snapshot/his/add?access_token=' + layui.sessions.getToken().access_token +'&resId=' + resId
|
|
|
, type: 'get'
|
|
|
, done: function (res) {
|
|
|
if (res.success) {
|
|
|
layer.msg('操作成功!', {offset: '15px', icon: 1, time: 2000});
|
|
|
} else {
|
|
|
layer.msg('操作失败,请与管理员联系!', {offset: '15px', icon: 7, time: 2000});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
$('a.res-view-history').unbind('click').on('click', function () {
|
|
|
let name = $(this).data('resname')+' |'+$(this).data('restypename')+' |'+$(this).data('ip')+' |'+'历史快照数据';
|
|
|
let paramStr = '?resId=' + $(this).data('id');
|
|
|
layer.open({
|
|
|
title: [name, 'font-size:18px;'],
|
|
|
type: 2,
|
|
|
area: ['90%', '90%'],
|
|
|
shadeClose: true,//开启遮罩层
|
|
|
id: 'res-history',
|
|
|
content: ['/vue3/index.html#/vue3/snapshot/history' + paramStr, 'no'],
|
|
|
cancel: function () {
|
|
|
clearTimeout();
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
// 查看资产配置信息
|
|
|
$('a.res-view-assets-details').unbind('click').on('click', function () {
|
|
|
var $that = $(this);
|
...
|
...
|
|