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