@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
@@ -9,17 +9,19 @@ export default {
|
|
9
9
|
queryBlackList: function queryBlackList(topoId) {
|
10
10
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
11
11
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
12
|
-
while (1)
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
while (1) {
|
13
|
+
switch (_context.prev = _context.next) {
|
14
|
+
case 0:
|
15
|
+
_context.next = 2;
|
16
|
+
return request.post(TOPO_API_ROOT + "/blackList/" + topoId);
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
case 2:
|
19
|
+
return _context.abrupt("return", _context.sent);
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
case 3:
|
22
|
+
case "end":
|
23
|
+
return _context.stop();
|
24
|
+
}
|
23
25
|
}
|
24
26
|
}, _callee);
|
25
27
|
}))();
|
@@ -35,20 +37,22 @@ export default {
|
|
35
37
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
36
38
|
var ciIds;
|
37
39
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
38
|
-
while (1)
|
39
|
-
|
40
|
-
|
40
|
+
while (1) {
|
41
|
+
switch (_context2.prev = _context2.next) {
|
42
|
+
case 0:
|
43
|
+
ciIds = ciIdList.join(',');
|
41
44
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
45
|
+
if (!(ciIdList.length > 0)) {
|
46
|
+
_context2.next = 3;
|
47
|
+
break;
|
48
|
+
}
|
46
49
|
|
47
|
-
|
50
|
+
return _context2.abrupt("return", request.post(TOPO_API_ROOT + "/blackList/add?topoId=" + id + "&ciList=" + (encodeURIComponent(ciIds) || '""')));
|
48
51
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
+
case 3:
|
53
|
+
case "end":
|
54
|
+
return _context2.stop();
|
55
|
+
}
|
52
56
|
}
|
53
57
|
}, _callee2);
|
54
58
|
}))();
|
@@ -12,29 +12,31 @@ export default {
|
|
12
12
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
13
13
|
var param;
|
14
14
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
15
|
-
while (1)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
while (1) {
|
16
|
+
switch (_context.prev = _context.next) {
|
17
|
+
case 0:
|
18
|
+
if (ciTypes.length) {
|
19
|
+
_context.next = 2;
|
20
|
+
break;
|
21
|
+
}
|
21
22
|
|
22
|
-
|
23
|
+
return _context.abrupt("return", []);
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
case 2:
|
26
|
+
param = {
|
27
|
+
typeCodes: ciTypes
|
28
|
+
}; // rlog.debug('getBatchCi', param);
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
_context.next = 5;
|
31
|
+
return request.post(TOPO_API_ROOT + "/attributes/once", param);
|
31
32
|
|
32
|
-
|
33
|
-
|
33
|
+
case 5:
|
34
|
+
return _context.abrupt("return", _context.sent);
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
36
|
+
case 6:
|
37
|
+
case "end":
|
38
|
+
return _context.stop();
|
39
|
+
}
|
38
40
|
}
|
39
41
|
}, _callee);
|
40
42
|
}))();
|
@@ -47,17 +49,19 @@ export default {
|
|
47
49
|
batchQueryCiInfo: function batchQueryCiInfo(params) {
|
48
50
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
49
51
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
50
|
-
while (1)
|
51
|
-
|
52
|
-
|
53
|
-
|
52
|
+
while (1) {
|
53
|
+
switch (_context2.prev = _context2.next) {
|
54
|
+
case 0:
|
55
|
+
_context2.next = 2;
|
56
|
+
return request.post(TOPO_API_ROOT + "/attributes/polling", params);
|
54
57
|
|
55
|
-
|
56
|
-
|
58
|
+
case 2:
|
59
|
+
return _context2.abrupt("return", _context2.sent);
|
57
60
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
+
case 3:
|
62
|
+
case "end":
|
63
|
+
return _context2.stop();
|
64
|
+
}
|
61
65
|
}
|
62
66
|
}, _callee2);
|
63
67
|
}))();
|
@@ -9,17 +9,19 @@ export default {
|
|
9
9
|
listAll: function listAll() {
|
10
10
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
11
11
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
12
|
-
while (1)
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
while (1) {
|
13
|
+
switch (_context.prev = _context.next) {
|
14
|
+
case 0:
|
15
|
+
_context.next = 2;
|
16
|
+
return request.get(API_ROOT + "/shape");
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
case 2:
|
19
|
+
return _context.abrupt("return", _context.sent);
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
21
|
+
case 3:
|
22
|
+
case "end":
|
23
|
+
return _context.stop();
|
24
|
+
}
|
23
25
|
}
|
24
26
|
}, _callee);
|
25
27
|
}))();
|
@@ -32,17 +34,19 @@ export default {
|
|
32
34
|
batchRename: function batchRename(data) {
|
33
35
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
34
36
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
35
|
-
while (1)
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
while (1) {
|
38
|
+
switch (_context2.prev = _context2.next) {
|
39
|
+
case 0:
|
40
|
+
_context2.next = 2;
|
41
|
+
return request.post(API_ROOT + "/shape/batch", data);
|
39
42
|
|
40
|
-
|
41
|
-
|
43
|
+
case 2:
|
44
|
+
return _context2.abrupt("return", _context2.sent);
|
42
45
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
+
case 3:
|
47
|
+
case "end":
|
48
|
+
return _context2.stop();
|
49
|
+
}
|
46
50
|
}
|
47
51
|
}, _callee2);
|
48
52
|
}))();
|
@@ -55,21 +59,23 @@ export default {
|
|
55
59
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
56
60
|
var id, name;
|
57
61
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
58
|
-
while (1)
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
while (1) {
|
63
|
+
switch (_context3.prev = _context3.next) {
|
64
|
+
case 0:
|
65
|
+
id = _ref.id, name = _ref.name;
|
66
|
+
_context3.next = 3;
|
67
|
+
return request.post(API_ROOT + "/shape/batch", [{
|
68
|
+
id: id,
|
69
|
+
name: name
|
70
|
+
}]);
|
66
71
|
|
67
|
-
|
68
|
-
|
72
|
+
case 3:
|
73
|
+
return _context3.abrupt("return", _context3.sent);
|
69
74
|
|
70
|
-
|
71
|
-
|
72
|
-
|
75
|
+
case 4:
|
76
|
+
case "end":
|
77
|
+
return _context3.stop();
|
78
|
+
}
|
73
79
|
}
|
74
80
|
}, _callee3);
|
75
81
|
}))();
|
@@ -77,17 +83,19 @@ export default {
|
|
77
83
|
"delete": function _delete(id) {
|
78
84
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
79
85
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
80
|
-
while (1)
|
81
|
-
|
82
|
-
|
83
|
-
|
86
|
+
while (1) {
|
87
|
+
switch (_context4.prev = _context4.next) {
|
88
|
+
case 0:
|
89
|
+
_context4.next = 2;
|
90
|
+
return request["delete"](API_ROOT + "/shape/" + id);
|
84
91
|
|
85
|
-
|
86
|
-
|
92
|
+
case 2:
|
93
|
+
return _context4.abrupt("return", _context4.sent);
|
87
94
|
|
88
|
-
|
89
|
-
|
90
|
-
|
95
|
+
case 3:
|
96
|
+
case "end":
|
97
|
+
return _context4.stop();
|
98
|
+
}
|
91
99
|
}
|
92
100
|
}, _callee4);
|
93
101
|
}))();
|
@@ -103,17 +111,19 @@ export default {
|
|
103
111
|
|
104
112
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
105
113
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
106
|
-
while (1)
|
107
|
-
|
108
|
-
|
109
|
-
|
114
|
+
while (1) {
|
115
|
+
switch (_context5.prev = _context5.next) {
|
116
|
+
case 0:
|
117
|
+
_context5.next = 2;
|
118
|
+
return request.get(_this.getDownloadUrl(id));
|
110
119
|
|
111
|
-
|
112
|
-
|
120
|
+
case 2:
|
121
|
+
return _context5.abrupt("return", _context5.sent);
|
113
122
|
|
114
|
-
|
115
|
-
|
116
|
-
|
123
|
+
case 3:
|
124
|
+
case "end":
|
125
|
+
return _context5.stop();
|
126
|
+
}
|
117
127
|
}
|
118
128
|
}, _callee5);
|
119
129
|
}))();
|
@@ -13,17 +13,19 @@ export default {
|
|
13
13
|
getCiTypesConnectable: function getCiTypesConnectable(typeCodes) {
|
14
14
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
15
15
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
16
|
-
while (1)
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
while (1) {
|
17
|
+
switch (_context.prev = _context.next) {
|
18
|
+
case 0:
|
19
|
+
_context.next = 2;
|
20
|
+
return request.post(API_ROOT + "/networkLink/ciTypesConnectable", typeCodes);
|
20
21
|
|
21
|
-
|
22
|
-
|
22
|
+
case 2:
|
23
|
+
return _context.abrupt("return", _context.sent);
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
case 3:
|
26
|
+
case "end":
|
27
|
+
return _context.stop();
|
28
|
+
}
|
27
29
|
}
|
28
30
|
}, _callee);
|
29
31
|
}))();
|
@@ -38,32 +40,34 @@ export default {
|
|
38
40
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
39
41
|
var stag, condition, parm, result;
|
40
42
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
41
|
-
while (1)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
43
|
+
while (1) {
|
44
|
+
switch (_context2.prev = _context2.next) {
|
45
|
+
case 0:
|
46
|
+
stag = "'" + ids.join("','") + "'";
|
47
|
+
condition = "type('network_link') && network_link.destination_ipv4 = '" + ip + "' && network_link.source_device_id in [" + stag + "]";
|
48
|
+
parm = {
|
49
|
+
condition: condition,
|
50
|
+
sort: "name asc",
|
51
|
+
currentPage: 1,
|
52
|
+
pageSize: 999
|
53
|
+
};
|
54
|
+
_context2.prev = 3;
|
55
|
+
_context2.next = 6;
|
56
|
+
return request.post("/mdc/v1/api/cmdb/commonQueryCiData", parm);
|
54
57
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
+
case 6:
|
59
|
+
result = _context2.sent;
|
60
|
+
return _context2.abrupt("return", result);
|
58
61
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
62
|
+
case 10:
|
63
|
+
_context2.prev = 10;
|
64
|
+
_context2.t0 = _context2["catch"](3);
|
65
|
+
rlog.error("通过ip查询关联链路", _context2.t0);
|
63
66
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
+
case 13:
|
68
|
+
case "end":
|
69
|
+
return _context2.stop();
|
70
|
+
}
|
67
71
|
}
|
68
72
|
}, _callee2, null, [[3, 10]]);
|
69
73
|
}))();
|
@@ -7,17 +7,19 @@ export default {
|
|
7
7
|
batchQueryRelation: function batchQueryRelation(ids) {
|
8
8
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
9
9
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
10
|
-
while (1)
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
while (1) {
|
11
|
+
switch (_context.prev = _context.next) {
|
12
|
+
case 0:
|
13
|
+
_context.next = 2;
|
14
|
+
return request.post(API_ROOT + "/structure/relationList", ids);
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
case 2:
|
17
|
+
return _context.abrupt("return", _context.sent);
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
case 3:
|
20
|
+
case "end":
|
21
|
+
return _context.stop();
|
22
|
+
}
|
21
23
|
}
|
22
24
|
}, _callee);
|
23
25
|
}))();
|
@@ -11,17 +11,19 @@ export default {
|
|
11
11
|
list: function list(ids) {
|
12
12
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
13
13
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
14
|
-
while (1)
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
while (1) {
|
15
|
+
switch (_context.prev = _context.next) {
|
16
|
+
case 0:
|
17
|
+
_context.next = 2;
|
18
|
+
return request.post(API_ROOT + "/webUrl/list", ids);
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
case 2:
|
21
|
+
return _context.abrupt("return", _context.sent);
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
case 3:
|
24
|
+
case "end":
|
25
|
+
return _context.stop();
|
26
|
+
}
|
25
27
|
}
|
26
28
|
}, _callee);
|
27
29
|
}))();
|
@@ -31,28 +33,30 @@ export default {
|
|
31
33
|
|
32
34
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
33
35
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
34
|
-
while (1)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
while (1) {
|
37
|
+
switch (_context2.prev = _context2.next) {
|
38
|
+
case 0:
|
39
|
+
if (!url) {
|
40
|
+
_context2.next = 6;
|
41
|
+
break;
|
42
|
+
}
|
40
43
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
44
|
+
_context2.next = 3;
|
45
|
+
return request.post(API_ROOT + "/webUrl", {
|
46
|
+
ciId: id,
|
47
|
+
webUrl: url
|
48
|
+
});
|
46
49
|
|
47
|
-
|
48
|
-
|
50
|
+
case 3:
|
51
|
+
return _context2.abrupt("return", _context2.sent);
|
49
52
|
|
50
|
-
|
51
|
-
|
53
|
+
case 6:
|
54
|
+
return _context2.abrupt("return", _this.deleteByIds([id]));
|
52
55
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
+
case 7:
|
57
|
+
case "end":
|
58
|
+
return _context2.stop();
|
59
|
+
}
|
56
60
|
}
|
57
61
|
}, _callee2);
|
58
62
|
}))();
|
@@ -60,17 +64,19 @@ export default {
|
|
60
64
|
deleteByIds: function deleteByIds(ids) {
|
61
65
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
62
66
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
63
|
-
while (1)
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
+
while (1) {
|
68
|
+
switch (_context3.prev = _context3.next) {
|
69
|
+
case 0:
|
70
|
+
_context3.next = 2;
|
71
|
+
return request.put(API_ROOT + "/webUrl/list/delete", ids);
|
67
72
|
|
68
|
-
|
69
|
-
|
73
|
+
case 2:
|
74
|
+
return _context3.abrupt("return", _context3.sent);
|
70
75
|
|
71
|
-
|
72
|
-
|
73
|
-
|
76
|
+
case 3:
|
77
|
+
case "end":
|
78
|
+
return _context3.stop();
|
79
|
+
}
|
74
80
|
}
|
75
81
|
}, _callee3);
|
76
82
|
}))();
|
@@ -31,23 +31,25 @@ export default function (topo) {
|
|
31
31
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
32
32
|
var permissions;
|
33
33
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
34
|
-
while (1)
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
while (1) {
|
35
|
+
switch (_context.prev = _context.next) {
|
36
|
+
case 0:
|
37
|
+
_context.next = 2;
|
38
|
+
return _this.getPermissions();
|
38
39
|
|
39
|
-
|
40
|
-
|
40
|
+
case 2:
|
41
|
+
permissions = _context.sent;
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
if (permissions) {
|
44
|
+
_this.update({
|
45
|
+
permissions: permissions
|
46
|
+
});
|
47
|
+
}
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
case 4:
|
50
|
+
case "end":
|
51
|
+
return _context.stop();
|
52
|
+
}
|
51
53
|
}
|
52
54
|
}, _callee);
|
53
55
|
}))();
|
@@ -56,18 +58,20 @@ export default function (topo) {
|
|
56
58
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
57
59
|
var permissions;
|
58
60
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
59
|
-
while (1)
|
60
|
-
|
61
|
-
|
62
|
-
|
61
|
+
while (1) {
|
62
|
+
switch (_context2.prev = _context2.next) {
|
63
|
+
case 0:
|
64
|
+
_context2.next = 2;
|
65
|
+
return topo.serverApi.getFuncAuth();
|
63
66
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
+
case 2:
|
68
|
+
permissions = _context2.sent;
|
69
|
+
return _context2.abrupt("return", permissions);
|
67
70
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
+
case 4:
|
72
|
+
case "end":
|
73
|
+
return _context2.stop();
|
74
|
+
}
|
71
75
|
}
|
72
76
|
}, _callee2);
|
73
77
|
}))();
|
@@ -80,14 +84,16 @@ export default function (topo) {
|
|
80
84
|
|
81
85
|
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
82
86
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
83
|
-
while (1)
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
while (1) {
|
88
|
+
switch (_context3.prev = _context3.next) {
|
89
|
+
case 0:
|
90
|
+
_context3.next = 2;
|
91
|
+
return _this2.init();
|
87
92
|
|
88
|
-
|
89
|
-
|
90
|
-
|
93
|
+
case 2:
|
94
|
+
case "end":
|
95
|
+
return _context3.stop();
|
96
|
+
}
|
91
97
|
}
|
92
98
|
}, _callee3);
|
93
99
|
}))();
|