@riil-frontend/component-topology 11.0.34 → 12.0.0-dev.1
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 +4 -2
- package/build/index.js +57 -34
- package/es/components/BatchAttrMetric/setting.js +1 -1
- package/es/components/MultiResourceDrawer/index.js +16 -18
- package/es/components/ResourceList/ResourceSelect.js +48 -50
- package/es/components/ResourceSelectDrawer/ResourceSelectDrawer.js +24 -26
- package/es/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +23 -25
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/es/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/es/core/editor/components/BackgroundView/UploadDialog/index.js +17 -18
- package/es/core/editor/components/BackgroundView/index.js +119 -129
- package/es/core/editor/components/CustomIconPlugin/RenameDialog.js +20 -22
- package/es/core/editor/components/CustomIconPlugin/UploadIconDialog.js +33 -34
- package/es/core/editor/components/CustomIconPlugin/utils/svgToShape.js +15 -17
- package/es/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +7 -9
- package/es/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/es/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/es/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/es/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +11 -13
- package/es/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +21 -23
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/es/core/editor/components/settings/propertyViews/view/BackgroundSize.js +10 -12
- package/es/core/editor/components/titlebar/TopoEditorTitleBar.js +21 -27
- package/es/core/editor/hooks/useKeyboardShortcut.js +36 -32
- package/es/core/editor/hooks/useNewElementTheme.js +2 -2
- package/es/core/editor/store/background.js +8 -10
- package/es/core/editor/store/topoEdit.js +4 -6
- package/es/core/editor/utils/copyElementUtil.js +171 -0
- package/es/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/es/core/hooks/usePolling.js +117 -121
- package/es/core/hooks/useResourceConfig.js +58 -66
- package/es/core/hooks/useTopoEdit.js +473 -503
- package/es/core/models/Alarm.js +281 -298
- package/es/core/models/AttributeMetricDisplay.js +101 -107
- package/es/core/models/PluginManager.js +4 -3
- package/es/core/models/SelectionModel.js +4 -5
- package/es/core/models/TopoApp.js +205 -240
- package/es/core/models/TopoGraphView.js +18 -21
- package/es/core/models/cache/CiCache.js +28 -27
- package/es/core/models/cache/CiTypeCache.js +37 -41
- package/es/core/models/cache/DictCache.js +33 -35
- package/es/core/models/graph/Background.js +15 -17
- package/es/core/models/plugins/resourceWebControllUrl.js +76 -82
- package/es/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/es/core/models/topoData.js +68 -70
- package/es/core/models/utils/linkUtils.js +41 -43
- package/es/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/es/core/services/alarm.js +14 -16
- package/es/core/services/background.js +59 -67
- package/es/core/services/cmdb/metric.js +9 -11
- package/es/core/services/cmdb.js +20 -20
- package/es/core/services/index.js +39 -45
- package/es/core/services/overview.js +131 -151
- package/es/core/services/topo/basic.js +37 -41
- package/es/core/services/topo/tagtip.js +10 -12
- package/es/core/store/models/ciModel.js +58 -62
- package/es/core/store/models/customIcon.js +120 -134
- package/es/core/store/models/displayConfig.js +15 -19
- package/es/core/store/models/selection.js +4 -6
- package/es/core/store/models/topoAlarm.js +162 -145
- package/es/core/store/models/topoBaseInfoOverview.js +4 -6
- package/es/core/store/models/topoBizMod.js +9 -11
- package/es/core/store/models/topoConfig.js +215 -231
- package/es/core/store/models/topoGraphView.js +4 -6
- package/es/core/store/models/topoMod.js +373 -395
- package/es/core/utils/imageUtil.js +18 -20
- package/es/core/utils/metricUtil.js +5 -0
- package/es/core/utils/saveSerialize.js +9 -11
- package/es/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +343 -357
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +189 -205
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/es/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +33 -37
- package/es/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/es/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/es/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +17 -19
- package/es/networkTopo/components/Link/hook.js +73 -77
- package/es/networkTopo/components/Link/index.js +86 -94
- package/es/networkTopo/components/Link/setting.js +42 -44
- package/es/networkTopo/getTopoData.js +63 -69
- package/es/networkTopo/hooks/viewer/useRelateTopo.js +30 -32
- package/es/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/es/networkTopo/models/TopoCenter.js +18 -22
- package/es/networkTopo/services/alert.js +18 -22
- package/es/networkTopo/services/authorization.js +45 -55
- package/es/networkTopo/services/cmdb.js +422 -470
- package/es/networkTopo/services/funcAuth.js +22 -24
- package/es/networkTopo/services/link.js +107 -117
- package/es/networkTopo/services/mdc.js +18 -24
- package/es/networkTopo/services/metric.js +23 -27
- package/es/networkTopo/services/model.js +445 -509
- package/es/networkTopo/services/risk.js +9 -11
- package/es/networkTopo/services/topo/auth.js +27 -33
- package/es/networkTopo/services/topo/basic.js +251 -289
- package/es/networkTopo/services/topo/blacklist.js +20 -24
- package/es/networkTopo/services/topo/ciInfo.js +27 -31
- package/es/networkTopo/services/topo/icon.js +49 -59
- package/es/networkTopo/services/topo/networkLink.js +32 -36
- package/es/networkTopo/services/topo/relation.js +9 -11
- package/es/networkTopo/services/topo/resourceWebUrl.js +36 -42
- package/es/networkTopo/store/functionAuth.js +31 -37
- package/es/networkTopo/store/topoCenter.js +142 -152
- package/es/networkTopo/store/topoLinkMod.js +4 -6
- package/es/networkTopo/store/topoTreeMod.js +170 -182
- package/es/networkTopo/utils/exportData.js +52 -54
- package/lib/components/BatchAttrMetric/setting.js +1 -1
- package/lib/components/MultiResourceDrawer/index.js +16 -18
- package/lib/components/ResourceList/ResourceSelect.js +48 -50
- package/lib/components/ResourceSelectDrawer/ResourceSelectDrawer.js +27 -29
- package/lib/components/SingleResourceDrawer/SelectDrawer.js +18 -20
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +30 -32
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +78 -84
- package/lib/core/components/titlebar/widgets/TitleWidget.js +5 -3
- package/lib/core/editor/components/BackgroundView/UploadDialog/index.js +18 -18
- package/lib/core/editor/components/BackgroundView/index.js +118 -128
- package/lib/core/editor/components/CustomIconPlugin/RenameDialog.js +22 -24
- package/lib/core/editor/components/CustomIconPlugin/UploadIconDialog.js +34 -34
- package/lib/core/editor/components/CustomIconPlugin/utils/svgToShape.js +19 -21
- package/lib/core/editor/components/GroupAddResourceDrawerPlugin/GroupAddResourceDrawer.js +8 -10
- package/lib/core/editor/components/Sidebar/views/CanvasPanel/hooks/useCanvasThemeConfig.js +37 -41
- package/lib/core/editor/components/Toolbar/widgets/BoxBackgroundButton/BoxBackgroundSetting.js +50 -54
- package/lib/core/editor/components/Toolbar/widgets/FontColorButton.js +50 -54
- package/lib/core/editor/components/settings/propertyViews/layer/DataTab/DefaultLayerAddResourceDrawer.js +12 -14
- package/lib/core/editor/components/settings/propertyViews/node/data/BindResourceDrawer.js +26 -28
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +15 -17
- package/lib/core/editor/components/settings/propertyViews/view/BackgroundSize.js +12 -14
- package/lib/core/editor/components/titlebar/TopoEditorTitleBar.js +25 -31
- package/lib/core/editor/hooks/useKeyboardShortcut.js +37 -34
- package/lib/core/editor/hooks/useNewElementTheme.js +2 -2
- package/lib/core/editor/store/background.js +8 -10
- package/lib/core/editor/store/topoEdit.js +4 -6
- package/lib/core/editor/utils/copyElementUtil.js +182 -0
- package/lib/core/editor/utils/edgeTypeStyleUtil.js +2 -4
- package/lib/core/hooks/usePolling.js +116 -120
- package/lib/core/hooks/useResourceConfig.js +58 -66
- package/lib/core/hooks/useTopoEdit.js +465 -495
- package/lib/core/models/Alarm.js +275 -292
- package/lib/core/models/AttributeMetricDisplay.js +104 -110
- package/lib/core/models/PluginManager.js +4 -3
- package/lib/core/models/SelectionModel.js +4 -5
- package/lib/core/models/TopoApp.js +205 -240
- package/lib/core/models/TopoGraphView.js +18 -21
- package/lib/core/models/cache/CiCache.js +33 -32
- package/lib/core/models/cache/CiTypeCache.js +38 -42
- package/lib/core/models/cache/DictCache.js +33 -35
- package/lib/core/models/graph/Background.js +16 -18
- package/lib/core/models/plugins/resourceWebControllUrl.js +74 -80
- package/lib/core/models/tagstips/ElementTagTipConfig.js +34 -38
- package/lib/core/models/topoData.js +69 -71
- package/lib/core/models/utils/linkUtils.js +41 -43
- package/lib/core/models/utils/nodeNameVisibleUtil.js +4 -4
- package/lib/core/services/alarm.js +18 -20
- package/lib/core/services/background.js +70 -78
- package/lib/core/services/cmdb/metric.js +10 -12
- package/lib/core/services/cmdb.js +22 -22
- package/lib/core/services/index.js +45 -51
- package/lib/core/services/overview.js +131 -151
- package/lib/core/services/topo/basic.js +37 -41
- package/lib/core/services/topo/tagtip.js +12 -14
- package/lib/core/store/models/ciModel.js +66 -70
- package/lib/core/store/models/customIcon.js +120 -134
- package/lib/core/store/models/displayConfig.js +15 -19
- package/lib/core/store/models/selection.js +4 -6
- package/lib/core/store/models/topoAlarm.js +163 -145
- package/lib/core/store/models/topoBaseInfoOverview.js +4 -6
- package/lib/core/store/models/topoBizMod.js +9 -11
- package/lib/core/store/models/topoConfig.js +222 -238
- package/lib/core/store/models/topoGraphView.js +4 -6
- package/lib/core/store/models/topoMod.js +375 -397
- package/lib/core/utils/imageUtil.js +22 -24
- package/lib/core/utils/metricUtil.js +5 -0
- package/lib/core/utils/saveSerialize.js +9 -11
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ClusterMemberTable.js +56 -58
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/EventsCard.js +15 -17
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +344 -358
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/Configurator/index.js +86 -92
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/LinkTopoCard.js +39 -41
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/services/index.js +190 -206
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useAlarmAndRiskData.js +107 -109
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +57 -59
- package/lib/core/viewer/components/plugins/ResourceDetail/components/WebConsole/WebConsoleForm/hooks/useWebConsole.js +29 -33
- package/lib/core/viewer/components/plugins/ResourceDetail/getCiDisplayMetricModels.js +25 -29
- package/lib/core/viewer/components/plugins/ResourceDetail/hooks/useUserId.js +32 -36
- package/lib/core/viewer/components/plugins/ResourceWebControllUrlSettingDialog.js +18 -20
- package/lib/networkTopo/components/Link/hook.js +73 -77
- package/lib/networkTopo/components/Link/index.js +87 -95
- package/lib/networkTopo/components/Link/setting.js +42 -44
- package/lib/networkTopo/getTopoData.js +63 -69
- package/lib/networkTopo/hooks/viewer/useRelateTopo.js +31 -33
- package/lib/networkTopo/models/LinkDynamicStyleExecutor.js +2 -2
- package/lib/networkTopo/models/TopoCenter.js +18 -22
- package/lib/networkTopo/services/alert.js +18 -22
- package/lib/networkTopo/services/authorization.js +55 -65
- package/lib/networkTopo/services/cmdb.js +422 -470
- package/lib/networkTopo/services/funcAuth.js +24 -26
- package/lib/networkTopo/services/link.js +108 -118
- package/lib/networkTopo/services/mdc.js +21 -27
- package/lib/networkTopo/services/metric.js +27 -31
- package/lib/networkTopo/services/model.js +445 -509
- package/lib/networkTopo/services/risk.js +11 -13
- package/lib/networkTopo/services/topo/auth.js +27 -33
- package/lib/networkTopo/services/topo/basic.js +252 -290
- package/lib/networkTopo/services/topo/blacklist.js +20 -24
- package/lib/networkTopo/services/topo/ciInfo.js +34 -38
- package/lib/networkTopo/services/topo/icon.js +59 -69
- package/lib/networkTopo/services/topo/networkLink.js +32 -36
- package/lib/networkTopo/services/topo/relation.js +11 -13
- package/lib/networkTopo/services/topo/resourceWebUrl.js +44 -50
- package/lib/networkTopo/store/functionAuth.js +31 -37
- package/lib/networkTopo/store/topoCenter.js +142 -152
- package/lib/networkTopo/store/topoLinkMod.js +4 -6
- package/lib/networkTopo/store/topoTreeMod.js +166 -178
- package/lib/networkTopo/utils/exportData.js +59 -61
- package/lib/utils/htElementDataUtil.js +4 -2
- package/package.json +5 -3
@@ -32,22 +32,20 @@ var _mdc = require("./mdc");
|
|
32
32
|
var getCommonCount = /*#__PURE__*/function () {
|
33
33
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(code) {
|
34
34
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
35
|
-
while (1) {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
return _context.stop();
|
50
|
-
}
|
35
|
+
while (1) switch (_context.prev = _context.next) {
|
36
|
+
case 0:
|
37
|
+
_context.next = 2;
|
38
|
+
return _componentTopologyUtils.request.post('/cmdb/v1/api/ci/commonCount', {
|
39
|
+
condition: "\"principal(type('" + code + "'))\"",
|
40
|
+
groupKeys: ['ci_type']
|
41
|
+
});
|
42
|
+
|
43
|
+
case 2:
|
44
|
+
return _context.abrupt("return", _context.sent);
|
45
|
+
|
46
|
+
case 3:
|
47
|
+
case "end":
|
48
|
+
return _context.stop();
|
51
49
|
}
|
52
50
|
}, _callee);
|
53
51
|
}));
|
@@ -66,21 +64,19 @@ exports.getCommonCount = getCommonCount;
|
|
66
64
|
var getComponents = /*#__PURE__*/function () {
|
67
65
|
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(code) {
|
68
66
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
69
|
-
while (1) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
return _context2.stop();
|
83
|
-
}
|
67
|
+
while (1) switch (_context2.prev = _context2.next) {
|
68
|
+
case 0:
|
69
|
+
_context2.next = 2;
|
70
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getComponents', {
|
71
|
+
code: code
|
72
|
+
});
|
73
|
+
|
74
|
+
case 2:
|
75
|
+
return _context2.abrupt("return", _context2.sent);
|
76
|
+
|
77
|
+
case 3:
|
78
|
+
case "end":
|
79
|
+
return _context2.stop();
|
84
80
|
}
|
85
81
|
}, _callee2);
|
86
82
|
}));
|
@@ -99,19 +95,17 @@ exports.getComponents = getComponents;
|
|
99
95
|
var getAllRelationType = /*#__PURE__*/function () {
|
100
96
|
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
101
97
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
102
|
-
while (1) {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
return _context3.stop();
|
114
|
-
}
|
98
|
+
while (1) switch (_context3.prev = _context3.next) {
|
99
|
+
case 0:
|
100
|
+
_context3.next = 2;
|
101
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getAllRelationType');
|
102
|
+
|
103
|
+
case 2:
|
104
|
+
return _context3.abrupt("return", _context3.sent);
|
105
|
+
|
106
|
+
case 3:
|
107
|
+
case "end":
|
108
|
+
return _context3.stop();
|
115
109
|
}
|
116
110
|
}, _callee3);
|
117
111
|
}));
|
@@ -131,21 +125,19 @@ exports.getAllRelationType = getAllRelationType;
|
|
131
125
|
var getCiTypes = /*#__PURE__*/function () {
|
132
126
|
var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(moduleName) {
|
133
127
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
134
|
-
while (1) {
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
return _context4.stop();
|
148
|
-
}
|
128
|
+
while (1) switch (_context4.prev = _context4.next) {
|
129
|
+
case 0:
|
130
|
+
_context4.next = 2;
|
131
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getCiTypes', {
|
132
|
+
moduleName: moduleName
|
133
|
+
});
|
134
|
+
|
135
|
+
case 2:
|
136
|
+
return _context4.abrupt("return", _context4.sent);
|
137
|
+
|
138
|
+
case 3:
|
139
|
+
case "end":
|
140
|
+
return _context4.stop();
|
149
141
|
}
|
150
142
|
}, _callee4);
|
151
143
|
}));
|
@@ -164,19 +156,17 @@ exports.getCiTypes = getCiTypes;
|
|
164
156
|
var dragTree = /*#__PURE__*/function () {
|
165
157
|
var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(param) {
|
166
158
|
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
167
|
-
while (1) {
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
return _context5.stop();
|
179
|
-
}
|
159
|
+
while (1) switch (_context5.prev = _context5.next) {
|
160
|
+
case 0:
|
161
|
+
_context5.next = 2;
|
162
|
+
return _componentTopologyUtils.request.post('/model/v1/api/dragTree', param);
|
163
|
+
|
164
|
+
case 2:
|
165
|
+
return _context5.abrupt("return", _context5.sent);
|
166
|
+
|
167
|
+
case 3:
|
168
|
+
case "end":
|
169
|
+
return _context5.stop();
|
180
170
|
}
|
181
171
|
}, _callee5);
|
182
172
|
}));
|
@@ -195,19 +185,17 @@ exports.dragTree = dragTree;
|
|
195
185
|
var getModelTree = /*#__PURE__*/function () {
|
196
186
|
var _ref6 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
197
187
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
198
|
-
while (1) {
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
return _context6.stop();
|
210
|
-
}
|
188
|
+
while (1) switch (_context6.prev = _context6.next) {
|
189
|
+
case 0:
|
190
|
+
_context6.next = 2;
|
191
|
+
return _componentTopologyUtils.request.post('/mdc/v1/api/model-asset/tree');
|
192
|
+
|
193
|
+
case 2:
|
194
|
+
return _context6.abrupt("return", _context6.sent);
|
195
|
+
|
196
|
+
case 3:
|
197
|
+
case "end":
|
198
|
+
return _context6.stop();
|
211
199
|
}
|
212
200
|
}, _callee6);
|
213
201
|
}));
|
@@ -234,19 +222,17 @@ exports.getModelTree = getModelTree;
|
|
234
222
|
var verify = /*#__PURE__*/function () {
|
235
223
|
var _ref7 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(param) {
|
236
224
|
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
237
|
-
while (1) {
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
return _context7.stop();
|
249
|
-
}
|
225
|
+
while (1) switch (_context7.prev = _context7.next) {
|
226
|
+
case 0:
|
227
|
+
_context7.next = 2;
|
228
|
+
return _componentTopologyUtils.request.post('/model/v1/api/verify', param);
|
229
|
+
|
230
|
+
case 2:
|
231
|
+
return _context7.abrupt("return", _context7.sent);
|
232
|
+
|
233
|
+
case 3:
|
234
|
+
case "end":
|
235
|
+
return _context7.stop();
|
250
236
|
}
|
251
237
|
}, _callee7);
|
252
238
|
}));
|
@@ -265,21 +251,19 @@ exports.verify = verify;
|
|
265
251
|
var getCiMetric = /*#__PURE__*/function () {
|
266
252
|
var _ref8 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(ciCode) {
|
267
253
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
268
|
-
while (1) {
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
return _context8.stop();
|
282
|
-
}
|
254
|
+
while (1) switch (_context8.prev = _context8.next) {
|
255
|
+
case 0:
|
256
|
+
_context8.next = 2;
|
257
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getCiMetric', {
|
258
|
+
ciCode: ciCode
|
259
|
+
});
|
260
|
+
|
261
|
+
case 2:
|
262
|
+
return _context8.abrupt("return", _context8.sent);
|
263
|
+
|
264
|
+
case 3:
|
265
|
+
case "end":
|
266
|
+
return _context8.stop();
|
283
267
|
}
|
284
268
|
}, _callee8);
|
285
269
|
}));
|
@@ -299,19 +283,17 @@ exports.getCiMetric = getCiMetric;
|
|
299
283
|
var getDomains = /*#__PURE__*/function () {
|
300
284
|
var _ref9 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
301
285
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
302
|
-
while (1) {
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
return _context9.stop();
|
314
|
-
}
|
286
|
+
while (1) switch (_context9.prev = _context9.next) {
|
287
|
+
case 0:
|
288
|
+
_context9.next = 2;
|
289
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getDomains');
|
290
|
+
|
291
|
+
case 2:
|
292
|
+
return _context9.abrupt("return", _context9.sent);
|
293
|
+
|
294
|
+
case 3:
|
295
|
+
case "end":
|
296
|
+
return _context9.stop();
|
315
297
|
}
|
316
298
|
}, _callee9);
|
317
299
|
}));
|
@@ -334,19 +316,17 @@ exports.getDomains = getDomains;
|
|
334
316
|
var getRelation = /*#__PURE__*/function () {
|
335
317
|
var _ref10 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(params) {
|
336
318
|
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
337
|
-
while (1) {
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
return _context10.stop();
|
349
|
-
}
|
319
|
+
while (1) switch (_context10.prev = _context10.next) {
|
320
|
+
case 0:
|
321
|
+
_context10.next = 2;
|
322
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getRelation', params);
|
323
|
+
|
324
|
+
case 2:
|
325
|
+
return _context10.abrupt("return", _context10.sent);
|
326
|
+
|
327
|
+
case 3:
|
328
|
+
case "end":
|
329
|
+
return _context10.stop();
|
350
330
|
}
|
351
331
|
}, _callee10);
|
352
332
|
}));
|
@@ -366,19 +346,17 @@ exports.getRelation = getRelation;
|
|
366
346
|
var createRelation = /*#__PURE__*/function () {
|
367
347
|
var _ref11 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(params) {
|
368
348
|
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
369
|
-
while (1) {
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
return _context11.stop();
|
381
|
-
}
|
349
|
+
while (1) switch (_context11.prev = _context11.next) {
|
350
|
+
case 0:
|
351
|
+
_context11.next = 2;
|
352
|
+
return _componentTopologyUtils.request.post('/model/v1/api/createRelation', params);
|
353
|
+
|
354
|
+
case 2:
|
355
|
+
return _context11.abrupt("return", _context11.sent);
|
356
|
+
|
357
|
+
case 3:
|
358
|
+
case "end":
|
359
|
+
return _context11.stop();
|
382
360
|
}
|
383
361
|
}, _callee11);
|
384
362
|
}));
|
@@ -398,19 +376,17 @@ exports.createRelation = createRelation;
|
|
398
376
|
var updateRelation = /*#__PURE__*/function () {
|
399
377
|
var _ref12 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(params) {
|
400
378
|
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
401
|
-
while (1) {
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
return _context12.stop();
|
413
|
-
}
|
379
|
+
while (1) switch (_context12.prev = _context12.next) {
|
380
|
+
case 0:
|
381
|
+
_context12.next = 2;
|
382
|
+
return _componentTopologyUtils.request.post('/model/v1/api/updateRelation', params);
|
383
|
+
|
384
|
+
case 2:
|
385
|
+
return _context12.abrupt("return", _context12.sent);
|
386
|
+
|
387
|
+
case 3:
|
388
|
+
case "end":
|
389
|
+
return _context12.stop();
|
414
390
|
}
|
415
391
|
}, _callee12);
|
416
392
|
}));
|
@@ -444,19 +420,17 @@ exports.updateRelation = updateRelation;
|
|
444
420
|
var deleteRelation = /*#__PURE__*/function () {
|
445
421
|
var _ref13 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(params) {
|
446
422
|
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
447
|
-
while (1) {
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
return _context13.stop();
|
459
|
-
}
|
423
|
+
while (1) switch (_context13.prev = _context13.next) {
|
424
|
+
case 0:
|
425
|
+
_context13.next = 2;
|
426
|
+
return _componentTopologyUtils.request.post('/model/v1/api/deleteRelation', params);
|
427
|
+
|
428
|
+
case 2:
|
429
|
+
return _context13.abrupt("return", _context13.sent);
|
430
|
+
|
431
|
+
case 3:
|
432
|
+
case "end":
|
433
|
+
return _context13.stop();
|
460
434
|
}
|
461
435
|
}, _callee13);
|
462
436
|
}));
|
@@ -511,19 +485,17 @@ exports.deleteRelation = deleteRelation;
|
|
511
485
|
var getCiAttributeDict = /*#__PURE__*/function () {
|
512
486
|
var _ref14 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(param) {
|
513
487
|
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
514
|
-
while (1) {
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
return _context14.stop();
|
526
|
-
}
|
488
|
+
while (1) switch (_context14.prev = _context14.next) {
|
489
|
+
case 0:
|
490
|
+
_context14.next = 2;
|
491
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getCiAttributeDict', param);
|
492
|
+
|
493
|
+
case 2:
|
494
|
+
return _context14.abrupt("return", _context14.sent);
|
495
|
+
|
496
|
+
case 3:
|
497
|
+
case "end":
|
498
|
+
return _context14.stop();
|
527
499
|
}
|
528
500
|
}, _callee14);
|
529
501
|
}));
|
@@ -573,26 +545,24 @@ function _getUserDicts() {
|
|
573
545
|
_getUserDicts = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee29(codes) {
|
574
546
|
var dicts, userDict;
|
575
547
|
return _regenerator["default"].wrap(function _callee29$(_context29) {
|
576
|
-
while (1) {
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
return _context29.stop();
|
595
|
-
}
|
548
|
+
while (1) switch (_context29.prev = _context29.next) {
|
549
|
+
case 0:
|
550
|
+
_context29.next = 2;
|
551
|
+
return getCiAttributeDict({
|
552
|
+
ciCode: codes
|
553
|
+
});
|
554
|
+
|
555
|
+
case 2:
|
556
|
+
dicts = _context29.sent;
|
557
|
+
userDict = dicts.reduce(function (map, obj) {
|
558
|
+
map[obj.attributeCode] = obj.dict.items;
|
559
|
+
return map;
|
560
|
+
}, {});
|
561
|
+
return _context29.abrupt("return", userDict);
|
562
|
+
|
563
|
+
case 5:
|
564
|
+
case "end":
|
565
|
+
return _context29.stop();
|
596
566
|
}
|
597
567
|
}, _callee29);
|
598
568
|
}));
|
@@ -602,21 +572,19 @@ function _getUserDicts() {
|
|
602
572
|
var queryDict = /*#__PURE__*/function () {
|
603
573
|
var _ref15 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(code) {
|
604
574
|
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
605
|
-
while (1) {
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
return _context15.stop();
|
619
|
-
}
|
575
|
+
while (1) switch (_context15.prev = _context15.next) {
|
576
|
+
case 0:
|
577
|
+
_context15.next = 2;
|
578
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getDict', {
|
579
|
+
code: code
|
580
|
+
});
|
581
|
+
|
582
|
+
case 2:
|
583
|
+
return _context15.abrupt("return", _context15.sent);
|
584
|
+
|
585
|
+
case 3:
|
586
|
+
case "end":
|
587
|
+
return _context15.stop();
|
620
588
|
}
|
621
589
|
}, _callee15);
|
622
590
|
}));
|
@@ -639,23 +607,21 @@ exports.queryDict = queryDict;
|
|
639
607
|
var queryVendors = /*#__PURE__*/function () {
|
640
608
|
var _ref16 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(vendorKeys) {
|
641
609
|
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
642
|
-
while (1) {
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
return
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
}));
|
610
|
+
while (1) switch (_context16.prev = _context16.next) {
|
611
|
+
case 0:
|
612
|
+
_context16.next = 2;
|
613
|
+
return Promise.all(vendorKeys.map(function (vendor) {
|
614
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getDict', {
|
615
|
+
vendor: vendor
|
616
|
+
});
|
617
|
+
}));
|
651
618
|
|
652
|
-
|
653
|
-
|
619
|
+
case 2:
|
620
|
+
return _context16.abrupt("return", _context16.sent);
|
654
621
|
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
}
|
622
|
+
case 3:
|
623
|
+
case "end":
|
624
|
+
return _context16.stop();
|
659
625
|
}
|
660
626
|
}, _callee16);
|
661
627
|
}));
|
@@ -699,23 +665,21 @@ exports.queryVendors = queryVendors;
|
|
699
665
|
var queryDicts = /*#__PURE__*/function () {
|
700
666
|
var _ref17 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee17(source) {
|
701
667
|
return _regenerator["default"].wrap(function _callee17$(_context17) {
|
702
|
-
while (1) {
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
}
|
668
|
+
while (1) switch (_context17.prev = _context17.next) {
|
669
|
+
case 0:
|
670
|
+
if (source === void 0) {
|
671
|
+
source = null;
|
672
|
+
}
|
708
673
|
|
709
|
-
|
710
|
-
|
674
|
+
_context17.next = 3;
|
675
|
+
return (0, _mdc.modelDictList)();
|
711
676
|
|
712
|
-
|
713
|
-
|
677
|
+
case 3:
|
678
|
+
return _context17.abrupt("return", _context17.sent);
|
714
679
|
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
}
|
680
|
+
case 4:
|
681
|
+
case "end":
|
682
|
+
return _context17.stop();
|
719
683
|
}
|
720
684
|
}, _callee17);
|
721
685
|
}));
|
@@ -762,19 +726,17 @@ exports.queryDicts = queryDicts;
|
|
762
726
|
var createDict = /*#__PURE__*/function () {
|
763
727
|
var _ref18 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee18(param) {
|
764
728
|
return _regenerator["default"].wrap(function _callee18$(_context18) {
|
765
|
-
while (1) {
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
return _context18.stop();
|
777
|
-
}
|
729
|
+
while (1) switch (_context18.prev = _context18.next) {
|
730
|
+
case 0:
|
731
|
+
_context18.next = 2;
|
732
|
+
return _componentTopologyUtils.request.post('/model/v1/api/createDict', param);
|
733
|
+
|
734
|
+
case 2:
|
735
|
+
return _context18.abrupt("return", _context18.sent);
|
736
|
+
|
737
|
+
case 3:
|
738
|
+
case "end":
|
739
|
+
return _context18.stop();
|
778
740
|
}
|
779
741
|
}, _callee18);
|
780
742
|
}));
|
@@ -814,19 +776,17 @@ exports.createDict = createDict;
|
|
814
776
|
var updateDict = /*#__PURE__*/function () {
|
815
777
|
var _ref19 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee19(param) {
|
816
778
|
return _regenerator["default"].wrap(function _callee19$(_context19) {
|
817
|
-
while (1) {
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
return _context19.stop();
|
829
|
-
}
|
779
|
+
while (1) switch (_context19.prev = _context19.next) {
|
780
|
+
case 0:
|
781
|
+
_context19.next = 2;
|
782
|
+
return _componentTopologyUtils.request.post('/model/v1/api/updateDict', param);
|
783
|
+
|
784
|
+
case 2:
|
785
|
+
return _context19.abrupt("return", _context19.sent);
|
786
|
+
|
787
|
+
case 3:
|
788
|
+
case "end":
|
789
|
+
return _context19.stop();
|
830
790
|
}
|
831
791
|
}, _callee19);
|
832
792
|
}));
|
@@ -857,21 +817,19 @@ exports.updateDict = updateDict;
|
|
857
817
|
var deleteDict = /*#__PURE__*/function () {
|
858
818
|
var _ref20 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee20(id) {
|
859
819
|
return _regenerator["default"].wrap(function _callee20$(_context20) {
|
860
|
-
while (1) {
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
return _context20.stop();
|
874
|
-
}
|
820
|
+
while (1) switch (_context20.prev = _context20.next) {
|
821
|
+
case 0:
|
822
|
+
_context20.next = 2;
|
823
|
+
return _componentTopologyUtils.request.post('/model/v1/api/deleteDict', {
|
824
|
+
id: id
|
825
|
+
});
|
826
|
+
|
827
|
+
case 2:
|
828
|
+
return _context20.abrupt("return", _context20.sent);
|
829
|
+
|
830
|
+
case 3:
|
831
|
+
case "end":
|
832
|
+
return _context20.stop();
|
875
833
|
}
|
876
834
|
}, _callee20);
|
877
835
|
}));
|
@@ -899,19 +857,17 @@ exports.deleteDict = deleteDict;
|
|
899
857
|
var getCiExtends = /*#__PURE__*/function () {
|
900
858
|
var _ref21 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee21(param) {
|
901
859
|
return _regenerator["default"].wrap(function _callee21$(_context21) {
|
902
|
-
while (1) {
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
return _context21.stop();
|
914
|
-
}
|
860
|
+
while (1) switch (_context21.prev = _context21.next) {
|
861
|
+
case 0:
|
862
|
+
_context21.next = 2;
|
863
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getCiExtends', param);
|
864
|
+
|
865
|
+
case 2:
|
866
|
+
return _context21.abrupt("return", _context21.sent);
|
867
|
+
|
868
|
+
case 3:
|
869
|
+
case "end":
|
870
|
+
return _context21.stop();
|
915
871
|
}
|
916
872
|
}, _callee21);
|
917
873
|
}));
|
@@ -935,44 +891,42 @@ var getCi = /*#__PURE__*/function () {
|
|
935
891
|
var _ref22 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee22(code, userVisibleFilter, dict) {
|
936
892
|
var meta;
|
937
893
|
return _regenerator["default"].wrap(function _callee22$(_context22) {
|
938
|
-
while (1) {
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
return _context22.stop();
|
975
|
-
}
|
894
|
+
while (1) switch (_context22.prev = _context22.next) {
|
895
|
+
case 0:
|
896
|
+
if (userVisibleFilter === void 0) {
|
897
|
+
userVisibleFilter = true;
|
898
|
+
}
|
899
|
+
|
900
|
+
if (dict === void 0) {
|
901
|
+
dict = true;
|
902
|
+
}
|
903
|
+
|
904
|
+
_context22.next = 4;
|
905
|
+
return formatCiAttributes(code, userVisibleFilter);
|
906
|
+
|
907
|
+
case 4:
|
908
|
+
meta = _context22.sent;
|
909
|
+
|
910
|
+
if (!dict) {
|
911
|
+
_context22.next = 14;
|
912
|
+
break;
|
913
|
+
}
|
914
|
+
|
915
|
+
_context22.prev = 6;
|
916
|
+
return _context22.abrupt("return", bindDict(meta));
|
917
|
+
|
918
|
+
case 10:
|
919
|
+
_context22.prev = 10;
|
920
|
+
_context22.t0 = _context22["catch"](6);
|
921
|
+
console.error(_context22.t0);
|
922
|
+
return _context22.abrupt("return", meta);
|
923
|
+
|
924
|
+
case 14:
|
925
|
+
return _context22.abrupt("return", meta);
|
926
|
+
|
927
|
+
case 15:
|
928
|
+
case "end":
|
929
|
+
return _context22.stop();
|
976
930
|
}
|
977
931
|
}, _callee22, null, [[6, 10]]);
|
978
932
|
}));
|
@@ -992,19 +946,17 @@ exports.getCi = getCi;
|
|
992
946
|
var updateCi = /*#__PURE__*/function () {
|
993
947
|
var _ref23 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee23(data) {
|
994
948
|
return _regenerator["default"].wrap(function _callee23$(_context23) {
|
995
|
-
while (1) {
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
return _context23.stop();
|
1007
|
-
}
|
949
|
+
while (1) switch (_context23.prev = _context23.next) {
|
950
|
+
case 0:
|
951
|
+
_context23.next = 2;
|
952
|
+
return _componentTopologyUtils.request.post('/model/v1/api/updateCi', data);
|
953
|
+
|
954
|
+
case 2:
|
955
|
+
return _context23.abrupt("return", _context23.sent);
|
956
|
+
|
957
|
+
case 3:
|
958
|
+
case "end":
|
959
|
+
return _context23.stop();
|
1008
960
|
}
|
1009
961
|
}, _callee23);
|
1010
962
|
}));
|
@@ -1049,19 +1001,17 @@ exports.updateCi = updateCi;
|
|
1049
1001
|
var createCi = /*#__PURE__*/function () {
|
1050
1002
|
var _ref24 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee24(data) {
|
1051
1003
|
return _regenerator["default"].wrap(function _callee24$(_context24) {
|
1052
|
-
while (1) {
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
return _context24.stop();
|
1064
|
-
}
|
1004
|
+
while (1) switch (_context24.prev = _context24.next) {
|
1005
|
+
case 0:
|
1006
|
+
_context24.next = 2;
|
1007
|
+
return _componentTopologyUtils.request.post('/model/v1/api/createCi', data);
|
1008
|
+
|
1009
|
+
case 2:
|
1010
|
+
return _context24.abrupt("return", _context24.sent);
|
1011
|
+
|
1012
|
+
case 3:
|
1013
|
+
case "end":
|
1014
|
+
return _context24.stop();
|
1065
1015
|
}
|
1066
1016
|
}, _callee24);
|
1067
1017
|
}));
|
@@ -1081,19 +1031,17 @@ exports.createCi = createCi;
|
|
1081
1031
|
var deleteCi = /*#__PURE__*/function () {
|
1082
1032
|
var _ref25 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee25(param) {
|
1083
1033
|
return _regenerator["default"].wrap(function _callee25$(_context25) {
|
1084
|
-
while (1) {
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
return _context25.stop();
|
1096
|
-
}
|
1034
|
+
while (1) switch (_context25.prev = _context25.next) {
|
1035
|
+
case 0:
|
1036
|
+
_context25.next = 2;
|
1037
|
+
return _componentTopologyUtils.request.post('/model/v1/api/deleteCi', param);
|
1038
|
+
|
1039
|
+
case 2:
|
1040
|
+
return _context25.abrupt("return", _context25.sent);
|
1041
|
+
|
1042
|
+
case 3:
|
1043
|
+
case "end":
|
1044
|
+
return _context25.stop();
|
1097
1045
|
}
|
1098
1046
|
}, _callee25);
|
1099
1047
|
}));
|
@@ -1113,19 +1061,17 @@ exports.deleteCi = deleteCi;
|
|
1113
1061
|
var getAllCi = /*#__PURE__*/function () {
|
1114
1062
|
var _ref26 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee26(params) {
|
1115
1063
|
return _regenerator["default"].wrap(function _callee26$(_context26) {
|
1116
|
-
while (1) {
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
return _context26.stop();
|
1128
|
-
}
|
1064
|
+
while (1) switch (_context26.prev = _context26.next) {
|
1065
|
+
case 0:
|
1066
|
+
_context26.next = 2;
|
1067
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getAllCi', params);
|
1068
|
+
|
1069
|
+
case 2:
|
1070
|
+
return _context26.abrupt("return", _context26.sent);
|
1071
|
+
|
1072
|
+
case 3:
|
1073
|
+
case "end":
|
1074
|
+
return _context26.stop();
|
1129
1075
|
}
|
1130
1076
|
}, _callee26);
|
1131
1077
|
}));
|
@@ -1155,19 +1101,17 @@ function getCiMeta(_x27) {
|
|
1155
1101
|
function _getCiMeta() {
|
1156
1102
|
_getCiMeta = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee30(code) {
|
1157
1103
|
return _regenerator["default"].wrap(function _callee30$(_context30) {
|
1158
|
-
while (1) {
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
return _context30.stop();
|
1170
|
-
}
|
1104
|
+
while (1) switch (_context30.prev = _context30.next) {
|
1105
|
+
case 0:
|
1106
|
+
_context30.next = 2;
|
1107
|
+
return _componentTopologyUtils.request.get("/mdc/v1/api/model-asset/" + code);
|
1108
|
+
|
1109
|
+
case 2:
|
1110
|
+
return _context30.abrupt("return", _context30.sent);
|
1111
|
+
|
1112
|
+
case 3:
|
1113
|
+
case "end":
|
1114
|
+
return _context30.stop();
|
1171
1115
|
}
|
1172
1116
|
}, _callee30);
|
1173
1117
|
}));
|
@@ -1183,54 +1127,52 @@ function _formatCiAttributes() {
|
|
1183
1127
|
_formatCiAttributes = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee31(code, userVisibleFilter) {
|
1184
1128
|
var meta, attributes;
|
1185
1129
|
return _regenerator["default"].wrap(function _callee31$(_context31) {
|
1186
|
-
while (1) {
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
});
|
1220
|
-
}
|
1221
|
-
} catch (error) {
|
1222
|
-
_rlog["default"].error('services=>model=>:', error);
|
1130
|
+
while (1) switch (_context31.prev = _context31.next) {
|
1131
|
+
case 0:
|
1132
|
+
_context31.next = 2;
|
1133
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getCi', {
|
1134
|
+
code: code
|
1135
|
+
});
|
1136
|
+
|
1137
|
+
case 2:
|
1138
|
+
meta = _context31.sent;
|
1139
|
+
|
1140
|
+
if (!meta) {
|
1141
|
+
_context31.next = 9;
|
1142
|
+
break;
|
1143
|
+
}
|
1144
|
+
|
1145
|
+
attributes = meta.attributes;
|
1146
|
+
|
1147
|
+
if (attributes) {
|
1148
|
+
_context31.next = 7;
|
1149
|
+
break;
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
return _context31.abrupt("return", meta);
|
1153
|
+
|
1154
|
+
case 7:
|
1155
|
+
try {
|
1156
|
+
// 适配后端,使属性正序
|
1157
|
+
attributes = attributes.reverse(); // 获取过滤userVisible=true的属性(用户可见)
|
1158
|
+
|
1159
|
+
if (userVisibleFilter) {
|
1160
|
+
meta.attributes = attributes.filter(function (item) {
|
1161
|
+
return item.userVisible === 'true';
|
1162
|
+
});
|
1223
1163
|
}
|
1164
|
+
} catch (error) {
|
1165
|
+
_rlog["default"].error('services=>model=>:', error);
|
1166
|
+
}
|
1224
1167
|
|
1225
|
-
|
1168
|
+
return _context31.abrupt("return", meta);
|
1226
1169
|
|
1227
|
-
|
1228
|
-
|
1170
|
+
case 9:
|
1171
|
+
return _context31.abrupt("return", meta);
|
1229
1172
|
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
}
|
1173
|
+
case 10:
|
1174
|
+
case "end":
|
1175
|
+
return _context31.stop();
|
1234
1176
|
}
|
1235
1177
|
}, _callee31);
|
1236
1178
|
}));
|
@@ -1287,35 +1229,33 @@ function queryAllModel(_x30) {
|
|
1287
1229
|
function _queryAllModel() {
|
1288
1230
|
_queryAllModel = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee32(isAuth) {
|
1289
1231
|
return _regenerator["default"].wrap(function _callee32$(_context32) {
|
1290
|
-
while (1) {
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
}
|
1232
|
+
while (1) switch (_context32.prev = _context32.next) {
|
1233
|
+
case 0:
|
1234
|
+
if (isAuth === void 0) {
|
1235
|
+
isAuth = false;
|
1236
|
+
}
|
1296
1237
|
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1238
|
+
if (!isAuth) {
|
1239
|
+
_context32.next = 5;
|
1240
|
+
break;
|
1241
|
+
}
|
1301
1242
|
|
1302
|
-
|
1303
|
-
|
1243
|
+
_context32.next = 4;
|
1244
|
+
return _componentTopologyUtils.request.post('/model/v1/api/authority/modelTree');
|
1304
1245
|
|
1305
|
-
|
1306
|
-
|
1246
|
+
case 4:
|
1247
|
+
return _context32.abrupt("return", _context32.sent);
|
1307
1248
|
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1249
|
+
case 5:
|
1250
|
+
_context32.next = 7;
|
1251
|
+
return _componentTopologyUtils.request.get('/mdc/v1/api/model-asset/tree');
|
1311
1252
|
|
1312
|
-
|
1313
|
-
|
1253
|
+
case 7:
|
1254
|
+
return _context32.abrupt("return", _context32.sent);
|
1314
1255
|
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
}
|
1256
|
+
case 8:
|
1257
|
+
case "end":
|
1258
|
+
return _context32.stop();
|
1319
1259
|
}
|
1320
1260
|
}, _callee32);
|
1321
1261
|
}));
|
@@ -1325,21 +1265,19 @@ function _queryAllModel() {
|
|
1325
1265
|
var getBatchCi = /*#__PURE__*/function () {
|
1326
1266
|
var _ref27 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee27(typeCodes) {
|
1327
1267
|
return _regenerator["default"].wrap(function _callee27$(_context27) {
|
1328
|
-
while (1) {
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
return _context27.stop();
|
1342
|
-
}
|
1268
|
+
while (1) switch (_context27.prev = _context27.next) {
|
1269
|
+
case 0:
|
1270
|
+
_context27.next = 2;
|
1271
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getBatchCi', {
|
1272
|
+
typeCodes: typeCodes
|
1273
|
+
});
|
1274
|
+
|
1275
|
+
case 2:
|
1276
|
+
return _context27.abrupt("return", _context27.sent);
|
1277
|
+
|
1278
|
+
case 3:
|
1279
|
+
case "end":
|
1280
|
+
return _context27.stop();
|
1343
1281
|
}
|
1344
1282
|
}, _callee27);
|
1345
1283
|
}));
|
@@ -1358,21 +1296,19 @@ exports.getBatchCi = getBatchCi;
|
|
1358
1296
|
var getBatchCiMetric = /*#__PURE__*/function () {
|
1359
1297
|
var _ref28 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee28(typeCodes) {
|
1360
1298
|
return _regenerator["default"].wrap(function _callee28$(_context28) {
|
1361
|
-
while (1) {
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
return _context28.stop();
|
1375
|
-
}
|
1299
|
+
while (1) switch (_context28.prev = _context28.next) {
|
1300
|
+
case 0:
|
1301
|
+
_context28.next = 2;
|
1302
|
+
return _componentTopologyUtils.request.post('/model/v1/api/getBatchCiMetric', {
|
1303
|
+
typeCodes: typeCodes
|
1304
|
+
});
|
1305
|
+
|
1306
|
+
case 2:
|
1307
|
+
return _context28.abrupt("return", _context28.sent);
|
1308
|
+
|
1309
|
+
case 3:
|
1310
|
+
case "end":
|
1311
|
+
return _context28.stop();
|
1376
1312
|
}
|
1377
1313
|
}, _callee28);
|
1378
1314
|
}));
|