From 62ade4c06737e3aaa071ec07764ea437c864c907 Mon Sep 17 00:00:00 2001 From: Joshua Date: Tue, 6 Jul 2021 12:41:26 -0700 Subject: [PATCH] Fix notebooks context menu (#109) Signed-off-by: Joshua Li --- dashboards-reports/server/routes/report.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/dashboards-reports/server/routes/report.ts b/dashboards-reports/server/routes/report.ts index 9cc169bb..305126b0 100644 --- a/dashboards-reports/server/routes/report.ts +++ b/dashboards-reports/server/routes/report.ts @@ -85,19 +85,12 @@ export default function (router: IRouter) { // if not deliver to user himself , no need to send actual file data to client const delivery = report.report_definition.delivery; addToMetric('report', 'create', 'count', report); - if ( - delivery.delivery_type === DELIVERY_TYPE.opensearchDashboardsUser && - delivery.delivery_params.opensearch_dashboards_recipients.length === 0 - ) { - return response.ok({ - body: { - data: reportData.dataUrl, - filename: reportData.fileName, - }, - }); - } else { - return response.ok(); - } + return response.ok({ + body: { + data: reportData.dataUrl, + filename: reportData.fileName, + }, + }); } catch (error) { // TODO: better error handling for delivery and stages in generating report, pass logger to deeper level logger.error(`Failed to generate report: ${error}`);