1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

Add job output menu controls component

This commit is contained in:
Marliana Lara 2019-07-03 13:07:05 -04:00
parent 99357acf5d
commit 408b38174a
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
3 changed files with 73 additions and 1 deletions

View File

@ -1,5 +1,12 @@
import React, { Component } from 'react';
import { CardBody } from '@patternfly/react-core';
import MenuControls from './shared/MenuControls';
import styled from 'styled-components';
const OutputToolbar = styled.div`
display: flex;
justify-content: space-between;
`;
class JobOutput extends Component {
render() {
@ -7,7 +14,12 @@ class JobOutput extends Component {
return (
<CardBody>
<b>{job.name}</b>
<b>{job.name} - Heading and Job Stats placeholder</b> <br /> {/*Heading and Job Stats */}
<b>Host Status Bar placeholder</b> <br /> {/*Host Status Bar */}
<OutputToolbar> {/* Filter and Pagination */}
<b>Filter placeholder</b>
<MenuControls />
</OutputToolbar>
</CardBody>
);
}

View File

@ -0,0 +1,59 @@
import React, { Component } from 'react';
import { Button as PFButton } from '@patternfly/react-core';
import {
PlusIcon,
AngleDoubleUpIcon,
AngleDoubleDownIcon,
AngleUpIcon,
AngleDownIcon,
} from '@patternfly/react-icons';
import styled from 'styled-components';
const Wrapper = styled.div`
display: grid;
grid-gap: 20px;
grid-template-columns: repeat(5, 1fr);
`;
const Button = styled(PFButton)`
&:hover {
background-color: #0066cc;
color: white;
}
`;
class MenuControls extends Component {
render() {
return (
<Wrapper>
<Button
variant="plain"
>
<PlusIcon />
</Button>
<Button
variant="plain"
>
<AngleUpIcon />
</Button>
<Button
variant="plain"
>
<AngleDownIcon />
</Button>
<Button
variant="plain"
>
<AngleDoubleUpIcon />
</Button>
<Button
variant="plain"
>
<AngleDoubleDownIcon />
</Button>
</Wrapper>
);
}
}
export default MenuControls;

View File

@ -0,0 +1 @@
export { default as MenuControls } from './MenuControls';