@riil-frontend/component-topology 2.15.45 → 2.15.48

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.
Files changed (26) hide show
  1. package/build/index.js +1 -1
  2. package/es/components/TagImageSelect/index.js +3 -1
  3. package/es/components/TagSelect/index.js +3 -3
  4. package/es/core/components/DisplaySettingDrawer/LinkTip.js +2 -2
  5. package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +1 -1
  6. package/es/core/editor/components/settings/common/LayoutSettings.js +11 -19
  7. package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +4 -4
  8. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +13 -8
  9. package/es/core/models/AttributeMetricDisplay.js +1 -1
  10. package/es/core/models/TopoApp.js +1 -1
  11. package/es/core/models/attributeFormatter/index.js +1 -1
  12. package/es/core/models/topoFactory.js +2 -2
  13. package/es/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +26 -25
  14. package/lib/components/TagImageSelect/index.js +3 -1
  15. package/lib/components/TagSelect/index.js +3 -3
  16. package/lib/core/components/DisplaySettingDrawer/LinkTip.js +2 -2
  17. package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +1 -1
  18. package/lib/core/editor/components/settings/common/LayoutSettings.js +10 -18
  19. package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +2 -4
  20. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +12 -7
  21. package/lib/core/models/AttributeMetricDisplay.js +1 -1
  22. package/lib/core/models/TopoApp.js +1 -1
  23. package/lib/core/models/attributeFormatter/index.js +1 -1
  24. package/lib/core/models/topoFactory.js +2 -2
  25. package/lib/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +26 -25
  26. package/package.json +2 -2
@@ -152,7 +152,7 @@ var AttributeFormatter = /*#__PURE__*/function () {
152
152
  type: item.type,
153
153
  code: item.code,
154
154
  // 属性code
155
- name: '图上名称',
155
+ name: '图片名称',
156
156
  // 属性名称
157
157
  value: value // 属性值
158
158
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports.__esModule = true;
4
4
  exports["default"] = void 0;
5
- var n = 0;
5
+ var n = 1;
6
6
 
7
7
  var TopoFactory = /*#__PURE__*/function () {
8
8
  function TopoFactory() {
@@ -12,7 +12,7 @@ var TopoFactory = /*#__PURE__*/function () {
12
12
  var _proto = TopoFactory.prototype;
13
13
 
14
14
  _proto.add = function add(name, topo) {
15
- var uid = name || "" + n++;
15
+ var uid = name || "topo" + n++;
16
16
  this.map[uid] = topo;
17
17
  return uid;
18
18
  };
@@ -116,10 +116,10 @@ function BaseInfoRender(type, data) {
116
116
  label: '目的IP地址:',
117
117
  objKey: 'destination_ipv4'
118
118
  }, {
119
- label: '源接口:',
119
+ label: '源端口:',
120
120
  objKey: 'source_Interface'
121
121
  }, {
122
- label: '目的接口:',
122
+ label: '目的端口:',
123
123
  objKey: 'destination_Interface'
124
124
  }]
125
125
  };
@@ -226,8 +226,8 @@ function ResourceOverview(props) {
226
226
  destination_ipv4: '',
227
227
  // 目的IP地址
228
228
  source_Interface: '',
229
- // 源接口
230
- destination_Interface: '' // 目的接口
229
+ // 源端口
230
+ destination_Interface: '' // 目的端口
231
231
 
232
232
  }),
233
233
  baseInfo = _useState[0],
@@ -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$.unit) : '';
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: "asc"
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.45",
3
+ "version": "2.15.48",
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.45/build/index.html",
113
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@2.15.48/build/index.html",
114
114
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
115
115
  }