-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Reporting] Replace Job Completion Notifier as NP Plugin #47283
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
tsullivan
merged 22 commits into
elastic:master
from
tsullivan:reporting/np-job-completion-notifier
Oct 18, 2019
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
366408d
[Reporting] Replace Job Completion Notifier as NP Plugin
tsullivan 1b94a7c
beautiful toasts
tsullivan 3fb1b02
unit test
tsullivan 4e98814
showNotifications returns observable
tsullivan 2c9c92c
Merge branch 'master' into reporting/np-job-completion-notifier
tsullivan d96ed8f
fix kibana.json
tsullivan 4056e8d
depends on links
tsullivan 6e14613
Merge branch 'master' into reporting/np-job-completion-notifier
tsullivan 39abf8b
no prettier ignore
tsullivan 8288273
Merge branch 'master' into reporting/np-job-completion-notifier
tsullivan 9a19f8c
Update content per feedback
tsullivan 926a392
Remove unnecessary wrapper
tsullivan 69edf32
remove type annos and condense
tsullivan 89332af
use an observable of the stop method
tsullivan b0669d0
Merge branch 'master' into reporting/np-job-completion-notifier
tsullivan f346d28
rename the new platform plugin to match legacy
tsullivan 923873c
fix i18n config
tsullivan a582c81
additional plugin rename
tsullivan b045027
i18n strings prefix change
tsullivan 3b78a36
try something with x-pack/.i18nrc.json
tsullivan 63d5270
remove a few more notifier phrasing from plugin definition
tsullivan f84dbde
Merge branch 'master' into reporting/np-job-completion-notifier
tsullivan 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
21 changes: 0 additions & 21 deletions
21
x-pack/legacy/plugins/reporting/public/hacks/__tests__/job_completion_notifier.js
This file was deleted.
Oops, something went wrong.
207 changes: 0 additions & 207 deletions
207
x-pack/legacy/plugins/reporting/public/hacks/job_completion_notifier.js
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
| 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; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| export const reportingPollConfig = { | ||
| jobCompletionNotifier: { interval: 10000, intervalErrorMultiplier: 5 }, | ||
| jobsRefresh: { interval: 5000, intervalErrorMultiplier: 5 }, | ||
| }; |
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,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 JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY = | ||
| 'xpack.reporting.jobCompletionNotifications'; | ||
|
|
||
| export const JOB_COMPLETION_NOTIFICATIONS_POLLER_CONFIG = { | ||
| jobCompletionNotifier: { | ||
| interval: 10000, | ||
| intervalErrorMultiplier: 5, | ||
| }, | ||
| }; | ||
|
|
||
| export const API_BASE_URL = '/api/reporting/jobs'; | ||
| export const REPORTING_MANAGEMENT_HOME = '/app/kibana#/management/kibana/reporting'; | ||
|
|
||
| export const JOB_STATUS_FAILED = 'failed'; | ||
| export const JOB_STATUS_COMPLETED = 'completed'; |
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,59 @@ | ||
| /* | ||
| * 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 { | ||
| CoreSetup, | ||
| CoreStart, | ||
| HttpServiceBase, | ||
| Plugin, | ||
| PluginInitializerContext, | ||
| NotificationsStart, | ||
| } from '../../../src/core/public'; | ||
|
|
||
| export type JobId = string; | ||
| export type JobStatus = 'completed' | 'pending' | 'processing' | 'failed'; | ||
|
|
||
| export type HttpService = HttpServiceBase; | ||
| export type NotificationsService = NotificationsStart; | ||
|
|
||
| export interface SourceJob { | ||
| _id: JobId; | ||
| _source: { | ||
| status: JobStatus; | ||
| output: { | ||
| max_size_reached: boolean; | ||
| csv_contains_formulas: boolean; | ||
| }; | ||
| payload: { | ||
| type: string; | ||
| title: string; | ||
| }; | ||
| }; | ||
| } | ||
|
|
||
| export interface JobContent { | ||
| content: string; | ||
| } | ||
|
|
||
| export interface JobSummary { | ||
| id: JobId; | ||
| status: JobStatus; | ||
| title: string; | ||
| type: string; | ||
| maxSizeReached: boolean; | ||
| csvContainsFormulas: boolean; | ||
| } | ||
|
|
||
| export interface JobStatusBuckets { | ||
| completed: JobSummary[]; | ||
| failed: JobSummary[]; | ||
| } | ||
|
|
||
| type DownloadLink = string; | ||
| export type DownloadReportFn = (jobId: JobId) => DownloadLink; | ||
|
|
||
| type ManagementLink = string; | ||
| export type ManagementLinkFn = () => ManagementLink; |
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,8 @@ | ||
| { | ||
| "id": "reporting", | ||
| "version": "8.0.0", | ||
| "kibanaVersion": "kibana", | ||
| "requiredPlugins": [], | ||
| "server": false, | ||
| "ui": true | ||
| } |
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.
Unrelated cleanup of TS