@riil-frontend/component-topology 4.0.14 → 4.0.15

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.
@@ -43,17 +43,19 @@ var Alarm = /*#__PURE__*/function () {
43
43
  while (1) {
44
44
  switch (_context.prev = _context.next) {
45
45
  case 0:
46
- if (this.isEnabled()) {
47
- _context.next = 2;
46
+ this.resetData();
47
+
48
+ if (!(!this.isEnabled() || this.topo.isEditMode())) {
49
+ _context.next = 3;
48
50
  break;
49
51
  }
50
52
 
51
53
  return _context.abrupt("return");
52
54
 
53
- case 2:
55
+ case 3:
54
56
  nodeCount = this.topo.dataModel.getNodes().length;
55
57
 
56
- if (nodeCount < 1500 || this.topo.isEditMode()) {
58
+ if (nodeCount < 1500) {
57
59
  this.doOpen();
58
60
  } else {
59
61
  this.confirmOpenWhenLargeResource(function () {
@@ -61,7 +63,7 @@ var Alarm = /*#__PURE__*/function () {
61
63
  });
62
64
  }
63
65
 
64
- case 4:
66
+ case 5:
65
67
  case "end":
66
68
  return _context.stop();
67
69
  }
@@ -97,13 +99,7 @@ var Alarm = /*#__PURE__*/function () {
97
99
  ;
98
100
 
99
101
  _proto.close = function close() {
100
- this.updateState({
101
- alarmPanelIsOpen: false,
102
- alarmData: [],
103
- alarmList: [],
104
- risks: [],
105
- alarmRecord: []
106
- }); // 获得拓扑id
102
+ this.resetData(); // 获得拓扑id
107
103
 
108
104
  var currentTopoId = this.currentTopoId;
109
105
 
@@ -115,6 +111,16 @@ var Alarm = /*#__PURE__*/function () {
115
111
  // 关闭告警推送通道
116
112
 
117
113
  this.closeTopoAlarm(currentTopoId);
114
+ };
115
+
116
+ _proto.resetData = function resetData() {
117
+ this.updateState({
118
+ alarmPanelIsOpen: false,
119
+ alarmData: [],
120
+ alarmList: [],
121
+ risks: [],
122
+ alarmRecord: []
123
+ });
118
124
  } // 资源数量多时确认是否开启
119
125
  // eslint-disable-next-line class-methods-use-this
120
126
  ;
@@ -21,7 +21,7 @@ import PluginManager from "./PluginManager";
21
21
  import topoFactory from "./topoFactory";
22
22
  import ElementTagTipConfig from "./tagstips/ElementTagTipConfig"; // eslint-disable-next-line no-undef
23
23
 
24
- var version = typeof "4.0.14" === 'string' ? "4.0.14" : null;
24
+ var version = typeof "4.0.15" === 'string' ? "4.0.15" : null;
25
25
  console.info("\u62D3\u6251\u7248\u672C: " + version);
26
26
  /**
27
27
  * 拓扑显示和编辑
@@ -56,17 +56,19 @@ var Alarm = /*#__PURE__*/function () {
56
56
  while (1) {
57
57
  switch (_context.prev = _context.next) {
58
58
  case 0:
59
- if (this.isEnabled()) {
60
- _context.next = 2;
59
+ this.resetData();
60
+
61
+ if (!(!this.isEnabled() || this.topo.isEditMode())) {
62
+ _context.next = 3;
61
63
  break;
62
64
  }
63
65
 
64
66
  return _context.abrupt("return");
65
67
 
66
- case 2:
68
+ case 3:
67
69
  nodeCount = this.topo.dataModel.getNodes().length;
68
70
 
69
- if (nodeCount < 1500 || this.topo.isEditMode()) {
71
+ if (nodeCount < 1500) {
70
72
  this.doOpen();
71
73
  } else {
72
74
  this.confirmOpenWhenLargeResource(function () {
@@ -74,7 +76,7 @@ var Alarm = /*#__PURE__*/function () {
74
76
  });
75
77
  }
76
78
 
77
- case 4:
79
+ case 5:
78
80
  case "end":
79
81
  return _context.stop();
80
82
  }
@@ -111,13 +113,7 @@ var Alarm = /*#__PURE__*/function () {
111
113
  ;
112
114
 
113
115
  _proto.close = function close() {
114
- this.updateState({
115
- alarmPanelIsOpen: false,
116
- alarmData: [],
117
- alarmList: [],
118
- risks: [],
119
- alarmRecord: []
120
- }); // 获得拓扑id
116
+ this.resetData(); // 获得拓扑id
121
117
 
122
118
  var currentTopoId = this.currentTopoId;
123
119
 
@@ -130,6 +126,16 @@ var Alarm = /*#__PURE__*/function () {
130
126
 
131
127
 
132
128
  this.closeTopoAlarm(currentTopoId);
129
+ };
130
+
131
+ _proto.resetData = function resetData() {
132
+ this.updateState({
133
+ alarmPanelIsOpen: false,
134
+ alarmData: [],
135
+ alarmList: [],
136
+ risks: [],
137
+ alarmRecord: []
138
+ });
133
139
  } // 资源数量多时确认是否开启
134
140
  // eslint-disable-next-line class-methods-use-this
135
141
  ;
@@ -50,7 +50,7 @@ var _topoFactory = _interopRequireDefault(require("./topoFactory"));
50
50
  var _ElementTagTipConfig = _interopRequireDefault(require("./tagstips/ElementTagTipConfig"));
51
51
 
52
52
  // eslint-disable-next-line no-undef
53
- var version = typeof "4.0.14" === 'string' ? "4.0.14" : null;
53
+ var version = typeof "4.0.15" === 'string' ? "4.0.15" : null;
54
54
  console.info("\u62D3\u6251\u7248\u672C: " + version);
55
55
  /**
56
56
  * 拓扑显示和编辑
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riil-frontend/component-topology",
3
- "version": "4.0.14",
3
+ "version": "4.0.15",
4
4
  "description": "拓扑",
5
5
  "scripts": {
6
6
  "start": "build-scripts start",
@@ -114,6 +114,6 @@
114
114
  "access": "public"
115
115
  },
116
116
  "license": "MIT",
117
- "homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.14/build/index.html",
117
+ "homepage": "https://unpkg.com/@riil-frontend/component-topology@4.0.15/build/index.html",
118
118
  "gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
119
119
  }