Skip to content

Commit

Permalink
[7.x] [Uptime] Move status filter to monitor list (#65049) (#65310)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored May 5, 2020
1 parent 2dd90e7 commit 9eadb64
Show file tree
Hide file tree
Showing 27 changed files with 458 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface GetPingHistogramParams {
dateEnd: string;
filters?: string;
monitorId?: string;
statusFilter?: string;
}

export interface HistogramResult {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ interface Props {

const Container: React.FC<Props & ResponsiveWrapperProps> = ({ height }) => {
const {
statusFilter,
absoluteDateRangeStart,
absoluteDateRangeEnd,
dateRangeStart: dateStart,
Expand All @@ -32,8 +31,8 @@ const Container: React.FC<Props & ResponsiveWrapperProps> = ({ height }) => {
const { loading, data, esKuery, lastRefresh } = useSelector(selectPingHistogram);

useEffect(() => {
dispatch(getPingHistogram({ monitorId, dateStart, dateEnd, statusFilter, filters: esKuery }));
}, [dateStart, dateEnd, monitorId, statusFilter, lastRefresh, esKuery, dispatch]);
dispatch(getPingHistogram({ monitorId, dateStart, dateEnd, filters: esKuery }));
}, [dateStart, dateEnd, monitorId, lastRefresh, esKuery, dispatch]);
return (
<PingHistogramComponent
data={data}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

import React, { useState } from 'react';
import { EuiFilterGroup } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FilterPopoverProps, FilterPopover } from './filter_popover';
import { FilterStatusButton } from './filter_status_button';
import { OverviewFilters } from '../../../../common/runtime_types/overview_filters';
import { filterLabels } from './translations';
import { useFilterUpdate } from '../../../hooks/use_filter_update';
Expand Down Expand Up @@ -81,22 +79,6 @@ export const FilterGroupComponent: React.FC<PresentationalComponentProps> = ({

return (
<EuiFilterGroup>
<FilterStatusButton
content={i18n.translate('xpack.uptime.filterBar.filterUpLabel', {
defaultMessage: 'Up',
})}
dataTestSubj="xpack.uptime.filterBar.filterStatusUp"
value="up"
withNext={true}
/>
<FilterStatusButton
content={i18n.translate('xpack.uptime.filterBar.filterDownLabel', {
defaultMessage: 'Down',
})}
dataTestSubj="xpack.uptime.filterBar.filterStatusDown"
value="down"
withNext={false}
/>
{filterPopoverProps.map(item => (
<FilterPopover key={item.id} {...item} />
))}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9eadb64

Please sign in to comment.