New: Improve empty list messaging

pull/5700/head
Bogdan 1 year ago committed by GitHub
parent 5184d995ca
commit ee843259bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,9 @@
import PropTypes from 'prop-types';
import React from 'react';
import Alert from 'Components/Alert';
import FieldSet from 'Components/FieldSet';
import PageSectionContent from 'Components/Page/PageSectionContent';
import { kinds } from 'Helpers/Props';
import TagConnector from './TagConnector';
import styles from './Tags.css';
@ -13,7 +15,9 @@ function Tags(props) {
if (!items.length) {
return (
<div>No tags have been added yet</div>
<Alert kind={kinds.INFO}>
No tags have been added yet
</Alert>
);
}

@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import Alert from 'Components/Alert';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FilterMenu from 'Components/Menu/FilterMenu';
import PageContent from 'Components/Page/PageContent';
@ -11,7 +12,7 @@ import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import TableOptionsModalWrapper from 'Components/Table/TableOptions/TableOptionsModalWrapper';
import TablePager from 'Components/Table/TablePager';
import { align, icons } from 'Helpers/Props';
import { align, icons, kinds } from 'Helpers/Props';
import LogsTableRow from './LogsTableRow';
function LogsTable(props) {
@ -81,9 +82,9 @@ function LogsTable(props) {
{
isPopulated && !error && !items.length &&
<div>
<Alert kind={kinds.INFO}>
No events found
</div>
</Alert>
}
{

@ -11,7 +11,7 @@ import PageToolbarSection from 'Components/Page/Toolbar/PageToolbarSection';
import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { icons } from 'Helpers/Props';
import { icons, kinds } from 'Helpers/Props';
import LogsNavMenu from '../LogsNavMenu';
import LogFilesTableRow from './LogFilesTableRow';
@ -117,7 +117,9 @@ class LogFiles extends Component {
{
!isFetching && !items.length &&
<div>No log files</div>
<Alert kind={kinds.INFO}>
No log files
</Alert>
}
</PageContentBody>
</PageContent>

@ -1,6 +1,7 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component, Fragment } from 'react';
import Alert from 'Components/Alert';
import Icon from 'Components/Icon';
import Label from 'Components/Label';
import SpinnerButton from 'Components/Link/SpinnerButton';
@ -59,7 +60,9 @@ class Updates extends Component {
{
noUpdates &&
<div>No updates are available</div>
<Alert kind={kinds.INFO}>
No updates are available
</Alert>
}
{

@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Alert from 'Components/Alert';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FilterMenu from 'Components/Menu/FilterMenu';
import ConfirmModal from 'Components/Modal/ConfirmModal';
@ -196,16 +197,16 @@ class CutoffUnmet extends Component {
{
!isFetching && error &&
<div>
<Alert kind={kinds.DANGER}>
Error fetching cutoff unmet
</div>
</Alert>
}
{
isPopulated && !error && !items.length &&
<div>
<Alert kind={kinds.INFO}>
No cutoff unmet items
</div>
</Alert>
}
{

@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Alert from 'Components/Alert';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FilterMenu from 'Components/Menu/FilterMenu';
import ConfirmModal from 'Components/Modal/ConfirmModal';
@ -209,16 +210,16 @@ class Missing extends Component {
{
!isFetching && error &&
<div>
<Alert kind={kinds.DANGER}>
Error fetching missing items
</div>
</Alert>
}
{
isPopulated && !error && !items.length &&
<div>
<Alert kind={kinds.INFO}>
No missing items
</div>
</Alert>
}
{

Loading…
Cancel
Save