diff --git a/awx/ui_next/src/components/CodeMirrorInput/CodeMirrorInput.jsx b/awx/ui_next/src/components/CodeMirrorInput/CodeMirrorInput.jsx index 06596aa8a9..6513322f66 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/CodeMirrorInput.jsx +++ b/awx/ui_next/src/components/CodeMirrorInput/CodeMirrorInput.jsx @@ -32,12 +32,42 @@ const CodeMirror = styled(ReactCodeMirror)` background: var(--pf-c-form-control--invalid--Background); border-bottom-width: var(--pf-c-form-control--invalid--BorderBottomWidth); }`} + + ${props => + props.options && + props.options.readOnly && + ` + &, + &:hover { + --pf-c-form-control--BorderBottomColor: var(--pf-global--BorderColor--300); + } + + .CodeMirror-cursors { + display: none; + } + + .CodeMirror-lines { + cursor: default; + } + + .CodeMirror-scroll { + background-color: var(--pf-c-form-control--disabled--BackgroundColor); + } + `} `; -function CodeMirrorInput({ value, onChange, mode, readOnly, hasErrors, rows }) { +function CodeMirrorInput({ + value, + onChange, + mode, + readOnly, + hasErrors, + rows, + className, +}) { return ( onChange(val)} mode={mode} diff --git a/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx b/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx index bcfee592a3..76476ea92b 100644 --- a/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx +++ b/awx/ui_next/src/components/CodeMirrorInput/VariablesInput.jsx @@ -18,6 +18,10 @@ const SmallButton = styled(Button)` font-size: var(--pf-global--FontSize--xs); `; +const SplitItemRight = styled(SplitItem)` + margin-bottom: 5px; +`; + function VariablesInput(props) { const { id, label, readOnly, rows, error, onError, className } = props; /* eslint-disable react/destructuring-assignment */ @@ -44,7 +48,7 @@ function VariablesInput(props) { {label} - + { @@ -79,7 +83,7 @@ function VariablesInput(props) { JSON - + ( export default styled(DetailList)` display: grid; grid-gap: 20px; + align-items: baseline; ${props => props.stacked ? ` diff --git a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx index 17eb3eeb89..51e62c6342 100644 --- a/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx +++ b/awx/ui_next/src/screens/Job/JobDetail/JobDetail.jsx @@ -6,7 +6,7 @@ import { CardBody, Button } from '@patternfly/react-core'; import styled from 'styled-components'; import { DetailList, Detail } from '@components/DetailList'; import { ChipGroup, Chip, CredentialChip } from '@components/Chip'; -import { VariablesInput } from '@components/CodeMirrorInput'; +import { VariablesInput as _VariablesInput } from '@components/CodeMirrorInput'; import { toTitleCase } from '@util/strings'; import { Job } from '../../../types'; @@ -15,6 +15,12 @@ const ActionButtonWrapper = styled.div` justify-content: flex-end; `; +const VariablesInput = styled(_VariablesInput)` + .pf-c-form__label { + --pf-c-form__label--FontWeight: var(--pf-global--FontWeight--bold); + } +`; + const VERBOSITY = { 0: '0 (Normal)', 1: '1 (Verbose)', @@ -128,14 +134,16 @@ function JobDetail({ job, i18n }) { label={i18n._(t`Variables`)} /> )} - + {job.artifacts && ( + + )}