Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
remove missed server config vars
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongnansu committed Apr 22, 2021
1 parent d49b2c7 commit ed561a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions kibana-reports/server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import registerReportSourceRoute from './reportSource';
import registerMetricRoute from './metric';
import { IRouter } from '../../../../src/core/server';

export default function (router: IRouter, accessInfo: AccessInfoType) {
registerReportRoute(router, accessInfo);
registerReportDefinitionRoute(router, accessInfo);
export default function (router: IRouter) {
registerReportRoute(router);
registerReportDefinitionRoute(router);
registerReportSourceRoute(router);
registerMetricRoute(router);
}
13 changes: 4 additions & 9 deletions kibana-reports/server/routes/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,12 @@ export default function (router: IRouter) {
}
);
// convert report to use UI model
const report = backendToUiReport(esResp.reportInstance, basePath);
const report = backendToUiReport(esResp.reportInstance);
// generate report
const reportData = await createReport(
request,
context,
report,
accessInfo,
savedReportId
);
addToMetric('report', 'download', 'count', report);
Expand Down Expand Up @@ -199,13 +198,12 @@ export default function (router: IRouter) {
);
const reportId = esResp.reportInstance.id;
// convert report to use UI model
const report = backendToUiReport(esResp.reportInstance, basePath);
const report = backendToUiReport(esResp.reportInstance);
// generate report
const reportData = await createReport(
request,
context,
report,
accessInfo,
reportId
);
addToMetric('report', 'create_from_definition', 'count', report);
Expand Down Expand Up @@ -262,10 +260,7 @@ export default function (router: IRouter) {
}
);

const reportsList = backendToUiReportsList(
esResp.reportInstanceList,
basePath
);
const reportsList = backendToUiReportsList(esResp.reportInstanceList);

return response.ok({
body: {
Expand Down Expand Up @@ -312,7 +307,7 @@ export default function (router: IRouter) {
}
);

const report = backendToUiReport(esResp.reportInstance, basePath);
const report = backendToUiReport(esResp.reportInstance);

return response.ok({
body: report,
Expand Down

0 comments on commit ed561a8

Please sign in to comment.