further tags

This commit is contained in:
Daniel Sami
2020-03-03 16:03:16 -05:00
parent c50705a2dc
commit 8301254f57
2 changed files with 4 additions and 1 deletions

View File

@@ -6,12 +6,13 @@ import { formatDateString } from '@util/dates';
import Detail from './Detail'; import Detail from './Detail';
import { SummaryFieldUser } from '../../types'; import { SummaryFieldUser } from '../../types';
function UserDateDetail({ label, date, user }) { function UserDateDetail({ label, date, user, dataCy = null}) {
const dateStr = formatDateString(date); const dateStr = formatDateString(date);
const username = user ? user.username : ''; const username = user ? user.username : '';
return ( return (
<Detail <Detail
label={label} label={label}
dataCy={dataCy}
value={ value={
user ? ( user ? (
<Trans> <Trans>

View File

@@ -104,11 +104,13 @@ function HostDetail({ host, i18n, onUpdateHost }) {
date={created} date={created}
label={i18n._(t`Created`)} label={i18n._(t`Created`)}
user={created_by} user={created_by}
dataCy="host-created-by"
/> />
<UserDateDetail <UserDateDetail
label={i18n._(t`Last Modified`)} label={i18n._(t`Last Modified`)}
user={modified_by} user={modified_by}
date={modified} date={modified}
dataCy="host-last-modified-by"
/> />
<VariablesDetail <VariablesDetail
value={host.variables} value={host.variables}