Merge pull request #10741 from AlexSCorey/10495-ActionBtnOnEmptyState

Improves empty state messages for improve UX
This commit is contained in:
Jake McDermott 2021-07-28 10:18:49 -04:00 committed by GitHub
commit 07a4683f08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -159,6 +159,7 @@ function JobList({ defaultParams, showTypeColumn = false }) {
hasContentLoading={isLoading || isDeleteLoading || isCancelLoading}
items={jobs}
itemCount={count}
emptyContentMessage={t`Please run a job to populate this list.`}
pluralizedItemName={t`Jobs`}
qsConfig={qsConfig}
toolbarSearchColumns={[

View File

@ -10,7 +10,6 @@ import { useKebabifiedMenu } from 'contexts/Kebabified';
function ToolbarAddButton({
linkTo,
onClick,
isDisabled,
defaultLabel = t`Add`,
showToggleIndicator,

View File

@ -147,6 +147,11 @@ function ScheduleList({
}
return missingValues && t`This schedule is missing required survey values`;
};
let emptyContentMessage = t`Please add a Schedule to populate this list.`;
if (location.pathname.startsWith('/schedules')) {
emptyContentMessage = t`Please add a Schedule to populate this list. Schedules can be added to a Template, Project, or Inventory Source.`;
}
return (
<>
@ -156,6 +161,8 @@ function ScheduleList({
items={schedules}
itemCount={itemCount}
qsConfig={QS_CONFIG}
pluralizedItemName={t`Schedules`}
emptyContentMessage={emptyContentMessage}
onRowClick={handleSelect}
headerRow={
<HeaderRow qsConfig={QS_CONFIG}>