@riil-frontend/component-topology 11.0.33 → 11.0.34
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/index.css +1 -1
- package/build/index.js +1 -1
- package/es/core/editor/components/BackgroundView/index.module.scss +2 -1
- package/es/core/hooks/useTopoEdit.js +16 -21
- package/es/core/models/TopoApp.js +1 -1
- package/lib/core/editor/components/BackgroundView/index.module.scss +2 -1
- package/lib/core/hooks/useTopoEdit.js +16 -21
- package/lib/core/models/TopoApp.js +1 -1
- package/package.json +2 -2
@@ -566,7 +566,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
566
566
|
|
567
567
|
function _bindViewResources() {
|
568
568
|
_bindViewResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(data) {
|
569
|
-
var config,
|
569
|
+
var config, _yield$editDispatcher3, elements;
|
570
570
|
|
571
571
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
572
572
|
while (1) {
|
@@ -583,19 +583,15 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
583
583
|
return editDispatchers.fetchDataByConfig();
|
584
584
|
|
585
585
|
case 6:
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
if (result) {
|
590
|
-
_elements = result.elements;
|
591
|
-
saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, _elements); // 临时放这里,仅拓扑中心有
|
586
|
+
_yield$editDispatcher3 = _context12.sent;
|
587
|
+
elements = _yield$editDispatcher3.elements;
|
588
|
+
saveBind(TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
|
592
589
|
|
593
|
-
|
594
|
-
|
595
|
-
}
|
590
|
+
if (topo.linkDynamicStyleExecutor) {
|
591
|
+
topo.linkDynamicStyleExecutor.execute();
|
596
592
|
}
|
597
593
|
|
598
|
-
case
|
594
|
+
case 10:
|
599
595
|
case "end":
|
600
596
|
return _context12.stop();
|
601
597
|
}
|
@@ -611,7 +607,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
611
607
|
|
612
608
|
function _addLayerResources() {
|
613
609
|
_addLayerResources = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(group, newResourceIds) {
|
614
|
-
var _yield$
|
610
|
+
var _yield$editDispatcher4, elements, newElements;
|
615
611
|
|
616
612
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
617
613
|
while (1) {
|
@@ -627,8 +623,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
627
623
|
return editDispatchers.fetchDataByConfig();
|
628
624
|
|
629
625
|
case 5:
|
630
|
-
_yield$
|
631
|
-
elements = _yield$
|
626
|
+
_yield$editDispatcher4 = _context13.sent;
|
627
|
+
elements = _yield$editDispatcher4.elements;
|
632
628
|
// 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
|
633
629
|
newElements = findUNExistedElements(elements);
|
634
630
|
rlog.debug("添加分层资源", {
|
@@ -1033,7 +1029,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1033
1029
|
|
1034
1030
|
function _relateNodeIp() {
|
1035
1031
|
_relateNodeIp = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(txtValue, nodeElement) {
|
1036
|
-
var dm, isUnique, ip, configObj, configData,
|
1032
|
+
var dm, isUnique, ip, configObj, configData, _elements, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
|
1037
1033
|
|
1038
1034
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
1039
1035
|
while (1) {
|
@@ -1056,7 +1052,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1056
1052
|
isUnique = isUniqueIp(dm, txtValue, nodeElement); // 获取关联链路
|
1057
1053
|
|
1058
1054
|
if (!isUnique) {
|
1059
|
-
_context15.next =
|
1055
|
+
_context15.next = 23;
|
1060
1056
|
break;
|
1061
1057
|
}
|
1062
1058
|
|
@@ -1080,8 +1076,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1080
1076
|
case 16:
|
1081
1077
|
configData = _context15.sent;
|
1082
1078
|
// console.log("configData",configObj, configData);
|
1083
|
-
|
1084
|
-
newLinkElements = findUNExistedLinkElements(
|
1079
|
+
_elements = configData.elements;
|
1080
|
+
newLinkElements = findUNExistedLinkElements(_elements); // console.log("configData", configData, newLinkElements);
|
1085
1081
|
|
1086
1082
|
newLink = newLinkElements.filter(function (item) {
|
1087
1083
|
return item.type === "link";
|
@@ -1096,8 +1092,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1096
1092
|
nodes: [],
|
1097
1093
|
links: newLink,
|
1098
1094
|
linkGroups: newLinkGroup
|
1099
|
-
};
|
1100
|
-
console.log("createElementsData", createElementsData);
|
1095
|
+
}; // console.log("createElementsData", createElementsData);
|
1101
1096
|
|
1102
1097
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1103
1098
|
_htTopo = topo.getHtTopo();
|
@@ -1105,7 +1100,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1105
1100
|
_htTopo.createElements(createElementsData);
|
1106
1101
|
}
|
1107
1102
|
|
1108
|
-
case
|
1103
|
+
case 23:
|
1109
1104
|
case "end":
|
1110
1105
|
return _context15.stop();
|
1111
1106
|
}
|
@@ -24,7 +24,7 @@ import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
|
24
24
|
import SelectionModel from "./SelectionModel";
|
25
25
|
import CiCache from "./cache/CiCache"; // eslint-disable-next-line no-undef
|
26
26
|
|
27
|
-
var version = typeof "11.0.
|
27
|
+
var version = typeof "11.0.34" === 'string' ? "11.0.34" : null;
|
28
28
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
29
29
|
/**
|
30
30
|
* 拓扑显示和编辑
|
@@ -603,7 +603,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
603
603
|
|
604
604
|
function _bindViewResources() {
|
605
605
|
_bindViewResources = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(data) {
|
606
|
-
var config,
|
606
|
+
var config, _yield$editDispatcher3, elements;
|
607
607
|
|
608
608
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
609
609
|
while (1) {
|
@@ -620,19 +620,15 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
620
620
|
return editDispatchers.fetchDataByConfig();
|
621
621
|
|
622
622
|
case 6:
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
if (result) {
|
627
|
-
_elements = result.elements;
|
628
|
-
saveBind(_componentTopologyGraph.TopoEvent.DATA_TYPE_RESOURCE_COMBO, _elements); // 临时放这里,仅拓扑中心有
|
623
|
+
_yield$editDispatcher3 = _context12.sent;
|
624
|
+
elements = _yield$editDispatcher3.elements;
|
625
|
+
saveBind(_componentTopologyGraph.TopoEvent.DATA_TYPE_RESOURCE_COMBO, elements); // 临时放这里,仅拓扑中心有
|
629
626
|
|
630
|
-
|
631
|
-
|
632
|
-
}
|
627
|
+
if (topo.linkDynamicStyleExecutor) {
|
628
|
+
topo.linkDynamicStyleExecutor.execute();
|
633
629
|
}
|
634
630
|
|
635
|
-
case
|
631
|
+
case 10:
|
636
632
|
case "end":
|
637
633
|
return _context12.stop();
|
638
634
|
}
|
@@ -648,7 +644,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
648
644
|
|
649
645
|
function _addLayerResources() {
|
650
646
|
_addLayerResources = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(group, newResourceIds) {
|
651
|
-
var _yield$
|
647
|
+
var _yield$editDispatcher4, elements, newElements;
|
652
648
|
|
653
649
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
654
650
|
while (1) {
|
@@ -664,8 +660,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
664
660
|
return editDispatchers.fetchDataByConfig();
|
665
661
|
|
666
662
|
case 5:
|
667
|
-
_yield$
|
668
|
-
elements = _yield$
|
663
|
+
_yield$editDispatcher4 = _context13.sent;
|
664
|
+
elements = _yield$editDispatcher4.elements;
|
669
665
|
// 2022-11-10 修复 添加资源后分层重新布局问题,仅布局新增资源。替换api topo.updateElements(data)
|
670
666
|
newElements = findUNExistedElements(elements);
|
671
667
|
|
@@ -1079,7 +1075,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1079
1075
|
|
1080
1076
|
function _relateNodeIp() {
|
1081
1077
|
_relateNodeIp = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(txtValue, nodeElement) {
|
1082
|
-
var dm, isUnique, ip, configObj, configData,
|
1078
|
+
var dm, isUnique, ip, configObj, configData, _elements, newLinkElements, newLink, newLinkGroup, createElementsData, _htTopo;
|
1083
1079
|
|
1084
1080
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
1085
1081
|
while (1) {
|
@@ -1102,7 +1098,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1102
1098
|
isUnique = (0, _exitLinkUtil.isUniqueIp)(dm, txtValue, nodeElement); // 获取关联链路
|
1103
1099
|
|
1104
1100
|
if (!isUnique) {
|
1105
|
-
_context15.next =
|
1101
|
+
_context15.next = 23;
|
1106
1102
|
break;
|
1107
1103
|
}
|
1108
1104
|
|
@@ -1126,8 +1122,8 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1126
1122
|
case 16:
|
1127
1123
|
configData = _context15.sent;
|
1128
1124
|
// console.log("configData",configObj, configData);
|
1129
|
-
|
1130
|
-
newLinkElements = findUNExistedLinkElements(
|
1125
|
+
_elements = configData.elements;
|
1126
|
+
newLinkElements = findUNExistedLinkElements(_elements); // console.log("configData", configData, newLinkElements);
|
1131
1127
|
|
1132
1128
|
newLink = newLinkElements.filter(function (item) {
|
1133
1129
|
return item.type === "link";
|
@@ -1142,8 +1138,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1142
1138
|
nodes: [],
|
1143
1139
|
links: newLink,
|
1144
1140
|
linkGroups: newLinkGroup
|
1145
|
-
};
|
1146
|
-
console.log("createElementsData", createElementsData);
|
1141
|
+
}; // console.log("createElementsData", createElementsData);
|
1147
1142
|
|
1148
1143
|
if ([].concat(newLink, newLinkGroup).length > 0) {
|
1149
1144
|
_htTopo = topo.getHtTopo();
|
@@ -1151,7 +1146,7 @@ var useTopoEdit = function useTopoEdit(params) {
|
|
1151
1146
|
_htTopo.createElements(createElementsData);
|
1152
1147
|
}
|
1153
1148
|
|
1154
|
-
case
|
1149
|
+
case 23:
|
1155
1150
|
case "end":
|
1156
1151
|
return _context15.stop();
|
1157
1152
|
}
|
@@ -56,7 +56,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
|
56
56
|
var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
|
57
57
|
|
58
58
|
// eslint-disable-next-line no-undef
|
59
|
-
var version = typeof "11.0.
|
59
|
+
var version = typeof "11.0.34" === 'string' ? "11.0.34" : null;
|
60
60
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
61
|
/**
|
62
62
|
* 拓扑显示和编辑
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "11.0.
|
3
|
+
"version": "11.0.34",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -121,6 +121,6 @@
|
|
121
121
|
"access": "public"
|
122
122
|
},
|
123
123
|
"license": "MIT",
|
124
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.
|
124
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.34/build/index.html",
|
125
125
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
126
126
|
}
|