@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
@@ -13,22 +13,20 @@ import { modelDictList } from "./mdc";
|
|
13
13
|
export var getCommonCount = /*#__PURE__*/function () {
|
14
14
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
|
15
15
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
16
|
-
while (1) {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
return _context.stop();
|
31
|
-
}
|
16
|
+
while (1) switch (_context.prev = _context.next) {
|
17
|
+
case 0:
|
18
|
+
_context.next = 2;
|
19
|
+
return request.post('/cmdb/v1/api/ci/commonCount', {
|
20
|
+
condition: "\"principal(type('" + code + "'))\"",
|
21
|
+
groupKeys: ['ci_type']
|
22
|
+
});
|
23
|
+
|
24
|
+
case 2:
|
25
|
+
return _context.abrupt("return", _context.sent);
|
26
|
+
|
27
|
+
case 3:
|
28
|
+
case "end":
|
29
|
+
return _context.stop();
|
32
30
|
}
|
33
31
|
}, _callee);
|
34
32
|
}));
|
@@ -44,21 +42,19 @@ export var getCommonCount = /*#__PURE__*/function () {
|
|
44
42
|
export var getComponents = /*#__PURE__*/function () {
|
45
43
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(code) {
|
46
44
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
47
|
-
while (1) {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
return _context2.stop();
|
61
|
-
}
|
45
|
+
while (1) switch (_context2.prev = _context2.next) {
|
46
|
+
case 0:
|
47
|
+
_context2.next = 2;
|
48
|
+
return request.post('/model/v1/api/getComponents', {
|
49
|
+
code: code
|
50
|
+
});
|
51
|
+
|
52
|
+
case 2:
|
53
|
+
return _context2.abrupt("return", _context2.sent);
|
54
|
+
|
55
|
+
case 3:
|
56
|
+
case "end":
|
57
|
+
return _context2.stop();
|
62
58
|
}
|
63
59
|
}, _callee2);
|
64
60
|
}));
|
@@ -74,19 +70,17 @@ export var getComponents = /*#__PURE__*/function () {
|
|
74
70
|
export var getAllRelationType = /*#__PURE__*/function () {
|
75
71
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
76
72
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
77
|
-
while (1) {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
return _context3.stop();
|
89
|
-
}
|
73
|
+
while (1) switch (_context3.prev = _context3.next) {
|
74
|
+
case 0:
|
75
|
+
_context3.next = 2;
|
76
|
+
return request.post('/model/v1/api/getAllRelationType');
|
77
|
+
|
78
|
+
case 2:
|
79
|
+
return _context3.abrupt("return", _context3.sent);
|
80
|
+
|
81
|
+
case 3:
|
82
|
+
case "end":
|
83
|
+
return _context3.stop();
|
90
84
|
}
|
91
85
|
}, _callee3);
|
92
86
|
}));
|
@@ -103,21 +97,19 @@ export var getAllRelationType = /*#__PURE__*/function () {
|
|
103
97
|
export var getCiTypes = /*#__PURE__*/function () {
|
104
98
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(moduleName) {
|
105
99
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
106
|
-
while (1) {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
return _context4.stop();
|
120
|
-
}
|
100
|
+
while (1) switch (_context4.prev = _context4.next) {
|
101
|
+
case 0:
|
102
|
+
_context4.next = 2;
|
103
|
+
return request.post('/model/v1/api/getCiTypes', {
|
104
|
+
moduleName: moduleName
|
105
|
+
});
|
106
|
+
|
107
|
+
case 2:
|
108
|
+
return _context4.abrupt("return", _context4.sent);
|
109
|
+
|
110
|
+
case 3:
|
111
|
+
case "end":
|
112
|
+
return _context4.stop();
|
121
113
|
}
|
122
114
|
}, _callee4);
|
123
115
|
}));
|
@@ -133,19 +125,17 @@ export var getCiTypes = /*#__PURE__*/function () {
|
|
133
125
|
export var dragTree = /*#__PURE__*/function () {
|
134
126
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(param) {
|
135
127
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
136
|
-
while (1) {
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
return _context5.stop();
|
148
|
-
}
|
128
|
+
while (1) switch (_context5.prev = _context5.next) {
|
129
|
+
case 0:
|
130
|
+
_context5.next = 2;
|
131
|
+
return request.post('/model/v1/api/dragTree', param);
|
132
|
+
|
133
|
+
case 2:
|
134
|
+
return _context5.abrupt("return", _context5.sent);
|
135
|
+
|
136
|
+
case 3:
|
137
|
+
case "end":
|
138
|
+
return _context5.stop();
|
149
139
|
}
|
150
140
|
}, _callee5);
|
151
141
|
}));
|
@@ -161,19 +151,17 @@ export var dragTree = /*#__PURE__*/function () {
|
|
161
151
|
export var getModelTree = /*#__PURE__*/function () {
|
162
152
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
163
153
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
164
|
-
while (1) {
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
return _context6.stop();
|
176
|
-
}
|
154
|
+
while (1) switch (_context6.prev = _context6.next) {
|
155
|
+
case 0:
|
156
|
+
_context6.next = 2;
|
157
|
+
return request.post('/mdc/v1/api/model-asset/tree');
|
158
|
+
|
159
|
+
case 2:
|
160
|
+
return _context6.abrupt("return", _context6.sent);
|
161
|
+
|
162
|
+
case 3:
|
163
|
+
case "end":
|
164
|
+
return _context6.stop();
|
177
165
|
}
|
178
166
|
}, _callee6);
|
179
167
|
}));
|
@@ -197,19 +185,17 @@ export var getModelTree = /*#__PURE__*/function () {
|
|
197
185
|
export var verify = /*#__PURE__*/function () {
|
198
186
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(param) {
|
199
187
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
200
|
-
while (1) {
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
return _context7.stop();
|
212
|
-
}
|
188
|
+
while (1) switch (_context7.prev = _context7.next) {
|
189
|
+
case 0:
|
190
|
+
_context7.next = 2;
|
191
|
+
return request.post('/model/v1/api/verify', param);
|
192
|
+
|
193
|
+
case 2:
|
194
|
+
return _context7.abrupt("return", _context7.sent);
|
195
|
+
|
196
|
+
case 3:
|
197
|
+
case "end":
|
198
|
+
return _context7.stop();
|
213
199
|
}
|
214
200
|
}, _callee7);
|
215
201
|
}));
|
@@ -225,21 +211,19 @@ export var verify = /*#__PURE__*/function () {
|
|
225
211
|
export var getCiMetric = /*#__PURE__*/function () {
|
226
212
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(ciCode) {
|
227
213
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
228
|
-
while (1) {
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
return _context8.stop();
|
242
|
-
}
|
214
|
+
while (1) switch (_context8.prev = _context8.next) {
|
215
|
+
case 0:
|
216
|
+
_context8.next = 2;
|
217
|
+
return request.post('/model/v1/api/getCiMetric', {
|
218
|
+
ciCode: ciCode
|
219
|
+
});
|
220
|
+
|
221
|
+
case 2:
|
222
|
+
return _context8.abrupt("return", _context8.sent);
|
223
|
+
|
224
|
+
case 3:
|
225
|
+
case "end":
|
226
|
+
return _context8.stop();
|
243
227
|
}
|
244
228
|
}, _callee8);
|
245
229
|
}));
|
@@ -256,19 +240,17 @@ export var getCiMetric = /*#__PURE__*/function () {
|
|
256
240
|
export var getDomains = /*#__PURE__*/function () {
|
257
241
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
258
242
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
259
|
-
while (1) {
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
return _context9.stop();
|
271
|
-
}
|
243
|
+
while (1) switch (_context9.prev = _context9.next) {
|
244
|
+
case 0:
|
245
|
+
_context9.next = 2;
|
246
|
+
return request.post('/model/v1/api/getDomains');
|
247
|
+
|
248
|
+
case 2:
|
249
|
+
return _context9.abrupt("return", _context9.sent);
|
250
|
+
|
251
|
+
case 3:
|
252
|
+
case "end":
|
253
|
+
return _context9.stop();
|
272
254
|
}
|
273
255
|
}, _callee9);
|
274
256
|
}));
|
@@ -288,19 +270,17 @@ export var getDomains = /*#__PURE__*/function () {
|
|
288
270
|
export var getRelation = /*#__PURE__*/function () {
|
289
271
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(params) {
|
290
272
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
291
|
-
while (1) {
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
return _context10.stop();
|
303
|
-
}
|
273
|
+
while (1) switch (_context10.prev = _context10.next) {
|
274
|
+
case 0:
|
275
|
+
_context10.next = 2;
|
276
|
+
return request.post('/model/v1/api/getRelation', params);
|
277
|
+
|
278
|
+
case 2:
|
279
|
+
return _context10.abrupt("return", _context10.sent);
|
280
|
+
|
281
|
+
case 3:
|
282
|
+
case "end":
|
283
|
+
return _context10.stop();
|
304
284
|
}
|
305
285
|
}, _callee10);
|
306
286
|
}));
|
@@ -317,19 +297,17 @@ export var getRelation = /*#__PURE__*/function () {
|
|
317
297
|
export var createRelation = /*#__PURE__*/function () {
|
318
298
|
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(params) {
|
319
299
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
320
|
-
while (1) {
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
return _context11.stop();
|
332
|
-
}
|
300
|
+
while (1) switch (_context11.prev = _context11.next) {
|
301
|
+
case 0:
|
302
|
+
_context11.next = 2;
|
303
|
+
return request.post('/model/v1/api/createRelation', params);
|
304
|
+
|
305
|
+
case 2:
|
306
|
+
return _context11.abrupt("return", _context11.sent);
|
307
|
+
|
308
|
+
case 3:
|
309
|
+
case "end":
|
310
|
+
return _context11.stop();
|
333
311
|
}
|
334
312
|
}, _callee11);
|
335
313
|
}));
|
@@ -346,19 +324,17 @@ export var createRelation = /*#__PURE__*/function () {
|
|
346
324
|
export var updateRelation = /*#__PURE__*/function () {
|
347
325
|
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(params) {
|
348
326
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
349
|
-
while (1) {
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
return _context12.stop();
|
361
|
-
}
|
327
|
+
while (1) switch (_context12.prev = _context12.next) {
|
328
|
+
case 0:
|
329
|
+
_context12.next = 2;
|
330
|
+
return request.post('/model/v1/api/updateRelation', params);
|
331
|
+
|
332
|
+
case 2:
|
333
|
+
return _context12.abrupt("return", _context12.sent);
|
334
|
+
|
335
|
+
case 3:
|
336
|
+
case "end":
|
337
|
+
return _context12.stop();
|
362
338
|
}
|
363
339
|
}, _callee12);
|
364
340
|
}));
|
@@ -389,19 +365,17 @@ export var updateRelation = /*#__PURE__*/function () {
|
|
389
365
|
export var deleteRelation = /*#__PURE__*/function () {
|
390
366
|
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(params) {
|
391
367
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
392
|
-
while (1) {
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
return _context13.stop();
|
404
|
-
}
|
368
|
+
while (1) switch (_context13.prev = _context13.next) {
|
369
|
+
case 0:
|
370
|
+
_context13.next = 2;
|
371
|
+
return request.post('/model/v1/api/deleteRelation', params);
|
372
|
+
|
373
|
+
case 2:
|
374
|
+
return _context13.abrupt("return", _context13.sent);
|
375
|
+
|
376
|
+
case 3:
|
377
|
+
case "end":
|
378
|
+
return _context13.stop();
|
405
379
|
}
|
406
380
|
}, _callee13);
|
407
381
|
}));
|
@@ -453,19 +427,17 @@ export var deleteRelation = /*#__PURE__*/function () {
|
|
453
427
|
export var getCiAttributeDict = /*#__PURE__*/function () {
|
454
428
|
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(param) {
|
455
429
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
456
|
-
while (1) {
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
return _context14.stop();
|
468
|
-
}
|
430
|
+
while (1) switch (_context14.prev = _context14.next) {
|
431
|
+
case 0:
|
432
|
+
_context14.next = 2;
|
433
|
+
return request.post('/model/v1/api/getCiAttributeDict', param);
|
434
|
+
|
435
|
+
case 2:
|
436
|
+
return _context14.abrupt("return", _context14.sent);
|
437
|
+
|
438
|
+
case 3:
|
439
|
+
case "end":
|
440
|
+
return _context14.stop();
|
469
441
|
}
|
470
442
|
}, _callee14);
|
471
443
|
}));
|
@@ -511,26 +483,24 @@ function _getUserDicts() {
|
|
511
483
|
_getUserDicts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(codes) {
|
512
484
|
var dicts, userDict;
|
513
485
|
return _regeneratorRuntime.wrap(function _callee29$(_context29) {
|
514
|
-
while (1) {
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
return _context29.stop();
|
533
|
-
}
|
486
|
+
while (1) switch (_context29.prev = _context29.next) {
|
487
|
+
case 0:
|
488
|
+
_context29.next = 2;
|
489
|
+
return getCiAttributeDict({
|
490
|
+
ciCode: codes
|
491
|
+
});
|
492
|
+
|
493
|
+
case 2:
|
494
|
+
dicts = _context29.sent;
|
495
|
+
userDict = dicts.reduce(function (map, obj) {
|
496
|
+
map[obj.attributeCode] = obj.dict.items;
|
497
|
+
return map;
|
498
|
+
}, {});
|
499
|
+
return _context29.abrupt("return", userDict);
|
500
|
+
|
501
|
+
case 5:
|
502
|
+
case "end":
|
503
|
+
return _context29.stop();
|
534
504
|
}
|
535
505
|
}, _callee29);
|
536
506
|
}));
|
@@ -540,21 +510,19 @@ function _getUserDicts() {
|
|
540
510
|
export var queryDict = /*#__PURE__*/function () {
|
541
511
|
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(code) {
|
542
512
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
543
|
-
while (1) {
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
return _context15.stop();
|
557
|
-
}
|
513
|
+
while (1) switch (_context15.prev = _context15.next) {
|
514
|
+
case 0:
|
515
|
+
_context15.next = 2;
|
516
|
+
return request.post('/model/v1/api/getDict', {
|
517
|
+
code: code
|
518
|
+
});
|
519
|
+
|
520
|
+
case 2:
|
521
|
+
return _context15.abrupt("return", _context15.sent);
|
522
|
+
|
523
|
+
case 3:
|
524
|
+
case "end":
|
525
|
+
return _context15.stop();
|
558
526
|
}
|
559
527
|
}, _callee15);
|
560
528
|
}));
|
@@ -574,23 +542,21 @@ export var queryDict = /*#__PURE__*/function () {
|
|
574
542
|
export var queryVendors = /*#__PURE__*/function () {
|
575
543
|
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(vendorKeys) {
|
576
544
|
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
577
|
-
while (1) {
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
return
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
}));
|
545
|
+
while (1) switch (_context16.prev = _context16.next) {
|
546
|
+
case 0:
|
547
|
+
_context16.next = 2;
|
548
|
+
return Promise.all(vendorKeys.map(function (vendor) {
|
549
|
+
return request.post('/model/v1/api/getDict', {
|
550
|
+
vendor: vendor
|
551
|
+
});
|
552
|
+
}));
|
586
553
|
|
587
|
-
|
588
|
-
|
554
|
+
case 2:
|
555
|
+
return _context16.abrupt("return", _context16.sent);
|
589
556
|
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
}
|
557
|
+
case 3:
|
558
|
+
case "end":
|
559
|
+
return _context16.stop();
|
594
560
|
}
|
595
561
|
}, _callee16);
|
596
562
|
}));
|
@@ -631,23 +597,21 @@ export var queryVendors = /*#__PURE__*/function () {
|
|
631
597
|
export var queryDicts = /*#__PURE__*/function () {
|
632
598
|
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(source) {
|
633
599
|
return _regeneratorRuntime.wrap(function _callee17$(_context17) {
|
634
|
-
while (1) {
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
}
|
600
|
+
while (1) switch (_context17.prev = _context17.next) {
|
601
|
+
case 0:
|
602
|
+
if (source === void 0) {
|
603
|
+
source = null;
|
604
|
+
}
|
640
605
|
|
641
|
-
|
642
|
-
|
606
|
+
_context17.next = 3;
|
607
|
+
return modelDictList();
|
643
608
|
|
644
|
-
|
645
|
-
|
609
|
+
case 3:
|
610
|
+
return _context17.abrupt("return", _context17.sent);
|
646
611
|
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
}
|
612
|
+
case 4:
|
613
|
+
case "end":
|
614
|
+
return _context17.stop();
|
651
615
|
}
|
652
616
|
}, _callee17);
|
653
617
|
}));
|
@@ -691,19 +655,17 @@ export var queryDicts = /*#__PURE__*/function () {
|
|
691
655
|
export var createDict = /*#__PURE__*/function () {
|
692
656
|
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(param) {
|
693
657
|
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
694
|
-
while (1) {
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
return _context18.stop();
|
706
|
-
}
|
658
|
+
while (1) switch (_context18.prev = _context18.next) {
|
659
|
+
case 0:
|
660
|
+
_context18.next = 2;
|
661
|
+
return request.post('/model/v1/api/createDict', param);
|
662
|
+
|
663
|
+
case 2:
|
664
|
+
return _context18.abrupt("return", _context18.sent);
|
665
|
+
|
666
|
+
case 3:
|
667
|
+
case "end":
|
668
|
+
return _context18.stop();
|
707
669
|
}
|
708
670
|
}, _callee18);
|
709
671
|
}));
|
@@ -740,19 +702,17 @@ export var createDict = /*#__PURE__*/function () {
|
|
740
702
|
export var updateDict = /*#__PURE__*/function () {
|
741
703
|
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(param) {
|
742
704
|
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
743
|
-
while (1) {
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
return _context19.stop();
|
755
|
-
}
|
705
|
+
while (1) switch (_context19.prev = _context19.next) {
|
706
|
+
case 0:
|
707
|
+
_context19.next = 2;
|
708
|
+
return request.post('/model/v1/api/updateDict', param);
|
709
|
+
|
710
|
+
case 2:
|
711
|
+
return _context19.abrupt("return", _context19.sent);
|
712
|
+
|
713
|
+
case 3:
|
714
|
+
case "end":
|
715
|
+
return _context19.stop();
|
756
716
|
}
|
757
717
|
}, _callee19);
|
758
718
|
}));
|
@@ -780,21 +740,19 @@ export var updateDict = /*#__PURE__*/function () {
|
|
780
740
|
export var deleteDict = /*#__PURE__*/function () {
|
781
741
|
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20(id) {
|
782
742
|
return _regeneratorRuntime.wrap(function _callee20$(_context20) {
|
783
|
-
while (1) {
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
return _context20.stop();
|
797
|
-
}
|
743
|
+
while (1) switch (_context20.prev = _context20.next) {
|
744
|
+
case 0:
|
745
|
+
_context20.next = 2;
|
746
|
+
return request.post('/model/v1/api/deleteDict', {
|
747
|
+
id: id
|
748
|
+
});
|
749
|
+
|
750
|
+
case 2:
|
751
|
+
return _context20.abrupt("return", _context20.sent);
|
752
|
+
|
753
|
+
case 3:
|
754
|
+
case "end":
|
755
|
+
return _context20.stop();
|
798
756
|
}
|
799
757
|
}, _callee20);
|
800
758
|
}));
|
@@ -819,19 +777,17 @@ export var deleteDict = /*#__PURE__*/function () {
|
|
819
777
|
export var getCiExtends = /*#__PURE__*/function () {
|
820
778
|
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21(param) {
|
821
779
|
return _regeneratorRuntime.wrap(function _callee21$(_context21) {
|
822
|
-
while (1) {
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
return _context21.stop();
|
834
|
-
}
|
780
|
+
while (1) switch (_context21.prev = _context21.next) {
|
781
|
+
case 0:
|
782
|
+
_context21.next = 2;
|
783
|
+
return request.post('/model/v1/api/getCiExtends', param);
|
784
|
+
|
785
|
+
case 2:
|
786
|
+
return _context21.abrupt("return", _context21.sent);
|
787
|
+
|
788
|
+
case 3:
|
789
|
+
case "end":
|
790
|
+
return _context21.stop();
|
835
791
|
}
|
836
792
|
}, _callee21);
|
837
793
|
}));
|
@@ -852,44 +808,42 @@ export var getCi = /*#__PURE__*/function () {
|
|
852
808
|
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(code, userVisibleFilter, dict) {
|
853
809
|
var meta;
|
854
810
|
return _regeneratorRuntime.wrap(function _callee22$(_context22) {
|
855
|
-
while (1) {
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
return _context22.stop();
|
892
|
-
}
|
811
|
+
while (1) switch (_context22.prev = _context22.next) {
|
812
|
+
case 0:
|
813
|
+
if (userVisibleFilter === void 0) {
|
814
|
+
userVisibleFilter = true;
|
815
|
+
}
|
816
|
+
|
817
|
+
if (dict === void 0) {
|
818
|
+
dict = true;
|
819
|
+
}
|
820
|
+
|
821
|
+
_context22.next = 4;
|
822
|
+
return formatCiAttributes(code, userVisibleFilter);
|
823
|
+
|
824
|
+
case 4:
|
825
|
+
meta = _context22.sent;
|
826
|
+
|
827
|
+
if (!dict) {
|
828
|
+
_context22.next = 14;
|
829
|
+
break;
|
830
|
+
}
|
831
|
+
|
832
|
+
_context22.prev = 6;
|
833
|
+
return _context22.abrupt("return", bindDict(meta));
|
834
|
+
|
835
|
+
case 10:
|
836
|
+
_context22.prev = 10;
|
837
|
+
_context22.t0 = _context22["catch"](6);
|
838
|
+
console.error(_context22.t0);
|
839
|
+
return _context22.abrupt("return", meta);
|
840
|
+
|
841
|
+
case 14:
|
842
|
+
return _context22.abrupt("return", meta);
|
843
|
+
|
844
|
+
case 15:
|
845
|
+
case "end":
|
846
|
+
return _context22.stop();
|
893
847
|
}
|
894
848
|
}, _callee22, null, [[6, 10]]);
|
895
849
|
}));
|
@@ -906,19 +860,17 @@ export var getCi = /*#__PURE__*/function () {
|
|
906
860
|
export var updateCi = /*#__PURE__*/function () {
|
907
861
|
var _ref23 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(data) {
|
908
862
|
return _regeneratorRuntime.wrap(function _callee23$(_context23) {
|
909
|
-
while (1) {
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
return _context23.stop();
|
921
|
-
}
|
863
|
+
while (1) switch (_context23.prev = _context23.next) {
|
864
|
+
case 0:
|
865
|
+
_context23.next = 2;
|
866
|
+
return request.post('/model/v1/api/updateCi', data);
|
867
|
+
|
868
|
+
case 2:
|
869
|
+
return _context23.abrupt("return", _context23.sent);
|
870
|
+
|
871
|
+
case 3:
|
872
|
+
case "end":
|
873
|
+
return _context23.stop();
|
922
874
|
}
|
923
875
|
}, _callee23);
|
924
876
|
}));
|
@@ -960,19 +912,17 @@ export var updateCi = /*#__PURE__*/function () {
|
|
960
912
|
export var createCi = /*#__PURE__*/function () {
|
961
913
|
var _ref24 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(data) {
|
962
914
|
return _regeneratorRuntime.wrap(function _callee24$(_context24) {
|
963
|
-
while (1) {
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
return _context24.stop();
|
975
|
-
}
|
915
|
+
while (1) switch (_context24.prev = _context24.next) {
|
916
|
+
case 0:
|
917
|
+
_context24.next = 2;
|
918
|
+
return request.post('/model/v1/api/createCi', data);
|
919
|
+
|
920
|
+
case 2:
|
921
|
+
return _context24.abrupt("return", _context24.sent);
|
922
|
+
|
923
|
+
case 3:
|
924
|
+
case "end":
|
925
|
+
return _context24.stop();
|
976
926
|
}
|
977
927
|
}, _callee24);
|
978
928
|
}));
|
@@ -989,19 +939,17 @@ export var createCi = /*#__PURE__*/function () {
|
|
989
939
|
export var deleteCi = /*#__PURE__*/function () {
|
990
940
|
var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(param) {
|
991
941
|
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
992
|
-
while (1) {
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
return _context25.stop();
|
1004
|
-
}
|
942
|
+
while (1) switch (_context25.prev = _context25.next) {
|
943
|
+
case 0:
|
944
|
+
_context25.next = 2;
|
945
|
+
return request.post('/model/v1/api/deleteCi', param);
|
946
|
+
|
947
|
+
case 2:
|
948
|
+
return _context25.abrupt("return", _context25.sent);
|
949
|
+
|
950
|
+
case 3:
|
951
|
+
case "end":
|
952
|
+
return _context25.stop();
|
1005
953
|
}
|
1006
954
|
}, _callee25);
|
1007
955
|
}));
|
@@ -1018,19 +966,17 @@ export var deleteCi = /*#__PURE__*/function () {
|
|
1018
966
|
export var getAllCi = /*#__PURE__*/function () {
|
1019
967
|
var _ref26 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26(params) {
|
1020
968
|
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
1021
|
-
while (1) {
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
return _context26.stop();
|
1033
|
-
}
|
969
|
+
while (1) switch (_context26.prev = _context26.next) {
|
970
|
+
case 0:
|
971
|
+
_context26.next = 2;
|
972
|
+
return request.post('/model/v1/api/getAllCi', params);
|
973
|
+
|
974
|
+
case 2:
|
975
|
+
return _context26.abrupt("return", _context26.sent);
|
976
|
+
|
977
|
+
case 3:
|
978
|
+
case "end":
|
979
|
+
return _context26.stop();
|
1034
980
|
}
|
1035
981
|
}, _callee26);
|
1036
982
|
}));
|
@@ -1056,19 +1002,17 @@ export function getCiMeta(_x27) {
|
|
1056
1002
|
function _getCiMeta() {
|
1057
1003
|
_getCiMeta = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(code) {
|
1058
1004
|
return _regeneratorRuntime.wrap(function _callee30$(_context30) {
|
1059
|
-
while (1) {
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
return _context30.stop();
|
1071
|
-
}
|
1005
|
+
while (1) switch (_context30.prev = _context30.next) {
|
1006
|
+
case 0:
|
1007
|
+
_context30.next = 2;
|
1008
|
+
return request.get("/mdc/v1/api/model-asset/" + code);
|
1009
|
+
|
1010
|
+
case 2:
|
1011
|
+
return _context30.abrupt("return", _context30.sent);
|
1012
|
+
|
1013
|
+
case 3:
|
1014
|
+
case "end":
|
1015
|
+
return _context30.stop();
|
1072
1016
|
}
|
1073
1017
|
}, _callee30);
|
1074
1018
|
}));
|
@@ -1084,54 +1028,52 @@ function _formatCiAttributes() {
|
|
1084
1028
|
_formatCiAttributes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(code, userVisibleFilter) {
|
1085
1029
|
var meta, attributes;
|
1086
1030
|
return _regeneratorRuntime.wrap(function _callee31$(_context31) {
|
1087
|
-
while (1) {
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
});
|
1121
|
-
}
|
1122
|
-
} catch (error) {
|
1123
|
-
rlog.error('services=>model=>:', error);
|
1031
|
+
while (1) switch (_context31.prev = _context31.next) {
|
1032
|
+
case 0:
|
1033
|
+
_context31.next = 2;
|
1034
|
+
return request.post('/model/v1/api/getCi', {
|
1035
|
+
code: code
|
1036
|
+
});
|
1037
|
+
|
1038
|
+
case 2:
|
1039
|
+
meta = _context31.sent;
|
1040
|
+
|
1041
|
+
if (!meta) {
|
1042
|
+
_context31.next = 9;
|
1043
|
+
break;
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
attributes = meta.attributes;
|
1047
|
+
|
1048
|
+
if (attributes) {
|
1049
|
+
_context31.next = 7;
|
1050
|
+
break;
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
return _context31.abrupt("return", meta);
|
1054
|
+
|
1055
|
+
case 7:
|
1056
|
+
try {
|
1057
|
+
// 适配后端,使属性正序
|
1058
|
+
attributes = attributes.reverse(); // 获取过滤userVisible=true的属性(用户可见)
|
1059
|
+
|
1060
|
+
if (userVisibleFilter) {
|
1061
|
+
meta.attributes = attributes.filter(function (item) {
|
1062
|
+
return item.userVisible === 'true';
|
1063
|
+
});
|
1124
1064
|
}
|
1065
|
+
} catch (error) {
|
1066
|
+
rlog.error('services=>model=>:', error);
|
1067
|
+
}
|
1125
1068
|
|
1126
|
-
|
1069
|
+
return _context31.abrupt("return", meta);
|
1127
1070
|
|
1128
|
-
|
1129
|
-
|
1071
|
+
case 9:
|
1072
|
+
return _context31.abrupt("return", meta);
|
1130
1073
|
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
}
|
1074
|
+
case 10:
|
1075
|
+
case "end":
|
1076
|
+
return _context31.stop();
|
1135
1077
|
}
|
1136
1078
|
}, _callee31);
|
1137
1079
|
}));
|
@@ -1189,35 +1131,33 @@ export function queryAllModel(_x30) {
|
|
1189
1131
|
function _queryAllModel() {
|
1190
1132
|
_queryAllModel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(isAuth) {
|
1191
1133
|
return _regeneratorRuntime.wrap(function _callee32$(_context32) {
|
1192
|
-
while (1) {
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
}
|
1134
|
+
while (1) switch (_context32.prev = _context32.next) {
|
1135
|
+
case 0:
|
1136
|
+
if (isAuth === void 0) {
|
1137
|
+
isAuth = false;
|
1138
|
+
}
|
1198
1139
|
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1140
|
+
if (!isAuth) {
|
1141
|
+
_context32.next = 5;
|
1142
|
+
break;
|
1143
|
+
}
|
1203
1144
|
|
1204
|
-
|
1205
|
-
|
1145
|
+
_context32.next = 4;
|
1146
|
+
return request.post('/model/v1/api/authority/modelTree');
|
1206
1147
|
|
1207
|
-
|
1208
|
-
|
1148
|
+
case 4:
|
1149
|
+
return _context32.abrupt("return", _context32.sent);
|
1209
1150
|
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1151
|
+
case 5:
|
1152
|
+
_context32.next = 7;
|
1153
|
+
return request.get('/mdc/v1/api/model-asset/tree');
|
1213
1154
|
|
1214
|
-
|
1215
|
-
|
1155
|
+
case 7:
|
1156
|
+
return _context32.abrupt("return", _context32.sent);
|
1216
1157
|
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
}
|
1158
|
+
case 8:
|
1159
|
+
case "end":
|
1160
|
+
return _context32.stop();
|
1221
1161
|
}
|
1222
1162
|
}, _callee32);
|
1223
1163
|
}));
|
@@ -1227,21 +1167,19 @@ function _queryAllModel() {
|
|
1227
1167
|
export var getBatchCi = /*#__PURE__*/function () {
|
1228
1168
|
var _ref27 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27(typeCodes) {
|
1229
1169
|
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
1230
|
-
while (1) {
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
return _context27.stop();
|
1244
|
-
}
|
1170
|
+
while (1) switch (_context27.prev = _context27.next) {
|
1171
|
+
case 0:
|
1172
|
+
_context27.next = 2;
|
1173
|
+
return request.post('/model/v1/api/getBatchCi', {
|
1174
|
+
typeCodes: typeCodes
|
1175
|
+
});
|
1176
|
+
|
1177
|
+
case 2:
|
1178
|
+
return _context27.abrupt("return", _context27.sent);
|
1179
|
+
|
1180
|
+
case 3:
|
1181
|
+
case "end":
|
1182
|
+
return _context27.stop();
|
1245
1183
|
}
|
1246
1184
|
}, _callee27);
|
1247
1185
|
}));
|
@@ -1257,21 +1195,19 @@ export var getBatchCi = /*#__PURE__*/function () {
|
|
1257
1195
|
export var getBatchCiMetric = /*#__PURE__*/function () {
|
1258
1196
|
var _ref28 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(typeCodes) {
|
1259
1197
|
return _regeneratorRuntime.wrap(function _callee28$(_context28) {
|
1260
|
-
while (1) {
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
return _context28.stop();
|
1274
|
-
}
|
1198
|
+
while (1) switch (_context28.prev = _context28.next) {
|
1199
|
+
case 0:
|
1200
|
+
_context28.next = 2;
|
1201
|
+
return request.post('/model/v1/api/getBatchCiMetric', {
|
1202
|
+
typeCodes: typeCodes
|
1203
|
+
});
|
1204
|
+
|
1205
|
+
case 2:
|
1206
|
+
return _context28.abrupt("return", _context28.sent);
|
1207
|
+
|
1208
|
+
case 3:
|
1209
|
+
case "end":
|
1210
|
+
return _context28.stop();
|
1275
1211
|
}
|
1276
1212
|
}, _callee28);
|
1277
1213
|
}));
|