@riil-frontend/component-topology 3.1.6 → 3.1.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/CHANGELOG.md +8 -15
- package/build/1.js +1 -1
- package/build/index.css +1 -1
- package/build/index.js +11 -11
- package/demo/1/345/237/272/346/234/254//345/256/232/345/210/266/345/214/226/350/265/204/346/272/220/346/246/202/350/247/210.md +11 -0
- package/demo/1/345/237/272/346/234/254//350/207/252/345/256/232/344/271/211/346/240/207/346/263/250/345/222/214/346/202/254/346/265/256/346/241/206.md +11 -0
- package/demo/2/347/274/226/350/276/221/346/250/241/345/274/217//345/261/236/346/200/247/351/235/242/346/235/277.md +11 -0
- package/demo//346/240/207/346/263/250/345/222/214/346/202/254/346/265/256/346/241/206//350/207/252/345/256/232/344/271/211/345/261/236/346/200/247/345/222/214/346/214/207/346/240/207.md +2 -2
- package/demo-mock/basic/topo/v1/api/attributes/once +152 -0
- package/demo-mock/basic/topo/v1/api/attributes/once.json +152 -0
- package/es/core/components/DisplaySettingDrawer/DisplaySetting.js +4 -5
- package/es/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/es/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +3 -5
- package/es/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +19 -6
- package/es/core/editor/components/settings/propertyViews/node/NodePropertyView.js +25 -160
- package/es/core/editor/components/settings/propertyViews/node/Setting/Setting.js +76 -0
- package/es/core/editor/components/settings/propertyViews/node/Setting/index.js +2 -0
- package/es/core/editor/components/settings/propertyViews/node/data/Data.js +125 -0
- package/es/core/models/AttributeMetricDisplay.js +9 -5
- package/es/core/models/TopoApp.js +1 -1
- package/es/core/viewer/components/plugins/{BaseInfo/index.js → ResourceDetail/ResourceDetail.js} +23 -11
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +11 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +131 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +31 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.js +0 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.module.scss +0 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +46 -0
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/SingleResourceStrategyLink.js +4 -2
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.js +70 -180
- package/es/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.module.scss +0 -0
- package/es/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +12 -0
- package/es/core/viewer/components/plugins/ResourceDetail/index.js +2 -0
- package/es/core/viewer/components/plugins/ResourceDetail/index.module.scss +39 -30
- package/es/core/viewer/components/plugins/ViewerPlugin.js +2 -2
- package/es/core/viewer/components/titlebar/BasicTools.js +1 -1
- package/es/core/viewer/components/titlebar/widgets/SettingButton.js +3 -4
- package/es/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +19 -0
- package/es/topoCenter/components/TopoView.js +3 -4
- package/es/topoCenter/models/TopoCenter.js +9 -5
- package/lib/core/components/DisplaySettingDrawer/DisplaySetting.js +4 -5
- package/lib/core/components/DisplaySettingDrawer/DisplaySettingDrawer.js +2 -2
- package/lib/core/components/DisplaySettingDrawer/hooks/useDisplaySetting.js +3 -5
- package/lib/core/editor/components/settings/propertyViews/group/DataTab/RelateData.js +20 -7
- package/lib/core/editor/components/settings/propertyViews/node/NodePropertyView.js +25 -171
- package/lib/core/editor/components/settings/propertyViews/node/Setting/Setting.js +95 -0
- package/lib/core/editor/components/settings/propertyViews/node/Setting/index.js +11 -0
- package/lib/core/editor/components/settings/propertyViews/node/data/Data.js +145 -0
- package/lib/core/models/AttributeMetricDisplay.js +8 -4
- package/lib/core/models/TopoApp.js +1 -1
- package/lib/core/viewer/components/plugins/{BaseInfo/index.js → ResourceDetail/ResourceDetail.js} +25 -12
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailPlugin.js +21 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfo.js +141 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/BaseInfoBlock.js +42 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.js +0 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/BlockBox.module.scss +0 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/ResourceOverviewMetric.js +56 -0
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/SingleResourceStrategyLink.js +4 -2
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.js +73 -182
- package/lib/core/viewer/components/plugins/{BaseInfo → ResourceDetail}/components/ResourceOverview/index.module.scss +0 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/components/ResourceOverview/useCiAttrAndMetricData.js +17 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/index.js +11 -0
- package/lib/core/viewer/components/plugins/ResourceDetail/index.module.scss +39 -30
- package/lib/core/viewer/components/plugins/ViewerPlugin.js +2 -2
- package/lib/core/viewer/components/titlebar/BasicTools.js +2 -2
- package/lib/core/viewer/components/titlebar/widgets/SettingButton.js +2 -3
- package/lib/core/viewer/components/titlebar/widgets/SettingButtonWidget.js +28 -0
- package/lib/topoCenter/components/TopoView.js +3 -4
- package/lib/topoCenter/models/TopoCenter.js +9 -5
- package/package.json +2 -2
- package/demo/1/345/237/272/346/234/254//350/207/252/345/256/232/344/271/211/345/261/236/346/200/247/345/222/214/346/214/207/346/240/207.md +0 -11
- package/es/core/viewer/components/plugins/BaseInfo/index.module.scss +0 -49
- package/es/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawerPlugin.js +0 -37
- package/es/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +0 -147
- package/lib/core/viewer/components/plugins/BaseInfo/index.module.scss +0 -49
- package/lib/core/viewer/components/plugins/ResourceDetail/ResourceDetailDrawerPlugin.js +0 -50
- package/lib/core/viewer/components/plugins/ResourceDetail/topoDrawer.js +0 -167
|
@@ -6,11 +6,11 @@ order: 8
|
|
|
6
6
|
<br/>
|
|
7
7
|
|
|
8
8
|
- 关闭内置的属性指标推送
|
|
9
|
-
-
|
|
9
|
+
- 自定义链路标注、悬浮框显示
|
|
10
10
|
|
|
11
11
|
<br/>
|
|
12
12
|
|
|
13
13
|
```jsx
|
|
14
|
-
<DemoCode src="../../demo-src/basic/CustomAttrAndMetric.jsx" />
|
|
14
|
+
<DemoCode src="../../demo-src/basic/CustomAttrAndMetric/CustomAttrAndMetric.jsx" />
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -10044,5 +10044,157 @@
|
|
|
10044
10044
|
"templateCode": "m.export_link"
|
|
10045
10045
|
}
|
|
10046
10046
|
]
|
|
10047
|
+
},
|
|
10048
|
+
{
|
|
10049
|
+
"code": "xx_link",
|
|
10050
|
+
"name": "xx链路",
|
|
10051
|
+
"icon": "xxLink",
|
|
10052
|
+
"extend": null,
|
|
10053
|
+
"domain": "network",
|
|
10054
|
+
"parent": null,
|
|
10055
|
+
"enable": true,
|
|
10056
|
+
"source": "system",
|
|
10057
|
+
"displayName": "网络链路",
|
|
10058
|
+
"vendor": null,
|
|
10059
|
+
"version": "v1.0",
|
|
10060
|
+
"category": "resources",
|
|
10061
|
+
"attributes": [
|
|
10062
|
+
{
|
|
10063
|
+
"id": "00000000080691f4",
|
|
10064
|
+
"key": null,
|
|
10065
|
+
"creator": null,
|
|
10066
|
+
"createdTime": 1650018956291,
|
|
10067
|
+
"updatedTime": 1650018956291,
|
|
10068
|
+
"code": "name",
|
|
10069
|
+
"name": "名称",
|
|
10070
|
+
"label": "资源",
|
|
10071
|
+
"type": "assets",
|
|
10072
|
+
"metricCode": "",
|
|
10073
|
+
"description": "名称",
|
|
10074
|
+
"source": "system",
|
|
10075
|
+
"dataType": "string",
|
|
10076
|
+
"dataLength": "255",
|
|
10077
|
+
"dataRange": "",
|
|
10078
|
+
"unit": "",
|
|
10079
|
+
"initValue": "",
|
|
10080
|
+
"defaultValue": "",
|
|
10081
|
+
"changeValue": "",
|
|
10082
|
+
"userVisible": true,
|
|
10083
|
+
"modifiable": false,
|
|
10084
|
+
"required": true,
|
|
10085
|
+
"enable": true,
|
|
10086
|
+
"refCi": null,
|
|
10087
|
+
"isPublic": true,
|
|
10088
|
+
"dictCode": null,
|
|
10089
|
+
"attrSource": "public",
|
|
10090
|
+
"refTemplateCode": "t.base",
|
|
10091
|
+
"refTemplateName": "基础模板",
|
|
10092
|
+
"dataSource": "discover"
|
|
10093
|
+
},
|
|
10094
|
+
{
|
|
10095
|
+
"id": "00000000080691f5",
|
|
10096
|
+
"key": null,
|
|
10097
|
+
"creator": null,
|
|
10098
|
+
"createdTime": 1650018956293,
|
|
10099
|
+
"updatedTime": 1650018956293,
|
|
10100
|
+
"code": "display_name",
|
|
10101
|
+
"name": "显示名称",
|
|
10102
|
+
"label": "资源",
|
|
10103
|
+
"type": "assets",
|
|
10104
|
+
"metricCode": "",
|
|
10105
|
+
"description": "显示名称",
|
|
10106
|
+
"source": "system",
|
|
10107
|
+
"dataType": "string",
|
|
10108
|
+
"dataLength": "255",
|
|
10109
|
+
"dataRange": "",
|
|
10110
|
+
"unit": "",
|
|
10111
|
+
"initValue": "name",
|
|
10112
|
+
"defaultValue": "",
|
|
10113
|
+
"changeValue": "",
|
|
10114
|
+
"userVisible": true,
|
|
10115
|
+
"modifiable": true,
|
|
10116
|
+
"required": false,
|
|
10117
|
+
"enable": true,
|
|
10118
|
+
"refCi": null,
|
|
10119
|
+
"isPublic": true,
|
|
10120
|
+
"dictCode": null,
|
|
10121
|
+
"attrSource": "public",
|
|
10122
|
+
"refTemplateCode": "t.base",
|
|
10123
|
+
"refTemplateName": "基础模板",
|
|
10124
|
+
"dataSource": "discover, manual"
|
|
10125
|
+
},
|
|
10126
|
+
{
|
|
10127
|
+
"id": null,
|
|
10128
|
+
"key": null,
|
|
10129
|
+
"creator": null,
|
|
10130
|
+
"createdTime": null,
|
|
10131
|
+
"updatedTime": null,
|
|
10132
|
+
"code": "xxx",
|
|
10133
|
+
"name": "xxx属性",
|
|
10134
|
+
"label": "",
|
|
10135
|
+
"type": "config",
|
|
10136
|
+
"metricCode": "",
|
|
10137
|
+
"description": "到网络出口的距离(跳数)",
|
|
10138
|
+
"source": "system",
|
|
10139
|
+
"dataType": "int",
|
|
10140
|
+
"dataLength": "128",
|
|
10141
|
+
"dataRange": "",
|
|
10142
|
+
"unit": "",
|
|
10143
|
+
"initValue": "",
|
|
10144
|
+
"defaultValue": "2147483647",
|
|
10145
|
+
"changeValue": "",
|
|
10146
|
+
"userVisible": false,
|
|
10147
|
+
"modifiable": false,
|
|
10148
|
+
"required": false,
|
|
10149
|
+
"enable": true,
|
|
10150
|
+
"refCi": null,
|
|
10151
|
+
"isPublic": null,
|
|
10152
|
+
"dictCode": null,
|
|
10153
|
+
"attrSource": "private",
|
|
10154
|
+
"refTemplateCode": "t.base",
|
|
10155
|
+
"refTemplateName": "基础模板",
|
|
10156
|
+
"dataSource": "manual"
|
|
10157
|
+
}
|
|
10158
|
+
],
|
|
10159
|
+
"metrics": [
|
|
10160
|
+
{
|
|
10161
|
+
"id": null,
|
|
10162
|
+
"key": null,
|
|
10163
|
+
"creator": null,
|
|
10164
|
+
"createdTime": null,
|
|
10165
|
+
"updatedTime": null,
|
|
10166
|
+
"ref": null,
|
|
10167
|
+
"code": "xxx1",
|
|
10168
|
+
"name": "xxx1指标",
|
|
10169
|
+
"desc": null,
|
|
10170
|
+
"label": "",
|
|
10171
|
+
"isGoldMetric": true,
|
|
10172
|
+
"metricType": "capacity",
|
|
10173
|
+
"unit": "%",
|
|
10174
|
+
"dataType": "double",
|
|
10175
|
+
"dataRange": "0-100",
|
|
10176
|
+
"changeValue": "",
|
|
10177
|
+
"templateCode": "m.agg_link"
|
|
10178
|
+
},
|
|
10179
|
+
{
|
|
10180
|
+
"id": null,
|
|
10181
|
+
"key": null,
|
|
10182
|
+
"creator": null,
|
|
10183
|
+
"createdTime": null,
|
|
10184
|
+
"updatedTime": null,
|
|
10185
|
+
"ref": null,
|
|
10186
|
+
"code": "xxx2",
|
|
10187
|
+
"name": "xxx2指标",
|
|
10188
|
+
"desc": null,
|
|
10189
|
+
"label": "",
|
|
10190
|
+
"isGoldMetric": true,
|
|
10191
|
+
"metricType": "capacity",
|
|
10192
|
+
"unit": "%",
|
|
10193
|
+
"dataType": "double",
|
|
10194
|
+
"dataRange": "0-100",
|
|
10195
|
+
"changeValue": "",
|
|
10196
|
+
"templateCode": "m.agg_link"
|
|
10197
|
+
}
|
|
10198
|
+
]
|
|
10047
10199
|
}
|
|
10048
10200
|
]
|
|
@@ -10044,5 +10044,157 @@
|
|
|
10044
10044
|
"templateCode": "m.export_link"
|
|
10045
10045
|
}
|
|
10046
10046
|
]
|
|
10047
|
+
},
|
|
10048
|
+
{
|
|
10049
|
+
"code": "xx_link",
|
|
10050
|
+
"name": "xx链路",
|
|
10051
|
+
"icon": "xxLink",
|
|
10052
|
+
"extend": null,
|
|
10053
|
+
"domain": "network",
|
|
10054
|
+
"parent": null,
|
|
10055
|
+
"enable": true,
|
|
10056
|
+
"source": "system",
|
|
10057
|
+
"displayName": "网络链路",
|
|
10058
|
+
"vendor": null,
|
|
10059
|
+
"version": "v1.0",
|
|
10060
|
+
"category": "resources",
|
|
10061
|
+
"attributes": [
|
|
10062
|
+
{
|
|
10063
|
+
"id": "00000000080691f4",
|
|
10064
|
+
"key": null,
|
|
10065
|
+
"creator": null,
|
|
10066
|
+
"createdTime": 1650018956291,
|
|
10067
|
+
"updatedTime": 1650018956291,
|
|
10068
|
+
"code": "name",
|
|
10069
|
+
"name": "名称",
|
|
10070
|
+
"label": "资源",
|
|
10071
|
+
"type": "assets",
|
|
10072
|
+
"metricCode": "",
|
|
10073
|
+
"description": "名称",
|
|
10074
|
+
"source": "system",
|
|
10075
|
+
"dataType": "string",
|
|
10076
|
+
"dataLength": "255",
|
|
10077
|
+
"dataRange": "",
|
|
10078
|
+
"unit": "",
|
|
10079
|
+
"initValue": "",
|
|
10080
|
+
"defaultValue": "",
|
|
10081
|
+
"changeValue": "",
|
|
10082
|
+
"userVisible": true,
|
|
10083
|
+
"modifiable": false,
|
|
10084
|
+
"required": true,
|
|
10085
|
+
"enable": true,
|
|
10086
|
+
"refCi": null,
|
|
10087
|
+
"isPublic": true,
|
|
10088
|
+
"dictCode": null,
|
|
10089
|
+
"attrSource": "public",
|
|
10090
|
+
"refTemplateCode": "t.base",
|
|
10091
|
+
"refTemplateName": "基础模板",
|
|
10092
|
+
"dataSource": "discover"
|
|
10093
|
+
},
|
|
10094
|
+
{
|
|
10095
|
+
"id": "00000000080691f5",
|
|
10096
|
+
"key": null,
|
|
10097
|
+
"creator": null,
|
|
10098
|
+
"createdTime": 1650018956293,
|
|
10099
|
+
"updatedTime": 1650018956293,
|
|
10100
|
+
"code": "display_name",
|
|
10101
|
+
"name": "显示名称",
|
|
10102
|
+
"label": "资源",
|
|
10103
|
+
"type": "assets",
|
|
10104
|
+
"metricCode": "",
|
|
10105
|
+
"description": "显示名称",
|
|
10106
|
+
"source": "system",
|
|
10107
|
+
"dataType": "string",
|
|
10108
|
+
"dataLength": "255",
|
|
10109
|
+
"dataRange": "",
|
|
10110
|
+
"unit": "",
|
|
10111
|
+
"initValue": "name",
|
|
10112
|
+
"defaultValue": "",
|
|
10113
|
+
"changeValue": "",
|
|
10114
|
+
"userVisible": true,
|
|
10115
|
+
"modifiable": true,
|
|
10116
|
+
"required": false,
|
|
10117
|
+
"enable": true,
|
|
10118
|
+
"refCi": null,
|
|
10119
|
+
"isPublic": true,
|
|
10120
|
+
"dictCode": null,
|
|
10121
|
+
"attrSource": "public",
|
|
10122
|
+
"refTemplateCode": "t.base",
|
|
10123
|
+
"refTemplateName": "基础模板",
|
|
10124
|
+
"dataSource": "discover, manual"
|
|
10125
|
+
},
|
|
10126
|
+
{
|
|
10127
|
+
"id": null,
|
|
10128
|
+
"key": null,
|
|
10129
|
+
"creator": null,
|
|
10130
|
+
"createdTime": null,
|
|
10131
|
+
"updatedTime": null,
|
|
10132
|
+
"code": "xxx",
|
|
10133
|
+
"name": "xxx属性",
|
|
10134
|
+
"label": "",
|
|
10135
|
+
"type": "config",
|
|
10136
|
+
"metricCode": "",
|
|
10137
|
+
"description": "到网络出口的距离(跳数)",
|
|
10138
|
+
"source": "system",
|
|
10139
|
+
"dataType": "int",
|
|
10140
|
+
"dataLength": "128",
|
|
10141
|
+
"dataRange": "",
|
|
10142
|
+
"unit": "",
|
|
10143
|
+
"initValue": "",
|
|
10144
|
+
"defaultValue": "2147483647",
|
|
10145
|
+
"changeValue": "",
|
|
10146
|
+
"userVisible": false,
|
|
10147
|
+
"modifiable": false,
|
|
10148
|
+
"required": false,
|
|
10149
|
+
"enable": true,
|
|
10150
|
+
"refCi": null,
|
|
10151
|
+
"isPublic": null,
|
|
10152
|
+
"dictCode": null,
|
|
10153
|
+
"attrSource": "private",
|
|
10154
|
+
"refTemplateCode": "t.base",
|
|
10155
|
+
"refTemplateName": "基础模板",
|
|
10156
|
+
"dataSource": "manual"
|
|
10157
|
+
}
|
|
10158
|
+
],
|
|
10159
|
+
"metrics": [
|
|
10160
|
+
{
|
|
10161
|
+
"id": null,
|
|
10162
|
+
"key": null,
|
|
10163
|
+
"creator": null,
|
|
10164
|
+
"createdTime": null,
|
|
10165
|
+
"updatedTime": null,
|
|
10166
|
+
"ref": null,
|
|
10167
|
+
"code": "xxx1",
|
|
10168
|
+
"name": "xxx1指标",
|
|
10169
|
+
"desc": null,
|
|
10170
|
+
"label": "",
|
|
10171
|
+
"isGoldMetric": true,
|
|
10172
|
+
"metricType": "capacity",
|
|
10173
|
+
"unit": "%",
|
|
10174
|
+
"dataType": "double",
|
|
10175
|
+
"dataRange": "0-100",
|
|
10176
|
+
"changeValue": "",
|
|
10177
|
+
"templateCode": "m.agg_link"
|
|
10178
|
+
},
|
|
10179
|
+
{
|
|
10180
|
+
"id": null,
|
|
10181
|
+
"key": null,
|
|
10182
|
+
"creator": null,
|
|
10183
|
+
"createdTime": null,
|
|
10184
|
+
"updatedTime": null,
|
|
10185
|
+
"ref": null,
|
|
10186
|
+
"code": "xxx2",
|
|
10187
|
+
"name": "xxx2指标",
|
|
10188
|
+
"desc": null,
|
|
10189
|
+
"label": "",
|
|
10190
|
+
"isGoldMetric": true,
|
|
10191
|
+
"metricType": "capacity",
|
|
10192
|
+
"unit": "%",
|
|
10193
|
+
"dataType": "double",
|
|
10194
|
+
"dataRange": "0-100",
|
|
10195
|
+
"changeValue": "",
|
|
10196
|
+
"templateCode": "m.agg_link"
|
|
10197
|
+
}
|
|
10198
|
+
]
|
|
10047
10199
|
}
|
|
10048
10200
|
]
|
|
@@ -17,16 +17,15 @@ import EdgeFlowDirection from "./EdgeFlowDirection";
|
|
|
17
17
|
|
|
18
18
|
function DisplaySetting(props, ref) {
|
|
19
19
|
var topo = props.topo,
|
|
20
|
-
|
|
20
|
+
displaySettingProps = props.displaySettingProps;
|
|
21
21
|
var displayConfig = topo.store.getModelState('displayConfig');
|
|
22
22
|
|
|
23
|
-
var _ref =
|
|
23
|
+
var _ref = displaySettingProps || {},
|
|
24
24
|
linkTagConfig = _ref.linkTagConfig,
|
|
25
25
|
linkTipConfig = _ref.linkTipConfig,
|
|
26
26
|
showEdgeExpandConfig = _ref.showEdgeExpandConfig,
|
|
27
|
-
extraConfig = _ref.extraConfig
|
|
28
|
-
|
|
29
|
-
var showLinkConfig = !!(viewerProps !== null && viewerProps !== void 0 && viewerProps.showLinkConfig);
|
|
27
|
+
extraConfig = _ref.extraConfig,
|
|
28
|
+
showLinkConfig = _ref.showLinkConfig;
|
|
30
29
|
|
|
31
30
|
var field = _Field.useField({
|
|
32
31
|
autoUnmount: false,
|
|
@@ -9,7 +9,7 @@ import useDisplaySetting from "./hooks/useDisplaySetting";
|
|
|
9
9
|
export default function DisplaySettingDrawer(props) {
|
|
10
10
|
var visible = props.visible,
|
|
11
11
|
topo = props.topo,
|
|
12
|
-
|
|
12
|
+
displaySettingProps = props.displaySettingProps,
|
|
13
13
|
onClose = props.onClose;
|
|
14
14
|
var settingRef = useRef();
|
|
15
15
|
|
|
@@ -76,7 +76,7 @@ export default function DisplaySettingDrawer(props) {
|
|
|
76
76
|
}, visible && /*#__PURE__*/React.createElement(DisplaySetting, {
|
|
77
77
|
ref: settingRef,
|
|
78
78
|
topo: topo,
|
|
79
|
-
|
|
79
|
+
displaySettingProps: displaySettingProps
|
|
80
80
|
}));
|
|
81
81
|
}
|
|
82
82
|
;
|
|
@@ -4,7 +4,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
4
4
|
import topoService from '@riil-frontend/component-topology-common/es/services/topo';
|
|
5
5
|
export default (function (props) {
|
|
6
6
|
var topo = props.topo,
|
|
7
|
-
|
|
7
|
+
displaySettingProps = props.displaySettingProps,
|
|
8
8
|
settingRef = props.settingRef;
|
|
9
9
|
|
|
10
10
|
var executeByConfig = /*#__PURE__*/function () {
|
|
@@ -17,7 +17,7 @@ export default (function (props) {
|
|
|
17
17
|
// 更新节点名称显示隐藏
|
|
18
18
|
topo.attributeMetricDisplay.updateNodesNameVisible(); // 更新连线展开折叠状态
|
|
19
19
|
|
|
20
|
-
if (
|
|
20
|
+
if (displaySettingProps !== null && displaySettingProps !== void 0 && displaySettingProps.showLinkConfig) {
|
|
21
21
|
if (config.expandAllEdges) {
|
|
22
22
|
topo.getHtTopo().expandAllEdgeGroups();
|
|
23
23
|
} else {
|
|
@@ -49,8 +49,6 @@ export default (function (props) {
|
|
|
49
49
|
|
|
50
50
|
var save = /*#__PURE__*/function () {
|
|
51
51
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
52
|
-
var _viewerProps$displayS;
|
|
53
|
-
|
|
54
52
|
var values, prevDisplayConfig, displayConfig, displayConfigDispatchers, extraOnOk;
|
|
55
53
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
56
54
|
while (1) {
|
|
@@ -73,7 +71,7 @@ export default (function (props) {
|
|
|
73
71
|
displayConfigDispatchers.update(displayConfig); // 按配置执行
|
|
74
72
|
|
|
75
73
|
executeByConfig(displayConfig);
|
|
76
|
-
extraOnOk = (
|
|
74
|
+
extraOnOk = (displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onOk) || (displaySettingProps === null || displaySettingProps === void 0 ? void 0 : displaySettingProps.onDisplaySettingDrawerOk);
|
|
77
75
|
|
|
78
76
|
if (extraOnOk) {
|
|
79
77
|
extraOnOk();
|
|
@@ -2,8 +2,8 @@ import _Collapse from "@alifd/next/es/collapse";
|
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import GroupNodeList from "./GroupNodeList";
|
|
4
4
|
import GroupAddResourceButton from "./GroupAddResourceButton";
|
|
5
|
-
import CollapseFullheightStyles from "../../../common/GroupNodeList/CollapseFullheight.module.scss";
|
|
6
5
|
import CollapsePanel from "../../../../../../../components/collapse/Panel";
|
|
6
|
+
import CollapseFullheightStyles from "../../../common/GroupNodeList/CollapseFullheight.module.scss";
|
|
7
7
|
export default function GroupRelateData(props) {
|
|
8
8
|
var topo = props.topo,
|
|
9
9
|
topoEditApi = props.topoEditApi,
|
|
@@ -12,15 +12,28 @@ export default function GroupRelateData(props) {
|
|
|
12
12
|
editorProps = props.editorProps;
|
|
13
13
|
|
|
14
14
|
var createResourcePanel = function createResourcePanel() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
var _groupDataViewProps$r;
|
|
16
|
+
|
|
17
|
+
var groupDataViewProps = editorProps.groupDataViewProps;
|
|
18
|
+
var headerExtra;
|
|
19
|
+
|
|
20
|
+
if ((groupDataViewProps === null || groupDataViewProps === void 0 ? void 0 : (_groupDataViewProps$r = groupDataViewProps.relateDataProps) === null || _groupDataViewProps$r === void 0 ? void 0 : _groupDataViewProps$r.headerExtra) !== undefined) {
|
|
21
|
+
var _groupDataViewProps$r2;
|
|
22
|
+
|
|
23
|
+
headerExtra = groupDataViewProps === null || groupDataViewProps === void 0 ? void 0 : (_groupDataViewProps$r2 = groupDataViewProps.relateDataProps) === null || _groupDataViewProps$r2 === void 0 ? void 0 : _groupDataViewProps$r2.headerExtra;
|
|
24
|
+
} else {
|
|
25
|
+
headerExtra = /*#__PURE__*/React.createElement(GroupAddResourceButton, {
|
|
19
26
|
topo: topo,
|
|
20
27
|
topoEdit: topoEditApi,
|
|
21
28
|
group: group,
|
|
22
29
|
groupData: values
|
|
23
|
-
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/React.createElement(CollapsePanel, {
|
|
34
|
+
key: "\u5173\u8054\u8D44\u6E90",
|
|
35
|
+
title: "\u5173\u8054\u8D44\u6E90",
|
|
36
|
+
extra: headerExtra,
|
|
24
37
|
className: CollapseFullheightStyles.panelFullHeight
|
|
25
38
|
}, /*#__PURE__*/React.createElement(GroupNodeList, {
|
|
26
39
|
topo: topo,
|