Skip to content

[ResponseOps] [Reporting] Allow users to see scheduled reports list #224354

Merged
js-jankisalvi merged 15 commits intoelastic:scheduled-reports-uifrom
js-jankisalvi:scheduled-reports-tables
Jun 23, 2025
Merged

[ResponseOps] [Reporting] Allow users to see scheduled reports list #224354
js-jankisalvi merged 15 commits intoelastic:scheduled-reports-uifrom
js-jankisalvi:scheduled-reports-tables

Conversation

@js-jankisalvi
Copy link
Copy Markdown
Contributor

@js-jankisalvi js-jankisalvi commented Jun 18, 2025

Summary

Resolves #216322

Important

This PR is targeting the scheduled-reports-ui feature branch, where the backend changes from the scheduled-reports branch are temporarily integrated while waiting for #221028 to be merged (see the squashed [TMP] ... commit message).
This PR has few commits from #222135 to support view schedule config table action. Please ignore code changes in folders if you are already reviewing other PR.
src/platform/packages/private/kbn-reporting/public/share/share_context_menu, src/platform/packages/shared/response-ops/recurring-schedule-form,
x-pack/platform/plugins/private/reporting/public/management/schemas,
x-pack/platform/plugins/private/reporting/public/management/validators and
xpack/platform/plugins/shared/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.tsx.

This PR adds new tabs Exports and Schedules in Reporting section.
Exports tab shows the list of all reports. Allows to open dashboard, download report and view report information.
Schedules tab shows list of scheduled reports. Allows to disable schedule.

Checklist

Check the PR satisfies following conditions.

What to test

  • Verify tabs
  • Verify exports table shows list of all reports
  • Verify schedules table shows list of scheduled report
  • Verify you can disable scheduled report
  • Verify pagination in both tables

@js-jankisalvi js-jankisalvi self-assigned this Jun 18, 2025
@js-jankisalvi js-jankisalvi added the Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// label Jun 18, 2025
@umbopepato umbopepato force-pushed the scheduled-reports-ui branch from d5b5d9a to 8abc15d Compare June 18, 2025 08:02
@js-jankisalvi js-jankisalvi force-pushed the scheduled-reports-tables branch from 1c7d9e0 to d862ede Compare June 18, 2025 09:27
@js-jankisalvi js-jankisalvi marked this pull request as ready for review June 19, 2025 09:45
@js-jankisalvi js-jankisalvi requested review from a team as code owners June 19, 2025 09:45
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@umbopepato umbopepato force-pushed the scheduled-reports-ui branch from 8abc15d to 4805aee Compare June 19, 2025 13:37
@umbopepato umbopepato requested review from a team as code owners June 19, 2025 13:37
Copy link
Copy Markdown
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

kibana.jsonc changes LGTM

Copy link
Copy Markdown
Contributor

@joana-cps joana-cps left a comment

Choose a reason for hiding this comment

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

We're missing the modal when disabling the schedule. Since this is a destructive action (the user can't enable it back) we need to make sure that we let the user know that.

Screenshot 2025-06-20 at 13 07 46

@js-jankisalvi
Copy link
Copy Markdown
Contributor Author

js-jankisalvi commented Jun 20, 2025

We're missing the modal when disabling the schedule. Since this is a destructive action (the user can't enable it back) we need to make sure that we let the user know that.

Thanks @joana-cps!
Added
image

Copy link
Copy Markdown
Contributor

@joana-cps joana-cps left a comment

Choose a reason for hiding this comment

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

Could you please change EuiAvatar to size s
Screenshot 2025-06-20 at 16 34 46

name: i18n.translate('xpack.reporting.schedules.tableColumns.reportTitle', {
defaultMessage: 'Title',
}),
width: '17%',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It feels like we could give more room for the title and balance out by removing a little bit from the schedule column
Screenshot 2025-06-20 at 17 31 10

}),
width: '17%',
render: (_title: string, item: ScheduledReportApiJSON) => (
<EuiLink data-test-subj={`reportTitle`} onClick={() => setSelectedReport(item)}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clicking on it didn't work while doing QA. Not sure what to expect, looks like a link but it's updating a state here? Anyways, I couldn't see anything happen in the UI when clicking on it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My bad, forgot add last change here. Working now. It opens view schedule config flyout

@@ -0,0 +1,244 @@
/*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I miss test to check the action items in a row

}),
width: '20%',
render: (_nextRun: string) => {
return moment(_nextRun).format('YYYY-MM-DD @ hh:mm A');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we get the format from the global kibana settings?

},
},
{
field: 'jobtype',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe rename fileType to match the name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the field name from api response, I can't change it


let statusText: string;

switch (schedule.rrule.freq) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you could have a mapping object outside of the render function with const translations = {[Frequency.DAILY]: i18n.translate...} so that all i18n calls are done once and not on every render. Here you could end up having const statusText = translations[schedule.rrule.freq]

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Jun 23, 2025

💔 Build Failed

Failed CI Steps

History

cc @js-jankisalvi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants