@riil-frontend/component-topology 2.7.3 → 2.7.4
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 +3 -3
- package/es/components/ResourceList/ResourceSelect.js +15 -14
- package/es/models/linkDynamicStyle.js +21 -6
- package/es/utils/template.js +1 -1
- package/lib/components/ResourceList/ResourceSelect.js +15 -15
- package/lib/models/linkDynamicStyle.js +21 -6
- package/lib/utils/template.js +1 -1
- package/package.json +3 -3
|
@@ -23,7 +23,7 @@ var getTableData = /*#__PURE__*/function () {
|
|
|
23
23
|
switch (_context.prev = _context.next) {
|
|
24
24
|
case 0:
|
|
25
25
|
_params$current = params.current, current = _params$current === void 0 ? 1 : _params$current, _params$pageSize = params.pageSize, pageSize = _params$pageSize === void 0 ? 20 : _params$pageSize, _params$sortBy = params.sortBy, sortBy = _params$sortBy === void 0 ? 'displayName' : _params$sortBy, _params$sortOrder = params.sortOrder, sortOrder = _params$sortOrder === void 0 ? 'asc' : _params$sortOrder, like = params.like, typeCode = params.typeCode;
|
|
26
|
-
condition = 'category(\'resource\')';
|
|
26
|
+
condition = 'type(\'common_network\',\'switch\',\'switch_cluster\',\'linux\',\'windows\',\'oracle\',\'oracle.asm_disk_group\',\'tomcat\',\'application\',\'service\') && category(\'resource\')';
|
|
27
27
|
|
|
28
28
|
if (like) {
|
|
29
29
|
condition = {
|
|
@@ -67,7 +67,7 @@ var getTableData = /*#__PURE__*/function () {
|
|
|
67
67
|
|
|
68
68
|
};
|
|
69
69
|
});
|
|
70
|
-
return _context.abrupt("return", formatDataForTable(dataSource, data.
|
|
70
|
+
return _context.abrupt("return", formatDataForTable(dataSource, data.totalRecord, data.pageIndex, data.pageSize));
|
|
71
71
|
|
|
72
72
|
case 9:
|
|
73
73
|
case "end":
|
|
@@ -149,7 +149,7 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
149
149
|
|
|
150
150
|
};
|
|
151
151
|
var defaultColumns = [{
|
|
152
|
-
title: '
|
|
152
|
+
title: '资源名称',
|
|
153
153
|
dataIndex: 'displayName',
|
|
154
154
|
sortable: true,
|
|
155
155
|
cell: getTitleCell
|
|
@@ -161,7 +161,7 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
161
161
|
return getTitleCell(getIp(ip));
|
|
162
162
|
}
|
|
163
163
|
}, {
|
|
164
|
-
title: '
|
|
164
|
+
title: '资源类型',
|
|
165
165
|
dataIndex: 'typeCode',
|
|
166
166
|
filters: filters.typeCode,
|
|
167
167
|
cell: function cell(code) {
|
|
@@ -171,16 +171,17 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
171
171
|
var name = dict && dict.label || code;
|
|
172
172
|
return getTitleCell(name);
|
|
173
173
|
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
174
|
+
} // {
|
|
175
|
+
// title: '厂商',
|
|
176
|
+
// sortable: true,
|
|
177
|
+
// dataIndex: 'company',
|
|
178
|
+
// cell: (code) => {
|
|
179
|
+
// const dict = DICT.get(code);
|
|
180
|
+
// const name = (dict && dict.name) || code;
|
|
181
|
+
// return getTitleCell(name);
|
|
182
|
+
// },
|
|
183
|
+
// }
|
|
184
|
+
];
|
|
184
185
|
return /*#__PURE__*/React.createElement(RiilTable, {
|
|
185
186
|
className: className || styles.table,
|
|
186
187
|
formProps: formProps,
|
|
@@ -210,13 +210,28 @@ export default function (engine) {
|
|
|
210
210
|
|
|
211
211
|
links = [];
|
|
212
212
|
|
|
213
|
-
if (isEdit && rootState.topoCreateMod.elements.links.length) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
if (!(isEdit && rootState.topoCreateMod.elements.links.length)) {
|
|
214
|
+
_context3.next = 9;
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
links = rootState.topoCreateMod.elements.links;
|
|
219
|
+
_context3.next = 12;
|
|
220
|
+
break;
|
|
221
|
+
|
|
222
|
+
case 9:
|
|
223
|
+
if (rootState.topoMod.topoData) {
|
|
224
|
+
_context3.next = 11;
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return _context3.abrupt("return");
|
|
218
229
|
|
|
230
|
+
case 11:
|
|
231
|
+
links = rootState.topoMod.topoData.links;
|
|
219
232
|
|
|
233
|
+
case 12:
|
|
234
|
+
// 获取属性。无权限的属性为 []
|
|
220
235
|
allLinkAttributes = rootState.topoBizMod.attrsAndMetrics; // 告警
|
|
221
236
|
|
|
222
237
|
alarmMap = rootState.topoBizMod.alarmDoc; // 如果是显示模式,过滤有告警的链路
|
|
@@ -268,7 +283,7 @@ export default function (engine) {
|
|
|
268
283
|
engine.view.topoClient.batchSetLineStyle(linkStyleMap);
|
|
269
284
|
}
|
|
270
285
|
|
|
271
|
-
case
|
|
286
|
+
case 19:
|
|
272
287
|
case "end":
|
|
273
288
|
return _context3.stop();
|
|
274
289
|
}
|
package/es/utils/template.js
CHANGED
|
@@ -46,7 +46,7 @@ var getTableData = /*#__PURE__*/function () {
|
|
|
46
46
|
switch (_context.prev = _context.next) {
|
|
47
47
|
case 0:
|
|
48
48
|
_params$current = params.current, current = _params$current === void 0 ? 1 : _params$current, _params$pageSize = params.pageSize, pageSize = _params$pageSize === void 0 ? 20 : _params$pageSize, _params$sortBy = params.sortBy, sortBy = _params$sortBy === void 0 ? 'displayName' : _params$sortBy, _params$sortOrder = params.sortOrder, sortOrder = _params$sortOrder === void 0 ? 'asc' : _params$sortOrder, like = params.like, typeCode = params.typeCode;
|
|
49
|
-
condition = 'category(\'resource\')';
|
|
49
|
+
condition = 'type(\'common_network\',\'switch\',\'switch_cluster\',\'linux\',\'windows\',\'oracle\',\'oracle.asm_disk_group\',\'tomcat\',\'application\',\'service\') && category(\'resource\')';
|
|
50
50
|
|
|
51
51
|
if (like) {
|
|
52
52
|
condition = {
|
|
@@ -90,7 +90,7 @@ var getTableData = /*#__PURE__*/function () {
|
|
|
90
90
|
|
|
91
91
|
};
|
|
92
92
|
});
|
|
93
|
-
return _context.abrupt("return", (0, _format.formatDataForTable)(dataSource, data.
|
|
93
|
+
return _context.abrupt("return", (0, _format.formatDataForTable)(dataSource, data.totalRecord, data.pageIndex, data.pageSize));
|
|
94
94
|
|
|
95
95
|
case 9:
|
|
96
96
|
case "end":
|
|
@@ -172,7 +172,7 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
172
172
|
|
|
173
173
|
};
|
|
174
174
|
var defaultColumns = [{
|
|
175
|
-
title: '
|
|
175
|
+
title: '资源名称',
|
|
176
176
|
dataIndex: 'displayName',
|
|
177
177
|
sortable: true,
|
|
178
178
|
cell: _table.getTitleCell
|
|
@@ -184,7 +184,7 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
184
184
|
return (0, _table.getTitleCell)((0, _format.getIp)(ip));
|
|
185
185
|
}
|
|
186
186
|
}, {
|
|
187
|
-
title: '
|
|
187
|
+
title: '资源类型',
|
|
188
188
|
dataIndex: 'typeCode',
|
|
189
189
|
filters: filters.typeCode,
|
|
190
190
|
cell: function cell(code) {
|
|
@@ -194,17 +194,17 @@ var ResourceList = function ResourceList(props, ref) {
|
|
|
194
194
|
var name = dict && dict.label || code;
|
|
195
195
|
return (0, _table.getTitleCell)(name);
|
|
196
196
|
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
197
|
+
} // {
|
|
198
|
+
// title: '厂商',
|
|
199
|
+
// sortable: true,
|
|
200
|
+
// dataIndex: 'company',
|
|
201
|
+
// cell: (code) => {
|
|
202
|
+
// const dict = DICT.get(code);
|
|
203
|
+
// const name = (dict && dict.name) || code;
|
|
204
|
+
// return getTitleCell(name);
|
|
205
|
+
// },
|
|
206
|
+
// }
|
|
207
|
+
];
|
|
208
208
|
return /*#__PURE__*/_react["default"].createElement(_FormTable["default"], {
|
|
209
209
|
className: className || _ResourceSelectModule["default"].table,
|
|
210
210
|
formProps: formProps,
|
|
@@ -221,13 +221,28 @@ function _default(engine) {
|
|
|
221
221
|
|
|
222
222
|
links = [];
|
|
223
223
|
|
|
224
|
-
if (isEdit && rootState.topoCreateMod.elements.links.length) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
if (!(isEdit && rootState.topoCreateMod.elements.links.length)) {
|
|
225
|
+
_context3.next = 9;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
links = rootState.topoCreateMod.elements.links;
|
|
230
|
+
_context3.next = 12;
|
|
231
|
+
break;
|
|
232
|
+
|
|
233
|
+
case 9:
|
|
234
|
+
if (rootState.topoMod.topoData) {
|
|
235
|
+
_context3.next = 11;
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return _context3.abrupt("return");
|
|
229
240
|
|
|
241
|
+
case 11:
|
|
242
|
+
links = rootState.topoMod.topoData.links;
|
|
230
243
|
|
|
244
|
+
case 12:
|
|
245
|
+
// 获取属性。无权限的属性为 []
|
|
231
246
|
allLinkAttributes = rootState.topoBizMod.attrsAndMetrics; // 告警
|
|
232
247
|
|
|
233
248
|
alarmMap = rootState.topoBizMod.alarmDoc; // 如果是显示模式,过滤有告警的链路
|
|
@@ -281,7 +296,7 @@ function _default(engine) {
|
|
|
281
296
|
engine.view.topoClient.batchSetLineStyle(linkStyleMap);
|
|
282
297
|
}
|
|
283
298
|
|
|
284
|
-
case
|
|
299
|
+
case 19:
|
|
285
300
|
case "end":
|
|
286
301
|
return _context3.stop();
|
|
287
302
|
}
|
package/lib/utils/template.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riil-frontend/component-topology",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.4",
|
|
4
4
|
"description": "拓扑",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "build-scripts start",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@riil-frontend/component-row-delete-ballon": "^1.0.2",
|
|
68
68
|
"@riil-frontend/component-table-filter-tags": "latest",
|
|
69
69
|
"@riil-frontend/component-table-layout": "^2.0.2",
|
|
70
|
-
"@riil-frontend/component-topology-graph": "^2.2.
|
|
70
|
+
"@riil-frontend/component-topology-graph": "^2.2.3",
|
|
71
71
|
"@riil-frontend/css": "^2.0.2",
|
|
72
72
|
"@riil-frontend/hooks": "latest",
|
|
73
73
|
"@riil-frontend/next-collapse": "^1.0.1-a.0",
|
|
@@ -102,6 +102,6 @@
|
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
104
|
"license": "MIT",
|
|
105
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.7.
|
|
105
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@2.7.4/build/index.html",
|
|
106
106
|
"gitHead": "62eadeca07c85ed047f2e933676f62015eff98cc"
|
|
107
107
|
}
|