Skip to content

Commit

Permalink
Temporarily removes kbn-optimizer cache key tests (elastic#58318)
Browse files Browse the repository at this point in the history
While we investigate why they are interfering with other tests.

Signed-off-by: Tyler Smalley <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
2 people authored and andrewvc committed Feb 24, 2020
1 parent db0a9cc commit e67a9ff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 231 deletions.
206 changes: 0 additions & 206 deletions packages/kbn-optimizer/src/optimizer/cache_keys.test.ts

This file was deleted.

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 @@ -13,27 +13,12 @@ interface Props {
total: number;
}

const getMessage = (down: number, total: number): string => {
if (down === 0 && total > 0) {
return i18n.translate('xpack.uptime.snapshot.zeroDownMessage', {
defaultMessage: 'All monitors are up',
});
} else if (down === 0 && total === 0) {
return i18n.translate('xpack.uptime.snapshot.noMonitorMessage', {
defaultMessage: 'No monitors found',
});
}
return i18n.translate('xpack.uptime.snapshot.downCountsMessage', {
defaultMessage: '{down}/{total} monitors are down',
values: {
down,
total,
},
});
};
export const SnapshotHeading = ({ total }: Props) => {
const monitorsText = total === 1 ?
i18n.translate('xpack.uptime.snapshot.monitor', {defaultMessage: 'Monitor'}) :
i18n.translate('xpack.uptime.snapshot.monitors', {defaultMessage: 'Monitors'});

export const SnapshotHeading = ({ down, total }: Props) => (
<EuiTitle size="s">
<h2>{getMessage(down, total)}</h2>
return <EuiTitle size="s">
<h2>{total} {monitorsText}</h2>
</EuiTitle>
);
};

0 comments on commit e67a9ff

Please sign in to comment.