Skip to content

Commit

Permalink
enable loading on cert list
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed May 7, 2020
1 parent 9b09009 commit 9c76182
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface Props {
}

export const CertificateList: React.FC<Props> = ({ page, sort, onChange }) => {
const certificates = useSelector(certificatesSelector);
const { data: certificates, loading } = useSelector(certificatesSelector);

const onTableChange = (newVal: Partial<Props>) => {
onChange(newVal.page as Page, newVal.sort as CertSort);
Expand Down Expand Up @@ -98,6 +98,7 @@ export const CertificateList: React.FC<Props> = ({ page, sort, onChange }) => {

return (
<EuiBasicTable
loading={loading}
columns={columns}
items={certificates?.certs ?? []}
pagination={pagination}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export const FingerprintCol: React.FC<Props> = ({ cert }) => {
<EmptyButton>{text} </EmptyButton>
</EuiToolTip>
<EuiCopy textToCopy={val ?? ''}>
{copy => <EuiButtonIcon onClick={copy} iconType="copy" title={COPY_FINGERPRINT} />}
{copy => (
<EuiButtonIcon
aria-label={COPY_FINGERPRINT}
onClick={copy}
iconType="copy"
title={COPY_FINGERPRINT}
/>
)}
</EuiCopy>
</Span>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ export function* fetchCertificatesEffect() {
);
}

export const certificatesSelector = ({ certificates }: AppState) => certificates.certs.data;
export const certificatesSelector = ({ certificates }: AppState) => certificates.certs;

0 comments on commit 9c76182

Please sign in to comment.