-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.x] [kbn/optimizer] only build xpack examples when building xpack p…
…lugins (#78656) (#78681) Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: spalger <spalger@users.noreply.github.com>
- Loading branch information
Showing
29 changed files
with
166 additions
and
381 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
examples/alerting_example/server/alert_types/always_firing.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export const ALERTING_EXAMPLE_APP_ID = 'AlertingExample'; | ||
|
||
// always firing | ||
export const DEFAULT_INSTANCES_TO_GENERATE = 5; | ||
|
||
// Astros | ||
export enum Craft { | ||
OuterSpace = 'Outer Space', | ||
ISS = 'ISS', | ||
} | ||
export enum Operator { | ||
AreAbove = 'Are above', | ||
AreBelow = 'Are below', | ||
AreExactly = 'Are exactly', | ||
} |
File renamed without changes.
21 changes: 4 additions & 17 deletions
21
...mple/public/alert_types/always_firing.tsx → ...mple/public/alert_types/always_firing.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
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
20 changes: 20 additions & 0 deletions
20
x-pack/examples/alerting_example/public/alert_types/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,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { registerNavigation as registerPeopleInSpaceNavigation } from './astros'; | ||
import { ALERTING_EXAMPLE_APP_ID } from '../../common/constants'; | ||
import { SanitizedAlert } from '../../../../plugins/alerts/common'; | ||
import { PluginSetupContract as AlertingSetup } from '../../../../plugins/alerts/public'; | ||
|
||
export function registerNavigation(alerts: AlertingSetup) { | ||
// register default navigation | ||
alerts.registerDefaultNavigation( | ||
ALERTING_EXAMPLE_APP_ID, | ||
(alert: SanitizedAlert) => `/alert/${alert.id}` | ||
); | ||
|
||
registerPeopleInSpaceNavigation(alerts); | ||
} |
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
24 changes: 4 additions & 20 deletions
24
...xample/public/components/create_alert.tsx → ...xample/public/components/create_alert.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
Oops, something went wrong.