Use Page/PageSection/Breadcrumb patternfly components to make the app aligned with the PF design guidelines
This commit is contained in:
parent
3ebdcfa4fe
commit
3244a4c37d
4 changed files with 77 additions and 45 deletions
|
|
@ -1,3 +1,8 @@
|
|||
p {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
// Ensure UI fills the entire page (and does not run over)
|
||||
.ct-page-fill {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
import React from "react";
|
||||
import {
|
||||
Breadcrumb, BreadcrumbItem,
|
||||
Button,
|
||||
Form,
|
||||
FormGroup,
|
||||
|
|
@ -37,9 +38,10 @@ import {
|
|||
EmptyStateIcon,
|
||||
Title,
|
||||
EmptyStateBody,
|
||||
EmptyStateVariant
|
||||
EmptyStateVariant,
|
||||
Page, PageSection,
|
||||
} from "@patternfly/react-core";
|
||||
import { AngleLeftIcon, ExclamationCircleIcon } from "@patternfly/react-icons";
|
||||
import { ExclamationCircleIcon } from "@patternfly/react-icons";
|
||||
import { global_danger_color_200 } from "@patternfly/react-tokens";
|
||||
|
||||
const json = require('comment-json');
|
||||
|
|
@ -557,12 +559,23 @@ export function Config () {
|
|||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button variant="link" icon={<AngleLeftIcon />} onClick={goBack}>
|
||||
<Page
|
||||
groupProps={{ sticky: 'top' }}
|
||||
isBreadcrumbGrouped
|
||||
breadcrumb={
|
||||
<Breadcrumb className='machines-listing-breadcrumb'>
|
||||
<BreadcrumbItem to='#' onClick={goBack}>
|
||||
{_("Session Recording")}
|
||||
</Button>
|
||||
</BreadcrumbItem>
|
||||
<BreadcrumbItem isActive>
|
||||
{_("Settings")}
|
||||
</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
}>
|
||||
<PageSection>
|
||||
<GeneralConfig />
|
||||
<SssdConfig />
|
||||
</>
|
||||
</PageSection>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
|
|||
</head>
|
||||
|
||||
<body class="pf-m-redhat-form">
|
||||
<div id="app"></div>
|
||||
<div class="ct-page-fill" id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
import React from "react";
|
||||
import {
|
||||
Breadcrumb, BreadcrumbItem,
|
||||
Bullseye,
|
||||
Button,
|
||||
Card,
|
||||
|
|
@ -34,6 +35,7 @@ import {
|
|||
EmptyStateIcon,
|
||||
EmptyStateVariant,
|
||||
ExpandableSection,
|
||||
Page, PageSection, PageSectionVariants,
|
||||
Spinner,
|
||||
Title,
|
||||
TextInput,
|
||||
|
|
@ -50,7 +52,6 @@ import {
|
|||
TableBody
|
||||
} from "@patternfly/react-table";
|
||||
import {
|
||||
AngleLeftIcon,
|
||||
CogIcon,
|
||||
ExclamationCircleIcon,
|
||||
ExclamationTriangleIcon,
|
||||
|
|
@ -394,10 +395,20 @@ class Recording extends React.Component {
|
|||
);
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Button variant="link" icon={<AngleLeftIcon />} onClick={this.goBackToList}>
|
||||
<Page
|
||||
groupProps={{ sticky: 'top' }}
|
||||
isBreadcrumbGrouped
|
||||
breadcrumb={
|
||||
<Breadcrumb className='machines-listing-breadcrumb'>
|
||||
<BreadcrumbItem to='#' onClick={this.goBackToList}>
|
||||
{_("Session Recording")}
|
||||
</Button>
|
||||
</BreadcrumbItem>
|
||||
<BreadcrumbItem isActive>
|
||||
{_("Current recording")}
|
||||
</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
}>
|
||||
<PageSection>
|
||||
<Player.Player
|
||||
ref="player"
|
||||
matchList={this.props.recording.matchList}
|
||||
|
|
@ -417,7 +428,8 @@ class Recording extends React.Component {
|
|||
curTs={this.state.curTs}
|
||||
jumpToTs={this.handleLogTsChange} />
|
||||
</ExpandableSection>
|
||||
</>
|
||||
</PageSection>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -890,7 +902,8 @@ export default class View extends React.Component {
|
|||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Page>
|
||||
<PageSection variant={PageSectionVariants.light}>
|
||||
<Toolbar>{toolbar}</Toolbar>
|
||||
<RecordingList
|
||||
date_since={this.state.date_since}
|
||||
|
|
@ -899,7 +912,8 @@ export default class View extends React.Component {
|
|||
hostname={this.state.hostname}
|
||||
list={this.state.recordingList}
|
||||
diff_hosts={this.state.diff_hosts} />
|
||||
</>
|
||||
</PageSection>
|
||||
</Page>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue