Skip to content

Commit

Permalink
Move previewDOMOptions to common AlertPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacqary committed Jun 25, 2020
1 parent e844349 commit e122bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const AlertPreview: React.FC<Props> = (props) => {
id="selectPreviewLookbackInterval"
value={previewLookbackInterval}
onChange={onSelectPreviewLookbackInterval}
options={previewOptions}
options={previewDOMOptions}
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down Expand Up @@ -343,6 +343,10 @@ const previewOptions = [
},
];

const previewDOMOptions: Array<{ text: string; value: string }> = previewOptions.map((o) =>
omit(o, 'shortText')
);

const firedTimeLabel = i18n.translate('xpack.infra.metrics.alertFlyout.firedTime', {
defaultMessage: 'time',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,6 @@ export const Expressions: React.FC<Props> = (props) => {
);
};

const previewDOMOptions: Array<{ text: string; value: string }> = previewOptions.map((o) =>
omit(o, 'shortText')
);

// required for dynamic import
// eslint-disable-next-line import/no-default-export
export default Expressions;

0 comments on commit e122bb1

Please sign in to comment.