Skip to content

Commit

Permalink
[Observability] Update AlertsSearchBar placeholder (#110192) (#110570)
Browse files Browse the repository at this point in the history
* [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.

Co-authored-by: Milton Hultgren <[email protected]>
  • Loading branch information
kibanamachine and miltonhultgren authored Aug 31, 2021
1 parent 2db1a14 commit cdc3c0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
8 changes: 1 addition & 7 deletions x-pack/plugins/observability/public/pages/alerts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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([
Expand Down

0 comments on commit cdc3c0a

Please sign in to comment.