@riil-frontend/component-topology 3.5.9 → 3.5.10
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 +20 -20
- package/es/core/models/TopoApp.js +1 -1
- package/es/topoCenter/models/LinkTagsTipsBuilder.js +17 -7
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/topoCenter/models/LinkTagsTipsBuilder.js +18 -7
- 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 "3.5.
|
|
23
|
+
var version = typeof "3.5.10" === 'string' ? "3.5.10" : null;
|
|
24
24
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
25
25
|
/**
|
|
26
26
|
* 拓扑显示和编辑
|
|
@@ -133,15 +133,26 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
|
|
|
133
133
|
config = _ref.config,
|
|
134
134
|
linkChildren = _ref.linkChildren,
|
|
135
135
|
data = _ref.data;
|
|
136
|
+
var connectTypes = ['physical_link.', 'export_link.'];
|
|
137
|
+
|
|
138
|
+
var replaceMetricConfigCode = function replaceMetricConfigCode(item) {
|
|
139
|
+
var code = item.code;
|
|
140
|
+
connectTypes.forEach(function (prefix) {
|
|
141
|
+
code = code.replace(prefix, 'physical_link.');
|
|
142
|
+
});
|
|
143
|
+
return _extends({}, item, {
|
|
144
|
+
code: code
|
|
145
|
+
});
|
|
146
|
+
}; // 查询配置,过滤不在范围内的属性
|
|
147
|
+
|
|
136
148
|
|
|
137
|
-
// 查询配置,过滤不在范围内的属性
|
|
138
149
|
var finalConfig = _extends({}, config, {
|
|
139
150
|
tags: config.tags.filter(function (item) {
|
|
140
151
|
return _this2.filterField(item, linkChildren);
|
|
141
|
-
}),
|
|
152
|
+
}).map(replaceMetricConfigCode),
|
|
142
153
|
tips: config.tips.filter(function (item) {
|
|
143
154
|
return _this2.filterField(item, linkChildren);
|
|
144
|
-
})
|
|
155
|
+
}).map(replaceMetricConfigCode)
|
|
145
156
|
}); // 构造数据,计算指标值
|
|
146
157
|
|
|
147
158
|
|
|
@@ -194,15 +205,14 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
|
|
|
194
205
|
ciType: 'network_link',
|
|
195
206
|
metricMap: {}
|
|
196
207
|
};
|
|
197
|
-
var connectType = linkChildren[0].attributes['network_link.connect_type'];
|
|
198
208
|
metrics.forEach(function (m) {
|
|
199
|
-
var metricCode = "" + connectTypePrefixMap[connectType] + m.code;
|
|
200
|
-
|
|
201
209
|
try {
|
|
202
210
|
var values = linkChildrenData.map(function (linkData) {
|
|
211
|
+
var connectType = linkData.attributeMap['network_link.connect_type'];
|
|
212
|
+
var metricCode = "" + connectTypePrefixMap[connectType] + m.code;
|
|
203
213
|
return linkData.metricMap[metricCode];
|
|
204
214
|
});
|
|
205
|
-
mergeData.metricMap[
|
|
215
|
+
mergeData.metricMap["physical_link." + m.code] = calcFnMap[m.calcType](values);
|
|
206
216
|
} catch (error) {
|
|
207
217
|
rlog.warn('连线组指标计算异常', error);
|
|
208
218
|
}
|
|
@@ -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 "3.5.
|
|
51
|
+
var version = typeof "3.5.10" === 'string' ? "3.5.10" : null;
|
|
52
52
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
|
53
53
|
/**
|
|
54
54
|
* 拓扑显示和编辑
|
|
@@ -144,14 +144,26 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
|
|
|
144
144
|
config = _ref.config,
|
|
145
145
|
linkChildren = _ref.linkChildren,
|
|
146
146
|
data = _ref.data;
|
|
147
|
-
|
|
147
|
+
var connectTypes = ['physical_link.', 'export_link.'];
|
|
148
|
+
|
|
149
|
+
var replaceMetricConfigCode = function replaceMetricConfigCode(item) {
|
|
150
|
+
var code = item.code;
|
|
151
|
+
connectTypes.forEach(function (prefix) {
|
|
152
|
+
code = code.replace(prefix, 'physical_link.');
|
|
153
|
+
});
|
|
154
|
+
return (0, _extends2["default"])({}, item, {
|
|
155
|
+
code: code
|
|
156
|
+
});
|
|
157
|
+
}; // 查询配置,过滤不在范围内的属性
|
|
158
|
+
|
|
159
|
+
|
|
148
160
|
var finalConfig = (0, _extends2["default"])({}, config, {
|
|
149
161
|
tags: config.tags.filter(function (item) {
|
|
150
162
|
return _this2.filterField(item, linkChildren);
|
|
151
|
-
}),
|
|
163
|
+
}).map(replaceMetricConfigCode),
|
|
152
164
|
tips: config.tips.filter(function (item) {
|
|
153
165
|
return _this2.filterField(item, linkChildren);
|
|
154
|
-
})
|
|
166
|
+
}).map(replaceMetricConfigCode)
|
|
155
167
|
}); // 构造数据,计算指标值
|
|
156
168
|
|
|
157
169
|
var mergeData = this.buildData(data, linkChildren); // 构造标注、悬浮框数据
|
|
@@ -203,15 +215,14 @@ var LinkTagsTipsBuilder = /*#__PURE__*/function () {
|
|
|
203
215
|
ciType: 'network_link',
|
|
204
216
|
metricMap: {}
|
|
205
217
|
};
|
|
206
|
-
var connectType = linkChildren[0].attributes['network_link.connect_type'];
|
|
207
218
|
metrics.forEach(function (m) {
|
|
208
|
-
var metricCode = "" + connectTypePrefixMap[connectType] + m.code;
|
|
209
|
-
|
|
210
219
|
try {
|
|
211
220
|
var values = linkChildrenData.map(function (linkData) {
|
|
221
|
+
var connectType = linkData.attributeMap['network_link.connect_type'];
|
|
222
|
+
var metricCode = "" + connectTypePrefixMap[connectType] + m.code;
|
|
212
223
|
return linkData.metricMap[metricCode];
|
|
213
224
|
});
|
|
214
|
-
mergeData.metricMap[
|
|
225
|
+
mergeData.metricMap["physical_link." + m.code] = calcFnMap[m.calcType](values);
|
|
215
226
|
} catch (error) {
|
|
216
227
|
_rlog["default"].warn('连线组指标计算异常', error);
|
|
217
228
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.10",
|
|
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@3.5.
|
|
113
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@3.5.10/build/index.html",
|
|
114
114
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
|
115
115
|
}
|