@riil-frontend/component-topology 11.0.3 → 11.0.5
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 +1 -1
- package/build/index.js +20 -20
- package/es/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +82 -0
- package/es/components/ModelAttrSelectDrawer/index.js +2 -2
- package/es/core/components/DisplaySettingDrawer/NodeTag.js +6 -3
- package/es/core/components/DisplaySettingDrawer/NodeTip.js +7 -4
- package/es/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +40 -0
- package/es/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +87 -10
- package/es/core/components/TopoView/GraphViewPanel.js +0 -3
- package/es/core/components/TopoView/topoView.js +6 -3
- package/es/core/hooks/useCanvasTheme.js +7 -32
- package/es/core/hooks/useCanvasThemeConfig.js +50 -0
- package/es/core/hooks/useTopoEdit.js +12 -8
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/models/tagstips/ElementTagTipConfig.js +43 -37
- package/lib/components/ModelAttrSelectDrawer/components/MultipleTypeAttributeSelectDrawer.js +97 -0
- package/lib/components/ModelAttrSelectDrawer/index.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/NodeTag.js +7 -3
- package/lib/core/components/DisplaySettingDrawer/NodeTip.js +8 -4
- package/lib/core/components/DisplaySettingDrawer/components/NodeAttrSettingDrawer.js +60 -0
- package/lib/core/components/ResourceViewAttributeSetting/nodeCiTypeAttrUtil.js +88 -10
- package/lib/core/components/TopoView/GraphViewPanel.js +0 -3
- package/lib/core/components/TopoView/topoView.js +6 -3
- package/lib/core/hooks/useCanvasTheme.js +8 -34
- package/lib/core/hooks/useCanvasThemeConfig.js +60 -0
- package/lib/core/hooks/useTopoEdit.js +12 -8
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/models/tagstips/ElementTagTipConfig.js +43 -37
- package/package.json +2 -2
@@ -83,7 +83,7 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
83
83
|
|
84
84
|
_proto.getNodeFiedldMap = function getNodeFiedldMap() {
|
85
85
|
var mtCodes = (0, _utils.getNodeMtCodes)(this.topoData);
|
86
|
-
return this.
|
86
|
+
return this.getFiedldMapByMtCodes(mtCodes, 'node');
|
87
87
|
}
|
88
88
|
/**
|
89
89
|
* 获得节点字段配置项map
|
@@ -92,8 +92,13 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
92
92
|
|
93
93
|
_proto.getLinkFidldMap = function getLinkFidldMap() {
|
94
94
|
var mtCodes = (0, _utils.getLinkMtCodes)(this.topoData);
|
95
|
-
return this.
|
96
|
-
}
|
95
|
+
return this.getFiedldMapByMtCodes(mtCodes, 'link');
|
96
|
+
}
|
97
|
+
/**
|
98
|
+
* 获取链路标注悬浮框属性配置数据
|
99
|
+
* @returns
|
100
|
+
*/
|
101
|
+
;
|
97
102
|
|
98
103
|
_proto.getLinkConfigItems = function getLinkConfigItems() {
|
99
104
|
var mtCodes = (0, _utils.getLinkMtCodes)(this.topoData);
|
@@ -123,45 +128,46 @@ var ElementTagTipConfig = /*#__PURE__*/function () {
|
|
123
128
|
// ]
|
124
129
|
};
|
125
130
|
|
126
|
-
_proto.getFiedldMapByType = function getFiedldMapByType(
|
131
|
+
_proto.getFiedldMapByType = function getFiedldMapByType(ciType, type) {
|
132
|
+
var attributes = this.topo.ciTyeCache.getCiType(ciType).attributes.filter(function (attr) {
|
133
|
+
return !!attr.userVisible;
|
134
|
+
});
|
135
|
+
var metrics = this.getMtMetricModels(mtCode);
|
136
|
+
var extItems = type === 'node' ? [{
|
137
|
+
lavel: '图片名称',
|
138
|
+
value: 'graph:name',
|
139
|
+
typeName: null
|
140
|
+
}, {
|
141
|
+
lavel: '资源类型',
|
142
|
+
value: 'ciType:name',
|
143
|
+
typeName: null
|
144
|
+
}] : [];
|
145
|
+
return [].concat(extItems, attributes.map(function (item) {
|
146
|
+
return {
|
147
|
+
type: 'attribute',
|
148
|
+
id: "attribute:" + item.code,
|
149
|
+
code: "attribute:" + item.code,
|
150
|
+
name: item.name,
|
151
|
+
typeName: '属性'
|
152
|
+
};
|
153
|
+
}), metrics.map(function (item) {
|
154
|
+
return {
|
155
|
+
type: 'metric',
|
156
|
+
id: "metric:" + item.code,
|
157
|
+
code: "metric:" + item.code,
|
158
|
+
name: item.name,
|
159
|
+
typeName: '指标'
|
160
|
+
};
|
161
|
+
}));
|
162
|
+
};
|
163
|
+
|
164
|
+
_proto.getFiedldMapByMtCodes = function getFiedldMapByMtCodes(mtCodes, type) {
|
127
165
|
var _this = this;
|
128
166
|
|
129
167
|
var map = {};
|
130
168
|
mtCodes.forEach(function (mtCode) {
|
131
169
|
var ciType = _this.mtCiTypeMap[mtCode];
|
132
|
-
|
133
|
-
var attributes = _this.topo.ciTyeCache.getCiType(ciType).attributes.filter(function (attr) {
|
134
|
-
return !!attr.userVisible;
|
135
|
-
});
|
136
|
-
|
137
|
-
var metrics = _this.getMtMetricModels(mtCode);
|
138
|
-
|
139
|
-
var extItems = type === 'node' ? [{
|
140
|
-
lavel: '图片名称',
|
141
|
-
value: 'graph:name',
|
142
|
-
typeName: null
|
143
|
-
}, {
|
144
|
-
lavel: '资源类型',
|
145
|
-
value: 'ciType:name',
|
146
|
-
typeName: null
|
147
|
-
}] : [];
|
148
|
-
map[mtCode] = [].concat(extItems, attributes.map(function (item) {
|
149
|
-
return {
|
150
|
-
type: 'attribute',
|
151
|
-
id: "attribute:" + item.code,
|
152
|
-
code: "attribute:" + item.code,
|
153
|
-
name: item.name,
|
154
|
-
typeName: '属性'
|
155
|
-
};
|
156
|
-
}), metrics.map(function (item) {
|
157
|
-
return {
|
158
|
-
type: 'metric',
|
159
|
-
id: "metric:" + item.code,
|
160
|
-
code: "metric:" + item.code,
|
161
|
-
name: item.name,
|
162
|
-
typeName: '指标'
|
163
|
-
};
|
164
|
-
}));
|
170
|
+
map[mtCode] = _this.getFiedldMapByType(ciType, type);
|
165
171
|
});
|
166
172
|
return map;
|
167
173
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@riil-frontend/component-topology",
|
3
|
-
"version": "11.0.
|
3
|
+
"version": "11.0.5",
|
4
4
|
"description": "拓扑",
|
5
5
|
"scripts": {
|
6
6
|
"start": "build-scripts start",
|
@@ -118,6 +118,6 @@
|
|
118
118
|
"access": "public"
|
119
119
|
},
|
120
120
|
"license": "MIT",
|
121
|
-
"homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.
|
121
|
+
"homepage": "https://unpkg.com/@riil-frontend/component-topology@11.0.5/build/index.html",
|
122
122
|
"gitHead": "2da19ffccbb7ca60a8acf396e39f542c68bb33f5"
|
123
123
|
}
|