Skip to content

Commit c577ba5

Browse files
[#653] Swagger UI button
1 parent 50b8803 commit c577ba5

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

src/app/Welcome/Welcome.tsx

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from '@patternfly/react-core';
2323
import icon from '!!url-loader!@app/assets/images/infinispan_logo_rgb_darkbluewhite_darkblue.svg';
2424
import { CatalogIcon, DownloadIcon, GithubIcon, UnknownIcon } from '@patternfly/react-icons';
25-
import { chart_color_blue_500, chart_global_Fill_Color_white } from '@patternfly/react-tokens';
25+
import { chart_color_blue_500, chart_color_orange_200, chart_global_Fill_Color_white } from '@patternfly/react-tokens';
2626
import { ConsoleBackground } from '@app/Common/ConsoleBackground/ConsoleBackground';
2727
import { Support } from '@app/Support/Support';
2828
import { useTranslation } from 'react-i18next';
@@ -107,24 +107,35 @@ const Welcome = () => {
107107
const DetailSection = (
108108
<Stack className="detail-section">
109109
<StackItem>
110-
<img width={'200px'} height={'42px'} src={icon} alt={brandname + ' logo'} />
110+
<img
111+
width={'200px'}
112+
height={'42px'}
113+
src={icon}
114+
alt={brandname + ' logo'}
115+
/>
111116
</StackItem>
112117
<StackItem className={'font-title-bold'}>
113-
<Title style={{ fontWeight: 'bold' }} size={TitleSizes['4xl']} headingLevel="h1">
118+
<Title
119+
style={{ fontWeight: 'bold' }}
120+
size={TitleSizes['4xl']}
121+
headingLevel="h1"
122+
>
114123
{t('welcome-page.welcome-title', { brandname: brandname })}
115124
</Title>
116125
</StackItem>
117126
{version !== '' && (
118127
<StackItem className={'version-text'}>
119128
<Flex>
120129
<FlexItem>
121-
<Content component={ContentVariants.p}>{t('welcome-page.current-version')}</Content>
130+
<Content component={ContentVariants.p}>
131+
{t('welcome-page.current-version')}
132+
</Content>
122133
</FlexItem>
123134
<FlexItem>
124135
<Badge
125136
style={{
126137
backgroundColor: 'white',
127-
color: chart_color_blue_500.value
138+
color: chart_color_blue_500.value,
128139
}}
129140
>
130141
{version}
@@ -138,12 +149,33 @@ const Welcome = () => {
138149
<Content component={ContentVariants.p}>{description2}</Content>
139150
<Content component={ContentVariants.p}>
140151
{license}{' '}
141-
<a style={{ color: 'white', textDecoration: 'underline' }} href={apacheLicenseLink} target="blank">
152+
<a
153+
style={{ color: 'white', textDecoration: 'underline' }}
154+
href={apacheLicenseLink}
155+
target="blank"
156+
>
142157
{t('welcome-page.apache-license')}
143158
</a>
144159
</Content>
145160
</StackItem>
146-
<StackItem>{buildConsoleButton()}</StackItem>
161+
<StackItem>
162+
<Flex>
163+
<FlexItem>{buildConsoleButton()}</FlexItem>
164+
<FlexItem>
165+
<Button
166+
component="a"
167+
href="/swagger-ui/"
168+
size="lg"
169+
style={{
170+
backgroundColor: chart_color_orange_200.value,
171+
color: chart_global_Fill_Color_white.value,
172+
}}
173+
>
174+
{t('welcome-page.open-swagger-ui')}
175+
</Button>
176+
</FlexItem>
177+
</Flex>
178+
</StackItem>
147179
</Stack>
148180
);
149181

src/app/assets/languages/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
"learn-more": " Get started",
5858
"develop": "Code applications for different use cases.",
5959
"tutorials": " Run quick tutorials",
60-
"go-to-console": "Open the console"
60+
"go-to-console": "Open the console",
61+
"open-swagger-ui": "Open Swagger UI"
6162
},
6263
"login-form": {
6364
"login-main": "Log in to {{brandname}}.",

0 commit comments

Comments
 (0)