Get browser timezone for reporting

This commit is contained in:
Jesús Ángel 2019-03-13 17:54:07 +01:00
parent 333f406bd2
commit 91e79ff0b7

View File

@ -11,7 +11,7 @@
*/
import $ from 'jquery';
import moment from 'moment'
export class ReportingService {
constructor(
$rootScope,
@ -55,7 +55,9 @@ export class ReportingService {
const array = await this.vis2png.checkArray(idArray);
const name = `wazuh-${
isAgents ? 'agents' : 'overview'
}-${tab}-${(Date.now() / 1000) | 0}.pdf`;
}-${tab}-${(Date.now() / 1000) | 0}.pdf`;
const browserTimezone = moment.tz.guess(true);
const data = {
array,
@ -67,7 +69,8 @@ export class ReportingService {
tables: appliedFilters.tables,
tab,
section: isAgents ? 'agents' : 'overview',
isAgents
isAgents,
browserTimezone
};
await this.genericReq.request('POST', '/reports', data);