Skip to content

Commit

Permalink
[Uptime] Added loading for certificates page on initial load (#111526)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Sep 8, 2021
1 parent b36ffc9 commit 032810e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CertMonitors } from './cert_monitors';
import * as labels from './translations';
import { Cert, CertMonitor } from '../../../common/runtime_types';
import { FingerprintCol } from './fingerprint_col';
import { NO_CERTS_AVAILABLE } from './translations';
import { LOADING_CERTIFICATES, NO_CERTS_AVAILABLE } from './translations';

interface Page {
index: number;
Expand Down Expand Up @@ -111,7 +111,13 @@ export const CertificateList: React.FC<Props> = ({ page, sort, onChange }) => {
direction: sort.direction,
},
}}
noItemsMessage={<span data-test-subj="uptimeCertsEmptyMessage">{NO_CERTS_AVAILABLE}</span>}
noItemsMessage={
loading ? (
LOADING_CERTIFICATES
) : (
<span data-test-subj="uptimeCertsEmptyMessage">{NO_CERTS_AVAILABLE}</span>
)
}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ export const COPY_FINGERPRINT = i18n.translate('xpack.uptime.certs.list.copyFing
export const NO_CERTS_AVAILABLE = i18n.translate('xpack.uptime.certs.list.empty', {
defaultMessage: 'No Certificates found. Note: Certificates are only visible for Heartbeat 7.8+',
});

export const LOADING_CERTIFICATES = i18n.translate('xpack.uptime.certificates.loading', {
defaultMessage: 'Loading certificates ...',
});

0 comments on commit 032810e

Please sign in to comment.