diff --git a/public/app/features/alerting/AlertRuleItem.tsx b/public/app/features/alerting/AlertRuleItem.tsx index 6273c822adc..c01c6105e8f 100644 --- a/public/app/features/alerting/AlertRuleItem.tsx +++ b/public/app/features/alerting/AlertRuleItem.tsx @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; // @ts-ignore import Highlighter from 'react-highlight-words'; import { AlertRule } from '../../types'; -import { Icon, IconName } from '@grafana/ui'; +import { Icon, IconName, Button, Tooltip, LinkButton, HorizontalGroup } from '@grafana/ui'; export interface Props { rule: AlertRule; @@ -43,16 +43,19 @@ class AlertRuleItem extends PureComponent {
- - - - + + +
); diff --git a/public/app/features/alerting/AlertRuleList.test.tsx b/public/app/features/alerting/AlertRuleList.test.tsx index 91c892e22ea..5a0b8b84959 100644 --- a/public/app/features/alerting/AlertRuleList.test.tsx +++ b/public/app/features/alerting/AlertRuleList.test.tsx @@ -127,7 +127,7 @@ describe('Functions', () => { describe('State filter changed', () => { it('should update location', () => { const { instance } = setup(); - const mockEvent = { target: { value: 'alerting' } } as React.ChangeEvent; + const mockEvent = { value: 'alerting' }; instance.onStateFilterChanged(mockEvent); diff --git a/public/app/features/alerting/AlertRuleList.tsx b/public/app/features/alerting/AlertRuleList.tsx index 93e00606ebf..d8f0ca4b8bf 100644 --- a/public/app/features/alerting/AlertRuleList.tsx +++ b/public/app/features/alerting/AlertRuleList.tsx @@ -10,8 +10,9 @@ import { AlertRule, CoreEvents, StoreState } from 'app/types'; import { getAlertRulesAsync, togglePauseAlertRule } from './state/actions'; import { getAlertRuleItems, getSearchQuery } from './state/selectors'; import { FilterInput } from 'app/core/components/FilterInput/FilterInput'; -import { NavModel } from '@grafana/data'; +import { NavModel, SelectableValue } from '@grafana/data'; import { setSearchQuery } from './state/reducers'; +import { Button, Select } from '@grafana/ui'; export interface Props { navModel: NavModel; @@ -27,13 +28,13 @@ export interface Props { export class AlertRuleList extends PureComponent { stateFilters = [ - { text: 'All', value: 'all' }, - { text: 'OK', value: 'ok' }, - { text: 'Not OK', value: 'not_ok' }, - { text: 'Alerting', value: 'alerting' }, - { text: 'No Data', value: 'no_data' }, - { text: 'Paused', value: 'paused' }, - { text: 'Pending', value: 'pending' }, + { label: 'All', value: 'all' }, + { label: 'OK', value: 'ok' }, + { label: 'Not OK', value: 'not_ok' }, + { label: 'Alerting', value: 'alerting' }, + { label: 'No Data', value: 'no_data' }, + { label: 'Paused', value: 'paused' }, + { label: 'Pending', value: 'pending' }, ]; componentDidMount() { @@ -58,9 +59,9 @@ export class AlertRuleList extends PureComponent { return 'all'; } - onStateFilterChanged = (evt: React.ChangeEvent) => { + onStateFilterChanged = (option: SelectableValue) => { this.props.updateLocation({ - query: { state: evt.target.value }, + query: { state: option.value }, }); }; @@ -108,15 +109,17 @@ export class AlertRuleList extends PureComponent {
- + - - - - - - - - + />
    - + />
      {
      - - New team - + + New Team +
      diff --git a/public/app/features/teams/__snapshots__/TeamList.test.tsx.snap b/public/app/features/teams/__snapshots__/TeamList.test.tsx.snap index 8dd56c4e75d..5f9fdbbbf11 100644 --- a/public/app/features/teams/__snapshots__/TeamList.test.tsx.snap +++ b/public/app/features/teams/__snapshots__/TeamList.test.tsx.snap @@ -52,12 +52,12 @@ exports[`Render should render teams table 1`] = `
      - - New team - + New Team +
      - - New team - + New Team +
      - - New team - + New Team +