[Observability] Update AlertsSearchBar placeholder (#110192)

* [Observability] Update AlertsSearchBar placeholder (#108179)
* [Observability] Remove default search query from Alerts page (#110242)

This is done to align with other placeholder texts found within the
Observability solution.
This commit is contained in:
Milton Hultgren 2021-08-31 08:32:46 +02:00 committed by GitHub
parent ed7beee634
commit 02538b6b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View file

@ -46,7 +46,7 @@ export function AlertsSearchBar({
<SearchBar
indexPatterns={compatibleIndexPatterns}
placeholder={i18n.translate('xpack.observability.alerts.searchBarPlaceholder', {
defaultMessage: 'kibana.alert.evaluation.threshold > 75',
defaultMessage: 'Search alerts (e.g. kibana.alert.evaluation.threshold > 75)',
})}
query={{ query: query ?? '', language: queryLanguage }}
timeHistory={timeHistory}

View file

@ -8,7 +8,6 @@
import { EuiButtonEmpty, EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui';
import { IndexPatternBase } from '@kbn/es-query';
import { i18n } from '@kbn/i18n';
import { ALERT_STATUS, ALERT_STATUS_ACTIVE } from '@kbn/rule-data-utils';
import React, { useCallback, useRef } from 'react';
import { useHistory } from 'react-router-dom';
import useAsync from 'react-use/lib/useAsync';
@ -43,12 +42,7 @@ export function AlertsPage({ routeParams }: AlertsPageProps) {
const history = useHistory();
const refetch = useRef<() => void>();
const {
query: {
rangeFrom = 'now-15m',
rangeTo = 'now',
kuery = `${ALERT_STATUS}: "${ALERT_STATUS_ACTIVE}"`,
workflowStatus = 'open',
},
query: { rangeFrom = 'now-15m', rangeTo = 'now', kuery = '', workflowStatus = 'open' },
} = routeParams;
useBreadcrumbs([