Skip to content

Commit

Permalink
Fix reports path in toast
Browse files Browse the repository at this point in the history
  • Loading branch information
Tostti committed Dec 15, 2023
1 parent bb4c621 commit fbaad9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions plugins/main/public/react-services/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class ReportingService {
const visualizationIDList = [];
for (const item of idArray) {
const tmpHTMLElement = $(`#${item}`);
if(tmpHTMLElement[0]){
if (tmpHTMLElement[0]) {
this.vis2png.assignHTMLItem(item, tmpHTMLElement);
visualizationIDList.push(item);
}
Expand Down Expand Up @@ -120,7 +120,7 @@ export class ReportingService {
this.showToast(
'success',
'Created report',
'Success. Go to Wazuh > Management > Reporting',
'Success. Go to Indexer/dashboard management > Reporting',
4000
);
return;
Expand Down Expand Up @@ -167,7 +167,7 @@ export class ReportingService {
this.showToast(
'success',
'Created report',
'Success. Go to Wazuh > Management > Reporting',
'Success. Go to Indexer/dashboard management > Reporting',
4000
);
return;
Expand Down
9 changes: 4 additions & 5 deletions plugins/main/public/services/reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ export class ReportingService {
const appliedFilters = await this.visHandlers.getAppliedFilters(syscollectorFilters);

const array = await this.vis2png.checkArray(idArray);
const name = `wazuh-${isAgents ? 'agents' : 'overview'}-${tab}-${
(Date.now() / 1000) | 0
}.pdf`;
const name = `wazuh-${isAgents ? 'agents' : 'overview'}-${tab}-${(Date.now() / 1000) | 0
}.pdf`;

const browserTimezone = moment.tz.guess(true);

Expand All @@ -96,7 +95,7 @@ export class ReportingService {
this.$rootScope.reportBusy = false;
this.$rootScope.reportStatus = false;
this.$rootScope.$applyAsync();
ErrorHandler.info('Success. Go to Wazuh > Management > Reporting', 'Reporting');
ErrorHandler.info('Success. Go to Indexer/dashboard management > Reporting', 'Reporting');

return;
} catch (error) {
Expand Down Expand Up @@ -134,7 +133,7 @@ export class ReportingService {
this.$rootScope.reportBusy = false;
this.$rootScope.reportStatus = false;
this.$rootScope.$applyAsync();
ErrorHandler.info('Success. Go to Wazuh > Management > Reporting', 'Reporting');
ErrorHandler.info('Success. Go to Indexer/dashboard management > Reporting', 'Reporting');

return;
} catch (error) {
Expand Down

0 comments on commit fbaad9d

Please sign in to comment.