@riil-frontend/component-topology 2.15.44 → 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.
Files changed (139) hide show
  1. package/build/1.js +2 -2
  2. package/build/2.js +1 -1
  3. package/build/index.css +1 -1
  4. package/build/index.js +25 -25
  5. package/es/components/Drawer/index.js +8 -2
  6. package/es/components/TagImageSelect/index.js +3 -1
  7. package/es/components/TagSelect/index.js +3 -3
  8. package/es/components/TemplateButton/index.module.scss +1 -0
  9. package/es/core/common/hooks/ht/useDataModelDataPropertyChange.js +13 -4
  10. package/es/core/common/icons/icon.js +1 -1
  11. package/es/core/common/icons/useIcons.js +1 -1
  12. package/es/core/components/TopoView/topoView.js +8 -18
  13. package/es/core/{models/createTopoApp.js → createTopoApp.js} +1 -1
  14. package/es/core/editor/components/BackgroundView/index.module.scss +1 -0
  15. package/es/core/editor/components/{iconManage/IconManage.js → CustomIconPlugin/CustomIconPlugin.js} +3 -3
  16. package/es/core/editor/components/{iconManage → CustomIconPlugin}/RenameDialog.js +1 -1
  17. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.js +16 -2
  18. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.module.scss +0 -0
  19. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.scss +0 -0
  20. package/es/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialogWrapper.js +1 -1
  21. package/es/core/editor/components/CustomIconPlugin/index.js +2 -0
  22. package/es/core/editor/components/{iconManage → CustomIconPlugin}/utils/svgToShape.js +0 -0
  23. package/es/core/editor/components/EditorPlugin.js +2 -2
  24. package/es/core/editor/components/settings/common/LayoutSettings.js +11 -19
  25. package/es/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +4 -4
  26. package/es/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +13 -8
  27. package/es/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +2 -0
  28. package/es/core/models/TopoApp.js +9 -5
  29. package/es/core/store/coreModels.js +32 -26
  30. package/es/core/store/createStore.js +1 -1
  31. package/es/core/test/Test.js +3 -1
  32. package/es/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +22 -21
  33. package/es/core/viewer/contextmenu/buildNodeContextmenu.js +65 -64
  34. package/es/createTopo.js +1 -1
  35. package/es/hooks/useAlarm.js +3 -6
  36. package/es/hooks/useResourceConfig.js +1 -1
  37. package/es/hooks/useTopoEdit.js +4 -8
  38. package/es/models/{iconManage.js → customIcon.js} +1 -1
  39. package/es/models/topoBizMod.js +22 -52
  40. package/es/models/{topoCreateMod.js → topoConfig.js} +8 -4
  41. package/es/models/topoMod.js +32 -69
  42. package/es/{components → topoCenter/components}/Link/form.js +0 -0
  43. package/es/{components → topoCenter/components}/Link/hook.js +0 -0
  44. package/es/{components → topoCenter/components}/Link/index copy.js +1 -1
  45. package/es/{components → topoCenter/components}/Link/index.js +1 -1
  46. package/es/{components → topoCenter/components}/Link/index.module.scss +0 -0
  47. package/es/{components → topoCenter/components}/Link/setting.js +0 -0
  48. package/es/topoCenter/components/TopoView.js +16 -3
  49. package/es/topoCenter/components/Topology.js +0 -5
  50. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.js +0 -0
  51. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.module.scss +0 -0
  52. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/index.js +0 -0
  53. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.js +0 -0
  54. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.module.scss +0 -0
  55. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +0 -0
  56. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.module.scss +0 -0
  57. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.scss +0 -0
  58. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +0 -0
  59. package/es/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.module.scss +0 -0
  60. package/es/topoCenter/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +1 -1
  61. package/es/topoCenter/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +3 -3
  62. package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +1 -1
  63. package/es/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +1 -1
  64. package/es/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.js → LinkInfoPreview.js} +1 -1
  65. package/es/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.module.scss → LinkInfoPreview.module.scss} +0 -0
  66. package/es/{hooks → topoCenter/hooks/viewer}/useRelateTopo.js +2 -2
  67. package/es/{models → topoCenter/store}/linkDynamicStyle.js +3 -3
  68. package/es/{models → topoCenter/store}/linkDynamicStyleConfig.js +2 -1
  69. package/es/{models → topoCenter/store}/linkManager.js +0 -0
  70. package/lib/components/Drawer/index.js +7 -2
  71. package/lib/components/TagImageSelect/index.js +3 -1
  72. package/lib/components/TagSelect/index.js +3 -3
  73. package/lib/components/TemplateButton/index.module.scss +1 -0
  74. package/lib/core/common/hooks/ht/useDataModelDataPropertyChange.js +13 -4
  75. package/lib/core/common/icons/icon.js +1 -1
  76. package/lib/core/common/icons/useIcons.js +1 -1
  77. package/lib/core/components/TopoView/topoView.js +9 -20
  78. package/lib/core/{models/createTopoApp.js → createTopoApp.js} +1 -1
  79. package/lib/core/editor/components/BackgroundView/index.module.scss +1 -0
  80. package/lib/core/editor/components/{iconManage/IconManage.js → CustomIconPlugin/CustomIconPlugin.js} +3 -3
  81. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/RenameDialog.js +1 -1
  82. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.js +17 -2
  83. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.module.scss +0 -0
  84. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialog.scss +0 -0
  85. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/UploadIconDialogWrapper.js +1 -1
  86. package/lib/core/editor/components/CustomIconPlugin/index.js +11 -0
  87. package/lib/core/editor/components/{iconManage → CustomIconPlugin}/utils/svgToShape.js +0 -0
  88. package/lib/core/editor/components/EditorPlugin.js +2 -2
  89. package/lib/core/editor/components/settings/common/LayoutSettings.js +10 -18
  90. package/lib/core/editor/components/settings/propertyViews/group/DataTab/hoooks/useGroupRelateResource.js +2 -4
  91. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/GroupExpandSetting.js +12 -7
  92. package/lib/core/editor/components/settings/propertyViews/group/SettingTab/Setting.js +2 -0
  93. package/lib/core/models/TopoApp.js +9 -5
  94. package/lib/core/store/coreModels.js +35 -26
  95. package/lib/core/store/createStore.js +2 -2
  96. package/lib/core/test/Test.js +3 -1
  97. package/lib/core/viewer/components/plugins/BaseInfo/components/ResourceOverview/index.js +22 -21
  98. package/lib/core/viewer/contextmenu/buildNodeContextmenu.js +65 -64
  99. package/lib/createTopo.js +1 -1
  100. package/lib/hooks/useAlarm.js +3 -6
  101. package/lib/hooks/useResourceConfig.js +1 -1
  102. package/lib/hooks/useTopoEdit.js +4 -8
  103. package/lib/models/{iconManage.js → customIcon.js} +1 -1
  104. package/lib/models/topoBizMod.js +22 -52
  105. package/lib/models/{topoCreateMod.js → topoConfig.js} +7 -4
  106. package/lib/models/topoMod.js +32 -69
  107. package/lib/{components → topoCenter/components}/Link/form.js +0 -0
  108. package/lib/{components → topoCenter/components}/Link/hook.js +0 -0
  109. package/lib/{components → topoCenter/components}/Link/index copy.js +1 -1
  110. package/lib/{components → topoCenter/components}/Link/index.js +1 -1
  111. package/lib/{components → topoCenter/components}/Link/index.module.scss +0 -0
  112. package/lib/{components → topoCenter/components}/Link/setting.js +0 -0
  113. package/lib/topoCenter/components/TopoView.js +19 -3
  114. package/lib/topoCenter/components/Topology.js +0 -7
  115. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.js +0 -0
  116. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/RuleSetting.module.scss +0 -0
  117. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/index.js +0 -0
  118. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.js +0 -0
  119. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/Rule.module.scss +0 -0
  120. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.js +0 -0
  121. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.module.scss +0 -0
  122. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleCondition.scss +0 -0
  123. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.js +0 -0
  124. package/lib/{core/editor/components → topoCenter/components/editor}/LinkDynamicStyleSettingDrawer/rule/RuleStyle.module.scss +0 -0
  125. package/lib/topoCenter/components/editor/propertyViews/edge/EdgeGroupPropertyView.js +2 -2
  126. package/lib/topoCenter/components/editor/propertyViews/edge/LinkPropertyView/Data/index.js +8 -8
  127. package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/AddLinkDrawer.js +1 -1
  128. package/lib/topoCenter/components/editor/propertyViews/edge/addLinkDrawer/components/editLinkInfo.js +1 -1
  129. package/lib/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.js → LinkInfoPreview.js} +4 -4
  130. package/lib/topoCenter/components/editor/propertyViews/edge/link/{LindInfoPreview.module.scss → LinkInfoPreview.module.scss} +0 -0
  131. package/lib/{hooks → topoCenter/hooks/viewer}/useRelateTopo.js +2 -2
  132. package/lib/{models → topoCenter/store}/linkDynamicStyle.js +3 -3
  133. package/lib/{models → topoCenter/store}/linkDynamicStyleConfig.js +2 -1
  134. package/lib/{models → topoCenter/store}/linkManager.js +0 -0
  135. package/package.json +2 -2
  136. package/es/core/editor/LinkDynamicStyleConfig.js +0 -16
  137. package/es/core/store/getStoreModels.js +0 -40
  138. package/lib/core/editor/LinkDynamicStyleConfig.js +0 -21
  139. package/lib/core/store/getStoreModels.js +0 -67
@@ -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:
@@ -11,70 +11,71 @@ function buildNodeContextmenu(topoApp) {
11
11
  return {
12
12
  enable: true,
13
13
  items: [// {
14
- // label: '概览',
15
- // id: 'Resource.detail',
16
- // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_overview.svg',
17
- // visible: (data) => {
18
- // return isResource(data) && !!data.operation;
19
- // }
20
- // },
21
- {
22
- label: 'Web控制台',
23
- icon: '/img/topo/contextmenu/Topology_resources_menu_icon_webconsole.svg',
24
- visible: function visible(data) {
25
- return isResource(data) && !!data.operation;
26
- },
27
- items: [{
28
- label: '访问',
29
- id: 'Resource.WebConsole.open',
30
- disable: function disable(data) {
31
- var resourceWebControllUrl = topoApp.pluginManager.pluginMap.resourceWebControllUrl;
32
- return !resourceWebControllUrl.getResourceUrl(data.id);
33
- }
34
- }, {
35
- label: '设置',
36
- id: 'Resource.WebConsole.setting'
37
- }]
38
- } // {
39
- // label: '资源操作',
40
- // id: 'Resource.Operate',
41
- // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_operands.svg',
42
- // visible: (data) => {
43
- // if (!isResource(data)) {
44
- // return false;
45
- // }
46
- // const {ciType} = data;
47
- // const ciMeta = topoApp.ciTyeCache.getCiType(ciType);
48
- // if (!ciMeta) {
49
- // return false;
50
- // }
51
- // const {domain} = ciMeta;
52
- // // 是否有该页签,与资源详情保持一致
53
- // const hasTab = domain === 'network' || domain === 'server';
54
- // return !!data.operation && hasTab;
55
- // }
56
- // },
57
- // {
58
- // label: 'Syslog',
59
- // id: 'Resource.Syslog',
60
- // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_syslog.svg',
61
- // visible: (data) => {
62
- // if (!isResource(data)) {
63
- // return false;
64
- // }
65
- // const {ciType} = data;
66
- // const ciMeta = topoApp.ciTyeCache.getCiType(ciType);
67
- // if (!ciMeta) {
68
- // return false;
69
- // }
70
- // const {domain} = ciMeta;
71
- // // 是否有该页签,与资源详情保持一致
72
- // const hasTab = domain === 'network' || domain === 'server';
73
- // return !!data.operation && hasTab;
74
- // }
75
- // },
76
- // { label: '打开属性设置', id: 'openSet' },
77
- // { label: '打开全局属性设置', id: 'openAllSet' },
14
+ // label: '概览',
15
+ // id: 'Resource.detail',
16
+ // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_overview.svg',
17
+ // visible: (data) => {
18
+ // return isResource(data) && !!data.operation;
19
+ // }
20
+ // },
21
+ // {
22
+ // label: 'Web控制台',
23
+ // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_webconsole.svg',
24
+ // visible: (data) => {
25
+ // return isResource(data) && !!data.operation;
26
+ // },
27
+ // items: [
28
+ // {
29
+ // label: '访问',
30
+ // id: 'Resource.WebConsole.open',
31
+ // disable: (data) => {
32
+ // const {resourceWebControllUrl} = topoApp.pluginManager.pluginMap;
33
+ // return !resourceWebControllUrl.getResourceUrl(data.id)
34
+ // },
35
+ // },
36
+ // { label: '设置', id: 'Resource.WebConsole.setting' },
37
+ // ]
38
+ // },
39
+ // {
40
+ // label: '资源操作',
41
+ // id: 'Resource.Operate',
42
+ // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_operands.svg',
43
+ // visible: (data) => {
44
+ // if (!isResource(data)) {
45
+ // return false;
46
+ // }
47
+ // const {ciType} = data;
48
+ // const ciMeta = topoApp.ciTyeCache.getCiType(ciType);
49
+ // if (!ciMeta) {
50
+ // return false;
51
+ // }
52
+ // const {domain} = ciMeta;
53
+ // // 是否有该页签,与资源详情保持一致
54
+ // const hasTab = domain === 'network' || domain === 'server';
55
+ // return !!data.operation && hasTab;
56
+ // }
57
+ // },
58
+ // {
59
+ // label: 'Syslog',
60
+ // id: 'Resource.Syslog',
61
+ // icon: '/img/topo/contextmenu/Topology_resources_menu_icon_syslog.svg',
62
+ // visible: (data) => {
63
+ // if (!isResource(data)) {
64
+ // return false;
65
+ // }
66
+ // const {ciType} = data;
67
+ // const ciMeta = topoApp.ciTyeCache.getCiType(ciType);
68
+ // if (!ciMeta) {
69
+ // return false;
70
+ // }
71
+ // const {domain} = ciMeta;
72
+ // // 是否有该页签,与资源详情保持一致
73
+ // const hasTab = domain === 'network' || domain === 'server';
74
+ // return !!data.operation && hasTab;
75
+ // }
76
+ // },
77
+ // { label: '打开属性设置', id: 'openSet' },
78
+ // { label: '打开全局属性设置', id: 'openAllSet' },
78
79
  ]
79
80
  };
80
81
  }
package/lib/createTopo.js CHANGED
@@ -8,7 +8,7 @@ exports["default"] = void 0;
8
8
 
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
 
11
- var _createTopoApp = require("./core/models/createTopoApp");
11
+ var _createTopoApp = require("./core/createTopoApp");
12
12
 
13
13
  var _createMenuCommands = _interopRequireDefault(require("./contextmenu/createMenuCommands"));
14
14
 
@@ -39,9 +39,7 @@ function useAlarm(options) {
39
39
 
40
40
  var _store$useModel2 = store.useModel("topoBizMod"),
41
41
  bizState = _store$useModel2[0],
42
- bizDispatchers = _store$useModel2[1];
43
-
44
- var linkDynamicStyleDispatcher = store.getModel("linkDynamicStyle")[1]; // rlog.debug(
42
+ bizDispatchers = _store$useModel2[1]; // rlog.debug(
45
43
  // "useAlarm.useEffect 获取初始化告警----------init",
46
44
  // topo,
47
45
  // allData,
@@ -76,6 +74,7 @@ function useAlarm(options) {
76
74
  // };
77
75
  // }, [alarmIsOpened]);
78
76
 
77
+
79
78
  function getAlarmByEE(_x) {
80
79
  return _getAlarmByEE.apply(this, arguments);
81
80
  }
@@ -127,9 +126,7 @@ function useAlarm(options) {
127
126
  _rlog["default"].debug("useAlarm.getAlarmByEE 推送告警到ht", alarmList, bizState);
128
127
 
129
128
  if (alarmIsOpened) {
130
- topo.loadAlarm(alarmList); // 告警变化后,刷新链路动态样式
131
-
132
- linkDynamicStyleDispatcher.execute();
129
+ topo.loadAlarm(alarmList);
133
130
  }
134
131
 
135
132
  case 12:
@@ -24,7 +24,7 @@ var _htElementUtils = require("../utils/htElementUtils");
24
24
  function _default(props) {
25
25
  var topo = props.topo;
26
26
  var store = topo.store;
27
- var editDispatchers = store.useModelDispatchers('topoCreateMod');
27
+ var editDispatchers = store.useModelDispatchers('topoConfig');
28
28
 
29
29
  var loadConfig = /*#__PURE__*/function () {
30
30
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
@@ -59,7 +59,7 @@ var useTopoEdit = function useTopoEdit(params) {
59
59
  topoEditState = _store$useModel[0],
60
60
  topoEditDispatchers = _store$useModel[1];
61
61
 
62
- var _store$useModel2 = store.useModel('topoCreateMod'),
62
+ var _store$useModel2 = store.useModel('topoConfig'),
63
63
  editState = _store$useModel2[0],
64
64
  editDispatchers = _store$useModel2[1];
65
65
 
@@ -128,9 +128,7 @@ var useTopoEdit = function useTopoEdit(params) {
128
128
 
129
129
 
130
130
  if (!isLayerTopo && config.layers.length) {
131
- topoDispatchers.update({
132
- type: _template.TPL_TREE
133
- });
131
+ topoDispatchers.setTopoType(_template.TPL_TREE);
134
132
  } // 更新配置
135
133
 
136
134
 
@@ -150,9 +148,7 @@ var useTopoEdit = function useTopoEdit(params) {
150
148
 
151
149
 
152
150
  if (!config.layers.length) {
153
- topoDispatchers.update({
154
- type: _template.TPL_BLANK
155
- });
151
+ topoDispatchers.setTopoType(_template.TPL_BLANK);
156
152
  } // 更新配置
157
153
 
158
154
 
@@ -957,7 +953,7 @@ var useTopoEdit = function useTopoEdit(params) {
957
953
  }
958
954
  };
959
955
 
960
- var effectsState = store.useModelEffectsState('topoCreateMod');
956
+ var effectsState = store.useModelEffectsState('topoConfig');
961
957
  var topoLoading = effectsState.getTopoByConditions.isLoading;
962
958
  return {
963
959
  resourceConfig: resourceConfig,
@@ -177,7 +177,7 @@ function _default(engine) {
177
177
  _this3.update({
178
178
  visible: false,
179
179
  icons: {
180
- node: [].concat(rootState.iconManage.icons.node, data.map(addIconUrlData)),
180
+ node: [].concat(rootState.customIcon.icons.node, data.map(addIconUrlData)),
181
181
  container: []
182
182
  }
183
183
  });
@@ -83,105 +83,75 @@ function _default(engine) {
83
83
  }, _callee);
84
84
  }))();
85
85
  },
86
- getCiInfo: function getCiInfo(conditions, state) {
87
- var _this2 = this;
88
-
89
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
90
- var result;
91
- return _regenerator["default"].wrap(function _callee2$(_context2) {
92
- while (1) {
93
- switch (_context2.prev = _context2.next) {
94
- case 0:
95
- _context2.next = 2;
96
- return (0, _model.getCiMeta)(conditions);
97
-
98
- case 2:
99
- result = _context2.sent;
100
-
101
- // rlog.debug('getCiInfo', result);
102
- _this2.update({
103
- // alarmList: result.datas,
104
- currentCiInfo: result // drawerAlarmPageInfo,
105
-
106
- });
107
-
108
- case 4:
109
- case "end":
110
- return _context2.stop();
111
- }
112
- }
113
- }, _callee2);
114
- }))();
115
- },
116
86
  // 根据ci的id获取属性的值
117
87
  getCiArrByIds: function getCiArrByIds(conditions, state) {
118
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
88
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
119
89
  var resIdsList, result;
120
- return _regenerator["default"].wrap(function _callee3$(_context3) {
90
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
121
91
  while (1) {
122
- switch (_context3.prev = _context3.next) {
92
+ switch (_context2.prev = _context2.next) {
123
93
  case 0:
124
94
  resIdsList = state.topoBizMod.resAndMetrics.resIdsList; // rlog.debug('根据ci的id获取属性的值-getCiArrByIds', resIdsList);
125
95
  // const ciIds = encodeURIComponent(resIdsList);
126
96
 
127
- _context3.prev = 1;
128
- _context3.next = 4;
97
+ _context2.prev = 1;
98
+ _context2.next = 4;
129
99
  return _topo["default"].getBatchCiArr({
130
100
  ids: resIdsList
131
101
  });
132
102
 
133
103
  case 4:
134
- result = _context3.sent;
135
- return _context3.abrupt("return", result.content);
104
+ result = _context2.sent;
105
+ return _context2.abrupt("return", result.content);
136
106
 
137
107
  case 8:
138
- _context3.prev = 8;
139
- _context3.t0 = _context3["catch"](1);
140
- return _context3.abrupt("return", null);
108
+ _context2.prev = 8;
109
+ _context2.t0 = _context2["catch"](1);
110
+ return _context2.abrupt("return", null);
141
111
 
142
112
  case 11:
143
113
  case "end":
144
- return _context3.stop();
114
+ return _context2.stop();
145
115
  }
146
116
  }
147
- }, _callee3, null, [[1, 8]]);
117
+ }, _callee2, null, [[1, 8]]);
148
118
  }))();
149
119
  },
150
120
  // 初始化,统一获取指标和属性
151
121
  getCiBizByIds: function getCiBizByIds(conditions, state) {
152
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
122
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
153
123
  var _conditions$ciIds, _conditions$codes;
154
124
 
155
125
  var _state$topoBizMod$res, resIdsList, metrics, ciIds, codes, metricResult, arrResult;
156
126
 
157
- return _regenerator["default"].wrap(function _callee4$(_context4) {
127
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
158
128
  while (1) {
159
- switch (_context4.prev = _context4.next) {
129
+ switch (_context3.prev = _context3.next) {
160
130
  case 0:
161
131
  _state$topoBizMod$res = state.topoBizMod.resAndMetrics, resIdsList = _state$topoBizMod$res.resIdsList, metrics = _state$topoBizMod$res.metrics;
162
132
  ciIds = encodeURIComponent((_conditions$ciIds = conditions === null || conditions === void 0 ? void 0 : conditions.ciIds) !== null && _conditions$ciIds !== void 0 ? _conditions$ciIds : resIdsList);
163
133
  codes = encodeURIComponent((_conditions$codes = conditions === null || conditions === void 0 ? void 0 : conditions.codes) !== null && _conditions$codes !== void 0 ? _conditions$codes : metrics);
164
- _context4.next = 5;
134
+ _context3.next = 5;
165
135
  return (0, _metric.getLatestMetrics)(ciIds, codes);
166
136
 
167
137
  case 5:
168
- metricResult = _context4.sent;
169
- _context4.next = 8;
138
+ metricResult = _context3.sent;
139
+ _context3.next = 8;
170
140
  return _topo["default"].getBatchCiArr(ciIds);
171
141
 
172
142
  case 8:
173
- arrResult = _context4.sent;
174
- return _context4.abrupt("return", {
143
+ arrResult = _context3.sent;
144
+ return _context3.abrupt("return", {
175
145
  metricResult: metricResult,
176
146
  arrResult: arrResult
177
147
  });
178
148
 
179
149
  case 10:
180
150
  case "end":
181
- return _context4.stop();
151
+ return _context3.stop();
182
152
  }
183
153
  }
184
- }, _callee4);
154
+ }, _callee3);
185
155
  }))();
186
156
  },
187
157
 
@@ -33,6 +33,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
33
33
 
34
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
35
 
36
+ /**
37
+ * 拓扑配置
38
+ */
36
39
  var newGroupWithUUID = function newGroupWithUUID(group) {
37
40
  if (group === void 0) {
38
41
  group = _template.DEFAULT_GROUP;
@@ -266,7 +269,7 @@ function _default(topoApp) {
266
269
  while (1) {
267
270
  switch (_context2.prev = _context2.next) {
268
271
  case 0:
269
- editState = rootState.topoCreateMod;
272
+ editState = rootState.topoConfig;
270
273
  resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups;
271
274
  query = {
272
275
  id: rootState.topoMod.topoId,
@@ -355,7 +358,7 @@ function _default(topoApp) {
355
358
  _rlog["default"].debug("getTopoByConditions--------", data, groupInfo);
356
359
 
357
360
  _context4.next = 13;
358
- return Promise.all([topoApp.ciTyeCache.getCiTypeMap((0, _topoData.getCiTypes)(data)), dispatch.iconManage.loadCustomIcons()]);
361
+ return Promise.all([topoApp.ciTyeCache.getCiTypeMap((0, _topoData.getCiTypes)(data)), dispatch.customIcon.loadCustomIcons()]);
359
362
 
360
363
  case 13:
361
364
  _yield$Promise$all = _context4.sent;
@@ -423,7 +426,7 @@ function _default(topoApp) {
423
426
  var _this5 = this;
424
427
 
425
428
  return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
426
- var _state$topoCreateMod$;
429
+ var _state$topoConfig$vie;
427
430
 
428
431
  var currentBackground;
429
432
  return _regenerator["default"].wrap(function _callee6$(_context6) {
@@ -433,7 +436,7 @@ function _default(topoApp) {
433
436
  currentBackground = topoApp.store.getModelState('background').current;
434
437
  _context6.next = 3;
435
438
  return (0, _topoData2.saveTopo)((0, _extends2["default"])({}, data, {
436
- viewGroupId: (_state$topoCreateMod$ = state.topoCreateMod.viewGroup) === null || _state$topoCreateMod$ === void 0 ? void 0 : _state$topoCreateMod$.id,
439
+ viewGroupId: (_state$topoConfig$vie = state.topoConfig.viewGroup) === null || _state$topoConfig$vie === void 0 ? void 0 : _state$topoConfig$vie.id,
437
440
  template: state.topoMod.type,
438
441
  // 背景图
439
442
  backgroundId: currentBackground ? currentBackground.id : null