mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 12:57:40 -02:30
Merge pull request #10741 from AlexSCorey/10495-ActionBtnOnEmptyState
Improves empty state messages for improve UX
This commit is contained in:
@@ -159,6 +159,7 @@ function JobList({ defaultParams, showTypeColumn = false }) {
|
|||||||
hasContentLoading={isLoading || isDeleteLoading || isCancelLoading}
|
hasContentLoading={isLoading || isDeleteLoading || isCancelLoading}
|
||||||
items={jobs}
|
items={jobs}
|
||||||
itemCount={count}
|
itemCount={count}
|
||||||
|
emptyContentMessage={t`Please run a job to populate this list.`}
|
||||||
pluralizedItemName={t`Jobs`}
|
pluralizedItemName={t`Jobs`}
|
||||||
qsConfig={qsConfig}
|
qsConfig={qsConfig}
|
||||||
toolbarSearchColumns={[
|
toolbarSearchColumns={[
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { useKebabifiedMenu } from 'contexts/Kebabified';
|
|||||||
function ToolbarAddButton({
|
function ToolbarAddButton({
|
||||||
linkTo,
|
linkTo,
|
||||||
onClick,
|
onClick,
|
||||||
|
|
||||||
isDisabled,
|
isDisabled,
|
||||||
defaultLabel = t`Add`,
|
defaultLabel = t`Add`,
|
||||||
showToggleIndicator,
|
showToggleIndicator,
|
||||||
|
|||||||
@@ -147,6 +147,11 @@ function ScheduleList({
|
|||||||
}
|
}
|
||||||
return missingValues && t`This schedule is missing required survey values`;
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -156,6 +161,8 @@ function ScheduleList({
|
|||||||
items={schedules}
|
items={schedules}
|
||||||
itemCount={itemCount}
|
itemCount={itemCount}
|
||||||
qsConfig={QS_CONFIG}
|
qsConfig={QS_CONFIG}
|
||||||
|
pluralizedItemName={t`Schedules`}
|
||||||
|
emptyContentMessage={emptyContentMessage}
|
||||||
onRowClick={handleSelect}
|
onRowClick={handleSelect}
|
||||||
headerRow={
|
headerRow={
|
||||||
<HeaderRow qsConfig={QS_CONFIG}>
|
<HeaderRow qsConfig={QS_CONFIG}>
|
||||||
|
|||||||
Reference in New Issue
Block a user