Default duration to minutes, only show alerting on metrics explorer (#61058)
This commit is contained in:
parent
427848c3be
commit
b0eb79858f
|
@ -70,7 +70,7 @@ export const Expressions: React.FC<Props> = props => {
|
|||
const { setAlertParams, alertParams, errors, alertsContext } = props;
|
||||
const { source, createDerivedIndexPattern } = useSource({ sourceId: 'default' });
|
||||
const [timeSize, setTimeSize] = useState<number | undefined>(1);
|
||||
const [timeUnit, setTimeUnit] = useState<TimeUnit>('s');
|
||||
const [timeUnit, setTimeUnit] = useState<TimeUnit>('m');
|
||||
|
||||
const derivedIndexPattern = useMemo(() => createDerivedIndexPattern('metrics'), [
|
||||
createDerivedIndexPattern,
|
||||
|
@ -93,7 +93,7 @@ export const Expressions: React.FC<Props> = props => {
|
|||
comparator: '>',
|
||||
threshold: [],
|
||||
timeSize: 1,
|
||||
timeUnit: 's',
|
||||
timeUnit: 'm',
|
||||
indexPattern: source?.configuration.metricAlias,
|
||||
}),
|
||||
[source]
|
||||
|
|
|
@ -91,7 +91,7 @@ export const InfrastructurePage = ({ match }: RouteComponentProps) => {
|
|||
/>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<AlertDropdown />
|
||||
<Route path={'/explorer'} component={AlertDropdown} />
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</AppNavigation>
|
||||
|
|
Loading…
Reference in a new issue