-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[RAC] Enable workflow status filtering #108215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
afgomez
merged 24 commits into
elastic:master
from
afgomez:107629-workflow-status-filters
Aug 20, 2021
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
b208bda
Move filter buttons to the left
5b1b2be
Change filter button labels and add "acknowledged" filter
fd9c7e0
Switch button widget
b4296c0
Automated removal of unused translations via scripts/i18n_check --fix
jasonrhodes ed182a7
Fixed broken tests
jasonrhodes 3f69056
Fixes for workflow status change
jasonrhodes a1d8f22
Updated translations
jasonrhodes bcb8dfe
Fixes broken type
jasonrhodes 63b9b2a
Adds default 'open' value for lifecycle helper rules
jasonrhodes 6fd20bd
Workflow status change again
jasonrhodes 13055ba
Workflow status type fixes
jasonrhodes dcc73d2
Workflow status test updates
jasonrhodes 69a0af5
Fixes more type failures and test failures that only show up in CI
jasonrhodes 37221a4
Merge branch 'master' into 107629-workflow-status-filters
kibanamachine 2f6f3e3
Prevent workflow status from overwrites
6443a57
Merge branch 'master' into 107629-workflow-status-filters
69c07d2
Remove duplicate import
c913475
Merge branch 'master' into 107629-workflow-status-filters
d935414
Tweak io-ts types
8f9027b
Remove outdated type cast
df7d0eb
Restore the correct field for the status column
8473684
Narrow down the valid IDs for the filter options
98517bd
Merge branch 'master' into 107629-workflow-status-filters
f2b0e2d
Merge branch 'master' into 107629-workflow-status-filters
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
x-pack/plugins/observability/public/pages/alerts/status_filter.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
x-pack/plugins/observability/public/pages/alerts/workflow_status_filter.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| import { EuiButtonGroup, EuiButtonGroupOptionProps } from '@elastic/eui'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| import React from 'react'; | ||
| import type { AlertWorkflowStatus } from '../../../common/typings'; | ||
|
|
||
| export interface WorkflowStatusFilterProps { | ||
| status: AlertWorkflowStatus; | ||
| onChange: (value: AlertWorkflowStatus) => void; | ||
| } | ||
|
|
||
| const options: Array<EuiButtonGroupOptionProps & { id: AlertWorkflowStatus }> = [ | ||
| { | ||
| id: 'open', | ||
| label: i18n.translate('xpack.observability.alerts.workflowStatusFilter.openButtonLabel', { | ||
| defaultMessage: 'Open', | ||
| }), | ||
| 'data-test-subj': 'WorkflowStatusFilter open button', | ||
| }, | ||
| { | ||
| id: 'acknowledged', | ||
| label: i18n.translate( | ||
| 'xpack.observability.alerts.workflowStatusFilter.acknowledgedButtonLabel', | ||
| { | ||
| defaultMessage: 'Acknowledged', | ||
| } | ||
| ), | ||
| 'data-test-subj': 'WorkflowStatusFilter acknowledged button', | ||
| }, | ||
| { | ||
| id: 'closed', | ||
| label: i18n.translate('xpack.observability.alerts.workflowStatusFilter.closedButtonLabel', { | ||
| defaultMessage: 'Closed', | ||
| }), | ||
| 'data-test-subj': 'WorkflowStatusFilter closed button', | ||
| }, | ||
| ]; | ||
|
|
||
| export function WorkflowStatusFilter({ status = 'open', onChange }: WorkflowStatusFilterProps) { | ||
| return ( | ||
| <EuiButtonGroup | ||
| legend="Filter by" | ||
| color="primary" | ||
| options={options} | ||
| idSelected={status} | ||
| onChange={(id) => onChange(id as AlertWorkflowStatus)} | ||
afgomez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.