1- import { Button , FlexBox , RadioButton , Title } from '@ui5/webcomponents-react' ;
1+ import { Button , Label , Text , Title } from '@ui5/webcomponents-react' ;
22import { useTranslation } from 'react-i18next' ;
33import './ClusterPreview.scss' ;
44import {
55 findInitialValue ,
66 findInitialValues ,
77} from '../views/EditCluster/EditCluster' ;
88import { getUserIndex } from '../shared' ;
9+ import { ChooseStorage } from './ChooseStorage' ;
910import { isOIDCExec } from './oidc-params' ;
1011import {
1112 Kubeconfig ,
@@ -27,16 +28,16 @@ const TokenData = ({
2728 < >
2829 { execCommand && (
2930 < >
30- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin- bottom-tiny" >
31- { t ( 'clusters.wizard.auth.exec-command' ) } :
32- </ p >
33- < div > { execCommand } </ div >
31+ < Label className = "sap-margin-bottom-tiny" showColon >
32+ { t ( 'clusters.wizard.auth.exec-command' ) }
33+ </ Label >
34+ < Text > { execCommand } </ Text >
3435 </ >
3536 ) }
36- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin-bottom-tiny" >
37- { ` ${ t ( 'clusters.token' ) } :` }
38- </ p >
39- { token && < div className = "cluster-preview__token" > { token } </ div > }
37+ < Label className = "sap-margin-top-small sap-margin-bottom-tiny" showColon >
38+ { t ( 'clusters.token' ) }
39+ </ Label >
40+ { token && < Text className = "cluster-preview__token" > { token } </ Text > }
4041 </ >
4142 ) ;
4243} ;
@@ -58,34 +59,43 @@ const OidcData = ({
5859 < >
5960 { issuerUrl && (
6061 < >
61- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin- bottom-tiny" >
62- { t ( 'clusters.labels.issuer-url' ) } :
63- </ p >
64- < div > { issuerUrl } </ div >
62+ < Label className = "sap-margin-bottom-tiny" showColon >
63+ { t ( 'clusters.labels.issuer-url' ) }
64+ </ Label >
65+ < Text > { issuerUrl } </ Text >
6566 </ >
6667 ) }
6768 { clientId && (
6869 < >
69- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin-bottom-tiny" >
70- { t ( 'clusters.labels.client-id' ) } :
71- </ p >
72- < div > { clientId } </ div >
70+ < Label
71+ className = "sap-margin-top-small sap-margin-bottom-tiny"
72+ showColon
73+ >
74+ { t ( 'clusters.labels.client-id' ) }
75+ </ Label >
76+ < Text > { clientId } </ Text >
7377 </ >
7478 ) }
7579 { clientSecret && (
7680 < >
77- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin-bottom-tiny" >
78- { t ( 'clusters.labels.client-secret' ) } :
79- </ p >
80- < div > { clientSecret } </ div >
81+ < Label
82+ className = "sap-margin-top-small sap-margin-bottom-tiny"
83+ showColon
84+ >
85+ { t ( 'clusters.labels.client-secret' ) }
86+ </ Label >
87+ < Text > { clientSecret } </ Text >
8188 </ >
8289 ) }
8390 { extraScopes && (
8491 < >
85- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin-bottom-tiny" >
86- { t ( 'clusters.labels.scopes' ) } :
87- </ p >
88- { < Tokens tokens = { extraScopes } /> }
92+ < Label
93+ className = "sap-margin-top-small sap-margin-bottom-tiny"
94+ showColon
95+ >
96+ { t ( 'clusters.labels.scopes' ) }
97+ </ Label >
98+ < Tokens tokens = { extraScopes } />
8999 </ >
90100 ) }
91101 </ >
@@ -138,11 +148,13 @@ export function ClusterPreview({
138148 level = "H5"
139149 className = "cluster-preview__subtitle sap-margin-y-small"
140150 > { `1. ${ t ( 'common.headers.configuration' ) } ` } </ Title >
141- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin-bottom-tiny" >
142- { t ( 'clusters.name_singular' ) } :
143- </ p >
144- < div className = "cluster-preview__content sap-margin-top-small sap-margin-bottom-tiny" >
145- < div > { kubeconfig ?. [ 'current-context' ] } </ div >
151+ < div className = "cluster-preview__content sap-margin-y-small" >
152+ < div >
153+ < Label className = "sap-margin-bottom-tiny" showColon >
154+ { t ( 'clusters.name_singular' ) }
155+ </ Label >
156+ < Text > { kubeconfig ?. [ 'current-context' ] } </ Text >
157+ </ div >
146158 < Button
147159 design = "Transparent"
148160 onClick = { ( ) => setSelected ( 1 ) }
@@ -159,7 +171,7 @@ export function ClusterPreview({
159171 className = "cluster-preview__subtitle sap-margin-y-small"
160172 > { `2. ${ t ( 'clusters.wizard.authentication' ) } ` } </ Title >
161173
162- < div className = "cluster-preview__content sap-margin-top -small sap-margin-bottom-tiny " >
174+ < div className = "cluster-preview__content sap-margin-y -small" >
163175 < div className = "cluster-preview__auth" >
164176 { authenticationType === 'token' ? (
165177 < TokenData token = { token } execCommand = { exec ?. command } />
@@ -187,39 +199,13 @@ export function ClusterPreview({
187199 level = "H5"
188200 className = "cluster-preview__subtitle sap-margin-y-small"
189201 > { `3. ${ t ( 'clusters.wizard.storage' ) } ` } </ Title >
190- < p className = "cluster-preview__data-header sap-margin-top-small sap-margin-bottom-tiny" >
191- { `${ t ( 'clusters.storage.storage-preference' ) } :` }
192- </ p >
193- < div className = "cluster-preview__content sap-margin-bottom-medium sap-margin-top-tiny" >
194- < FlexBox
195- direction = "Column"
196- className = "cluster-preview__storage-container"
197- >
198- < RadioButton
199- checked = { storage === 'localStorage' }
200- text = { `${ t ( 'clusters.storage.labels.localStorage' ) } : ${ t (
201- 'clusters.storage.descriptions.localStorage' ,
202- ) } `}
203- disabled
204- className = "cluster-preview__storage"
205- />
206- < RadioButton
207- checked = { storage === 'sessionStorage' }
208- text = { `${ t ( 'clusters.storage.labels.sessionStorage' ) } : ${ t (
209- 'clusters.storage.descriptions.sessionStorage' ,
210- ) } `}
211- disabled
212- className = "cluster-preview__storage"
213- />
214- < RadioButton
215- checked = { storage === 'inMemory' }
216- text = { `${ t ( 'clusters.storage.labels.inMemory' ) } : ${ t (
217- 'clusters.storage.descriptions.inMemory' ,
218- ) } `}
219- disabled
220- className = "cluster-preview__storage"
221- />
222- </ FlexBox >
202+ < div className = "cluster-preview__content sap-margin-y-small" >
203+ < ChooseStorage
204+ storage = { storage }
205+ setStorage = { ( ) => { } }
206+ disabled
207+ name = "storage-preview"
208+ />
223209 < Button
224210 design = "Transparent"
225211 onClick = { ( ) => {
0 commit comments