PPL Alerting with Feature Flag - #1311
Conversation
…ject#1295) (cherry picked from commit a232821) Signed-off-by: opensearch-ci <opensearch-infra@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…opensearch-project#1297) (cherry picked from commit 147e2e7) Signed-off-by: Peter Zhu <zhujiaxi@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Revert "fix mustache format notif message" This reverts commit 862d635. update tests Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
| if (alertingDashboardsCap?.pplV2 === true || alertingCap?.pplV2 === true) { | ||
| return true; | ||
| } | ||
| return true; |
| return true; | ||
| } | ||
| const alertingDashboardsCap = capabilities.alertingDashboards; | ||
| const alertingCap = capabilities.alerting; |
There was a problem hiding this comment.
remove this one and also simply return !!capabilities.alertingDashboards?.pplV2
| if (!isPplV2Enabled()) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Remove this since this check is not ppl alerting and should exist regardless
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
| destinations(services, router, dataSourceEnabled); | ||
| opensearch(services, router, dataSourceEnabled); | ||
| monitors(services, router, dataSourceEnabled); | ||
| pplAlertingMonitors(services, router, dataSourceEnabled); |
There was a problem hiding this comment.
gate this and remove the per api gating
| monitorService.getMonitors | ||
| ); | ||
|
|
||
| router.get( |
There was a problem hiding this comment.
shouldn't have it removed
| export type { ExplorePluginSetup, ExplorePluginStart } from '../../../src/plugins/explore/public'; | ||
| // @ts-ignore | ||
| export type { QueryWithQueryAsString } from '../../../src/plugins/explore/public'; |
There was a problem hiding this comment.
We shouldn't be exporting these from this plugin?
There was a problem hiding this comment.
These are needed for alert flyout in discover.
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
| // mount: async (params) => { | ||
| // const { renderApp } = await import('./app'); | ||
| // const [coreStart] = await core.getStartServices(); | ||
| // return renderApp(coreStart, params); | ||
| // }, |
| order: 9070, | ||
| category: DEFAULT_APP_CATEGORIES.detect, | ||
| updater$: this.appStateUpdater, | ||
| updater$: this.appStateUpdater$ as any, |
There was a problem hiding this comment.
why did we make this change?
There was a problem hiding this comment.
was getting a type error because the navigation API expects an Observable, not the BehaviorSubject instance itself. BehaviorSubject implements the observable interface, but its public type also exposes .next() and .value which doesn't match watch the registry expects
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
|
|
||
| public start(core: CoreStart, { visAugmenter, embeddable, data, navigation, contentManagement, assistantDashboards }: AlertingStartDeps): AlertingStart { | ||
| public start(core: CoreStart, { visAugmenter, embeddable, data, navigation, contentManagement, assistantDashboards, explore }: AlertingStartDeps): AlertingStart { | ||
| navigateToAppRef = core.application.navigateToApp; |
There was a problem hiding this comment.
where are we using this? and why do we need to create a variable for this?
There was a problem hiding this comment.
this was old code for transporting query to ppl alerting. removing it
| return { status: 'unknown' }; | ||
| }; | ||
|
|
||
| export const ensurePplSupport = ( |
There was a problem hiding this comment.
not actually being used, will remove
| if (!isPplAlertingEnabled()) { | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Let's remove this since updated ux should not be gated on ppl alerting
There was a problem hiding this comment.
When I remove this it looks like updated ux overwrites ppl flag
There was a problem hiding this comment.
found error, fixed
There was a problem hiding this comment.
Can you change all new files to be ts(x)?
There was a problem hiding this comment.
will address in next pr
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
Description
PPL Alerting changes
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.