@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
@@ -8,7 +8,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Sy
|
|
8
8
|
|
9
9
|
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); }
|
10
10
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
11
|
+
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; }
|
12
12
|
|
13
13
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
14
14
|
import moment from 'moment';
|
@@ -163,27 +163,25 @@ export default function ResourceOverview(props) {
|
|
163
163
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(roomLink, id) {
|
164
164
|
var power;
|
165
165
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
166
|
-
while (1) {
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
}
|
166
|
+
while (1) switch (_context.prev = _context.next) {
|
167
|
+
case 0:
|
168
|
+
onClose();
|
169
|
+
_context.next = 3;
|
170
|
+
return commonQueryCiData(id);
|
171
|
+
|
172
|
+
case 3:
|
173
|
+
power = _context.sent;
|
174
|
+
|
175
|
+
// console.log(power)
|
176
|
+
if (power.data.length) {
|
177
|
+
window.open("" + window.location.origin + roomLink);
|
178
|
+
} else {
|
179
|
+
_Message.error('无访问权限,请联系管理员');
|
180
|
+
}
|
182
181
|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
}
|
182
|
+
case 5:
|
183
|
+
case "end":
|
184
|
+
return _context.stop();
|
187
185
|
}
|
188
186
|
}, _callee);
|
189
187
|
}));
|
@@ -254,22 +252,20 @@ export default function ResourceOverview(props) {
|
|
254
252
|
_getDevice = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
255
253
|
var list;
|
256
254
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
257
|
-
while (1) {
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
return _context2.stop();
|
272
|
-
}
|
255
|
+
while (1) switch (_context2.prev = _context2.next) {
|
256
|
+
case 0:
|
257
|
+
_context2.next = 2;
|
258
|
+
return service.getDeviceTypeList();
|
259
|
+
|
260
|
+
case 2:
|
261
|
+
list = _context2.sent;
|
262
|
+
setIsDevice(list.some(function (item) {
|
263
|
+
return item.code === ciType;
|
264
|
+
})); // console.log('getDevice', ciType, list);
|
265
|
+
|
266
|
+
case 4:
|
267
|
+
case "end":
|
268
|
+
return _context2.stop();
|
273
269
|
}
|
274
270
|
}, _callee2);
|
275
271
|
}));
|
@@ -289,41 +285,39 @@ export default function ResourceOverview(props) {
|
|
289
285
|
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;
|
290
286
|
|
291
287
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
292
|
-
while (1) {
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
address = '';
|
288
|
+
while (1) switch (_context3.prev = _context3.next) {
|
289
|
+
case 0:
|
290
|
+
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;
|
291
|
+
address = '';
|
297
292
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
293
|
+
if (!(owned_computer_room && owned_cabinet)) {
|
294
|
+
_context3.next = 7;
|
295
|
+
break;
|
296
|
+
}
|
302
297
|
|
303
|
-
|
304
|
-
|
298
|
+
_context3.next = 5;
|
299
|
+
return queryCisByIds([owned_computer_room, owned_cabinet]);
|
305
300
|
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
301
|
+
case 5:
|
302
|
+
res = _context3.sent;
|
303
|
+
address = (((_res$find = res.find(function (item) {
|
304
|
+
return item.id === owned_computer_room;
|
305
|
+
})) === 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) {
|
306
|
+
return item.id === owned_cabinet;
|
307
|
+
})) === 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) || '');
|
313
308
|
|
314
|
-
|
315
|
-
|
309
|
+
case 7:
|
310
|
+
u = '';
|
316
311
|
|
317
|
-
|
318
|
-
|
319
|
-
|
312
|
+
if (start_u_location || end_u_location) {
|
313
|
+
u = (start_u_location || '') + "-" + (end_u_location || '');
|
314
|
+
}
|
320
315
|
|
321
|
-
|
316
|
+
return _context3.abrupt("return", address || u ? "" + (address || '') + (u ? " " + u : '') : '');
|
322
317
|
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
}
|
318
|
+
case 10:
|
319
|
+
case "end":
|
320
|
+
return _context3.stop();
|
327
321
|
}
|
328
322
|
}, _callee3);
|
329
323
|
}));
|
@@ -391,37 +385,35 @@ export default function ResourceOverview(props) {
|
|
391
385
|
_alarmRiskOperation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(type, params) {
|
392
386
|
var res;
|
393
387
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
394
|
-
while (1) {
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
}
|
388
|
+
while (1) switch (_context4.prev = _context4.next) {
|
389
|
+
case 0:
|
390
|
+
if (!(type === 'alarm')) {
|
391
|
+
_context4.next = 6;
|
392
|
+
break;
|
393
|
+
}
|
401
394
|
|
402
|
-
|
403
|
-
|
395
|
+
_context4.next = 3;
|
396
|
+
return service.handleAlarm(params);
|
404
397
|
|
405
|
-
|
406
|
-
|
398
|
+
case 3:
|
399
|
+
res = _context4.sent;
|
407
400
|
|
408
|
-
|
401
|
+
_Message.success('受理成功');
|
409
402
|
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
403
|
+
refreshAlarmData(id); // if (isAppTopo) {
|
404
|
+
// const {
|
405
|
+
// displayName: ciName,
|
406
|
+
// attributeMap: modelAttributeMap,
|
407
|
+
// domain,
|
408
|
+
// } = topo.ciTyeCache.getCiType(ciType);
|
409
|
+
// initAppTopo(monitorMetricModels, modelAttributeMap, ciName, domain);
|
410
|
+
// } else {
|
411
|
+
// getAlarmRiskData(id);
|
412
|
+
// }
|
420
413
|
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
}
|
414
|
+
case 6:
|
415
|
+
case "end":
|
416
|
+
return _context4.stop();
|
425
417
|
}
|
426
418
|
}, _callee4);
|
427
419
|
}));
|
@@ -441,174 +433,172 @@ export default function ResourceOverview(props) {
|
|
441
433
|
|
442
434
|
|
443
435
|
function _baseInfoColChange() {
|
444
|
-
_baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
436
|
+
_baseInfoColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(col) {
|
445
437
|
var _col;
|
446
438
|
|
447
|
-
var infoData, attributeMap, _iterator, _step
|
439
|
+
var infoData, attributeMap, _loop, _iterator, _step;
|
448
440
|
|
449
|
-
return _regeneratorRuntime.wrap(function
|
450
|
-
while (1) {
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
}
|
441
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
442
|
+
while (1) switch (_context6.prev = _context6.next) {
|
443
|
+
case 0:
|
444
|
+
if ((_col = col) !== null && _col !== void 0 && _col.length) {
|
445
|
+
_context6.next = 3;
|
446
|
+
break;
|
447
|
+
}
|
457
448
|
|
458
|
-
|
459
|
-
|
449
|
+
setBaseInfo([]);
|
450
|
+
return _context6.abrupt("return");
|
460
451
|
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
452
|
+
case 3:
|
453
|
+
settBaseInfoInitLoading(true);
|
454
|
+
infoData = [];
|
455
|
+
_context6.next = 7;
|
456
|
+
return getAttribute(id);
|
466
457
|
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
458
|
+
case 7:
|
459
|
+
attributeMap = _context6.sent;
|
460
|
+
// console.log('getAttribute', attributeMap);
|
461
|
+
col = col.filter(function (item) {
|
462
|
+
return !item.hidden;
|
463
|
+
});
|
464
|
+
_loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
|
465
|
+
var item, value, contentTitle, link, address, owned_computer_room, owned_cabinet, roomLink, node, data, _ref3, _ref3$, _item, _attributeMap, object, _object2, displayName, attr;
|
466
|
+
|
467
|
+
return _regeneratorRuntime.wrap(function _loop$(_context5) {
|
468
|
+
while (1) switch (_context5.prev = _context5.next) {
|
469
|
+
case 0:
|
470
|
+
item = _step.value;
|
471
|
+
value = formatMetric(attributeMap[item.dataIndex], ciTypeMeta.attributeMap[item.dataIndex]);
|
472
|
+
contentTitle = value;
|
473
|
+
_context5.t0 = item.dataIndex;
|
474
|
+
_context5.next = _context5.t0 === 'display_name' ? 6 : _context5.t0 === 'ciName' ? 9 : _context5.t0 === 'res_address' ? 12 : _context5.t0 === 'imageName' ? 19 : 23;
|
475
|
+
break;
|
476
|
+
|
477
|
+
case 6:
|
478
|
+
// 无监控模板不能跳转详情。跳转前需判定资源实例数据属性中是否包含support_templates属性。若不包含,则不能跳转
|
479
|
+
if (attributeMap.support_templates) {
|
480
|
+
link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
|
481
|
+
|
482
|
+
value = /*#__PURE__*/React.createElement("span", {
|
483
|
+
onClick: onClose
|
484
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
485
|
+
className: styles.link,
|
486
|
+
disabled: true,
|
487
|
+
title: attributeMap.display_name || '',
|
488
|
+
to: formatUrl(link)
|
489
|
+
}, attributeMap.display_name || '-'));
|
490
|
+
} else {
|
491
|
+
value = attributeMap.display_name || '-';
|
492
|
+
}
|
474
493
|
|
475
|
-
|
476
|
-
|
477
|
-
_context6.next = 26;
|
478
|
-
break;
|
479
|
-
}
|
494
|
+
contentTitle = attributeMap.display_name || '-';
|
495
|
+
return _context5.abrupt("break", 24);
|
480
496
|
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
case 0:
|
490
|
-
_context5.t0 = item.dataIndex;
|
491
|
-
_context5.next = _context5.t0 === 'display_name' ? 3 : _context5.t0 === 'ciName' ? 6 : _context5.t0 === 'res_address' ? 9 : _context5.t0 === 'imageName' ? 16 : 20;
|
492
|
-
break;
|
493
|
-
|
494
|
-
case 3:
|
495
|
-
// 无监控模板不能跳转详情。跳转前需判定资源实例数据属性中是否包含support_templates属性。若不包含,则不能跳转
|
496
|
-
if (attributeMap.support_templates) {
|
497
|
-
link = "/default/pagecenter/resDetail/view/" + id + "?resId=" + id + "&domainCode=" + ciTypeMeta.domain + "&title=" + attributeMap.display_name + "&ciCode=" + ciType; // 资源跳转链接
|
498
|
-
|
499
|
-
value = /*#__PURE__*/React.createElement("span", {
|
500
|
-
onClick: onClose
|
501
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
502
|
-
className: styles.link,
|
503
|
-
disabled: true,
|
504
|
-
title: attributeMap.display_name || '',
|
505
|
-
to: formatUrl(link)
|
506
|
-
}, attributeMap.display_name || '-'));
|
507
|
-
} else {
|
508
|
-
value = attributeMap.display_name || '-';
|
509
|
-
}
|
497
|
+
case 9:
|
498
|
+
value = ciTypeMeta.displayName;
|
499
|
+
contentTitle = value;
|
500
|
+
return _context5.abrupt("break", 24);
|
501
|
+
|
502
|
+
case 12:
|
503
|
+
_context5.next = 14;
|
504
|
+
return getAddressFormat(attributeMap);
|
510
505
|
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
return getAddressFormat(attributeMap);
|
522
|
-
|
523
|
-
case 11:
|
524
|
-
address = _context5.sent;
|
525
|
-
owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
|
526
|
-
|
527
|
-
if (owned_computer_room && owned_cabinet) {
|
528
|
-
// /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
|
529
|
-
roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
|
530
|
-
value = /*#__PURE__*/React.createElement("span", {
|
531
|
-
onClick: function onClick() {
|
532
|
-
jump(roomLink, owned_computer_room);
|
533
|
-
}
|
534
|
-
}, /*#__PURE__*/React.createElement("span", {
|
535
|
-
className: styles.link,
|
536
|
-
title: address
|
537
|
-
}, address));
|
538
|
-
} else {
|
539
|
-
value = address;
|
506
|
+
case 14:
|
507
|
+
address = _context5.sent;
|
508
|
+
owned_computer_room = attributeMap.owned_computer_room, owned_cabinet = attributeMap.owned_cabinet; // 跳转3D机房定位设备
|
509
|
+
|
510
|
+
if (owned_computer_room && owned_cabinet) {
|
511
|
+
// /visual/room/index_runtime.html?type=preview&room_id=00000000383e3381&rack_id=11&device_id=122
|
512
|
+
roomLink = "/visual/room/index_runtime.html?type=preview&room_id=" + owned_computer_room + "&rack_id=" + owned_cabinet + "&device_id=" + id;
|
513
|
+
value = /*#__PURE__*/React.createElement("span", {
|
514
|
+
onClick: function onClick() {
|
515
|
+
jump(roomLink, owned_computer_room);
|
540
516
|
}
|
517
|
+
}, /*#__PURE__*/React.createElement("span", {
|
518
|
+
className: styles.link,
|
519
|
+
title: address
|
520
|
+
}, address));
|
521
|
+
} else {
|
522
|
+
value = address;
|
523
|
+
}
|
541
524
|
|
542
|
-
|
543
|
-
|
525
|
+
contentTitle = address;
|
526
|
+
return _context5.abrupt("break", 24);
|
544
527
|
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
528
|
+
case 19:
|
529
|
+
node = topo.getDataModel().getDataByTag(id);
|
530
|
+
value = (node === null || node === void 0 ? void 0 : node.a('customName')) || (node === null || node === void 0 ? void 0 : node.a('name')) || '-';
|
531
|
+
contentTitle = value;
|
532
|
+
return _context5.abrupt("break", 24);
|
550
533
|
|
551
|
-
|
552
|
-
|
534
|
+
case 23:
|
535
|
+
return _context5.abrupt("break", 24);
|
553
536
|
|
554
|
-
|
555
|
-
|
556
|
-
|
537
|
+
case 24:
|
538
|
+
// 拿翻译字段属性数据
|
539
|
+
if (attributeMap[item.dataIndex] && attributeMap[item.dataIndex + ".name"]) {
|
540
|
+
value = attributeMap[item.dataIndex + ".name"];
|
541
|
+
contentTitle = value;
|
557
542
|
}
|
558
|
-
}
|
559
|
-
}, _callee5);
|
560
|
-
})(), "t0", 15);
|
561
|
-
|
562
|
-
case 15:
|
563
|
-
// 拿翻译字段属性数据
|
564
|
-
if (attributeMap[item.dataIndex] && attributeMap[item.dataIndex + ".name"]) {
|
565
|
-
value = attributeMap[item.dataIndex + ".name"];
|
566
|
-
contentTitle = value;
|
567
|
-
}
|
568
543
|
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
544
|
+
data = topo.attributeMetricDisplay.getData() || [];
|
545
|
+
_ref3 = [].concat(data.filter(function (m) {
|
546
|
+
return m.id === id;
|
547
|
+
})), _ref3$ = _ref3[0], _item = _ref3$ === void 0 ? {} : _ref3$;
|
548
|
+
_attributeMap = _item.attributeMap || {};
|
549
|
+
object = _attributeMap[item.dataIndex + "_object"] || {};
|
550
|
+
|
551
|
+
if (!attributeMap[item.dataIndex + ".name"] && JSON.stringify(object) !== '{}') {
|
552
|
+
_object2 = _extends({}, object), displayName = _object2.displayName;
|
553
|
+
value = displayName || _attributeMap["" + item.dataIndex];
|
554
|
+
contentTitle = value;
|
555
|
+
}
|
581
556
|
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
557
|
+
if (item.dataIndex === 'ipv6_address') {
|
558
|
+
value = _attributeMap["" + item.dataIndex];
|
559
|
+
contentTitle = value;
|
560
|
+
}
|
586
561
|
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
562
|
+
if (isAppTopo && (item.dataIndex === 'source_type' || item.dataIndex === 'destination_type')) {
|
563
|
+
attr = topo.ciTyeCache.getCiType(attributeMap["" + item.dataIndex]) || {};
|
564
|
+
value = attr.displayName || attributeMap["" + item.dataIndex];
|
565
|
+
contentTitle = value;
|
566
|
+
}
|
592
567
|
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
568
|
+
infoData.push(_extends({}, item, {
|
569
|
+
value: value,
|
570
|
+
contentTitle: contentTitle
|
571
|
+
}));
|
572
|
+
|
573
|
+
case 33:
|
574
|
+
case "end":
|
575
|
+
return _context5.stop();
|
576
|
+
}
|
577
|
+
}, _loop);
|
578
|
+
});
|
579
|
+
_iterator = _createForOfIteratorHelperLoose(col);
|
597
580
|
|
598
|
-
|
599
|
-
|
581
|
+
case 11:
|
582
|
+
if ((_step = _iterator()).done) {
|
583
|
+
_context6.next = 15;
|
600
584
|
break;
|
585
|
+
}
|
601
586
|
|
602
|
-
|
603
|
-
settBaseInfoInitLoading(false);
|
604
|
-
setBaseInfo(infoData);
|
587
|
+
return _context6.delegateYield(_loop(), "t0", 13);
|
605
588
|
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
589
|
+
case 13:
|
590
|
+
_context6.next = 11;
|
591
|
+
break;
|
592
|
+
|
593
|
+
case 15:
|
594
|
+
settBaseInfoInitLoading(false);
|
595
|
+
setBaseInfo(infoData);
|
596
|
+
|
597
|
+
case 17:
|
598
|
+
case "end":
|
599
|
+
return _context6.stop();
|
610
600
|
}
|
611
|
-
},
|
601
|
+
}, _callee5);
|
612
602
|
}));
|
613
603
|
return _baseInfoColChange.apply(this, arguments);
|
614
604
|
}
|
@@ -619,66 +609,64 @@ export default function ResourceOverview(props) {
|
|
619
609
|
|
620
610
|
|
621
611
|
function _getAttribute() {
|
622
|
-
_getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
623
|
-
var _yield$
|
624
|
-
|
625
|
-
return _regeneratorRuntime.wrap(function
|
626
|
-
while (1) {
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
}
|
612
|
+
_getAttribute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id) {
|
613
|
+
var _yield$resourceOvervi2, baseInfos, res, _ref4, attributes;
|
614
|
+
|
615
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context7) {
|
616
|
+
while (1) switch (_context7.prev = _context7.next) {
|
617
|
+
case 0:
|
618
|
+
if (id) {
|
619
|
+
_context7.next = 2;
|
620
|
+
break;
|
621
|
+
}
|
633
622
|
|
634
|
-
|
623
|
+
return _context7.abrupt("return");
|
635
624
|
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
625
|
+
case 2:
|
626
|
+
if (!(resourceOverviewProps !== null && resourceOverviewProps !== void 0 && resourceOverviewProps.getData)) {
|
627
|
+
_context7.next = 9;
|
628
|
+
break;
|
629
|
+
}
|
641
630
|
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
631
|
+
_context7.next = 5;
|
632
|
+
return resourceOverviewProps === null || resourceOverviewProps === void 0 ? void 0 : resourceOverviewProps.getData({
|
633
|
+
id: id
|
634
|
+
});
|
646
635
|
|
647
|
-
|
648
|
-
|
649
|
-
|
636
|
+
case 5:
|
637
|
+
_yield$resourceOvervi2 = _context7.sent;
|
638
|
+
baseInfos = _yield$resourceOvervi2.baseInfos;
|
650
639
|
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
640
|
+
if (!baseInfos) {
|
641
|
+
_context7.next = 9;
|
642
|
+
break;
|
643
|
+
}
|
655
644
|
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
645
|
+
return _context7.abrupt("return", baseInfos);
|
646
|
+
|
647
|
+
case 9:
|
648
|
+
_context7.next = 11;
|
649
|
+
return service.commonQueryCiData({
|
650
|
+
condition: "id('" + id + "')",
|
651
|
+
refAttribute: true,
|
652
|
+
orders: [{
|
653
|
+
name: 'CREATED_TIME',
|
654
|
+
type: 'asc'
|
655
|
+
}],
|
656
|
+
pageIndex: 1,
|
657
|
+
pageSize: 10
|
658
|
+
});
|
670
659
|
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
660
|
+
case 11:
|
661
|
+
res = _context7.sent;
|
662
|
+
_ref4 = (res === null || res === void 0 ? void 0 : res.data[0]) || {}, attributes = _ref4.attributes;
|
663
|
+
return _context7.abrupt("return", attributes || {});
|
675
664
|
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
}
|
665
|
+
case 14:
|
666
|
+
case "end":
|
667
|
+
return _context7.stop();
|
680
668
|
}
|
681
|
-
},
|
669
|
+
}, _callee6);
|
682
670
|
}));
|
683
671
|
return _getAttribute.apply(this, arguments);
|
684
672
|
}
|
@@ -688,89 +676,87 @@ export default function ResourceOverview(props) {
|
|
688
676
|
}
|
689
677
|
|
690
678
|
function _metricColChange() {
|
691
|
-
_metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
679
|
+
_metricColChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(col) {
|
692
680
|
var _col2, _col3;
|
693
681
|
|
694
|
-
var codes, endTime, params,
|
682
|
+
var codes, endTime, params, _ref6, times, metricList, metricLists;
|
695
683
|
|
696
|
-
return _regeneratorRuntime.wrap(function
|
697
|
-
while (1) {
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
});
|
684
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context8) {
|
685
|
+
while (1) switch (_context8.prev = _context8.next) {
|
686
|
+
case 0:
|
687
|
+
// console.log('metricColChange col', col);
|
688
|
+
col = (_col2 = col) === null || _col2 === void 0 ? void 0 : _col2.filter(function (item) {
|
689
|
+
return !item.hidden;
|
690
|
+
});
|
704
691
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
692
|
+
if ((_col3 = col) !== null && _col3 !== void 0 && _col3.length) {
|
693
|
+
_context8.next = 4;
|
694
|
+
break;
|
695
|
+
}
|
709
696
|
|
710
|
-
|
697
|
+
setMetric([]); // Message.error('指标未设置')
|
711
698
|
|
712
|
-
|
699
|
+
return _context8.abrupt("return");
|
713
700
|
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
701
|
+
case 4:
|
702
|
+
codes = col.map(function (item) {
|
703
|
+
return item.dataIndex;
|
704
|
+
});
|
705
|
+
endTime = Math.floor(new Date().getTime() / 1000);
|
706
|
+
params = {
|
707
|
+
ciIds: [id],
|
708
|
+
subIds: [id],
|
709
|
+
startTime: endTime - 60 * 60,
|
710
|
+
endTime: endTime,
|
711
|
+
codes: codes
|
712
|
+
};
|
713
|
+
|
714
|
+
if (isAppTopo) {
|
715
|
+
_ref6 = resourceOverviewProps.metricProps || {}, times = _ref6.times;
|
716
|
+
|
717
|
+
if (times !== null && times !== void 0 && times.length) {
|
718
|
+
params.startTime = times[0];
|
719
|
+
params.endTime = times[1];
|
720
|
+
}
|
721
|
+
}
|
722
|
+
|
723
|
+
setMetricInitLoading(true);
|
724
|
+
_context8.next = 11;
|
725
|
+
return service.getMetricList(params);
|
726
|
+
|
727
|
+
case 11:
|
728
|
+
metricList = _context8.sent;
|
729
|
+
metricLists = metricList.concat(getNewMetricList());
|
730
|
+
rlog.debug('metricColChange', metricLists, monitorMetricModels);
|
731
|
+
setMetric(col.map(function (item, key) {
|
732
|
+
return {
|
733
|
+
code: item.dataIndex,
|
734
|
+
chartIndex: key,
|
722
735
|
startTime: endTime - 60 * 60,
|
723
736
|
endTime: endTime,
|
724
|
-
|
737
|
+
metricItem: monitorMetricModels.find(function (m_item) {
|
738
|
+
return m_item.code === item.dataIndex;
|
739
|
+
}),
|
740
|
+
list: metricLists.filter(function (m_item) {
|
741
|
+
return m_item.metricCode === item.dataIndex;
|
742
|
+
})
|
725
743
|
};
|
744
|
+
}));
|
745
|
+
setMetricInitLoading(false);
|
746
|
+
|
747
|
+
if (!isAppTopo) {
|
748
|
+
// 一分钟更新一次指标信息 metricTimer
|
749
|
+
window.topo_overview_metric_timer && clearInterval(window.topo_overview_metric_timer);
|
750
|
+
window.topo_overview_metric_timer = setInterval(function () {
|
751
|
+
metricColChange(col);
|
752
|
+
}, 60000);
|
753
|
+
}
|
726
754
|
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
if (times !== null && times !== void 0 && times.length) {
|
731
|
-
params.startTime = times[0];
|
732
|
-
params.endTime = times[1];
|
733
|
-
}
|
734
|
-
}
|
735
|
-
|
736
|
-
setMetricInitLoading(true);
|
737
|
-
_context8.next = 11;
|
738
|
-
return service.getMetricList(params);
|
739
|
-
|
740
|
-
case 11:
|
741
|
-
metricList = _context8.sent;
|
742
|
-
metricLists = metricList.concat(getNewMetricList());
|
743
|
-
rlog.debug('metricColChange', metricLists, monitorMetricModels);
|
744
|
-
setMetric(col.map(function (item, key) {
|
745
|
-
return {
|
746
|
-
code: item.dataIndex,
|
747
|
-
chartIndex: key,
|
748
|
-
startTime: endTime - 60 * 60,
|
749
|
-
endTime: endTime,
|
750
|
-
metricItem: monitorMetricModels.find(function (m_item) {
|
751
|
-
return m_item.code === item.dataIndex;
|
752
|
-
}),
|
753
|
-
list: metricLists.filter(function (m_item) {
|
754
|
-
return m_item.metricCode === item.dataIndex;
|
755
|
-
})
|
756
|
-
};
|
757
|
-
}));
|
758
|
-
setMetricInitLoading(false);
|
759
|
-
|
760
|
-
if (!isAppTopo) {
|
761
|
-
// 一分钟更新一次指标信息 metricTimer
|
762
|
-
window.topo_overview_metric_timer && clearInterval(window.topo_overview_metric_timer);
|
763
|
-
window.topo_overview_metric_timer = setInterval(function () {
|
764
|
-
metricColChange(col);
|
765
|
-
}, 60000);
|
766
|
-
}
|
767
|
-
|
768
|
-
case 17:
|
769
|
-
case "end":
|
770
|
-
return _context8.stop();
|
771
|
-
}
|
755
|
+
case 17:
|
756
|
+
case "end":
|
757
|
+
return _context8.stop();
|
772
758
|
}
|
773
|
-
},
|
759
|
+
}, _callee7);
|
774
760
|
}));
|
775
761
|
return _metricColChange.apply(this, arguments);
|
776
762
|
}
|