mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
assorted style cleanup in UI next
- round all corners of combo fields - make sure required asterisk is always before help popover ? - bug: fix ? popover from opening lookups - fix spacing of detail toggle for http error
This commit is contained in:
@@ -16,6 +16,7 @@ import ErrorDetail from '@components/ErrorDetail';
|
|||||||
|
|
||||||
const EmptyState = styled(PFEmptyState)`
|
const EmptyState = styled(PFEmptyState)`
|
||||||
width: var(--pf-c-empty-state--m-lg--MaxWidth);
|
width: var(--pf-c-empty-state--m-lg--MaxWidth);
|
||||||
|
max-width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ const CardBody = styled(PFCardBody)`
|
|||||||
|
|
||||||
const Expandable = styled(PFExpandable)`
|
const Expandable = styled(PFExpandable)`
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
|
& .pf-c-expandable__toggle {
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
class ErrorDetail extends Component {
|
class ErrorDetail extends Component {
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
||||||
import { QuestionCircleIcon } from '@patternfly/react-icons';
|
import { QuestionCircleIcon as PFQuestionCircleIcon} from '@patternfly/react-icons';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { InstanceGroupsAPI } from '@api';
|
import { InstanceGroupsAPI } from '@api';
|
||||||
import Lookup from '@components/Lookup';
|
import Lookup from '@components/Lookup';
|
||||||
|
|
||||||
|
const QuestionCircleIcon = styled(PFQuestionCircleIcon)`
|
||||||
|
margin-left: 10px;
|
||||||
|
`;
|
||||||
|
|
||||||
const getInstanceGroups = async params => InstanceGroupsAPI.read(params);
|
const getInstanceGroups = async params => InstanceGroupsAPI.read(params);
|
||||||
|
|
||||||
class InstanceGroupsLookup extends React.Component {
|
class InstanceGroupsLookup extends React.Component {
|
||||||
@@ -21,18 +26,14 @@ class InstanceGroupsLookup extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={
|
label={i18n._(t`Instance Groups`)}
|
||||||
<Fragment>
|
|
||||||
{i18n._(t`Instance Groups`)}{' '}
|
|
||||||
{tooltip && (
|
|
||||||
<Tooltip position="right" content={tooltip}>
|
|
||||||
<QuestionCircleIcon />
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
|
||||||
</Fragment>
|
|
||||||
}
|
|
||||||
fieldId="org-instance-groups"
|
fieldId="org-instance-groups"
|
||||||
>
|
>
|
||||||
|
{tooltip && (
|
||||||
|
<Tooltip position="right" content={tooltip}>
|
||||||
|
<QuestionCircleIcon />
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
<Lookup
|
<Lookup
|
||||||
id="org-instance-groups"
|
id="org-instance-groups"
|
||||||
lookupHeader={i18n._(t`Instance Groups`)}
|
lookupHeader={i18n._(t`Instance Groups`)}
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React from 'react';
|
||||||
import { string, func, bool } from 'prop-types';
|
import { string, func, bool } from 'prop-types';
|
||||||
import { withI18n } from '@lingui/react';
|
import { withI18n } from '@lingui/react';
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
import { FormGroup, Tooltip } from '@patternfly/react-core';
|
||||||
import { QuestionCircleIcon } from '@patternfly/react-icons';
|
import { QuestionCircleIcon as PFQuestionCircleIcon} from '@patternfly/react-icons';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import { InventoriesAPI } from '@api';
|
import { InventoriesAPI } from '@api';
|
||||||
import { Inventory } from '@types';
|
import { Inventory } from '@types';
|
||||||
import Lookup from '@components/Lookup';
|
import Lookup from '@components/Lookup';
|
||||||
|
|
||||||
|
const QuestionCircleIcon = styled(PFQuestionCircleIcon)`
|
||||||
|
margin-left: 10px;
|
||||||
|
`;
|
||||||
|
|
||||||
const getInventories = async params => InventoriesAPI.read(params);
|
const getInventories = async params => InventoriesAPI.read(params);
|
||||||
|
|
||||||
class InventoryLookup extends React.Component {
|
class InventoryLookup extends React.Component {
|
||||||
@@ -17,19 +22,15 @@ class InventoryLookup extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={
|
label={i18n._(t`Inventory`)}
|
||||||
<Fragment>
|
|
||||||
{i18n._(t`Inventory`)}{' '}
|
|
||||||
{tooltip && (
|
|
||||||
<Tooltip position="right" content={tooltip}>
|
|
||||||
<QuestionCircleIcon />
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
|
||||||
</Fragment>
|
|
||||||
}
|
|
||||||
isRequired={required}
|
isRequired={required}
|
||||||
fieldId="inventory-lookup"
|
fieldId="inventory-lookup"
|
||||||
>
|
>
|
||||||
|
{tooltip && (
|
||||||
|
<Tooltip position="right" content={tooltip}>
|
||||||
|
<QuestionCircleIcon />
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
<Lookup
|
<Lookup
|
||||||
id="inventory-lookup"
|
id="inventory-lookup"
|
||||||
lookupHeader={i18n._(t`Inventory`)}
|
lookupHeader={i18n._(t`Inventory`)}
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ const InputGroup = styled(PFInputGroup)`
|
|||||||
const ChipHolder = styled.div`
|
const ChipHolder = styled.div`
|
||||||
--pf-c-form-control--BorderTopColor: var(--pf-global--BorderColor--200);
|
--pf-c-form-control--BorderTopColor: var(--pf-global--BorderColor--200);
|
||||||
--pf-c-form-control--BorderRightColor: var(--pf-global--BorderColor--200);
|
--pf-c-form-control--BorderRightColor: var(--pf-global--BorderColor--200);
|
||||||
|
border-top-right-radius: 3px;
|
||||||
|
border-bottom-right-radius: 3px
|
||||||
`;
|
`;
|
||||||
|
|
||||||
class Lookup extends React.Component {
|
class Lookup extends React.Component {
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ const Dropdown = styled(PFDropdown)`
|
|||||||
|
|
||||||
::before {
|
::before {
|
||||||
border-color: var(--pf-global--BorderColor--200);
|
border-color: var(--pf-global--BorderColor--200);
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
@@ -64,6 +66,8 @@ const Dropdown = styled(PFDropdown)`
|
|||||||
const NoOptionDropdown = styled.div`
|
const NoOptionDropdown = styled.div`
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
border: 1px solid var(--pf-global--BorderColor--200);
|
border: 1px solid var(--pf-global--BorderColor--200);
|
||||||
|
border-top-left-radius: 3px;
|
||||||
|
border-bottom-left-radius: 3px;
|
||||||
padding: 3px 7px;
|
padding: 3px 7px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user