@riil-frontend/component-topology 12.0.0-dev.3 → 12.0.0-dev.30
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 +1 -1
- package/build/index.css +1 -1
- package/build/index.js +13 -13
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +1 -1
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +1 -1
- package/es/components/TemplateButton/index.module.scss +1 -1
- package/es/core/components/AlarmListPanel/components/AlarmListItem.js +58 -3
- package/es/core/components/AlarmListPanel/index.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +1 -1
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/es/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +1 -1
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +1 -1
- package/es/core/components/ResourceViewAttributeSetting/Setting.js +1 -1
- package/es/core/components/TopoView/topoView.js +6 -2
- package/es/core/editor/components/BackgroundView/index.js +1 -1
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +1 -1
- package/es/core/editor/components/EditorPlugin.js +1 -1
- package/es/core/editor/components/Sidebar/views/ComponentPanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +1 -1
- package/es/core/editor/components/Sidebar/views/LinkPanel.js +1 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +5 -12
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -10
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +9 -0
- package/es/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +2 -2
- package/es/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/es/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +1 -1
- package/es/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +1 -1
- package/es/core/editor/hooks/useKeyboardShortcut.js +3 -1
- package/es/core/editor/store/background.js +1 -1
- package/es/core/editor/store/historyManager.js +1 -1
- package/es/core/editor/store/topoEdit.js +1 -1
- package/es/core/editor/utils/copyElementUtil.js +12 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +8 -7
- package/es/core/hooks/__tests__/useCiAttributeChange.test.js +0 -0
- package/es/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -1
- package/es/core/hooks/useAlarm.js +119 -82
- package/es/core/hooks/useCiAttributeChange.js +31 -15
- package/es/core/hooks/useCmpLinkAlarm.js +156 -0
- package/es/core/hooks/useEventData.js +1 -2
- package/es/core/hooks/useGraphAlarmDisplay.js +91 -56
- package/es/core/hooks/useManageStatus.js +1 -1
- package/es/core/hooks/usePolling.js +1 -1
- package/es/core/hooks/useResourceConfig.js +1 -3
- package/es/core/hooks/useTopoEdit.js +51 -54
- package/es/core/models/Alarm.js +70 -143
- package/es/core/models/AttributeMetricDisplay.js +15 -6
- package/es/core/models/HistoryManager.js +1 -1
- package/es/core/models/SelectionModel.js +1 -1
- package/es/core/models/TopoApp.js +2 -2
- package/es/core/models/attributeFormatter/formatter/graphTransform.js +1 -1
- package/es/core/models/attributeFormatter/index.js +1 -1
- package/es/core/models/cache/CiCache.d.ts +1 -1
- package/es/core/models/cache/CiCache.js +3 -3
- package/es/core/models/cache/CiTypeCache.js +5 -1
- package/es/core/models/cache/DictCache.js +1 -1
- package/es/core/models/plugins/resourceWebControllUrl.js +1 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +1 -1
- package/es/core/models/topoData.js +0 -1
- package/es/core/services/alarm.js +1 -1
- package/es/core/services/index.js +1 -1
- package/es/core/services/topo/basic.js +2 -2
- package/es/core/store/models/customIcon.js +1 -1
- package/es/core/store/models/displayConfig.js +1 -1
- package/es/core/store/models/selection.js +1 -1
- package/es/core/store/models/topoBaseInfoOverview.js +1 -1
- package/es/core/store/models/topoBizMod.js +1 -1
- package/es/core/store/models/topoConfig.js +7 -10
- package/es/core/store/models/topoGraphView.js +1 -1
- package/es/core/store/models/topoMod.js +82 -135
- package/es/core/store/models/viewer/lock.js +1 -1
- package/es/core/store/models/viewer/resourceDetail.js +1 -1
- package/es/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/es/core/utils/edgeUtil.js +10 -1
- package/es/core/utils/metricUtil.js +8 -4
- package/es/core/utils/showGraphManageStatusUtil.js +3 -2
- package/es/core/utils/showMessage.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +1 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +1 -1
- package/es/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/es/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
- package/es/networkTopo/components/Link/index.js +1 -1
- package/es/networkTopo/components/TopoView.js +6 -11
- package/es/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +1 -1
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +1 -1
- package/es/networkTopo/models/LinkTagsTipsBuilder.js +1 -1
- package/es/networkTopo/models/TopoCenter.js +1 -1
- package/es/networkTopo/services/model.js +1 -1
- package/es/networkTopo/services/topo/basic.js +4 -4
- package/es/networkTopo/services/topo/ciInfo.js +1 -1
- package/es/networkTopo/store/functionAuth.js +1 -1
- package/es/networkTopo/store/topoCenter.js +1 -1
- package/es/networkTopo/store/topoTreeMod.js +1 -1
- package/es/networkTopo/utils/exportData.js +1 -1
- package/es/style.js +2 -2
- package/es/utils/ResourceConfigUtil.js +4 -37
- package/es/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/es/utils/ciRefAttributeTranslateUtil.js +155 -0
- package/es/utils/format.js +1 -1
- package/es/utils/topoData.js +4 -2
- package/lib/components/BatchAttrMetric/setting.js +2 -2
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +2 -2
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +2 -2
- package/lib/components/TemplateButton/index.module.scss +1 -1
- package/lib/core/components/AlarmListPanel/components/AlarmListItem.js +60 -3
- package/lib/core/components/AlarmListPanel/index.js +1 -1
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/ResourceDisplay/BasicConfig.js +3 -3
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +2 -2
- package/lib/core/components/ResourceViewAttributeSetting/Setting.js +2 -2
- package/lib/core/components/TopoView/topoView.js +14 -10
- package/lib/core/editor/components/BackgroundView/index.js +3 -3
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +2 -2
- package/lib/core/editor/components/EditorPlugin.js +3 -3
- package/lib/core/editor/components/Sidebar/views/ComponentPanel.js +2 -4
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CiTypeImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/CustomImagePanel.js +1 -1
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtCustomImagePanel.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/HtImagePalette.js +2 -2
- package/lib/core/editor/components/Sidebar/views/ImagePanel/ImagePalette.js +2 -4
- package/lib/core/editor/components/Sidebar/views/LinkPanel.js +2 -4
- package/lib/core/editor/components/Toolbar/widgets/EdgeColorButton/EdgeColorButton.js +6 -12
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.js +27 -9
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/EdgeType.module.scss +21 -1
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/LineType.js +8 -0
- package/lib/core/editor/components/Toolbar/widgets/EdgeTypeButton/index.js +1 -1
- package/lib/core/editor/components/Toolbar/widgets/Layout/index.js +16 -2
- package/lib/core/editor/components/settings/common/NodeSizeInput/NodeSizeInput.js +5 -5
- package/lib/core/editor/components/settings/common/SizeInput/NodeSizeInput.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/BasicSetting.js +1 -1
- package/lib/core/editor/components/settings/propertyViews/layer/SettingTab/Setting.js +3 -3
- package/lib/core/editor/components/settings/propertyViews/view/hooks/useBackgroundSizeConfig.js +2 -2
- package/lib/core/editor/hooks/useKeyboardShortcut.js +2 -0
- package/lib/core/editor/store/background.js +1 -1
- package/lib/core/editor/store/historyManager.js +1 -1
- package/lib/core/editor/store/topoEdit.js +1 -1
- package/lib/core/editor/utils/copyElementUtil.js +15 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +8 -6
- package/lib/core/hooks/__tests__/useCiAttributeChange.test.js +1 -0
- package/lib/core/hooks/ht/useHtDataPropertyChangeListener.js +1 -3
- package/lib/core/hooks/useAlarm.js +118 -80
- package/lib/core/hooks/useCiAttributeChange.js +30 -14
- package/lib/core/hooks/useCmpLinkAlarm.js +169 -0
- package/lib/core/hooks/useEventData.js +1 -2
- package/lib/core/hooks/useGraphAlarmDisplay.js +91 -55
- package/lib/core/hooks/useManageStatus.js +1 -1
- package/lib/core/hooks/usePolling.js +3 -3
- package/lib/core/hooks/useResourceConfig.js +1 -3
- package/lib/core/hooks/useTopoEdit.js +50 -53
- package/lib/core/models/Alarm.js +77 -152
- package/lib/core/models/AttributeMetricDisplay.js +18 -6
- package/lib/core/models/HistoryManager.js +8 -8
- package/lib/core/models/SelectionModel.js +5 -5
- package/lib/core/models/TopoApp.js +4 -6
- package/lib/core/models/attributeFormatter/formatter/graphTransform.js +2 -4
- package/lib/core/models/attributeFormatter/index.js +1 -1
- package/lib/core/models/cache/CiCache.d.ts +1 -1
- package/lib/core/models/cache/CiCache.js +3 -3
- package/lib/core/models/cache/CiTypeCache.js +6 -2
- package/lib/core/models/cache/DictCache.js +2 -2
- package/lib/core/models/plugins/resourceWebControllUrl.js +2 -2
- package/lib/core/models/tagstips/ElementTagTipConfig.js +2 -2
- package/lib/core/models/topoData.js +0 -1
- package/lib/core/services/alarm.js +2 -2
- package/lib/core/services/index.js +1 -1
- package/lib/core/services/topo/basic.js +2 -2
- package/lib/core/store/models/customIcon.js +3 -3
- package/lib/core/store/models/displayConfig.js +1 -1
- package/lib/core/store/models/selection.js +1 -1
- package/lib/core/store/models/topoBaseInfoOverview.js +1 -1
- package/lib/core/store/models/topoBizMod.js +1 -1
- package/lib/core/store/models/topoConfig.js +7 -10
- package/lib/core/store/models/topoGraphView.js +1 -1
- package/lib/core/store/models/topoMod.js +89 -142
- package/lib/core/store/models/viewer/lock.js +1 -1
- package/lib/core/store/models/viewer/resourceDetail.js +1 -1
- package/lib/core/store/models/viewer/resourceWebControllUrlSetting.js +1 -1
- package/lib/core/utils/edgeUtil.js +12 -1
- package/lib/core/utils/metricUtil.js +8 -4
- package/lib/core/utils/showGraphManageStatusUtil.js +3 -2
- package/lib/core/utils/showMessage.js +2 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetail.js +1 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +12 -13
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +3 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +4 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +6 -6
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +3 -5
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +20 -18
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +2 -2
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +3 -1
- package/lib/core/viewer/components/titlebar/widgets/AlarmButton.js +1 -5
- package/lib/networkTopo/components/Link/index.js +2 -2
- package/lib/networkTopo/components/TopoView.js +5 -14
- package/lib/networkTopo/hooks/useEdgeExpand.js +2 -3
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +4 -4
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +3 -5
- package/lib/networkTopo/models/LinkTagsTipsBuilder.js +3 -3
- package/lib/networkTopo/models/TopoCenter.js +1 -1
- package/lib/networkTopo/services/model.js +1 -3
- package/lib/networkTopo/services/topo/basic.js +4 -6
- package/lib/networkTopo/services/topo/ciInfo.js +0 -2
- package/lib/networkTopo/store/functionAuth.js +1 -1
- package/lib/networkTopo/store/topoCenter.js +1 -1
- package/lib/networkTopo/store/topoTreeMod.js +5 -5
- package/lib/networkTopo/utils/exportData.js +1 -3
- package/lib/style.js +2 -2
- package/lib/utils/ResourceConfigUtil.js +4 -39
- package/lib/utils/ciRefAttributeTranslateUtil.d.ts +19 -0
- package/lib/utils/ciRefAttributeTranslateUtil.js +168 -0
- package/lib/utils/format.js +1 -1
- package/lib/utils/topoData.js +4 -2
- package/package.json +4 -4
@@ -13,8 +13,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
13
13
|
|
14
14
|
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
|
-
var _rlog = _interopRequireDefault(require("@riil-frontend/component-topology-utils/es/rlog"));
|
17
|
-
|
18
16
|
var _lodash = require("lodash");
|
19
17
|
|
20
18
|
var _topo = _interopRequireDefault(require("../services/topo"));
|
@@ -56,7 +54,7 @@ var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
|
56
54
|
var _CiCache = _interopRequireDefault(require("./cache/CiCache"));
|
57
55
|
|
58
56
|
// eslint-disable-next-line no-undef
|
59
|
-
var version = typeof "12.0.0-dev.
|
57
|
+
var version = typeof "12.0.0-dev.30" === 'string' ? "12.0.0-dev.30" : null;
|
60
58
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
61
59
|
/**
|
62
60
|
* 拓扑显示和编辑
|
@@ -384,7 +382,7 @@ var Topo = /*#__PURE__*/function () {
|
|
384
382
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
385
383
|
while (1) switch (_context7.prev = _context7.next) {
|
386
384
|
case 0:
|
387
|
-
|
385
|
+
_componentTopologyUtils.rlog.info('TopoApp.open 打开拓扑图', id); // 如果是切换拓扑图,注销原拓扑图
|
388
386
|
|
389
387
|
|
390
388
|
lastId = this.id;
|
@@ -414,7 +412,7 @@ var Topo = /*#__PURE__*/function () {
|
|
414
412
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
415
413
|
while (1) switch (_context8.prev = _context8.next) {
|
416
414
|
case 0:
|
417
|
-
|
415
|
+
_componentTopologyUtils.rlog.info('关闭拓扑图', this.id);
|
418
416
|
|
419
417
|
if (this.id) {
|
420
418
|
_context8.next = 3;
|
@@ -547,7 +545,7 @@ var Topo = /*#__PURE__*/function () {
|
|
547
545
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
548
546
|
while (1) switch (_context12.prev = _context12.next) {
|
549
547
|
case 0:
|
550
|
-
|
548
|
+
_componentTopologyUtils.rlog.info('TopoApp.enterEditMode');
|
551
549
|
|
552
550
|
if (!this.options.onSwitchToEditModeBegin) {
|
553
551
|
_context12.next = 4;
|
@@ -1,11 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
3
|
exports.__esModule = true;
|
6
4
|
exports["default"] = graphTransform;
|
7
5
|
|
8
|
-
var
|
6
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
9
7
|
|
10
8
|
function graphTransform(options) {
|
11
9
|
var item = options.item,
|
@@ -17,7 +15,7 @@ function graphTransform(options) {
|
|
17
15
|
var node = topo.getDataModel().getDataByTag(ciData.id);
|
18
16
|
value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
|
19
17
|
} catch (error) {
|
20
|
-
|
18
|
+
_componentTopologyUtils.rlog.error(error);
|
21
19
|
}
|
22
20
|
|
23
21
|
return {
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
exports.__esModule = true;
|
6
6
|
exports["default"] = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
9
9
|
|
10
10
|
var _attributeTransform = _interopRequireDefault(require("./formatter/attributeTransform"));
|
11
11
|
|
@@ -11,7 +11,7 @@ declare class CiCache {
|
|
11
11
|
* @param ids {string[]}
|
12
12
|
* @returns {Promise<Object>}
|
13
13
|
*/
|
14
|
-
load(ids: string[]): Promise<Object>;
|
14
|
+
load(ids: string[], refreshCiCache?: boolean): Promise<Object>;
|
15
15
|
getCi(id: string): Object;
|
16
16
|
}
|
17
17
|
declare const _default: CiCache;
|
@@ -32,14 +32,14 @@ var CiCache = /*#__PURE__*/function () {
|
|
32
32
|
_proto.load =
|
33
33
|
/*#__PURE__*/
|
34
34
|
function () {
|
35
|
-
var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids) {
|
35
|
+
var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(ids, refreshCiCache) {
|
36
36
|
var _this = this;
|
37
37
|
|
38
38
|
var unloadCiIds, cis, map;
|
39
39
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
40
40
|
while (1) switch (_context.prev = _context.next) {
|
41
41
|
case 0:
|
42
|
-
unloadCiIds = ids.filter(function (id) {
|
42
|
+
unloadCiIds = refreshCiCache === true ? ids : ids.filter(function (id) {
|
43
43
|
return !_this.ciMap[id];
|
44
44
|
});
|
45
45
|
|
@@ -71,7 +71,7 @@ var CiCache = /*#__PURE__*/function () {
|
|
71
71
|
}, _callee, this);
|
72
72
|
}));
|
73
73
|
|
74
|
-
function load(_x) {
|
74
|
+
function load(_x, _x2) {
|
75
75
|
return _load.apply(this, arguments);
|
76
76
|
}
|
77
77
|
|
@@ -15,7 +15,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
15
15
|
|
16
16
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
17
17
|
|
18
|
-
var
|
18
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
19
19
|
|
20
20
|
var _keyBy = _interopRequireDefault(require("lodash/keyBy"));
|
21
21
|
|
@@ -46,7 +46,7 @@ var CiTypeCache = /*#__PURE__*/function () {
|
|
46
46
|
_context.prev = 5;
|
47
47
|
_context.t0 = _context["catch"](0);
|
48
48
|
|
49
|
-
|
49
|
+
_componentTopologyUtils.rlog.error('查询Ci模型异常', _context.t0);
|
50
50
|
|
51
51
|
case 8:
|
52
52
|
return _context.abrupt("return", this.ciTypeMap);
|
@@ -119,6 +119,10 @@ var CiTypeCache = /*#__PURE__*/function () {
|
|
119
119
|
this.ciTypeMap = cache;
|
120
120
|
};
|
121
121
|
|
122
|
+
_proto.getCiTypeMap = function getCiTypeMap() {
|
123
|
+
return this.ciTypeMap;
|
124
|
+
};
|
125
|
+
|
122
126
|
_proto.getCiType = function getCiType(typeCode) {
|
123
127
|
return this.ciTypeMap[typeCode];
|
124
128
|
};
|
@@ -13,7 +13,7 @@ var _utils = require("@riil-frontend/utils");
|
|
13
13
|
|
14
14
|
var modelService = _interopRequireWildcard(require("@riil-frontend/component-topology-common/es/services/model"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
17
17
|
|
18
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
19
19
|
|
@@ -58,7 +58,7 @@ var DictCache = /*#__PURE__*/function () {
|
|
58
58
|
case 7:
|
59
59
|
_context.next = 9;
|
60
60
|
return modelService.queryDicts()["catch"](function (e) {
|
61
|
-
|
61
|
+
_componentTopologyUtils.rlog.error('初始化数据字典异常', e);
|
62
62
|
|
63
63
|
return [];
|
64
64
|
});
|
@@ -13,7 +13,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
13
13
|
|
14
14
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
17
17
|
|
18
18
|
function _default(topo) {
|
19
19
|
var resourceUrlMap = {};
|
@@ -90,7 +90,7 @@ function _default(topo) {
|
|
90
90
|
_context2.prev = 10;
|
91
91
|
_context2.t0 = _context2["catch"](3);
|
92
92
|
|
93
|
-
|
93
|
+
_componentTopologyUtils.rlog.error('资源web控制台.加载数据异常', _context2.t0);
|
94
94
|
|
95
95
|
case 13:
|
96
96
|
case "end":
|
@@ -13,7 +13,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
13
13
|
|
14
14
|
var _keyBy = _interopRequireDefault(require("lodash/keyBy"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
17
17
|
|
18
18
|
var _utils = require("./utils");
|
19
19
|
|
@@ -88,7 +88,7 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
88
88
|
_context2.prev = 8;
|
89
89
|
_context2.t0 = _context2["catch"](0);
|
90
90
|
|
91
|
-
|
91
|
+
_componentTopologyUtils.rlog.error('查询监控模板指标失败', _context2.t0);
|
92
92
|
|
93
93
|
case 11:
|
94
94
|
case "end":
|
@@ -13,7 +13,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
13
13
|
|
14
14
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
17
17
|
|
18
18
|
var _default = {
|
19
19
|
/**
|
@@ -36,7 +36,7 @@ var _default = {
|
|
36
36
|
case 3:
|
37
37
|
result = _context.sent;
|
38
38
|
|
39
|
-
|
39
|
+
_componentTopologyUtils.rlog.debug('查询告警列表', ciIds, result);
|
40
40
|
|
41
41
|
return _context.abrupt("return", result);
|
42
42
|
|
@@ -118,7 +118,7 @@ var _default = {
|
|
118
118
|
* @param {Array} groups
|
119
119
|
* @returns
|
120
120
|
*/
|
121
|
-
getTopoDataByResource: function getTopoDataByResource(id, resources, groups
|
121
|
+
getTopoDataByResource: function getTopoDataByResource(id, resources, groups) {
|
122
122
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
123
123
|
var data, obj;
|
124
124
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
@@ -137,7 +137,7 @@ var _default = {
|
|
137
137
|
obj = prepareGroupParams(data);
|
138
138
|
_context.next = 5;
|
139
139
|
return _componentTopologyUtils.request.post(API_ROOT + "/structure/byCondition/" + id, (0, _extends2["default"])({}, obj, {
|
140
|
-
exportLinkIdList:
|
140
|
+
exportLinkIdList: []
|
141
141
|
}));
|
142
142
|
|
143
143
|
case 5:
|
@@ -15,7 +15,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
15
15
|
|
16
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
17
17
|
|
18
|
-
var
|
18
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
19
19
|
|
20
20
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
21
21
|
|
@@ -202,7 +202,7 @@ function _default(engine) {
|
|
202
202
|
|
203
203
|
var id = (0, _icon.getCustomIconIdFromHtId)(htIconId);
|
204
204
|
|
205
|
-
|
205
|
+
_componentTopologyUtils.rlog.debug("\u5220\u9664\u56FE\u6807: " + id);
|
206
206
|
|
207
207
|
_dialog["default"].confirm({
|
208
208
|
title: '删除',
|
@@ -246,7 +246,7 @@ function _default(engine) {
|
|
246
246
|
_context5.prev = 9;
|
247
247
|
_context5.t0 = _context5["catch"](0);
|
248
248
|
|
249
|
-
|
249
|
+
_componentTopologyUtils.rlog.warn('删除图标失败', _context5.t0);
|
250
250
|
|
251
251
|
case 12:
|
252
252
|
case "end":
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
11
11
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
16
|
/**
|
17
17
|
* 动态设置链路样式 Model
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
11
11
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
16
|
/**
|
17
17
|
* 拓扑图 Model
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
11
11
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
16
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
17
17
|
|
@@ -13,7 +13,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
13
13
|
|
14
14
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
17
17
|
|
18
18
|
function _default(engine) {
|
19
19
|
return {
|
@@ -53,7 +53,6 @@ var initialState = {
|
|
53
53
|
"static": []
|
54
54
|
},
|
55
55
|
groups: [],
|
56
|
-
exportLinkIdList: [],
|
57
56
|
// config: {
|
58
57
|
// view: null,
|
59
58
|
// groups: [],
|
@@ -260,18 +259,17 @@ function _default(topoApp) {
|
|
260
259
|
var _this2 = this;
|
261
260
|
|
262
261
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
263
|
-
var editState, resources, _editState$groups, groups,
|
262
|
+
var editState, resources, _editState$groups, groups, query, data;
|
264
263
|
|
265
264
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
266
265
|
while (1) switch (_context2.prev = _context2.next) {
|
267
266
|
case 0:
|
268
267
|
editState = rootState.topoConfig;
|
269
|
-
resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups
|
268
|
+
resources = editState.resources, _editState$groups = editState.groups, groups = _editState$groups === void 0 ? [] : _editState$groups;
|
270
269
|
query = {
|
271
270
|
id: rootState.topoMod.topoId,
|
272
271
|
resources: resources,
|
273
|
-
groups: groups
|
274
|
-
ipNodes: ipNodes
|
272
|
+
groups: groups
|
275
273
|
};
|
276
274
|
_context2.next = 5;
|
277
275
|
return _this2.getTopoByConditions(query);
|
@@ -322,14 +320,14 @@ function _default(topoApp) {
|
|
322
320
|
var _this4 = this;
|
323
321
|
|
324
322
|
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
325
|
-
var topoId, resources, groups,
|
323
|
+
var topoId, resources, groups, viewConditions, groupInfo, data, _yield$Promise$all, dataWithLinkDetail, _combTopoData, topoData, resAndMetrics, topoDataTrans;
|
326
324
|
|
327
325
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
328
326
|
while (1) switch (_context4.prev = _context4.next) {
|
329
327
|
case 0:
|
330
328
|
_rlog["default"].debug("getTopoByConditions--------", params);
|
331
329
|
|
332
|
-
topoId = params.id, resources = params.resources, groups = params.groups
|
330
|
+
topoId = params.id, resources = params.resources, groups = params.groups;
|
333
331
|
viewConditions = (0, _topoData2.resToConditions)(resources);
|
334
332
|
groupInfo = (0, _utils.isAvailableArray)(groups) && groups.map(function (group) {
|
335
333
|
return (0, _extends2["default"])({}, group, {
|
@@ -341,7 +339,7 @@ function _default(topoApp) {
|
|
341
339
|
_rlog["default"].debug("getTopoByConditions--------", viewConditions, groupInfo);
|
342
340
|
|
343
341
|
_context4.next = 7;
|
344
|
-
return topoApp.serverApi.getTopoDataByResource(topoId, viewConditions, groupInfo
|
342
|
+
return topoApp.serverApi.getTopoDataByResource(topoId, viewConditions, groupInfo);
|
345
343
|
|
346
344
|
case 7:
|
347
345
|
data = _context4.sent;
|
@@ -484,8 +482,7 @@ function _default(topoApp) {
|
|
484
482
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
485
483
|
while (1) switch (_context8.prev = _context8.next) {
|
486
484
|
case 0:
|
487
|
-
ids = data.ids, ip = data.ip;
|
488
|
-
|
485
|
+
ids = data.ids, ip = data.ip;
|
489
486
|
_context8.next = 3;
|
490
487
|
return _networkLink["default"].queryLinksByIp(ids, ip);
|
491
488
|
|
@@ -11,7 +11,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
11
11
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
13
|
|
14
|
-
var
|
14
|
+
var _componentTopologyUtils = require("@riil-frontend/component-topology-utils");
|
15
15
|
|
16
16
|
var _topo = _interopRequireDefault(require("@riil-frontend/component-topology-common/es/services/topo"));
|
17
17
|
|