@@ -12,6 +12,7 @@ import {
12
12
SYSTEM_QUICK_LINKS ,
13
13
SYSTEM_QUICK_LINKS_LABELS ,
14
14
} from '../../k8s/groups/EDP/QuickLink/constants' ;
15
+ import { QUICK_LINK_LABEL_SELECTOR_TYPE } from '../../k8s/groups/EDP/QuickLink/labels' ;
15
16
import { Tabs } from '../../providers/Tabs/components/Tabs' ;
16
17
import { useTabsContext } from '../../providers/Tabs/hooks' ;
17
18
import { LinkCreationService } from '../../services/link-creation' ;
@@ -33,13 +34,12 @@ export const PageView = () => {
33
34
stage : { data : stage , isLoading : isStageLoading , error : stageError } ,
34
35
} = useDynamicDataContext ( ) ;
35
36
36
- const grafanaQuickLink =
37
- QuickLinks && QuickLinks . data ?. find ( ( el ) => el . metadata . name === SYSTEM_QUICK_LINKS . GRAFANA ) ;
38
- const kibanaQuickLink =
39
- QuickLinks && QuickLinks . data ?. find ( ( el ) => el . metadata . name === SYSTEM_QUICK_LINKS . KIBANA ) ;
37
+ const monitoringQuickLink =
38
+ QuickLinks && QuickLinks . data ?. find ( ( el ) => el . metadata . name === SYSTEM_QUICK_LINKS . MONITORING ) ;
39
+ const loggingQuickLink =
40
+ QuickLinks && QuickLinks . data ?. find ( ( el ) => el . metadata . name === SYSTEM_QUICK_LINKS . LOGGING ) ;
40
41
41
42
const stageSpecName = stage ?. spec . name ;
42
- const stageSpecNamespace = stage ?. spec . namespace ;
43
43
44
44
const tabs = usePageTabs ( ) ;
45
45
@@ -109,28 +109,32 @@ export const PageView = () => {
109
109
/>
110
110
< QuickLink
111
111
name = { {
112
- label : SYSTEM_QUICK_LINKS_LABELS [ SYSTEM_QUICK_LINKS . GRAFANA ] ,
113
- value : SYSTEM_QUICK_LINKS . GRAFANA ,
112
+ label : SYSTEM_QUICK_LINKS_LABELS [ SYSTEM_QUICK_LINKS . MONITORING ] ,
113
+ value : SYSTEM_QUICK_LINKS . MONITORING ,
114
114
} }
115
- icon = { ICONS . GRAFANA }
116
- externalLink = { LinkCreationService . grafana . createDashboardLink (
117
- QuickLinksURLs . data ?. [ SYSTEM_QUICK_LINKS . GRAFANA ] ,
118
- stageSpecNamespace
115
+ enabledText = "monitoring dashboard"
116
+ iconBase64 = { monitoringQuickLink ?. spec ?. icon }
117
+ externalLink = { LinkCreationService . monitoring . createDashboardLink (
118
+ monitoringQuickLink ?. metadata ?. labels [ QUICK_LINK_LABEL_SELECTOR_TYPE ] ,
119
+ QuickLinksURLs . data ?. [ SYSTEM_QUICK_LINKS . MONITORING ] ,
120
+ stage . spec . namespace
119
121
) }
120
- QuickLinkComponent = { grafanaQuickLink }
122
+ QuickLinkComponent = { monitoringQuickLink }
121
123
isTextButton
122
124
/>
123
125
< QuickLink
124
126
name = { {
125
- label : SYSTEM_QUICK_LINKS_LABELS [ SYSTEM_QUICK_LINKS . KIBANA ] ,
126
- value : SYSTEM_QUICK_LINKS . KIBANA ,
127
+ label : SYSTEM_QUICK_LINKS_LABELS [ SYSTEM_QUICK_LINKS . LOGGING ] ,
128
+ value : SYSTEM_QUICK_LINKS . LOGGING ,
127
129
} }
128
- icon = { ICONS . KIBANA }
129
- externalLink = { LinkCreationService . kibana . createDashboardLink (
130
- QuickLinksURLs . data ?. [ SYSTEM_QUICK_LINKS . KIBANA ] ,
131
- stageSpecNamespace
130
+ enabledText = "logging dashboard"
131
+ iconBase64 = { loggingQuickLink ?. spec ?. icon }
132
+ externalLink = { LinkCreationService . logging . createDashboardLink (
133
+ loggingQuickLink ?. metadata ?. labels [ QUICK_LINK_LABEL_SELECTOR_TYPE ] ,
134
+ QuickLinksURLs . data ?. [ SYSTEM_QUICK_LINKS . LOGGING ] ,
135
+ stage . spec . namespace
132
136
) }
133
- QuickLinkComponent = { kibanaQuickLink }
137
+ QuickLinkComponent = { loggingQuickLink }
134
138
isTextButton
135
139
/>
136
140
< Box sx = { { ml : ( t ) => t . typography . pxToRem ( 20 ) } } >
0 commit comments