Skip to content

Commit

Permalink
[7.x] [Alerting] Create alert design cleanup (#56929) (#60070)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadelrio committed Mar 13, 2020
1 parent 4b95995 commit 3f8d8bd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { FormattedMessage } from '@kbn/i18n/react';
import {
EuiFlexItem,
EuiFlexGroup,
EuiFormLabel,
EuiExpression,
EuiPopover,
EuiPopoverTitle,
Expand Down Expand Up @@ -345,7 +346,15 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
<EuiSpacer />
</Fragment>
) : null}
<EuiFlexGroup gutterSize="s" wrap>
<EuiSpacer size="l" />
<EuiFormLabel>
<FormattedMessage
defaultMessage="Select Index to query:"
id="xpack.triggersActionsUI.sections.alertAdd.selectIndex"
/>
</EuiFormLabel>
<EuiSpacer size="m" />
<EuiFlexGroup wrap>
<EuiFlexItem grow={false}>
<EuiPopover
id="indexPopover"
Expand All @@ -358,7 +367,7 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
defaultMessage: 'index',
}
)}
value={index || firstFieldOption.text}
value={index ? index.join(' ') : firstFieldOption.text}
isActive={indexPopoverOpen}
onClick={() => {
setIndexPopoverOpen(true);
Expand Down Expand Up @@ -388,6 +397,8 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
</div>
</EuiPopover>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<WhenExpression
aggType={aggType ?? DEFAULT_VALUES.AGGREGATION_TYPE}
Expand All @@ -409,6 +420,8 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
/>
</EuiFlexItem>
) : null}
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<GroupByExpression
groupBy={groupBy || DEFAULT_VALUES.GROUP_BY}
Expand All @@ -425,6 +438,16 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent<IndexThr
}
/>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="xl" />
<EuiFormLabel>
<FormattedMessage
defaultMessage="Define the alert condition:"
id="xpack.triggersActionsUI.sections.alertAdd.conditionPrompt"
/>
</EuiFormLabel>
<EuiSpacer size="m" />
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<ThresholdExpression
thresholdComparator={thresholdComparator ?? DEFAULT_VALUES.THRESHOLD_COMPARATOR}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export const ThresholdVisualization: React.FunctionComponent<Props> = ({
>
{error}
</EuiCallOut>
<EuiSpacer size="l" />
</Fragment>
);
}
Expand Down Expand Up @@ -228,7 +227,7 @@ export const ThresholdVisualization: React.FunctionComponent<Props> = ({
<div data-test-subj="alertVisualizationChart">
<EuiSpacer size="l" />
{alertVisualizationDataKeys.length ? (
<Chart size={['100%', 300]} renderer="canvas">
<Chart size={['100%', 200]} renderer="canvas">
<Settings
theme={[customTheme(), chartsTheme]}
xDomain={domain}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.actConnectorModal {
z-index: 9000;
}

.euiComboBoxOptionsList {
z-index: 10000;
}

0 comments on commit 3f8d8bd

Please sign in to comment.