Skip to content
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a74e49d
Support rrule for task scheduling
ersin-erdal Apr 9, 2025
6163f7e
remove redundant return
ersin-erdal Apr 9, 2025
20ecece
add functional tests
ersin-erdal Apr 11, 2025
c29a08e
[CI] Auto-commit changed files from 'node scripts/styled_components_m…
kibanamachine Apr 11, 2025
de20db1
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Apr 11, 2025
65f0960
fix linting
ersin-erdal Apr 11, 2025
2dde5f6
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal Apr 11, 2025
717cadb
fix linter
ersin-erdal Apr 11, 2025
72b108e
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine Apr 11, 2025
38e69ef
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal Apr 11, 2025
c9e71ba
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Apr 11, 2025
5f6fad9
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal Apr 11, 2025
d05d9c8
Allowing shared concurrency task types
ymao1 Apr 14, 2025
4a04b90
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal Apr 14, 2025
249f14c
set second to [0]
ersin-erdal Apr 15, 2025
4c60d8e
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal Apr 15, 2025
4a14142
testing schedule is more resilient
ersin-erdal Apr 15, 2025
4ec1bca
remove "only"
ersin-erdal Apr 15, 2025
1275f1e
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal Apr 16, 2025
8aff2c9
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal Apr 16, 2025
04b70a2
Merge branch 'main' into shared-concurrency-tasks
elasticmachine Apr 23, 2025
c9547ae
Merge branch 'main' into shared-concurrency-tasks
elasticmachine Apr 25, 2025
850ec64
throw when interval is not provided for the next run calculation
ersin-erdal Apr 28, 2025
10c40e5
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal Apr 28, 2025
af75dfb
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal Apr 28, 2025
95cf333
[CI] Auto-commit changed files from 'node scripts/jest_integration -u…
kibanamachine Apr 28, 2025
d5227aa
update read me
ersin-erdal Apr 28, 2025
2a1482e
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal Apr 28, 2025
372d4c7
Merge branch 'main' into shared-concurrency-tasks
elasticmachine Apr 28, 2025
62fe072
update read me
ersin-erdal Apr 28, 2025
0f0685e
export Frequency and Weekday from TM
ersin-erdal Apr 28, 2025
cc65fd5
Merge branch 'pr/217728' into report-dependencies
ymao1 Apr 28, 2025
11053d1
Merge branch 'shared-concurrency-tasks' into report-dependencies
ymao1 Apr 28, 2025
23d837d
Schedule report api
ymao1 Apr 28, 2025
bbabb1f
Schedule report api
ymao1 Apr 28, 2025
f5bb665
Cleanup
ymao1 Apr 28, 2025
f039e51
add rrule examples
ersin-erdal Apr 29, 2025
e75e796
fix rrule example
ersin-erdal Apr 29, 2025
424d733
PR feedback
ymao1 Apr 29, 2025
0514306
Merge branch 'main' of github.com:elastic/kibana into shared-concurre…
ymao1 Apr 29, 2025
2d6dfab
Fixing types
ymao1 Apr 30, 2025
b2d9bbd
Merge branch 'pr/217728' into report-dependencies
ymao1 Apr 30, 2025
8caeb79
Merge branch 'shared-concurrency-tasks' into report-dependencies
ymao1 Apr 30, 2025
7a0d9c5
Merge branch 'scheduled-reports' of github.com:elastic/kibana into re…
ymao1 Apr 30, 2025
64cfb78
Merge branch 'report-dependencies' into scheduled-reports-api
ymao1 Apr 30, 2025
b98f26c
Fixing types
ymao1 Apr 30, 2025
3fd59a1
Cleanup
ymao1 Apr 30, 2025
0370162
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Apr 30, 2025
0277de9
Fixing tests
ymao1 Apr 30, 2025
b0ce938
Merge branch 'scheduled-reports-api' of github.com:ymao1/kibana into …
ymao1 Apr 30, 2025
626cf01
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal May 2, 2025
fbb3f85
remove mappings
ersin-erdal May 2, 2025
f361058
remove mappings
ersin-erdal May 2, 2025
7099229
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine May 2, 2025
a0e3fc9
Merge
ymao1 May 2, 2025
baa41cb
Merge branch 'report-dependencies' of github.com:ymao1/kibana into re…
ymao1 May 2, 2025
2947bcc
Merge branch 'pr/217728' into report-dependencies
ymao1 May 2, 2025
3afe5b2
Fix
ymao1 May 2, 2025
dc96d64
Merge and add createdBy mapping
ymao1 May 2, 2025
5398116
remove schema from v4
ersin-erdal May 2, 2025
5a800d5
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal May 2, 2025
8faaf40
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal May 3, 2025
aaf4309
Merge branch 'main' into shared-concurrency-tasks
elasticmachine May 5, 2025
5c55c02
Merge branch 'main' into 216308-support-rrule-for-task-scheduling
ersin-erdal May 5, 2025
fc2b386
Merge branch 'scheduled-reports' of github.com:elastic/kibana into re…
ymao1 May 5, 2025
4fed516
Merge branch 'shared-concurrency-tasks' into report-dependencies
ymao1 May 5, 2025
d1104e4
Merge branch 'pr/217728' into report-dependencies
ymao1 May 5, 2025
c9911fa
Merge branch 'report-dependencies' into scheduled-reports-api
ymao1 May 5, 2025
85cb015
Updating types
ymao1 May 5, 2025
0253ced
add explicit error log when the next run at cannot be calculated
ersin-erdal May 5, 2025
590e659
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal May 5, 2025
3834eaf
[CI] Auto-commit changed files from 'node scripts/styled_components_m…
kibanamachine May 5, 2025
c7e26f0
add missing logger
ersin-erdal May 5, 2025
8455d3c
Merge branch '216308-support-rrule-for-task-scheduling' of github.com…
ersin-erdal May 5, 2025
1e3d3e9
Handling notification
ymao1 May 5, 2025
bbea405
fix unit test
ersin-erdal May 5, 2025
4df59d0
Merge
ymao1 May 6, 2025
17bdcd0
Merge branch 'report-dependencies' into scheduled-reports-api
ymao1 May 6, 2025
402ef5c
Merge
ymao1 May 6, 2025
d5799f5
Merge
ymao1 May 6, 2025
bfef31b
Merge branch 'pr/217728' into report-dependencies
ymao1 May 6, 2025
8cc0976
Merge branch 'report-dependencies' into scheduled-reports-api
ymao1 May 6, 2025
2bd0d5d
Adding schedule reports API
ymao1 May 7, 2025
6a7b62e
Merge
ymao1 May 8, 2025
99f186c
Merge
ymao1 May 8, 2025
601fbc6
Fixing types
ymao1 May 8, 2025
bc09318
Adding cc,bcc fields and validation for max recipients
ymao1 May 8, 2025
d87b6f1
Merge branch 'scheduled-reports' of github.com:elastic/kibana into sc…
ymao1 May 19, 2025
b6af770
Making migration_version optional
ymao1 May 20, 2025
55c7011
Fixing email validation
ymao1 May 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,9 @@
"installCount",
"unInstallCount"
],
"scheduled_report": [
"createdBy"
],
"search": [
"description",
"title"
Expand Down
8 changes: 8 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3045,6 +3045,14 @@
}
}
},
"scheduled_report": {
"dynamic": false,
"properties": {
"createdBy": {
"type": "keyword"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use this to filter scheduled reports by the username of the user who scheduled it.

}
}
},
"search": {
"dynamic": false,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const previouslyRegisteredTypes = [
'query',
'rules-settings',
'sample-data-telemetry',
'scheduled_report',
'search',
'search-session',
'search-telemetry',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const INTERNAL_ROUTES = {
},
HEALTH: prefixInternalPath + '/_health',
GENERATE_PREFIX: prefixInternalPath + '/generate', // exportTypeId is added to the final path
SCHEDULE_PREFIX: prefixInternalPath + '/schedule', // exportTypeId is added to the final path
};

const prefixPublicPath = '/api/reporting';
Expand Down
8 changes: 6 additions & 2 deletions x-pack/platform/plugins/private/canvas/server/feature.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ it('Provides a feature declaration ', () => {
"minimumLicense": "gold",
"name": "Generate PDF reports",
"savedObject": Object {
"all": Array [],
"all": Array [
"scheduled_report",
],
"read": Array [],
},
"ui": Array [
Expand Down Expand Up @@ -216,7 +218,9 @@ it(`Calls on Reporting whether to include Generate PDF as a sub-feature`, () =>
"minimumLicense": "gold",
"name": "Generate PDF reports",
"savedObject": Object {
"all": Array [],
"all": Array [
"scheduled_report",
],
"read": Array [],
},
"ui": Array [
Expand Down
2 changes: 1 addition & 1 deletion x-pack/platform/plugins/private/canvas/server/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function getCanvasFeature(plugins: { reporting?: ReportingStart }): Kiban
includeIn: 'all',
management: { insightsAndAlerting: ['reporting'] },
minimumLicense: 'gold',
savedObject: { all: [], read: [] },
savedObject: { all: ['scheduled_report'], read: [] },
api: ['generateReport'],
ui: ['generatePdf'],
},
Expand Down
1 change: 1 addition & 0 deletions x-pack/platform/plugins/private/reporting/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"reporting"
],
"requiredPlugins": [
"actions",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, could be a problem if we ever have "reporting" connectors, but we can factor the config bits out of the actions plugin later if we need to :-)

"data",
"discover",
"encryptedSavedObjects",
Expand Down
20 changes: 20 additions & 0 deletions x-pack/platform/plugins/private/reporting/server/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import type {
StatusServiceSetup,
UiSettingsServiceStart,
} from '@kbn/core/server';
import { SECURITY_EXTENSION_ID } from '@kbn/core-saved-objects-server';
import type { PluginSetupContract as ActionsPluginSetupContract } from '@kbn/actions-plugin/server';
import type { PluginStart as DataPluginStart } from '@kbn/data-plugin/server';
import type { DiscoverServerPluginStart } from '@kbn/discover-plugin/server';
import type { FeaturesPluginSetup } from '@kbn/features-plugin/server';
Expand Down Expand Up @@ -54,8 +56,10 @@ import type { IReport, ReportingStore } from './lib/store';
import { ExecuteReportTask, ReportTaskParams } from './lib/tasks';
import type { ReportingPluginRouter } from './types';
import { EventTracker } from './usage';
import { SCHEDULED_REPORT_SAVED_OBJECT_TYPE } from './saved_objects';

export interface ReportingInternalSetup {
actions: ActionsPluginSetupContract;
basePath: Pick<IBasePath, 'set'>;
docLinks: DocLinksServiceSetup;
encryptedSavedObjects: EncryptedSavedObjectsPluginSetup;
Expand Down Expand Up @@ -351,6 +355,13 @@ export class ReportingCore {
);
}

public validateNotificationEmails(emails: string[]): string | undefined {
const pluginSetupDeps = this.getPluginSetupDeps();
return pluginSetupDeps.actions
.getActionsConfigurationUtilities()
.validateEmailAddresses(emails);
}

/*
* Gives synchronous access to the setupDeps
*/
Expand All @@ -371,6 +382,15 @@ export class ReportingCore {
return dataViews;
}

public async getSoClient(request: KibanaRequest) {
const { savedObjects } = await this.getPluginStartDeps();
const savedObjectsClient = savedObjects.getScopedClient(request, {
excludedExtensions: [SECURITY_EXTENSION_ID],
includedHiddenTypes: [SCHEDULED_REPORT_SAVED_OBJECT_TYPE],
});
return savedObjectsClient;
}

public async getDataService() {
const startDeps = await this.getPluginStartDeps();
return startDeps.data;
Expand Down
15 changes: 15 additions & 0 deletions x-pack/platform/plugins/private/reporting/server/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@ describe('Reporting Plugin', () => {
);
});

it('registers a saved object for scheduled reports', async () => {
plugin.setup(coreSetup, pluginSetup);
expect(coreSetup.savedObjects.registerType).toHaveBeenCalledWith(
expect.objectContaining({
name: 'scheduled_report',
namespaceType: 'multiple',
hidden: true,
indexPattern: '.kibana_alerting_cases',
management: {
importableAndExportable: false,
},
})
);
});

it('logs start issues', async () => {
// wait for the setup phase background work
plugin.setup(coreSetup, pluginSetup);
Expand Down
4 changes: 4 additions & 0 deletions x-pack/platform/plugins/private/reporting/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type {
import { ReportingRequestHandlerContext } from './types';
import { registerReportingEventTypes, registerReportingUsageCollector } from './usage';
import { registerFeatures } from './features';
import { setupSavedObjects } from './saved_objects';

/*
* @internal
Expand Down Expand Up @@ -75,6 +76,9 @@ export class ReportingPlugin
registerReportingUsageCollector(reportingCore, plugins.usageCollection);
registerReportingEventTypes(core);

// Saved objects
setupSavedObjects(core.savedObjects);

// Routes
registerRoutes(reportingCore, this.logger);

Expand Down
Loading