@riil-frontend/component-topology 2.15.46 → 2.15.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/1.js +2 -2
- package/build/2.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +19 -19
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +22 -21
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +22 -21
- package/package.json +2 -2
|
@@ -20,7 +20,7 @@ import { updateEdgeExpanded } from "../utils/edgeUtil";
|
|
|
20
20
|
import PluginManager from "./PluginManager";
|
|
21
21
|
import topoFactory from "./topoFactory"; // eslint-disable-next-line no-undef
|
|
22
22
|
|
|
23
|
-
var version = typeof "2.15.
|
|
23
|
+
var version = typeof "2.15.47" === 'string' ? "2.15.47" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
|
@@ -224,9 +224,9 @@ export default function ResourceOverview(props) {
|
|
|
224
224
|
|
|
225
225
|
function _init() {
|
|
226
226
|
_init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
227
|
-
var _topo$options$resourc, _attributeMap$source_, _attributeMap$destina;
|
|
227
|
+
var _topo$options$resourc, _modelAttributeMap$ow, _modelAttributeMap$, _modelAttributeMap$2, _modelAttributeMap$3, _modelAttributeMap$di, _modelAttributeMap$ip, _modelAttributeMap$as, _modelAttributeMap$5, _modelAttributeMap$6, _modelAttributeMap$so, _attributeMap$source_, _modelAttributeMap$de, _attributeMap$destina;
|
|
228
228
|
|
|
229
|
-
var ciTypeMeta, link, linkConnectType, _ciTypeMeta, modelMetrics, ciName, modelAttributeMap, domain, topModelMetrics, isAppTopoFlag, _findItem, attributeMap, metrics, res_address, _attributeMap$, rated_bandwidth, _modelAttributeMap
|
|
229
|
+
var ciTypeMeta, link, linkConnectType, _ciTypeMeta, modelMetrics, ciName, modelAttributeMap, domain, topModelMetrics, isAppTopoFlag, _findItem, attributeMap, metrics, res_address, _attributeMap$, rated_bandwidth, _modelAttributeMap$4;
|
|
230
230
|
|
|
231
231
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
232
232
|
while (1) {
|
|
@@ -265,11 +265,12 @@ export default function ResourceOverview(props) {
|
|
|
265
265
|
// 拓扑(默认) ---------------------------
|
|
266
266
|
// 基本信息
|
|
267
267
|
_findItem = findItem(attrsAndMetrics, 'id', id), attributeMap = _findItem.attributeMap, metrics = _findItem.metrics;
|
|
268
|
-
console.log('基本信息', attributeMap, attrsAndMetrics); //
|
|
268
|
+
console.log('基本信息', attributeMap, attrsAndMetrics, modelAttributeMap); // userVisible
|
|
269
|
+
// 位置
|
|
269
270
|
|
|
270
271
|
res_address = false;
|
|
271
272
|
|
|
272
|
-
if (!modelAttributeMap['owned_computer_room']) {
|
|
273
|
+
if (!((_modelAttributeMap$ow = modelAttributeMap['owned_computer_room']) !== null && _modelAttributeMap$ow !== void 0 && _modelAttributeMap$ow.userVisible)) {
|
|
273
274
|
_context.next = 19;
|
|
274
275
|
break;
|
|
275
276
|
}
|
|
@@ -283,7 +284,7 @@ export default function ResourceOverview(props) {
|
|
|
283
284
|
break;
|
|
284
285
|
|
|
285
286
|
case 19:
|
|
286
|
-
if (modelAttributeMap[ciType + ".computer_room"] || modelAttributeMap[ciType + ".area"]) {
|
|
287
|
+
if ((_modelAttributeMap$ = modelAttributeMap[ciType + ".computer_room"]) !== null && _modelAttributeMap$ !== void 0 && _modelAttributeMap$.userVisible || (_modelAttributeMap$2 = modelAttributeMap[ciType + ".area"]) !== null && _modelAttributeMap$2 !== void 0 && _modelAttributeMap$2.userVisible) {
|
|
287
288
|
res_address = attributeMap[ciType + ".computer_room "] || attributeMap[ciType + ".area"] ? " " + (((_attributeMap$ = attributeMap[ciType + ".area_object"]) === null || _attributeMap$ === void 0 ? void 0 : _attributeMap$.displayName) || '') + " " + (attributeMap[ciType + ".computer_room"] || '') : false;
|
|
288
289
|
}
|
|
289
290
|
|
|
@@ -291,30 +292,30 @@ export default function ResourceOverview(props) {
|
|
|
291
292
|
// 链路带宽(取实际带宽)
|
|
292
293
|
rated_bandwidth = false;
|
|
293
294
|
|
|
294
|
-
if (modelAttributeMap[ciType + ".actual_bandwidth"]) {
|
|
295
|
-
rated_bandwidth = attributeMap[ciType + ".actual_bandwidth"] ? attributeMap[ciType + ".actual_bandwidth"] + " " + ((_modelAttributeMap$ = modelAttributeMap[ciType + ".actual_bandwidth"]) === null || _modelAttributeMap$ === void 0 ? void 0 : _modelAttributeMap
|
|
295
|
+
if ((_modelAttributeMap$3 = modelAttributeMap[ciType + ".actual_bandwidth"]) !== null && _modelAttributeMap$3 !== void 0 && _modelAttributeMap$3.userVisible) {
|
|
296
|
+
rated_bandwidth = attributeMap[ciType + ".actual_bandwidth"] ? attributeMap[ciType + ".actual_bandwidth"] + " " + ((_modelAttributeMap$4 = modelAttributeMap[ciType + ".actual_bandwidth"]) === null || _modelAttributeMap$4 === void 0 ? void 0 : _modelAttributeMap$4.unit) : '';
|
|
296
297
|
}
|
|
297
298
|
|
|
298
299
|
setBaseInfo({
|
|
299
300
|
// 资源
|
|
300
301
|
//display_name: modelAttributeMap['display_name'] ? attributeMap.display_name : false,
|
|
301
|
-
resource: modelAttributeMap['display_name'] ? {
|
|
302
|
+
resource: (_modelAttributeMap$di = modelAttributeMap['display_name']) !== null && _modelAttributeMap$di !== void 0 && _modelAttributeMap$di.userVisible ? {
|
|
302
303
|
display_name: attributeMap.display_name,
|
|
303
304
|
// 资源名称/显示名称
|
|
304
305
|
link: "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType // 资源跳转链接
|
|
305
306
|
|
|
306
307
|
} : false,
|
|
307
|
-
ipv4_address: modelAttributeMap['ipv4_address'] ? attributeMap.ipv4_address : false,
|
|
308
|
-
asset_number: modelAttributeMap['asset_number'] ? attributeMap.asset_number : false,
|
|
308
|
+
ipv4_address: (_modelAttributeMap$ip = modelAttributeMap['ipv4_address']) !== null && _modelAttributeMap$ip !== void 0 && _modelAttributeMap$ip.userVisible ? attributeMap.ipv4_address : false,
|
|
309
|
+
asset_number: (_modelAttributeMap$as = modelAttributeMap['asset_number']) !== null && _modelAttributeMap$as !== void 0 && _modelAttributeMap$as.userVisible ? attributeMap.asset_number : false,
|
|
309
310
|
ciName: ciName,
|
|
310
311
|
res_address: res_address,
|
|
311
312
|
// principal: modelAttributeMap[`${ciType}.principal`] ? attributeMap[`${ciType}.principal`] : false,
|
|
312
313
|
// 链路
|
|
313
314
|
rated_bandwidth: rated_bandwidth,
|
|
314
|
-
source_ipv4: modelAttributeMap[ciType + ".source_ipv4"] ? attributeMap[ciType + ".source_ipv4"] : false,
|
|
315
|
-
destination_ipv4: modelAttributeMap[ciType + ".destination_ipv4"] ? attributeMap[ciType + ".destination_ipv4"] : false,
|
|
316
|
-
source_Interface: modelAttributeMap['source_id'] ? (_attributeMap$source_ = attributeMap.source_id_object) === null || _attributeMap$source_ === void 0 ? void 0 : _attributeMap$source_.displayName : false,
|
|
317
|
-
destination_Interface: modelAttributeMap['destination_id'] ? (_attributeMap$destina = attributeMap.destination_id_object) === null || _attributeMap$destina === void 0 ? void 0 : _attributeMap$destina.displayName : false
|
|
315
|
+
source_ipv4: (_modelAttributeMap$5 = modelAttributeMap[ciType + ".source_ipv4"]) !== null && _modelAttributeMap$5 !== void 0 && _modelAttributeMap$5.userVisible ? attributeMap[ciType + ".source_ipv4"] : false,
|
|
316
|
+
destination_ipv4: (_modelAttributeMap$6 = modelAttributeMap[ciType + ".destination_ipv4"]) !== null && _modelAttributeMap$6 !== void 0 && _modelAttributeMap$6.userVisible ? attributeMap[ciType + ".destination_ipv4"] : false,
|
|
317
|
+
source_Interface: (_modelAttributeMap$so = modelAttributeMap['source_id']) !== null && _modelAttributeMap$so !== void 0 && _modelAttributeMap$so.userVisible ? (_attributeMap$source_ = attributeMap.source_id_object) === null || _attributeMap$source_ === void 0 ? void 0 : _attributeMap$source_.displayName : false,
|
|
318
|
+
destination_Interface: (_modelAttributeMap$de = modelAttributeMap['destination_id']) !== null && _modelAttributeMap$de !== void 0 && _modelAttributeMap$de.userVisible ? (_attributeMap$destina = attributeMap.destination_id_object) === null || _attributeMap$destina === void 0 ? void 0 : _attributeMap$destina.displayName : false
|
|
318
319
|
}); // 资源/链路-关键指标 数据 metrics,模型 topo.ciTyeCache.getCiType(ciType)
|
|
319
320
|
|
|
320
321
|
setIndicator(topModelMetrics.map(function (item) {
|
|
@@ -344,7 +345,7 @@ export default function ResourceOverview(props) {
|
|
|
344
345
|
|
|
345
346
|
function _initAppTopo() {
|
|
346
347
|
_initAppTopo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(topModelMetrics, modelAttributeMap, ciName, domain) {
|
|
347
|
-
var _topo$options$resourc2, _alarmList;
|
|
348
|
+
var _topo$options$resourc2, _modelAttributeMap$ow2, _modelAttributeMap$7, _modelAttributeMap$8, _modelAttributeMap$di2, _modelAttributeMap$ip2, _modelAttributeMap$as2, _alarmList;
|
|
348
349
|
|
|
349
350
|
var _yield$topo$options$r, metrics, alarmList, attributeMap, res_address, _attributeMap$2;
|
|
350
351
|
|
|
@@ -376,7 +377,7 @@ export default function ResourceOverview(props) {
|
|
|
376
377
|
// 位置
|
|
377
378
|
res_address = false;
|
|
378
379
|
|
|
379
|
-
if (!modelAttributeMap['owned_computer_room']) {
|
|
380
|
+
if (!((_modelAttributeMap$ow2 = modelAttributeMap['owned_computer_room']) !== null && _modelAttributeMap$ow2 !== void 0 && _modelAttributeMap$ow2.userVisible)) {
|
|
380
381
|
_context2.next = 17;
|
|
381
382
|
break;
|
|
382
383
|
}
|
|
@@ -390,7 +391,7 @@ export default function ResourceOverview(props) {
|
|
|
390
391
|
break;
|
|
391
392
|
|
|
392
393
|
case 17:
|
|
393
|
-
if (modelAttributeMap[ciType + ".computer_room"] || modelAttributeMap[ciType + ".area"]) {
|
|
394
|
+
if ((_modelAttributeMap$7 = modelAttributeMap[ciType + ".computer_room"]) !== null && _modelAttributeMap$7 !== void 0 && _modelAttributeMap$7.userVisible || (_modelAttributeMap$8 = modelAttributeMap[ciType + ".area"]) !== null && _modelAttributeMap$8 !== void 0 && _modelAttributeMap$8.userVisible) {
|
|
394
395
|
res_address = attributeMap[ciType + ".computer_room "] || attributeMap[ciType + ".area"] ? " " + (((_attributeMap$2 = attributeMap[ciType + ".area_object"]) === null || _attributeMap$2 === void 0 ? void 0 : _attributeMap$2.displayName) || '') + " " + (attributeMap[ciType + ".computer_room"] || '') : false;
|
|
395
396
|
}
|
|
396
397
|
|
|
@@ -398,14 +399,14 @@ export default function ResourceOverview(props) {
|
|
|
398
399
|
setBaseInfo({
|
|
399
400
|
// 资源
|
|
400
401
|
//display_name: modelAttributeMap['display_name'] ? attributeMap.display_name : false,
|
|
401
|
-
resource: modelAttributeMap['display_name'] ? {
|
|
402
|
+
resource: (_modelAttributeMap$di2 = modelAttributeMap['display_name']) !== null && _modelAttributeMap$di2 !== void 0 && _modelAttributeMap$di2.userVisible ? {
|
|
402
403
|
display_name: attributeMap.display_name,
|
|
403
404
|
// 资源名称/显示名称
|
|
404
405
|
link: "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType // 资源跳转链接
|
|
405
406
|
|
|
406
407
|
} : false,
|
|
407
|
-
ipv4_address: modelAttributeMap['ipv4_address'] ? attributeMap.ipv4_address : false,
|
|
408
|
-
asset_number: modelAttributeMap['asset_number'] ? attributeMap.asset_number : false,
|
|
408
|
+
ipv4_address: (_modelAttributeMap$ip2 = modelAttributeMap['ipv4_address']) !== null && _modelAttributeMap$ip2 !== void 0 && _modelAttributeMap$ip2.userVisible ? attributeMap.ipv4_address : false,
|
|
409
|
+
asset_number: (_modelAttributeMap$as2 = modelAttributeMap['asset_number']) !== null && _modelAttributeMap$as2 !== void 0 && _modelAttributeMap$as2.userVisible ? attributeMap.asset_number : false,
|
|
409
410
|
ciName: ciName,
|
|
410
411
|
res_address: res_address // principal: modelAttributeMap[`${ciType}.principal`] ? attributeMap[`${ciType}.principal`] : false,
|
|
411
412
|
|
|
@@ -563,7 +564,7 @@ export default function ResourceOverview(props) {
|
|
|
563
564
|
pageNum: 1,
|
|
564
565
|
pageSize: 999,
|
|
565
566
|
sortField: "alertLevel",
|
|
566
|
-
sortOrder: "
|
|
567
|
+
sortOrder: "desc"
|
|
567
568
|
});
|
|
568
569
|
|
|
569
570
|
case 2:
|
|
@@ -48,7 +48,7 @@ var _PluginManager = _interopRequireDefault(require("./PluginManager"));
|
|
|
48
48
|
var _topoFactory = _interopRequireDefault(require("./topoFactory"));
|
|
49
49
|
|
|
50
50
|
// eslint-disable-next-line no-undef
|
|
51
|
-
var version = typeof "2.15.
|
|
51
|
+
var version = typeof "2.15.47" === 'string' ? "2.15.47" : null;
|
|
52
52
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
53
53
|
/**
|
|
54
54
|
* 拓扑显示和编辑
|
|
@@ -255,9 +255,9 @@ function ResourceOverview(props) {
|
|
|
255
255
|
|
|
256
256
|
function _init() {
|
|
257
257
|
_init = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
258
|
-
var _topo$options$resourc, _attributeMap$source_, _attributeMap$destina;
|
|
258
|
+
var _topo$options$resourc, _modelAttributeMap$ow, _modelAttributeMap$, _modelAttributeMap$2, _modelAttributeMap$3, _modelAttributeMap$di, _modelAttributeMap$ip, _modelAttributeMap$as, _modelAttributeMap$5, _modelAttributeMap$6, _modelAttributeMap$so, _attributeMap$source_, _modelAttributeMap$de, _attributeMap$destina;
|
|
259
259
|
|
|
260
|
-
var ciTypeMeta, link, linkConnectType, _ciTypeMeta, modelMetrics, ciName, modelAttributeMap, domain, topModelMetrics, isAppTopoFlag, _findItem, attributeMap, metrics, res_address, _attributeMap$, rated_bandwidth, _modelAttributeMap
|
|
260
|
+
var ciTypeMeta, link, linkConnectType, _ciTypeMeta, modelMetrics, ciName, modelAttributeMap, domain, topModelMetrics, isAppTopoFlag, _findItem, attributeMap, metrics, res_address, _attributeMap$, rated_bandwidth, _modelAttributeMap$4;
|
|
261
261
|
|
|
262
262
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
263
263
|
while (1) {
|
|
@@ -296,11 +296,12 @@ function ResourceOverview(props) {
|
|
|
296
296
|
// 拓扑(默认) ---------------------------
|
|
297
297
|
// 基本信息
|
|
298
298
|
_findItem = (0, _topoData.findItem)(attrsAndMetrics, 'id', id), attributeMap = _findItem.attributeMap, metrics = _findItem.metrics;
|
|
299
|
-
console.log('基本信息', attributeMap, attrsAndMetrics); //
|
|
299
|
+
console.log('基本信息', attributeMap, attrsAndMetrics, modelAttributeMap); // userVisible
|
|
300
|
+
// 位置
|
|
300
301
|
|
|
301
302
|
res_address = false;
|
|
302
303
|
|
|
303
|
-
if (!modelAttributeMap['owned_computer_room']) {
|
|
304
|
+
if (!((_modelAttributeMap$ow = modelAttributeMap['owned_computer_room']) !== null && _modelAttributeMap$ow !== void 0 && _modelAttributeMap$ow.userVisible)) {
|
|
304
305
|
_context.next = 19;
|
|
305
306
|
break;
|
|
306
307
|
}
|
|
@@ -314,7 +315,7 @@ function ResourceOverview(props) {
|
|
|
314
315
|
break;
|
|
315
316
|
|
|
316
317
|
case 19:
|
|
317
|
-
if (modelAttributeMap[ciType + ".computer_room"] || modelAttributeMap[ciType + ".area"]) {
|
|
318
|
+
if ((_modelAttributeMap$ = modelAttributeMap[ciType + ".computer_room"]) !== null && _modelAttributeMap$ !== void 0 && _modelAttributeMap$.userVisible || (_modelAttributeMap$2 = modelAttributeMap[ciType + ".area"]) !== null && _modelAttributeMap$2 !== void 0 && _modelAttributeMap$2.userVisible) {
|
|
318
319
|
res_address = attributeMap[ciType + ".computer_room "] || attributeMap[ciType + ".area"] ? " " + (((_attributeMap$ = attributeMap[ciType + ".area_object"]) === null || _attributeMap$ === void 0 ? void 0 : _attributeMap$.displayName) || '') + " " + (attributeMap[ciType + ".computer_room"] || '') : false;
|
|
319
320
|
}
|
|
320
321
|
|
|
@@ -322,30 +323,30 @@ function ResourceOverview(props) {
|
|
|
322
323
|
// 链路带宽(取实际带宽)
|
|
323
324
|
rated_bandwidth = false;
|
|
324
325
|
|
|
325
|
-
if (modelAttributeMap[ciType + ".actual_bandwidth"]) {
|
|
326
|
-
rated_bandwidth = attributeMap[ciType + ".actual_bandwidth"] ? attributeMap[ciType + ".actual_bandwidth"] + " " + ((_modelAttributeMap$ = modelAttributeMap[ciType + ".actual_bandwidth"]) === null || _modelAttributeMap$ === void 0 ? void 0 : _modelAttributeMap
|
|
326
|
+
if ((_modelAttributeMap$3 = modelAttributeMap[ciType + ".actual_bandwidth"]) !== null && _modelAttributeMap$3 !== void 0 && _modelAttributeMap$3.userVisible) {
|
|
327
|
+
rated_bandwidth = attributeMap[ciType + ".actual_bandwidth"] ? attributeMap[ciType + ".actual_bandwidth"] + " " + ((_modelAttributeMap$4 = modelAttributeMap[ciType + ".actual_bandwidth"]) === null || _modelAttributeMap$4 === void 0 ? void 0 : _modelAttributeMap$4.unit) : '';
|
|
327
328
|
}
|
|
328
329
|
|
|
329
330
|
setBaseInfo({
|
|
330
331
|
// 资源
|
|
331
332
|
//display_name: modelAttributeMap['display_name'] ? attributeMap.display_name : false,
|
|
332
|
-
resource: modelAttributeMap['display_name'] ? {
|
|
333
|
+
resource: (_modelAttributeMap$di = modelAttributeMap['display_name']) !== null && _modelAttributeMap$di !== void 0 && _modelAttributeMap$di.userVisible ? {
|
|
333
334
|
display_name: attributeMap.display_name,
|
|
334
335
|
// 资源名称/显示名称
|
|
335
336
|
link: "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType // 资源跳转链接
|
|
336
337
|
|
|
337
338
|
} : false,
|
|
338
|
-
ipv4_address: modelAttributeMap['ipv4_address'] ? attributeMap.ipv4_address : false,
|
|
339
|
-
asset_number: modelAttributeMap['asset_number'] ? attributeMap.asset_number : false,
|
|
339
|
+
ipv4_address: (_modelAttributeMap$ip = modelAttributeMap['ipv4_address']) !== null && _modelAttributeMap$ip !== void 0 && _modelAttributeMap$ip.userVisible ? attributeMap.ipv4_address : false,
|
|
340
|
+
asset_number: (_modelAttributeMap$as = modelAttributeMap['asset_number']) !== null && _modelAttributeMap$as !== void 0 && _modelAttributeMap$as.userVisible ? attributeMap.asset_number : false,
|
|
340
341
|
ciName: ciName,
|
|
341
342
|
res_address: res_address,
|
|
342
343
|
// principal: modelAttributeMap[`${ciType}.principal`] ? attributeMap[`${ciType}.principal`] : false,
|
|
343
344
|
// 链路
|
|
344
345
|
rated_bandwidth: rated_bandwidth,
|
|
345
|
-
source_ipv4: modelAttributeMap[ciType + ".source_ipv4"] ? attributeMap[ciType + ".source_ipv4"] : false,
|
|
346
|
-
destination_ipv4: modelAttributeMap[ciType + ".destination_ipv4"] ? attributeMap[ciType + ".destination_ipv4"] : false,
|
|
347
|
-
source_Interface: modelAttributeMap['source_id'] ? (_attributeMap$source_ = attributeMap.source_id_object) === null || _attributeMap$source_ === void 0 ? void 0 : _attributeMap$source_.displayName : false,
|
|
348
|
-
destination_Interface: modelAttributeMap['destination_id'] ? (_attributeMap$destina = attributeMap.destination_id_object) === null || _attributeMap$destina === void 0 ? void 0 : _attributeMap$destina.displayName : false
|
|
346
|
+
source_ipv4: (_modelAttributeMap$5 = modelAttributeMap[ciType + ".source_ipv4"]) !== null && _modelAttributeMap$5 !== void 0 && _modelAttributeMap$5.userVisible ? attributeMap[ciType + ".source_ipv4"] : false,
|
|
347
|
+
destination_ipv4: (_modelAttributeMap$6 = modelAttributeMap[ciType + ".destination_ipv4"]) !== null && _modelAttributeMap$6 !== void 0 && _modelAttributeMap$6.userVisible ? attributeMap[ciType + ".destination_ipv4"] : false,
|
|
348
|
+
source_Interface: (_modelAttributeMap$so = modelAttributeMap['source_id']) !== null && _modelAttributeMap$so !== void 0 && _modelAttributeMap$so.userVisible ? (_attributeMap$source_ = attributeMap.source_id_object) === null || _attributeMap$source_ === void 0 ? void 0 : _attributeMap$source_.displayName : false,
|
|
349
|
+
destination_Interface: (_modelAttributeMap$de = modelAttributeMap['destination_id']) !== null && _modelAttributeMap$de !== void 0 && _modelAttributeMap$de.userVisible ? (_attributeMap$destina = attributeMap.destination_id_object) === null || _attributeMap$destina === void 0 ? void 0 : _attributeMap$destina.displayName : false
|
|
349
350
|
}); // 资源/链路-关键指标 数据 metrics,模型 topo.ciTyeCache.getCiType(ciType)
|
|
350
351
|
|
|
351
352
|
setIndicator(topModelMetrics.map(function (item) {
|
|
@@ -375,7 +376,7 @@ function ResourceOverview(props) {
|
|
|
375
376
|
|
|
376
377
|
function _initAppTopo() {
|
|
377
378
|
_initAppTopo = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(topModelMetrics, modelAttributeMap, ciName, domain) {
|
|
378
|
-
var _topo$options$resourc2, _alarmList;
|
|
379
|
+
var _topo$options$resourc2, _modelAttributeMap$ow2, _modelAttributeMap$7, _modelAttributeMap$8, _modelAttributeMap$di2, _modelAttributeMap$ip2, _modelAttributeMap$as2, _alarmList;
|
|
379
380
|
|
|
380
381
|
var _yield$topo$options$r, metrics, alarmList, attributeMap, res_address, _attributeMap$2;
|
|
381
382
|
|
|
@@ -407,7 +408,7 @@ function ResourceOverview(props) {
|
|
|
407
408
|
// 位置
|
|
408
409
|
res_address = false;
|
|
409
410
|
|
|
410
|
-
if (!modelAttributeMap['owned_computer_room']) {
|
|
411
|
+
if (!((_modelAttributeMap$ow2 = modelAttributeMap['owned_computer_room']) !== null && _modelAttributeMap$ow2 !== void 0 && _modelAttributeMap$ow2.userVisible)) {
|
|
411
412
|
_context2.next = 17;
|
|
412
413
|
break;
|
|
413
414
|
}
|
|
@@ -421,7 +422,7 @@ function ResourceOverview(props) {
|
|
|
421
422
|
break;
|
|
422
423
|
|
|
423
424
|
case 17:
|
|
424
|
-
if (modelAttributeMap[ciType + ".computer_room"] || modelAttributeMap[ciType + ".area"]) {
|
|
425
|
+
if ((_modelAttributeMap$7 = modelAttributeMap[ciType + ".computer_room"]) !== null && _modelAttributeMap$7 !== void 0 && _modelAttributeMap$7.userVisible || (_modelAttributeMap$8 = modelAttributeMap[ciType + ".area"]) !== null && _modelAttributeMap$8 !== void 0 && _modelAttributeMap$8.userVisible) {
|
|
425
426
|
res_address = attributeMap[ciType + ".computer_room "] || attributeMap[ciType + ".area"] ? " " + (((_attributeMap$2 = attributeMap[ciType + ".area_object"]) === null || _attributeMap$2 === void 0 ? void 0 : _attributeMap$2.displayName) || '') + " " + (attributeMap[ciType + ".computer_room"] || '') : false;
|
|
426
427
|
}
|
|
427
428
|
|
|
@@ -429,14 +430,14 @@ function ResourceOverview(props) {
|
|
|
429
430
|
setBaseInfo({
|
|
430
431
|
// 资源
|
|
431
432
|
//display_name: modelAttributeMap['display_name'] ? attributeMap.display_name : false,
|
|
432
|
-
resource: modelAttributeMap['display_name'] ? {
|
|
433
|
+
resource: (_modelAttributeMap$di2 = modelAttributeMap['display_name']) !== null && _modelAttributeMap$di2 !== void 0 && _modelAttributeMap$di2.userVisible ? {
|
|
433
434
|
display_name: attributeMap.display_name,
|
|
434
435
|
// 资源名称/显示名称
|
|
435
436
|
link: "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType // 资源跳转链接
|
|
436
437
|
|
|
437
438
|
} : false,
|
|
438
|
-
ipv4_address: modelAttributeMap['ipv4_address'] ? attributeMap.ipv4_address : false,
|
|
439
|
-
asset_number: modelAttributeMap['asset_number'] ? attributeMap.asset_number : false,
|
|
439
|
+
ipv4_address: (_modelAttributeMap$ip2 = modelAttributeMap['ipv4_address']) !== null && _modelAttributeMap$ip2 !== void 0 && _modelAttributeMap$ip2.userVisible ? attributeMap.ipv4_address : false,
|
|
440
|
+
asset_number: (_modelAttributeMap$as2 = modelAttributeMap['asset_number']) !== null && _modelAttributeMap$as2 !== void 0 && _modelAttributeMap$as2.userVisible ? attributeMap.asset_number : false,
|
|
440
441
|
ciName: ciName,
|
|
441
442
|
res_address: res_address // principal: modelAttributeMap[`${ciType}.principal`] ? attributeMap[`${ciType}.principal`] : false,
|
|
442
443
|
|
|
@@ -594,7 +595,7 @@ function ResourceOverview(props) {
|
|
|
594
595
|
pageNum: 1,
|
|
595
596
|
pageSize: 999,
|
|
596
597
|
sortField: "alertLevel",
|
|
597
|
-
sortOrder: "
|
|
598
|
+
sortOrder: "desc"
|
|
598
599
|
});
|
|
599
600
|
|
|
600
601
|
case 2:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.47",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -110,6 +110,6 @@
|
|
|
110
110
|
"access": "public"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.
|
|
113
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.47/build/index.html",
|
|
114
114
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
115
115
|
}
|