Skip to content

Commit cdda238

Browse files
authored
Add API cheat sheet link and tweak styling (#423)
* Add API cheat sheet link to home page * fix lint
1 parent 0effeb6 commit cdda238

File tree

2 files changed

+28
-31
lines changed

2 files changed

+28
-31
lines changed

src/App.scss

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
flex-direction: column;
1818
}
1919
}
20-
.apid-legacy-button {
21-
--pf-c-button--m-secondary--hover--BackgroundColor: var(--pf-c-button--m-primary--BackgroundColor);
22-
--pf-c-button--m-secondary--hover--Color: var(--pf-global--Color--light-100);
23-
}
2420
.pf-c-sidebar__main {
2521
height: 100%;
2622
}

src/pages/LandingPage.tsx

+28-27
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {FunctionComponent, useMemo } from 'react';
22
import {
3-
ActionList, ActionListItem,
43
Button,
54
Flex,
65
Form,
6+
Icon,
77
Page,
88
PageSection,
99
PageSectionVariants,
@@ -22,6 +22,7 @@ import {apiConfigurations, apiLabels} from "@apidocs/common";
2222
import { SearchInput } from '@patternfly/react-core';
2323
import ThIcon from '@patternfly/react-icons/dist/js/icons/th-icon';
2424
import ThListIcon from '@patternfly/react-icons/dist/js/icons/th-list-icon';
25+
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
2526
import {Helmet} from 'react-helmet-async';
2627

2728

@@ -130,32 +131,32 @@ export const LandingPage: FunctionComponent = () => {
130131
<PageSection variant={PageSectionVariants.light} className="pf-u-p-md">
131132
<Flex direction={{ default: "rowReverse" }}>
132133
<Split className="apid-split-l-pagination">
133-
<SplitItem className="pf-u-pb-md pf-u-pt-md-on-md pf-u-pl-sm-on-md" isFilled>
134-
<ActionList>
135-
<ActionListItem>
136-
<Button component="a" target="_blank" href="https://console.redhat.com/docs/api" variant="secondary" className="apid-legacy-button">
137-
Use the legacy API documentation site
138-
</Button>
139-
</ActionListItem>
140-
<ActionListItem>
141-
<Popover
142-
aria-label="Connect to APIs using Red Hat service accounts"
143-
position="bottom"
144-
bodyContent={<>
145-
<b>Important:</b> Starting Dec 2024, Red Hat will discontinue support for basic authorization to connect to services' APIs.
146-
The Red Hat Hybrid Cloud Console is integrating service accounts with User Access functionality to provide granular control
147-
over access permissions and enhance security.
148-
Token-based authentication is recommended.
149-
More information about transitioning from basic authentication to token-based authentication via service accounts is described
150-
on the <a href="https://access.redhat.com/articles/7036194">Red Hat Customer Portal</a>.
151-
</>}
152-
>
153-
<Button component="a" target="_blank" variant="secondary" className="apid-legacy-button">
154-
Connect to APIs using Red Hat service accounts
155-
</Button>
156-
</Popover>
157-
</ActionListItem>
158-
</ActionList>
134+
<SplitItem className="pf-u-pb-md pf-u-pt-md-on-md pf-u-pl-sm-on-md pf-v5-u-text-wrap" isFilled>
135+
<Button className="pf-u-mr-sm pf-u-mb-sm" component="a" target="_blank" href="https://developers.redhat.com/cheat-sheets/red-hat-insights-api-cheat-sheet" variant="secondary" isSmall>
136+
API Cheat Sheet
137+
</Button>
138+
<Button className="pf-u-mr-sm pf-u-mb-sm" component="a" target="_blank" href="https://console.redhat.com/docs/api" variant="secondary" isSmall>
139+
Legacy API documentation
140+
<Icon size="sm" className="pf-u-ml-xs" isInline>
141+
<ExternalLinkAltIcon />
142+
</Icon>
143+
</Button>
144+
<Popover
145+
aria-label="Connect to APIs using Red Hat service accounts"
146+
position="bottom"
147+
bodyContent={<>
148+
<b>Important:</b> Starting Dec 2024, Red Hat will discontinue support for basic authorization to connect to services' APIs.
149+
The Red Hat Hybrid Cloud Console is integrating service accounts with User Access functionality to provide granular control
150+
over access permissions and enhance security.
151+
Token-based authentication is recommended.
152+
More information about transitioning from basic authentication to token-based authentication via service accounts is described
153+
on the <a href="https://access.redhat.com/articles/7036194">Red Hat Customer Portal</a>.
154+
</>}
155+
>
156+
<Button component="a" target="_blank" variant="secondary" isSmall>
157+
Connect to APIs using Red Hat service accounts
158+
</Button>
159+
</Popover>
159160
</SplitItem>
160161
<SplitItem>
161162
<Pagination

0 commit comments

Comments
 (0)