Files
awx/awx/ui_next/src/components/DetailList/NumberSinceDetail.jsx
Bill Nottingham ca07946c24 Adjust subscription calculation & warning behavior
- Add a field for hosts automated across

  This is populated by the new table we've added.
- Update the subs check to check against this, not imported hosts.
- Reword messages on inventory import
2021-06-07 15:47:55 -04:00

30 lines
680 B
JavaScript

import React from 'react';
import { node, string } from 'prop-types';
import { t } from '@lingui/macro';
import styled from 'styled-components';
import { formatDateString } from '../../util/dates';
import _Detail from './Detail';
const Detail = styled(_Detail)`
word-break: break-word;
`;
function NumberSinceDetail({ label, number, date, dataCy = null }) {
const dateStr = formatDateString(date);
return (
<Detail
label={label}
dataCy={dataCy}
value={t`${number} since ${dateStr}`}
/>
);
}
NumberSinceDetail.propTypes = {
label: node.isRequired,
number: string.isRequired,
date: string.isRequired,
};
export default NumberSinceDetail;