Skip to content

Commit

Permalink
Add information in the table
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano committed Oct 1, 2024
1 parent 62c029b commit e8a8429
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/components/main/main_utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const addReportDefinitionsTableContent = (data: any) => {
for (let index = 0; index < data.length; ++index) {
let item = data[index];
let reportDefinition = item._source.report_definition;
let reportNotification = reportDefinition.delivery;
let reportParams = reportDefinition.report_params;
let trigger = reportDefinition.trigger;
let triggerParams = trigger.trigger_params;
Expand All @@ -113,6 +114,8 @@ export const addReportDefinitionsTableContent = (data: any) => {
? `\u2014`
: triggerParams.schedule_type, // e.g. recurring, cron based
status: reportDefinition.status,
notificationsEnabled:
reportNotification.configIds.length > 0 ? 'Enabled' : 'Disabled'
};
reportDefinitionsTableItems.push(reportDefinitionsTableEntry);
}
Expand Down
9 changes: 9 additions & 0 deletions public/components/main/report_definitions_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ export function ReportDefinitions(props) {
return <EuiText size="s">{readable}</EuiText>;
},
},
{
field: 'notificationsEnabled',
name: i18n.translate(
'opensearch.reports.reportDefinitionsTable.columns.notificationsEnabled',
{ defaultMessage: 'Notifications' }
),
sortable: true,
truncateText: false,
},
{
field: 'status',
name: i18n.translate(
Expand Down

0 comments on commit e8a8429

Please sign in to comment.