-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Response Ops] [Rule Form] Add Rule Form Flyout v2 #206685
Open
Zacqary
wants to merge
68
commits into
elastic:main
Choose a base branch
from
Zacqary:195211-replace-flyout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,073
−659
Open
Changes from 60 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
1ef801c
Hide close button when show request is open
Zacqary 1faf112
Use EUI breakpoint variables for container breakpoints
Zacqary 4cb5b1d
Revert "Use EUI breakpoint variables for container breakpoints"
Zacqary e5b287a
Decouple RuleForm component from react router
Zacqary 74f59b7
Initially replace flyout in Discover plugin
Zacqary dd6e167
Replace add/edit rule flyouts with getRuleFormFlyout
Zacqary 6dd013d
Remove missing import
Zacqary 69eb8fa
Add isServerless flag to rule flyout
Zacqary 74d5339
Fix metadata typing
Zacqary 646af0f
Fix initialMetadata error
Zacqary d4c91d3
Add flyout close confirm and no actions callout
Zacqary 2d61517
Fix action UI display papercuts
Zacqary 1ffea47
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine 19f2fdc
Fix typecheck
Zacqary 3e9ebe4
Fix bundle size
Zacqary 70d4dab
Fix typecheck
Zacqary 9c4d831
Lazy load rule form component from response ops package
Zacqary 547c4da
Fix lazy loading rule form
Zacqary c2174d6
Begin fixing discover tests
Zacqary 4719faf
Fix button ids on discover test
Zacqary 51e33f9
Fix system actions test
Zacqary c25c283
Fix get app menu header id
Zacqary dc8c9ab
Fix cancelAlertFlyout function in ML anomaly tests
Zacqary 114e98a
Fix monitor alerts journey for closing rule form flyout
Zacqary e3a0e7e
Create /components folder for common components
Zacqary dbc9712
Move confirm close modal to own component
Zacqary fd7abec
Replace flyout callouts and screens with confirm modals
Zacqary 4dbc4f0
Merge branch 'main' into 195211-replace-flyout
elasticmachine b0f977b
Remove unused import
Zacqary 4b806ac
Merge branch '195211-replace-flyout' of https://github.com/Zacqary/ki…
Zacqary 13429c1
Fix ES query expression error display
Zacqary f557eb2
Fix errorParam ternary syntax
Zacqary 286721f
Fix APM chypress test
Zacqary 1fd34d0
Fix APM cypress test
Zacqary c437919
Reduce discover accessibility test flakiness
Zacqary dbbe03a
Fix data touched tracking
Zacqary f9f82ed
Fix custom threshold preview test
Zacqary f21566b
Fix monitor alerts journey
Zacqary 0efa925
Merge remote-tracking branch 'upstream/main' into 195211-replace-flyout
Zacqary fb70192
Merge isServerless implementation from main
Zacqary 4fd1228
Fix APM cypress
Zacqary f2e01b9
Fix some tests, improve loading prompty
Zacqary e6befaf
Fix initial metadata override
Zacqary 07ee45a
Fix typecheck
Zacqary 370a2b6
Fix i18n
Zacqary 908d36c
Merge remote-tracking branch 'upstream/main' into 195211-replace-flyout
Zacqary 52c6414
Fix uptime rule form flyout and observability rule params
Zacqary aa0287f
Fix uptime tests
Zacqary 9ef99b5
Fix serverless search source test
Zacqary bb09a7d
Fix APM cypress
Zacqary d182820
Add debug logs to accessibility testing
Zacqary 118a154
Fix synthetics journey
Zacqary b8a2e33
Fix APM cypress
Zacqary 09d456d
Remove code path for experimental use of v1 flyout
Zacqary c89a707
Update synthetics journey
Zacqary 565c974
Update uptime synthetic test and skip discover accessibility test
Zacqary def9107
Merge remote-tracking branch 'upstream/main' into 195211-replace-flyout
Zacqary 3f16b58
Unskip discover accessibility test
Zacqary 27cb8b3
Remove flyout loading check from discover test
Zacqary 688c145
Update synthetics tests
Zacqary c3eff4f
Omit dataViews from RequiredRuleFormPlugins typedef
Zacqary 3ef3181
Add encryption key to discover accessibility test
Zacqary 756cfa8
Fix uptime journey
Zacqary 95b14da
Merge remote-tracking branch 'upstream/main' into 195211-replace-flyout
Zacqary aa0abd0
Fix typecheck
Zacqary 990a73c
Attempt synthetics test fix
Zacqary c4a2c9b
Merge remote-tracking branch 'upstream/main' into 195211-replace-flyout
Zacqary 3772d57
Merge branch 'main' into 195211-replace-flyout
Zacqary 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 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 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 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 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
10 changes: 10 additions & 0 deletions
10
...atform/packages/shared/response-ops/rule_form/src/components/confirm_create_rule/index.ts
This file contains 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,10 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
export * from './confirm_create_rule'; |
43 changes: 43 additions & 0 deletions
43
...es/shared/response-ops/rule_form/src/components/confirm_rule_close/confirm_rule_close.tsx
This file contains 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,43 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiConfirmModal, EuiText } from '@elastic/eui'; | ||
import { | ||
RULE_FORM_CANCEL_MODAL_TITLE, | ||
RULE_FORM_CANCEL_MODAL_CONFIRM, | ||
RULE_FORM_CANCEL_MODAL_CANCEL, | ||
RULE_FORM_CANCEL_MODAL_DESCRIPTION, | ||
} from '../../translations'; | ||
|
||
export interface ConfirmRuleCloseRuleProps { | ||
onCancel: () => void; | ||
onConfirm: () => void; | ||
} | ||
|
||
export const ConfirmRuleClose = (props: ConfirmRuleCloseRuleProps) => { | ||
const { onCancel, onConfirm } = props; | ||
|
||
return ( | ||
<EuiConfirmModal | ||
onCancel={onCancel} | ||
onConfirm={onConfirm} | ||
data-test-subj="confirmRuleCloseModal" | ||
buttonColor="danger" | ||
defaultFocusedButton="confirm" | ||
title={RULE_FORM_CANCEL_MODAL_TITLE} | ||
confirmButtonText={RULE_FORM_CANCEL_MODAL_CONFIRM} | ||
cancelButtonText={RULE_FORM_CANCEL_MODAL_CANCEL} | ||
> | ||
<EuiText> | ||
<p>{RULE_FORM_CANCEL_MODAL_DESCRIPTION}</p> | ||
</EuiText> | ||
</EuiConfirmModal> | ||
); | ||
}; |
10 changes: 10 additions & 0 deletions
10
...latform/packages/shared/response-ops/rule_form/src/components/confirm_rule_close/index.ts
This file contains 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,10 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
export * from './confirm_rule_close'; |
12 changes: 12 additions & 0 deletions
12
src/platform/packages/shared/response-ops/rule_form/src/components/index.ts
This file contains 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,12 @@ | ||
/* | ||
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
export * from './request_code_block'; | ||
export * from './confirm_create_rule'; | ||
export * from './confirm_rule_close'; |
File renamed without changes.
This file contains 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a service to dynamically load ECS data for selected fields: https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fields_metadata/README.md
Or when rendering it's possible to simply use
<FieldDescription .../>
component from https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-field-utils/src/components/field_description/field_description.tsx