@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
@@ -61,7 +61,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Sy
|
|
61
61
|
|
62
62
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
63
63
|
|
64
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
64
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
65
65
|
|
66
66
|
// url 处理,UICBB 的地址需截取前缀
|
67
67
|
function formatUrl(url) {
|
@@ -197,27 +197,25 @@ function ResourceOverview(props) {
|
|
197
197
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(roomLink, id) {
|
198
198
|
var power;
|
199
199
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
200
|
-
while (1) {
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
}
|
200
|
+
while (1) switch (_context.prev = _context.next) {
|
201
|
+
case 0:
|
202
|
+
onClose();
|
203
|
+
_context.next = 3;
|
204
|
+
return (0, _services.commonQueryCiData)(id);
|
205
|
+
|
206
|
+
case 3:
|
207
|
+
power = _context.sent;
|
208
|
+
|
209
|
+
// console.log(power)
|
210
|
+
if (power.data.length) {
|
211
|
+
window.open("" + window.location.origin + roomLink);
|
212
|
+
} else {
|
213
|
+
_message["default"].error('无访问权限,请联系管理员');
|
214
|
+
}
|
216
215
|
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
}
|
216
|
+
case 5:
|
217
|
+
case "end":
|
218
|
+
return _context.stop();
|
221
219
|
}
|
222
220
|
}, _callee);
|
223
221
|
}));
|
@@ -288,22 +286,20 @@ function ResourceOverview(props) {
|
|
288
286
|
_getDevice = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
289
287
|
var list;
|
290
288
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
291
|
-
while (1) {
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
return _context2.stop();
|
306
|
-
}
|
289
|
+
while (1) switch (_context2.prev = _context2.next) {
|
290
|
+
case 0:
|
291
|
+
_context2.next = 2;
|
292
|
+
return _overview["default"].getDeviceTypeList();
|
293
|
+
|
294
|
+
case 2:
|
295
|
+
list = _context2.sent;
|
296
|
+
setIsDevice(list.some(function (item) {
|
297
|
+
return item.code === ciType;
|
298
|
+
})); // console.log('getDevice', ciType, list);
|
299
|
+
|
300
|
+
case 4:
|
301
|
+
case "end":
|
302
|
+
return _context2.stop();
|
307
303
|
}
|
308
304
|
}, _callee2);
|
309
305
|
}));
|
@@ -323,41 +319,39 @@ function ResourceOverview(props) {
|
|
323
319
|
var owned_computer_room, owned_cabinet, start_u_location, end_u_location, address, _res$find, _res$find$attributes, _res$find2, _res$find2$attributes, res, u;
|
324
320
|
|
325
321
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
326
|
-
while (1) {
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
address = '';
|
322
|
+
while (1) switch (_context3.prev = _context3.next) {
|
323
|
+
case 0:
|
324
|
+
owned_computer_room = _ref2.owned_computer_room, owned_cabinet = _ref2.owned_cabinet, start_u_location = _ref2.start_u_location, end_u_location = _ref2.end_u_location;
|
325
|
+
address = '';
|
331
326
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
327
|
+
if (!(owned_computer_room && owned_cabinet)) {
|
328
|
+
_context3.next = 7;
|
329
|
+
break;
|
330
|
+
}
|
336
331
|
|
337
|
-
|
338
|
-
|
332
|
+
_context3.next = 5;
|
333
|
+
return (0, _services.queryCisByIds)([owned_computer_room, owned_cabinet]);
|
339
334
|
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
335
|
+
case 5:
|
336
|
+
res = _context3.sent;
|
337
|
+
address = (((_res$find = res.find(function (item) {
|
338
|
+
return item.id === owned_computer_room;
|
339
|
+
})) === null || _res$find === void 0 ? void 0 : (_res$find$attributes = _res$find.attributes) === null || _res$find$attributes === void 0 ? void 0 : _res$find$attributes.display_name) || '') + " " + (((_res$find2 = res.find(function (item) {
|
340
|
+
return item.id === owned_cabinet;
|
341
|
+
})) === null || _res$find2 === void 0 ? void 0 : (_res$find2$attributes = _res$find2.attributes) === null || _res$find2$attributes === void 0 ? void 0 : _res$find2$attributes.display_name) || '');
|
347
342
|
|
348
|
-
|
349
|
-
|
343
|
+
case 7:
|
344
|
+
u = '';
|
350
345
|
|
351
|
-
|
352
|
-
|
353
|
-
|
346
|
+
if (start_u_location || end_u_location) {
|
347
|
+
u = (start_u_location || '') + "-" + (end_u_location || '');
|
348
|
+
}
|
354
349
|
|
355
|
-
|
350
|
+
return _context3.abrupt("return", address || u ? "" + (address || '') + (u ? " " + u : '') : '');
|
356
351
|
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
}
|
352
|
+
case 10:
|
353
|
+
case "end":
|
354
|
+
return _context3.stop();
|
361
355
|
}
|
362
356
|
}, _callee3);
|
363
357
|
}));
|
@@ -425,37 +419,35 @@ function ResourceOverview(props) {
|
|
425
419
|
_alarmRiskOperation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(type, params) {
|
426
420
|
var res;
|
427
421
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
428
|
-
while (1) {
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
}
|
422
|
+
while (1) switch (_context4.prev = _context4.next) {
|
423
|
+
case 0:
|
424
|
+
if (!(type === 'alarm')) {
|
425
|
+
_context4.next = 6;
|
426
|
+
break;
|
427
|
+
}
|
435
428
|
|
436
|
-
|
437
|
-
|
429
|
+
_context4.next = 3;
|
430
|
+
return _overview["default"].handleAlarm(params);
|
438
431
|
|
439
|
-
|
440
|
-
|
432
|
+
case 3:
|
433
|
+
res = _context4.sent;
|
441
434
|
|
442
|
-
|
435
|
+
_message["default"].success('受理成功');
|
443
436
|
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
437
|
+
refreshAlarmData(id); // if (isAppTopo) {
|
438
|
+
// const {
|
439
|
+
// displayName: ciName,
|
440
|
+
// attributeMap: modelAttributeMap,
|
441
|
+
// domain,
|
442
|
+
// } = topo.ciTyeCache.getCiType(ciType);
|
443
|
+
// initAppTopo(monitorMetricModels, modelAttributeMap, ciName, domain);
|
444
|
+
// } else {
|
445
|
+
// getAlarmRiskData(id);
|
446
|
+
// }
|
454
447
|
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
}
|
448
|
+
case 6:
|
449
|
+
case "end":
|
450
|
+
return _context4.stop();
|
459
451
|
}
|
460
452
|
}, _callee4);
|
461
453
|
}));
|
@@ -475,174 +467,172 @@ function ResourceOverview(props) {
|
|
475
467
|
|
476
468
|
|
477
469
|
function _baseInfoColChange() {
|
478
|
-
_baseInfoColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
470
|
+
_baseInfoColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(col) {
|
479
471
|
var _col;
|
480
472
|
|
481
|
-
var infoData, attributeMap, _iterator, _step
|
473
|
+
var infoData, attributeMap, _loop, _iterator, _step;
|
482
474
|
|
483
|
-
return _regenerator["default"].wrap(function
|
484
|
-
while (1) {
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
}
|
475
|
+
return _regenerator["default"].wrap(function _callee5$(_context6) {
|
476
|
+
while (1) switch (_context6.prev = _context6.next) {
|
477
|
+
case 0:
|
478
|
+
if ((_col = col) !== null && _col !== void 0 && _col.length) {
|
479
|
+
_context6.next = 3;
|
480
|
+
break;
|
481
|
+
}
|
491
482
|
|
492
|
-
|
493
|
-
|
483
|
+
setBaseInfo([]);
|
484
|
+
return _context6.abrupt("return");
|
494
485
|
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
486
|
+
case 3:
|
487
|
+
settBaseInfoInitLoading(true);
|
488
|
+
infoData = [];
|
489
|
+
_context6.next = 7;
|
490
|
+
return getAttribute(id);
|
500
491
|
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
492
|
+
case 7:
|
493
|
+
attributeMap = _context6.sent;
|
494
|
+
// console.log('getAttribute', attributeMap);
|
495
|
+
col = col.filter(function (item) {
|
496
|
+
return !item.hidden;
|
497
|
+
});
|
498
|
+
_loop = /*#__PURE__*/_regenerator["default"].mark(function _loop() {
|
499
|
+
var item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, roomLink, node, data, _ref3, _ref3$, _item, _attributeMap, object, _object2, displayName, attr;
|
500
|
+
|
501
|
+
return _regenerator["default"].wrap(function _loop$(_context5) {
|
502
|
+
while (1) switch (_context5.prev = _context5.next) {
|
503
|
+
case 0:
|
504
|
+
item = _step.value;
|
505
|
+
value = (0, _metricUtil.formatMetric)(attributeMap[item.dataIndex], ciTypeMeta.attributeMap[item.dataIndex]);
|
506
|
+
contentTitle = value;
|
507
|
+
_context5.t0 = item.dataIndex;
|
508
|
+
_context5.next = _context5.t0 === 'display_name' ? 6 : _context5.t0 === 'ciName' ? 9 : _context5.t0 === 'res_address' ? 12 : _context5.t0 === 'imageName' ? 19 : 23;
|
509
|
+
break;
|
510
|
+
|
511
|
+
case 6:
|
512
|
+
// 无监控模板不能跳转详情。跳转前需判定资源实例数据属性中是否包含support_templates属性。若不包含,则不能跳转
|
513
|
+
if (attributeMap.support_templates) {
|
514
|
+
link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
|
515
|
+
|
516
|
+
value = /*#__PURE__*/_react["default"].createElement("span", {
|
517
|
+
onClick: onClose
|
518
|
+
}, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
519
|
+
className: _indexModule["default"].link,
|
520
|
+
disabled: true,
|
521
|
+
title: attributeMap.display_name || '',
|
522
|
+
to: formatUrl(link)
|
523
|
+
}, attributeMap.display_name || '-'));
|
524
|
+
} else {
|
525
|
+
value = attributeMap.display_name || '-';
|
526
|
+
}
|
508
527
|
|
509
|
-
|
510
|
-
|
511
|
-
_context6.next = 26;
|
512
|
-
break;
|
513
|
-
}
|
528
|
+
contentTitle = attributeMap.display_name || '-';
|
529
|
+
return _context5.abrupt("break", 24);
|
514
530
|
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
case 3:
|
529
|
-
// 无监控模板不能跳转详情。跳转前需判定资源实例数据属性中是否包含support_templates属性。若不包含,则不能跳转
|
530
|
-
if (attributeMap.support_templates) {
|
531
|
-
link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
|
532
|
-
|
533
|
-
value = /*#__PURE__*/_react["default"].createElement("span", {
|
534
|
-
onClick: onClose
|
535
|
-
}, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
536
|
-
className: _indexModule["default"].link,
|
537
|
-
disabled: true,
|
538
|
-
title: attributeMap.display_name || '',
|
539
|
-
to: formatUrl(link)
|
540
|
-
}, attributeMap.display_name || '-'));
|
541
|
-
} else {
|
542
|
-
value = attributeMap.display_name || '-';
|
543
|
-
}
|
531
|
+
case 9:
|
532
|
+
value = ciTypeMeta.displayName;
|
533
|
+
contentTitle = value;
|
534
|
+
return _context5.abrupt("break", 24);
|
535
|
+
|
536
|
+
case 12:
|
537
|
+
_context5.next = 14;
|
538
|
+
return getAddressFormat(attributeMap);
|
539
|
+
|
540
|
+
case 14:
|
541
|
+
address = _context5.sent;
|
542
|
+
owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
|
544
543
|
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
return _context5.abrupt("break", 21);
|
552
|
-
|
553
|
-
case 9:
|
554
|
-
_context5.next = 11;
|
555
|
-
return getAddressFormat(attributeMap);
|
556
|
-
|
557
|
-
case 11:
|
558
|
-
address = _context5.sent;
|
559
|
-
owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
|
560
|
-
|
561
|
-
if (owned_computer_room && owned_cabinet) {
|
562
|
-
// /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
|
563
|
-
roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
|
564
|
-
value = /*#__PURE__*/_react["default"].createElement("span", {
|
565
|
-
onClick: function onClick() {
|
566
|
-
jump(roomLink, owned_computer_room);
|
567
|
-
}
|
568
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
569
|
-
className: _indexModule["default"].link,
|
570
|
-
title: address
|
571
|
-
}, address));
|
572
|
-
} else {
|
573
|
-
value = address;
|
544
|
+
if (owned_computer_room && owned_cabinet) {
|
545
|
+
// /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
|
546
|
+
roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
|
547
|
+
value = /*#__PURE__*/_react["default"].createElement("span", {
|
548
|
+
onClick: function onClick() {
|
549
|
+
jump(roomLink, owned_computer_room);
|
574
550
|
}
|
551
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
552
|
+
className: _indexModule["default"].link,
|
553
|
+
title: address
|
554
|
+
}, address));
|
555
|
+
} else {
|
556
|
+
value = address;
|
557
|
+
}
|
575
558
|
|
576
|
-
|
577
|
-
|
559
|
+
contentTitle = address;
|
560
|
+
return _context5.abrupt("break", 24);
|
578
561
|
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
562
|
+
case 19:
|
563
|
+
node = topo.getDataModel().getDataByTag(id);
|
564
|
+
value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
|
565
|
+
contentTitle = value;
|
566
|
+
return _context5.abrupt("break", 24);
|
584
567
|
|
585
|
-
|
586
|
-
|
568
|
+
case 23:
|
569
|
+
return _context5.abrupt("break", 24);
|
587
570
|
|
588
|
-
|
589
|
-
|
590
|
-
|
571
|
+
case 24:
|
572
|
+
// 拿翻译字段属性数据
|
573
|
+
if (attributeMap[item.dataIndex] && attributeMap[item.dataIndex + ".name"]) {
|
574
|
+
value = attributeMap[item.dataIndex + ".name"];
|
575
|
+
contentTitle = value;
|
591
576
|
}
|
592
|
-
}
|
593
|
-
}, _callee5);
|
594
|
-
})(), "t0", 15);
|
595
|
-
|
596
|
-
case 15:
|
597
|
-
// 拿翻译字段属性数据
|
598
|
-
if (attributeMap[item.dataIndex] && attributeMap[item.dataIndex + ".name"]) {
|
599
|
-
value = attributeMap[item.dataIndex + ".name"];
|
600
|
-
contentTitle = value;
|
601
|
-
}
|
602
577
|
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
578
|
+
data = topo.attributeMetricDisplay.getData() || [];
|
579
|
+
_ref3 = [].concat(data.filter(function (m) {
|
580
|
+
return m.id === id;
|
581
|
+
})), _ref3$ = _ref3[0], _item = _ref3$ === void 0 ? {} : _ref3$;
|
582
|
+
_attributeMap = _item.attributeMap || {};
|
583
|
+
object = _attributeMap[item.dataIndex + "_object"] || {};
|
584
|
+
|
585
|
+
if (!attributeMap[item.dataIndex + ".name"] && JSON.stringify(object) !== '{}') {
|
586
|
+
_object2 = (0, _extends2["default"])({}, object), displayName = _object2.displayName;
|
587
|
+
value = displayName || _attributeMap["" + item.dataIndex];
|
588
|
+
contentTitle = value;
|
589
|
+
}
|
615
590
|
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
591
|
+
if (item.dataIndex === 'ipv6_address') {
|
592
|
+
value = _attributeMap["" + item.dataIndex];
|
593
|
+
contentTitle = value;
|
594
|
+
}
|
620
595
|
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
596
|
+
if (isAppTopo && (item.dataIndex === 'source_type' || item.dataIndex === 'destination_type')) {
|
597
|
+
attr = topo.ciTyeCache.getCiType(attributeMap["" + item.dataIndex]) || {};
|
598
|
+
value = attr.displayName || attributeMap["" + item.dataIndex];
|
599
|
+
contentTitle = value;
|
600
|
+
}
|
601
|
+
|
602
|
+
infoData.push((0, _extends2["default"])({}, item, {
|
603
|
+
value: value,
|
604
|
+
contentTitle: contentTitle
|
605
|
+
}));
|
626
606
|
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
607
|
+
case 33:
|
608
|
+
case "end":
|
609
|
+
return _context5.stop();
|
610
|
+
}
|
611
|
+
}, _loop);
|
612
|
+
});
|
613
|
+
_iterator = _createForOfIteratorHelperLoose(col);
|
631
614
|
|
632
|
-
|
633
|
-
|
615
|
+
case 11:
|
616
|
+
if ((_step = _iterator()).done) {
|
617
|
+
_context6.next = 15;
|
634
618
|
break;
|
619
|
+
}
|
635
620
|
|
636
|
-
|
637
|
-
settBaseInfoInitLoading(false);
|
638
|
-
setBaseInfo(infoData);
|
621
|
+
return _context6.delegateYield(_loop(), "t0", 13);
|
639
622
|
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
623
|
+
case 13:
|
624
|
+
_context6.next = 11;
|
625
|
+
break;
|
626
|
+
|
627
|
+
case 15:
|
628
|
+
settBaseInfoInitLoading(false);
|
629
|
+
setBaseInfo(infoData);
|
630
|
+
|
631
|
+
case 17:
|
632
|
+
case "end":
|
633
|
+
return _context6.stop();
|
644
634
|
}
|
645
|
-
},
|
635
|
+
}, _callee5);
|
646
636
|
}));
|
647
637
|
return _baseInfoColChange.apply(this, arguments);
|
648
638
|
}
|
@@ -653,66 +643,64 @@ function ResourceOverview(props) {
|
|
653
643
|
|
654
644
|
|
655
645
|
function _getAttribute() {
|
656
|
-
_getAttribute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
657
|
-
var _yield$
|
658
|
-
|
659
|
-
return _regenerator["default"].wrap(function
|
660
|
-
while (1) {
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
}
|
646
|
+
_getAttribute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(id) {
|
647
|
+
var _yield$resourceOvervi2, baseInfos, res, _ref4, attributes;
|
648
|
+
|
649
|
+
return _regenerator["default"].wrap(function _callee6$(_context7) {
|
650
|
+
while (1) switch (_context7.prev = _context7.next) {
|
651
|
+
case 0:
|
652
|
+
if (id) {
|
653
|
+
_context7.next = 2;
|
654
|
+
break;
|
655
|
+
}
|
667
656
|
|
668
|
-
|
657
|
+
return _context7.abrupt("return");
|
669
658
|
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
659
|
+
case 2:
|
660
|
+
if (!(resourceOverviewProps !== null && resourceOverviewProps !== void 0 && resourceOverviewProps.getData)) {
|
661
|
+
_context7.next = 9;
|
662
|
+
break;
|
663
|
+
}
|
675
664
|
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
665
|
+
_context7.next = 5;
|
666
|
+
return resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.getData({
|
667
|
+
id: id
|
668
|
+
});
|
680
669
|
|
681
|
-
|
682
|
-
|
683
|
-
|
670
|
+
case 5:
|
671
|
+
_yield$resourceOvervi2 = _context7.sent;
|
672
|
+
baseInfos = _yield$resourceOvervi2.baseInfos;
|
684
673
|
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
674
|
+
if (!baseInfos) {
|
675
|
+
_context7.next = 9;
|
676
|
+
break;
|
677
|
+
}
|
689
678
|
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
679
|
+
return _context7.abrupt("return", baseInfos);
|
680
|
+
|
681
|
+
case 9:
|
682
|
+
_context7.next = 11;
|
683
|
+
return _overview["default"].commonQueryCiData({
|
684
|
+
condition: "id('" + id + "')",
|
685
|
+
refAttribute: true,
|
686
|
+
orders: [{
|
687
|
+
name: 'CREATED_TIME',
|
688
|
+
type: 'asc'
|
689
|
+
}],
|
690
|
+
pageIndex: 1,
|
691
|
+
pageSize: 10
|
692
|
+
});
|
704
693
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
694
|
+
case 11:
|
695
|
+
res = _context7.sent;
|
696
|
+
_ref4 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref4.attributes;
|
697
|
+
return _context7.abrupt("return", attributes || {});
|
709
698
|
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
}
|
699
|
+
case 14:
|
700
|
+
case "end":
|
701
|
+
return _context7.stop();
|
714
702
|
}
|
715
|
-
},
|
703
|
+
}, _callee6);
|
716
704
|
}));
|
717
705
|
return _getAttribute.apply(this, arguments);
|
718
706
|
}
|
@@ -722,91 +710,89 @@ function ResourceOverview(props) {
|
|
722
710
|
}
|
723
711
|
|
724
712
|
function _metricColChange() {
|
725
|
-
_metricColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
713
|
+
_metricColChange = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(col) {
|
726
714
|
var _col2, _col3;
|
727
715
|
|
728
|
-
var codes, endTime, params,
|
716
|
+
var codes, endTime, params, _ref6, times, metricList, metricLists;
|
729
717
|
|
730
|
-
return _regenerator["default"].wrap(function
|
731
|
-
while (1) {
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
718
|
+
return _regenerator["default"].wrap(function _callee7$(_context8) {
|
719
|
+
while (1) switch (_context8.prev = _context8.next) {
|
720
|
+
case 0:
|
721
|
+
// console.log('metricColChange col', col);
|
722
|
+
col = (_col2 = col) === null || _col2 === void 0 ? void 0 : _col2.filter(function (item) {
|
723
|
+
return !item.hidden;
|
724
|
+
});
|
725
|
+
|
726
|
+
if ((_col3 = col) !== null && _col3 !== void 0 && _col3.length) {
|
727
|
+
_context8.next = 4;
|
728
|
+
break;
|
729
|
+
}
|
730
|
+
|
731
|
+
setMetric([]); // Message.error('指标未设置')
|
732
|
+
|
733
|
+
return _context8.abrupt("return");
|
738
734
|
|
739
|
-
|
740
|
-
|
741
|
-
|
735
|
+
case 4:
|
736
|
+
codes = col.map(function (item) {
|
737
|
+
return item.dataIndex;
|
738
|
+
});
|
739
|
+
endTime = Math.floor(new Date().getTime() / 1000);
|
740
|
+
params = {
|
741
|
+
ciIds: [id],
|
742
|
+
subIds: [id],
|
743
|
+
startTime: endTime - 60 * 60,
|
744
|
+
endTime: endTime,
|
745
|
+
codes: codes
|
746
|
+
};
|
747
|
+
|
748
|
+
if (isAppTopo) {
|
749
|
+
_ref6 = resourceOverviewProps.metricProps || {}, times = _ref6.times;
|
750
|
+
|
751
|
+
if (times !== null && times !== void 0 && times.length) {
|
752
|
+
params.startTime = times[0];
|
753
|
+
params.endTime = times[1];
|
742
754
|
}
|
755
|
+
}
|
743
756
|
|
744
|
-
|
757
|
+
setMetricInitLoading(true);
|
758
|
+
_context8.next = 11;
|
759
|
+
return _overview["default"].getMetricList(params);
|
745
760
|
|
746
|
-
|
761
|
+
case 11:
|
762
|
+
metricList = _context8.sent;
|
763
|
+
metricLists = metricList.concat(getNewMetricList());
|
747
764
|
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
ciIds: [id],
|
755
|
-
subIds: [id],
|
765
|
+
_rlog.rlog.debug('metricColChange', metricLists, monitorMetricModels);
|
766
|
+
|
767
|
+
setMetric(col.map(function (item, key) {
|
768
|
+
return {
|
769
|
+
code: item.dataIndex,
|
770
|
+
chartIndex: key,
|
756
771
|
startTime: endTime - 60 * 60,
|
757
772
|
endTime: endTime,
|
758
|
-
|
773
|
+
metricItem: monitorMetricModels.find(function (m_item) {
|
774
|
+
return m_item.code === item.dataIndex;
|
775
|
+
}),
|
776
|
+
list: metricLists.filter(function (m_item) {
|
777
|
+
return m_item.metricCode === item.dataIndex;
|
778
|
+
})
|
759
779
|
};
|
780
|
+
}));
|
781
|
+
setMetricInitLoading(false);
|
782
|
+
|
783
|
+
if (!isAppTopo) {
|
784
|
+
// 一分钟更新一次指标信息 metricTimer
|
785
|
+
window.topo_overview_metric_timer && clearInterval(window.topo_overview_metric_timer);
|
786
|
+
window.topo_overview_metric_timer = setInterval(function () {
|
787
|
+
metricColChange(col);
|
788
|
+
}, 60000);
|
789
|
+
}
|
760
790
|
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
if (times !== null && times !== void 0 && times.length) {
|
765
|
-
params.startTime = times[0];
|
766
|
-
params.endTime = times[1];
|
767
|
-
}
|
768
|
-
}
|
769
|
-
|
770
|
-
setMetricInitLoading(true);
|
771
|
-
_context8.next = 11;
|
772
|
-
return _overview["default"].getMetricList(params);
|
773
|
-
|
774
|
-
case 11:
|
775
|
-
metricList = _context8.sent;
|
776
|
-
metricLists = metricList.concat(getNewMetricList());
|
777
|
-
|
778
|
-
_rlog.rlog.debug('metricColChange', metricLists, monitorMetricModels);
|
779
|
-
|
780
|
-
setMetric(col.map(function (item, key) {
|
781
|
-
return {
|
782
|
-
code: item.dataIndex,
|
783
|
-
chartIndex: key,
|
784
|
-
startTime: endTime - 60 * 60,
|
785
|
-
endTime: endTime,
|
786
|
-
metricItem: monitorMetricModels.find(function (m_item) {
|
787
|
-
return m_item.code === item.dataIndex;
|
788
|
-
}),
|
789
|
-
list: metricLists.filter(function (m_item) {
|
790
|
-
return m_item.metricCode === item.dataIndex;
|
791
|
-
})
|
792
|
-
};
|
793
|
-
}));
|
794
|
-
setMetricInitLoading(false);
|
795
|
-
|
796
|
-
if (!isAppTopo) {
|
797
|
-
// 一分钟更新一次指标信息 metricTimer
|
798
|
-
window.topo_overview_metric_timer && clearInterval(window.topo_overview_metric_timer);
|
799
|
-
window.topo_overview_metric_timer = setInterval(function () {
|
800
|
-
metricColChange(col);
|
801
|
-
}, 60000);
|
802
|
-
}
|
803
|
-
|
804
|
-
case 17:
|
805
|
-
case "end":
|
806
|
-
return _context8.stop();
|
807
|
-
}
|
791
|
+
case 17:
|
792
|
+
case "end":
|
793
|
+
return _context8.stop();
|
808
794
|
}
|
809
|
-
},
|
795
|
+
}, _callee7);
|
810
796
|
}));
|
811
797
|
return _metricColChange.apply(this, arguments);
|
812
798
|
}
|