Authored by 王涛

Merge branch 'master-V32-XuHaoJie' into 'master'

通用-华为云,阿里云详情页暂时不能点、收藏夹暂时解决报错问题



See merge request !8
... ... @@ -2610,6 +2610,10 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
if(resType == 'STORAGE_SHARE' && (provider == 'H3C' || provider == 'HDS')){
return;
}
// 阿里云,华为云不能点击
if(resType == 'ALI_CLOUD_PLAT' || resType == 'HUAWEI_CLOUD_PLAT'){
return ;
}
var nameClickLoading = layer.load(2);
var resId = $(this).data("zymc");
var name = $(this).data("name");
... ...
... ... @@ -69,21 +69,23 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
var favoriteId = $("#favorites_parentId").val();
var resIds = [];
var param={
favId: favoriteId,
resName: $("#keyword_id").val(),
resType: $("#fav_reslist_restype").val(),
busId: $("#fav_reslist_resListBizTypes").val(),
resHealth: $("#fav_reslist_resStatus").val(),
page: -1,
limit: 20
}
//获取所有资源id
var oldResIdList = [];
admin.req({
url: common.domainName + '/api-web/favorites/res/list',
url: common.domainName + '/api-web/favorites/res/list?access_token='+accessToken,
async: false,
data: {
access_token: accessToken,
favId: favoriteId,
resName: $("#keyword_id").val(),
resType: $("#fav_reslist_restype").val(),
busId: $("#fav_reslist_resListBizTypes").val(),
resHealth: $("#fav_reslist_resStatus").val(),
page: -1,
limit: 20
},
type:'post',
data: JSON.stringify(param),
contentType: "application/json;charset=UTF-8",
error: function () {
layer.close(loading);
}
... ... @@ -337,10 +339,10 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
templet: '<div><span data-fav-zymc="{{ d.resId }}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.admin }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>'
}
, {field: 'ip', title: 'IP地址', minWidth: 150, align: 'center', sort: true}
, {field: 'adminName', title: '负责人', minWidth: 100, align: 'center', sort: true}
, {field: 'resAdminMaster', title: '负责人', minWidth: 100, align: 'center', sort: true}
, {field: 'resTypeName', title: '资源类型', minWidth: 150, align: 'center', sort: true}
, {field: 'health', title: '健康状态', minWidth: 100, align: 'center', sort: true, templet: '#reshealthTpl'}
, {field: 'state', title: '连接状态', minWidth: 100, align: 'center', templet: '#ljztresListTpl'}
, {field: 'linkState', title: '连接状态', minWidth: 100, align: 'center', templet: '#ljztresListTpl'}
];
}
favoriteResourceListTable = table.render({
... ... @@ -348,7 +350,7 @@ layui.define(['table', 'admin', 'form', 'common', 'sessions', 'reslist', 'common
id: 'favoriteListTable'
,toolbar: '<div class="warn-btns"><button id="favorites_cols_save" class="layui-btn layui-btn-normal layui-btn-sm hide" style="float: right;">保存列顺序</button></div>' //开启头部工具栏,并为其绑定左侧模板
, defaultToolbar: ['filter']
, url: common.domainName + '/api-web/favorites/res/list'
, url: common.domainName + '/api-web/favorites/res/noList'
, where: {
access_token: accessToken,
favId: favId,
... ...
... ... @@ -915,19 +915,30 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', '
, limits: [150, 200, 300]
, cols: [cols]
, done: function (res, curr, count) {
// 共享设备,厂商是H3C、HDS的设备不让点击并且提示暂无监控信息
var $hsc_=$('span[data-restype="STORAGE_SHARE"][data-provider="H3C"]');
$.each($hsc_,function (i,v) {
$(this).css("color","#666");
$(this).css("text-decoration","none");
$(this).attr("lay-tips","未监控到数据");
//更改样式
function noClick($that) {
$that.css("color", "#666");
$that.css("text-decoration", "none");
$that.attr("lay-tips", "未监控到数据");
}
// 共享设备,厂商是H3C、HDS的设备不让点击并且提示暂无监控信息
var $hsc_ = $('span[data-restype="STORAGE_SHARE"][data-provider="H3C"]');
$.each($hsc_, function (i, v) {
noClick($(this));
});
var $hds = $('span[data-restype="STORAGE_SHARE"][data-provider="HDS"]');
$.each($hds, function (i, v) {
noClick($(this));
});
//华为云,阿里云不让点击,并且提示暂无监控信息
var $hds = $('span[data-restype="HUAWEI_CLOUD_PLAT"]');
$.each($hds, function (i, v) {
noClick($(this));
});
var $hds=$('span[data-restype="STORAGE_SHARE"][data-provider="HDS"]');
$.each($hds,function (i,v) {
$(this).css("color","#666");
$(this).css("text-decoration","none");
$(this).attr("lay-tips","未监控到数据");
var $hds = $('span[data-restype="ALI_CLOUD_PLAT"]');
$.each($hds, function (i, v) {
noClick($(this));
});
soulTable.render(this)
... ...