mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 19:50:05 -03:30
Removes changes to serializer that added type to host recent jobs. Addresses Switch styling issues on host list items.
This commit is contained in:
@@ -1701,7 +1701,6 @@ class HostSerializer(BaseSerializerWithVariables):
|
|||||||
'name': j.job.job_template.name if j.job.job_template is not None else "",
|
'name': j.job.job_template.name if j.job.job_template is not None else "",
|
||||||
'status': j.job.status,
|
'status': j.job.status,
|
||||||
'finished': j.job.finished,
|
'finished': j.job.finished,
|
||||||
'type': j.job.get_real_instance_class()._meta.verbose_name.replace(' ', '_')
|
|
||||||
} for j in obj.job_host_summaries.select_related('job__job_template').order_by('-created')[:5]])
|
} for j in obj.job_host_summaries.select_related('job__job_template').order_by('-created')[:5]])
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
DataListItem,
|
DataListItem,
|
||||||
DataListItemRow,
|
DataListItemRow,
|
||||||
DataListItemCells,
|
DataListItemCells,
|
||||||
Switch,
|
Switch as PFSwitch,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from '@patternfly/react-core';
|
} from '@patternfly/react-core';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
@@ -20,6 +20,15 @@ import { Sparkline } from '@components/Sparkline';
|
|||||||
import VerticalSeparator from '@components/VerticalSeparator';
|
import VerticalSeparator from '@components/VerticalSeparator';
|
||||||
import { Host } from '@types';
|
import { Host } from '@types';
|
||||||
|
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
const Switch = styled(PFSwitch)`
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: no-wrap;
|
||||||
|
/* workaround PF bug; used in calculating switch width: */
|
||||||
|
--pf-c-switch__toggle-icon--Offset: 0.125rem;
|
||||||
|
`;
|
||||||
|
|
||||||
class HostListItem extends React.Component {
|
class HostListItem extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
host: Host.isRequired,
|
host: Host.isRequired,
|
||||||
|
|||||||
Reference in New Issue
Block a user