Authored by ww

fix: 【任务2693】 【资源管理】屏蔽控制台功能,查看详情跳转新的页面

@@ -889,9 +889,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -889,9 +889,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
889 if ((d.resType !== 'MIDDLEWARE_WEBLOGIC') || (d.resType === 'MIDDLEWARE_WEBLOGIC' && d.parentId && d.parentId !== '')) { 889 if ((d.resType !== 'MIDDLEWARE_WEBLOGIC') || (d.resType === 'MIDDLEWARE_WEBLOGIC' && d.parentId && d.parentId !== '')) {
890 htm += '<a resmanage-data-opendetail="' + d.resId + '" data-ip="' + d.ip + '" data-restype="' + d.resType + '" data-restypename="' + d.resTypeName + '" data-admin="' + d.admin + '" data-name="' + d.resName + '" data-adminname="' + d.adminName + '" data-manageip="' + d.manageIp + '" data-collprotocol="' + d.collProtocol + '" data-provider="' + d.provider + '" class="layui-btn layui-btn-xs layui-btn-normal" lay-tips="查看详情">查看详情</a>'; 890 htm += '<a resmanage-data-opendetail="' + d.resId + '" data-ip="' + d.ip + '" data-restype="' + d.resType + '" data-restypename="' + d.resTypeName + '" data-admin="' + d.admin + '" data-name="' + d.resName + '" data-adminname="' + d.adminName + '" data-manageip="' + d.manageIp + '" data-collprotocol="' + d.collProtocol + '" data-provider="' + d.provider + '" class="layui-btn layui-btn-xs layui-btn-normal" lay-tips="查看详情">查看详情</a>';
891 } 891 }
892 - if (d.resType && d.resType.indexOf("HOST") > -1) {  
893 - htm += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-tips="CONSOLE" resmanage-data-console="' + d.resId + '">控制台</a>'  
894 - } 892 + // if (d.resType && d.resType.indexOf("HOST") > -1) {
  893 + // htm += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-tips="CONSOLE" resmanage-data-console="' + d.resId + '">控制台</a>'
  894 + // }
895 if (loginName === 'admin') { 895 if (loginName === 'admin') {
896 htm += '<a resmanage-data-delete-plus="' + d.resId + '" class="layui-btn layui-btn-xs layui-btn-normal" lay-tips="强制删除">强制删除</a>' 896 htm += '<a resmanage-data-delete-plus="' + d.resId + '" class="layui-btn layui-btn-xs layui-btn-normal" lay-tips="强制删除">强制删除</a>'
897 } 897 }
@@ -1186,44 +1186,49 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -1186,44 +1186,49 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
1186 // $(this).parents('tr').eq(0).addClass("tbody-tr-background-color"); 1186 // $(this).parents('tr').eq(0).addClass("tbody-tr-background-color");
1187 var resId = $(this).attr("resmanage-data-openDetail"); 1187 var resId = $(this).attr("resmanage-data-openDetail");
1188 var resType = $(this).data("restype"); 1188 var resType = $(this).data("restype");
1189 - var name = $(this).data("name");  
1190 - var ip = $(this).data("ip");  
1191 - var resTypeName = $(this).data("restypename");  
1192 - var admin = $(this).data("admin");  
1193 - var adminName = $(this).data("adminname");  
1194 - var manageIp = $(this).data("manageip");  
1195 - var collProtocol = $(this).data("collprotocol");  
1196 - var provider = $(this).data("provider");  
1197 - if (name && name != '') {  
1198 - name += ' | ';  
1199 - }  
1200 - if (resTypeName && resType !== 'HOST_X86SERVER') {  
1201 - name += resTypeName + '|';  
1202 - }  
1203 - if (ip) {  
1204 - if (resType === 'HOST_X86SERVER') {  
1205 - if (collProtocol && (collProtocol.split(",").length > 1 || collProtocol === 'SSH')) {  
1206 - name += '应用IP-' + ip + '|';  
1207 - }  
1208 - } else {  
1209 - name += ip + '|';  
1210 - }  
1211 - }  
1212 - if (resType === 'HOST_X86SERVER' && collProtocol && collProtocol.indexOf('SNMP') !== -1) {  
1213 - if (manageIp) {  
1214 - name += '管理IP-' + manageIp + '|';  
1215 - }  
1216 - }  
1217 - if (adminName) {  
1218 - name += adminName + ' | ';  
1219 - }  
1220 - if (name.length > 0) {  
1221 - name = name.substr(0, name.length - 1);  
1222 - }  
1223 - if (resType == 'STORAGE_SHARE' && provider != 'HUAWEI' && provider != 'Inspur' && provider != 'macrosan') {  
1224 - return false;  
1225 - }  
1226 - commonDetail.openDetail(resId, resType, name) 1189 + // var name = $(this).data("name");
  1190 + // var ip = $(this).data("ip");
  1191 + // var resTypeName = $(this).data("restypename");
  1192 + // var admin = $(this).data("admin");
  1193 + // var adminName = $(this).data("adminname");
  1194 + // var manageIp = $(this).data("manageip");
  1195 + // var collProtocol = $(this).data("collprotocol");
  1196 + // var provider = $(this).data("provider");
  1197 + // if (name && name != '') {
  1198 + // name += ' | ';
  1199 + // }
  1200 + // if (resTypeName && resType !== 'HOST_X86SERVER') {
  1201 + // name += resTypeName + '|';
  1202 + // }
  1203 + // if (ip) {
  1204 + // if (resType === 'HOST_X86SERVER') {
  1205 + // if (collProtocol && (collProtocol.split(",").length > 1 || collProtocol === 'SSH')) {
  1206 + // name += '应用IP-' + ip + '|';
  1207 + // }
  1208 + // } else {
  1209 + // name += ip + '|';
  1210 + // }
  1211 + // }
  1212 + // if (resType === 'HOST_X86SERVER' && collProtocol && collProtocol.indexOf('SNMP') !== -1) {
  1213 + // if (manageIp) {
  1214 + // name += '管理IP-' + manageIp + '|';
  1215 + // }
  1216 + // }
  1217 + // if (adminName) {
  1218 + // name += adminName + ' | ';
  1219 + // }
  1220 + // if (name.length > 0) {
  1221 + // name = name.substr(0, name.length - 1);
  1222 + // }
  1223 + // if (resType == 'STORAGE_SHARE' && provider != 'HUAWEI' && provider != 'Inspur' && provider != 'macrosan') {
  1224 + // return false;
  1225 + // }
  1226 + // commonDetail.openDetail(resId, resType, name)
  1227 +
  1228 + window.top.postMessage({
  1229 + type: 'resDetail',
  1230 + message: {'params':{'resId':resId,'resType':resType}}
  1231 + }, '*')
1227 }); 1232 });
1228 resTopo(); 1233 resTopo();
1229 //lsq T3和IOP点击修改删除 2022-08-04 1234 //lsq T3和IOP点击修改删除 2022-08-04