@riil-frontend/component-topology 7.0.7 → 7.0.9
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/index.js +1 -1
- package/es/core/hooks/usePolling.js +3 -3
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/store/models/topoConfig.js +6 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +2 -1
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +4 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +2 -2
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +3 -3
- package/lib/core/hooks/usePolling.js +3 -3
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/store/models/topoConfig.js +6 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverview.js +2 -1
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +4 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/components/LinkTopo/hooks/useMetricPolling.js +2 -2
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/hooks/useMetricModels.js +3 -3
- package/package.json +2 -2
@@ -21,9 +21,9 @@ var usePolling = function usePolling(props) {
|
|
21
21
|
var resIdsList = resAndMetrics === null || resAndMetrics === void 0 ? void 0 : resAndMetrics.resIdsList; // 轮询hooks
|
22
22
|
|
23
23
|
var _useRequest = useRequest(refresh, {
|
24
|
-
pollingInterval:
|
25
|
-
|
26
|
-
// debounceInterval:
|
24
|
+
pollingInterval: 60 * 1000,
|
25
|
+
pollingWhenHidden: false,
|
26
|
+
// debounceInterval: 200,
|
27
27
|
manual: true,
|
28
28
|
onSuccess: function onSuccess(result) {
|
29
29
|
if (result) {
|
@@ -23,7 +23,7 @@ import topoFactory from "./topoFactory";
|
|
23
23
|
import ElementTagTipConfig from "./tagstips/ElementTagTipConfig";
|
24
24
|
import SelectionModel from "./SelectionModel"; // eslint-disable-next-line no-undef
|
25
25
|
|
26
|
-
var version = typeof "7.0.
|
26
|
+
var version = typeof "7.0.9" === 'string' ? "7.0.9" : null;
|
27
27
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
28
28
|
/**
|
29
29
|
* 拓扑显示和编辑
|
@@ -386,7 +386,12 @@ export default function (topoApp) {
|
|
386
386
|
alarmListDefaultOpen: displayConfig.alarmListDefaultOpen,
|
387
387
|
extraConfig: JSON.stringify(_extends({}, displayConfig, {
|
388
388
|
// 背景图,便于加载拓扑直接显示背景图
|
389
|
-
background: topoApp.store.getModelState("background").current
|
389
|
+
background: topoApp.store.getModelState("background").current,
|
390
|
+
// 增加保存日志,便于排查链路重复问题 2023-4-12 19:27:18
|
391
|
+
saveHistories: [{
|
392
|
+
date: new Date().toLocaleString(),
|
393
|
+
version: topoApp.version
|
394
|
+
}].concat(displayConfig.saveHistories || [])
|
390
395
|
}))
|
391
396
|
};
|
392
397
|
rlog.debug('saveGlobalConfig', config);
|
@@ -954,7 +954,8 @@ export default function ResourceOverview(props) {
|
|
954
954
|
ciAttrAndMetricData: ciAttrAndMetricData
|
955
955
|
},
|
956
956
|
data: metric,
|
957
|
-
loading: metricInitLoading
|
957
|
+
loading: metricInitLoading,
|
958
|
+
formatMetricLatestValue: resourceOverviewProps.formatMetricLatestValue
|
958
959
|
})), /*#__PURE__*/React.createElement(EventsCard, {
|
959
960
|
alarmRiskList: alarmRiskList,
|
960
961
|
closeDetailDrawer: onClose,
|
@@ -60,7 +60,8 @@ export default function ResourceOverviewMetric(props) {
|
|
60
60
|
var topo = props.topo,
|
61
61
|
type = props.type,
|
62
62
|
data = props.data,
|
63
|
-
loading = props.loading
|
63
|
+
loading = props.loading,
|
64
|
+
formatMetricLatestValue = props.formatMetricLatestValue;
|
64
65
|
|
65
66
|
function formatValue(itemData) {
|
66
67
|
var _list;
|
@@ -69,7 +70,8 @@ export default function ResourceOverviewMetric(props) {
|
|
69
70
|
metricItem = itemData.metricItem,
|
70
71
|
list = itemData.list;
|
71
72
|
var format = metricValueFormat({
|
72
|
-
|
73
|
+
// 支持业务拓扑历史时间点指标值处理
|
74
|
+
value: formatMetricLatestValue ? formatMetricLatestValue(list) : (_list = list[list.length - 1]) === null || _list === void 0 ? void 0 : _list.metricValue,
|
73
75
|
dataType: metricItem.dataType,
|
74
76
|
dict: topo.dictCache.getDictObject(),
|
75
77
|
unit: metricItem.unit,
|
@@ -21,7 +21,7 @@ export default function useMetricPolling(_ref) {
|
|
21
21
|
|
22
22
|
|
23
23
|
var queryLinkMetricsRequest = useRequest(queryLinkLatestMetrics, {
|
24
|
-
pollingInterval:
|
24
|
+
pollingInterval: 60 * 1000,
|
25
25
|
pollingWhenHidden: false,
|
26
26
|
debounceInterval: 200,
|
27
27
|
manual: true,
|
@@ -31,7 +31,7 @@ export default function useMetricPolling(_ref) {
|
|
31
31
|
}
|
32
32
|
});
|
33
33
|
var queryInterfaceMetricsRequest = useRequest(queryLinkInterfacesLatestMetrics, {
|
34
|
-
pollingInterval:
|
34
|
+
pollingInterval: 60 * 1000,
|
35
35
|
pollingWhenHidden: false,
|
36
36
|
debounceInterval: 200,
|
37
37
|
manual: true,
|
@@ -92,9 +92,9 @@ var useMetricModels = function useMetricModels(props) {
|
|
92
92
|
}
|
93
93
|
|
94
94
|
var request = useRequest(fetchData, {
|
95
|
-
pollingInterval: 1000 *
|
96
|
-
|
97
|
-
// debounceInterval:
|
95
|
+
pollingInterval: 1000 * 60,
|
96
|
+
pollingWhenHidden: false,
|
97
|
+
// debounceInterval: 200,
|
98
98
|
manual: true,
|
99
99
|
onSuccess: function onSuccess(newMetricModels) {
|
100
100
|
var a = metricModels.map(function (item) {
|
@@ -34,9 +34,9 @@ var usePolling = function usePolling(props) {
|
|
34
34
|
var resIdsList = resAndMetrics === null || resAndMetrics === void 0 ? void 0 : resAndMetrics.resIdsList; // 轮询hooks
|
35
35
|
|
36
36
|
var _useRequest = (0, _ahooks.useRequest)(refresh, {
|
37
|
-
pollingInterval:
|
38
|
-
|
39
|
-
// debounceInterval:
|
37
|
+
pollingInterval: 60 * 1000,
|
38
|
+
pollingWhenHidden: false,
|
39
|
+
// debounceInterval: 200,
|
40
40
|
manual: true,
|
41
41
|
onSuccess: function onSuccess(result) {
|
42
42
|
if (result) {
|
@@ -54,7 +54,7 @@ var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTag
|
|
54
54
|
var _SelectionModel = _interopRequireDefault(require("./SelectionModel"));
|
55
55
|
|
56
56
|
// eslint-disable-next-line no-undef
|
57
|
-
var version = typeof "7.0.
|
57
|
+
var version = typeof "7.0.9" === 'string' ? "7.0.9" : null;
|
58
58
|
console.info("\u62D3\u6251\u7248\u672C: " + version);
|
59
59
|
/**
|
60
60
|
* 拓扑显示和编辑
|
@@ -408,7 +408,12 @@ function _default(topoApp) {
|
|
408
408
|
alarmListDefaultOpen: displayConfig.alarmListDefaultOpen,
|
409
409
|
extraConfig: JSON.stringify((0, _extends2["default"])({}, displayConfig, {
|
410
410
|
// 背景图,便于加载拓扑直接显示背景图
|
411
|
-
background: topoApp.store.getModelState("background").current
|
411
|
+
background: topoApp.store.getModelState("background").current,
|
412
|
+
// 增加保存日志,便于排查链路重复问题 2023-4-12 19:27:18
|
413
|
+
saveHistories: [{
|
414
|
+
date: new Date().toLocaleString(),
|
415
|
+
version: topoApp.version
|
416
|
+
}].concat(displayConfig.saveHistories || [])
|
412
417
|
}))
|
413
418
|
};
|
414
419
|
|
@@ -989,7 +989,8 @@ function ResourceOverview(props) {
|
|
989
989
|
ciAttrAndMetricData: ciAttrAndMetricData
|
990
990
|
},
|
991
991
|
data: metric,
|
992
|
-
loading: metricInitLoading
|
992
|
+
loading: metricInitLoading,
|
993
|
+
formatMetricLatestValue: resourceOverviewProps.formatMetricLatestValue
|
993
994
|
})), /*#__PURE__*/_react["default"].createElement(_EventsCard["default"], {
|
994
995
|
alarmRiskList: alarmRiskList,
|
995
996
|
closeDetailDrawer: onClose,
|
@@ -78,7 +78,8 @@ function ResourceOverviewMetric(props) {
|
|
78
78
|
var topo = props.topo,
|
79
79
|
type = props.type,
|
80
80
|
data = props.data,
|
81
|
-
loading = props.loading
|
81
|
+
loading = props.loading,
|
82
|
+
formatMetricLatestValue = props.formatMetricLatestValue;
|
82
83
|
|
83
84
|
function formatValue(itemData) {
|
84
85
|
var _list;
|
@@ -87,7 +88,8 @@ function ResourceOverviewMetric(props) {
|
|
87
88
|
metricItem = itemData.metricItem,
|
88
89
|
list = itemData.list;
|
89
90
|
var format = (0, _utils.metricValueFormat)({
|
90
|
-
|
91
|
+
// 支持业务拓扑历史时间点指标值处理
|
92
|
+
value: formatMetricLatestValue ? formatMetricLatestValue(list) : (_list = list[list.length - 1]) === null || _list === void 0 ? void 0 : _list.metricValue,
|
91
93
|
dataType: metricItem.dataType,
|
92
94
|
dict: topo.dictCache.getDictObject(),
|
93
95
|
unit: metricItem.unit,
|
@@ -37,7 +37,7 @@ function useMetricPolling(_ref) {
|
|
37
37
|
|
38
38
|
|
39
39
|
var queryLinkMetricsRequest = (0, _ahooks.useRequest)(_services.queryLinkLatestMetrics, {
|
40
|
-
pollingInterval:
|
40
|
+
pollingInterval: 60 * 1000,
|
41
41
|
pollingWhenHidden: false,
|
42
42
|
debounceInterval: 200,
|
43
43
|
manual: true,
|
@@ -48,7 +48,7 @@ function useMetricPolling(_ref) {
|
|
48
48
|
}
|
49
49
|
});
|
50
50
|
var queryInterfaceMetricsRequest = (0, _ahooks.useRequest)(_services.queryLinkInterfacesLatestMetrics, {
|
51
|
-
pollingInterval:
|
51
|
+
pollingInterval: 60 * 1000,
|
52
52
|
pollingWhenHidden: false,
|
53
53
|
debounceInterval: 200,
|
54
54
|
manual: true,
|
@@ -103,9 +103,9 @@ var useMetricModels = function useMetricModels(props) {
|
|
103
103
|
}
|
104
104
|
|
105
105
|
var request = (0, _ahooks.useRequest)(fetchData, {
|
106
|
-
pollingInterval: 1000 *
|
107
|
-
|
108
|
-
// debounceInterval:
|
106
|
+
pollingInterval: 1000 * 60,
|
107
|
+
pollingWhenHidden: false,
|
108
|
+
// debounceInterval: 200,
|
109
109
|
manual: true,
|
110
110
|
onSuccess: function onSuccess(newMetricModels) {
|
111
111
|
var a = metricModels.map(function (item) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "7.0.
|
3
|
+
"version": "7.0.9",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -116,6 +116,6 @@
|
|
116
116
|
"access": "public"
|
117
117
|
},
|
118
118
|
"license": "MIT",
|
119
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@7.0.
|
119
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@7.0.9/build/index.html",
|
120
120
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
121
121
|
}
|