File tree Expand file tree Collapse file tree 4 files changed +25
-21
lines changed
src/views/dashboard/related/network-profiling Expand file tree Collapse file tree 4 files changed +25
-21
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,14 @@ limitations under the License. -->
15
15
<template >
16
16
<div class =" flex-h content" >
17
17
<Tasks />
18
- <div
19
- class =" vis-graph ml-5"
20
- v-if =" networkProfilingStore.nodes.length"
21
- v-loading =" networkProfilingStore.loadNodes"
22
- >
23
- <process-topology :config =" config" />
24
- </div >
25
- <div class =" text" v-else v-loading =" networkProfilingStore.loadNodes" >
26
- {{ t("noData") }}
18
+ <div class =" vis-graph ml-5" v-loading =" networkProfilingStore.loadNodes" >
19
+ <process-topology
20
+ v-if =" networkProfilingStore.nodes.length"
21
+ :config =" config"
22
+ />
23
+ <div class =" text" v-else >
24
+ {{ t("noData") }}
25
+ </div >
27
26
</div >
28
27
</div >
29
28
</template >
@@ -60,7 +59,7 @@ const { t } = useI18n();
60
59
}
61
60
62
61
.text {
63
- width : calc ( 100% - 330 px ) ;
62
+ width : 100% ;
64
63
text-align : center ;
65
64
margin-top : 30px ;
66
65
}
Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ export const linkElement = (graph: any) => {
30
30
0.5
31
31
) ;
32
32
if ( d . lowerArc ) {
33
- controlPos [ 1 ] = - controlPos [ 1 ] - 10 ;
33
+ controlPos [ 1 ] =
34
+ Math . abs ( controlPos [ 1 ] ) < 50
35
+ ? - controlPos [ 1 ] + 90
36
+ : - controlPos [ 1 ] - 10 ;
34
37
}
35
38
return (
36
39
"M" +
@@ -141,7 +144,8 @@ function getMidpoint(d: Call) {
141
144
0.5
142
145
) ;
143
146
if ( d . lowerArc ) {
144
- controlPos [ 1 ] = - controlPos [ 1 ] ;
147
+ controlPos [ 1 ] =
148
+ Math . abs ( controlPos [ 1 ] ) < 50 ? - controlPos [ 1 ] + 100 : - controlPos [ 1 ] - 10 ;
145
149
}
146
150
const p = quadraticBezier (
147
151
0.5 ,
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
14
14
limitations under the License. -->
15
15
<template >
16
16
<div ref =" chart" class =" process-topo" ></div >
17
- <el-popover placement =" bottom" :width =" 295" trigger =" click" >
17
+ <el-popover
18
+ placement =" bottom"
19
+ :width =" 295"
20
+ trigger =" click"
21
+ v-if =" dashboardStore.editMode"
22
+ >
18
23
<template #reference >
19
- <div
20
- class =" switch-icon-edit ml-5"
21
- title =" Settings"
22
- @click =" setConfig"
23
- v-if =" dashboardStore.editMode"
24
- >
24
+ <div class =" switch-icon-edit ml-5" title =" Settings" @click =" setConfig" >
25
25
<Icon size =" middle" iconName =" setting_empty" />
26
26
</div >
27
27
</template >
@@ -76,7 +76,7 @@ const link = ref<any>(null);
76
76
const anchor = ref <any >(null );
77
77
const arrow = ref <any >(null );
78
78
const oldVal = ref <{ width: number ; height: number }>({ width: 0 , height: 0 });
79
- const config = ref <any >({});
79
+ const config = ref <any >(props . config || {});
80
80
const diff = ref <number []>([220 , 200 ]);
81
81
const radius = 210 ;
82
82
const dates = ref <Nullable <{ start: number ; end: number }>>(null );
Original file line number Diff line number Diff line change @@ -62,9 +62,10 @@ function getDashboards() {
62
62
}
63
63
64
64
function changeLinkDashboard(opt : { value: string }[]) {
65
+ const linkDashboard = opt .length ? opt [0 ].value : " " ;
65
66
const p = {
66
67
... dashboardStore .selectedGrid ,
67
- linkDashboard: opt [ 0 ]. value ,
68
+ linkDashboard ,
68
69
};
69
70
dashboardStore .selectWidget (p );
70
71
dashboardStore .setConfigs (p );
You can’t perform that action at this time.
0 commit comments