Skip to content

Commit

Permalink
Add support to pass configuration to backend database queries: delimi…
Browse files Browse the repository at this point in the history
…ter and skipEmptyDates
  • Loading branch information
amirch1 committed Feb 14, 2019
1 parent 91f9141 commit 6ccb95a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
Binary file removed libs/kaltura-ngx-client-11.2.0-v20190204-150229.tgz
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"echarts": "^4.2.1-rc.1",
"jquery": "^3.3.1",
"jsnlog": "^2.28.0",
"kaltura-ngx-client": "file:libs/kaltura-ngx-client-11.2.0-v20190204-150229.tgz",
"kaltura-ngx-client": "file:libs/kaltura-ngx-client-11.2.0-v20190214-114417.tgz",
"moment": "^2.22.2",
"ngx-echarts": "^4.0.0",
"ngx-page-scroll": "^5.0.1",
Expand Down
17 changes: 13 additions & 4 deletions src/app/shared/services/report.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
KalturaReportGraph,
KalturaReportInputFilter,
KalturaReportInterval,
KalturaReportResponseOptions,
KalturaReportTable,
KalturaReportTotal,
KalturaReportType,
Expand Down Expand Up @@ -78,27 +79,35 @@ export class ReportService implements OnDestroy {
sections = sections === null ? { table: null } : sections; // table is mandatory section
const logger = this._logger.subLogger(`Report #${config.reportType}`);
logger.info('Request report from the server', { reportType: config.reportType, sections: Object.keys(sections) });


const responseOptions: KalturaReportResponseOptions = new KalturaReportResponseOptions({
delimiter: analyticsConfig.valueSeparator,
skipEmptyDates: analyticsConfig.skipEmptyBuckets
});

return Observable.create(
observer => {
const getTotal = new ReportGetTotalAction({
reportType: config.reportType,
reportInputFilter: config.filter,
objectIds: config.objectIds ? config.objectIds : null
objectIds: config.objectIds ? config.objectIds : null,
responseOptions
});

const getGraphs = new ReportGetGraphsAction({
reportType: config.reportType,
reportInputFilter: config.filter,
objectIds: config.objectIds ? config.objectIds : null
objectIds: config.objectIds ? config.objectIds : null,
responseOptions
});

const getTable = new ReportGetTableAction({
reportType: config.reportType,
reportInputFilter: config.filter,
pager: config.pager,
order: config.order,
objectIds: config.objectIds ? config.objectIds : null
objectIds: config.objectIds ? config.objectIds : null,
responseOptions
});

if (this._querySubscription && preventMultipleRequests) {
Expand Down

0 comments on commit 6ccb95a

Please sign in to comment.