Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reports path in toast #6226

Merged
merged 3 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed exception in IT-Hygiene when an agent doesn't have policies [#6177](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6177)
- Fixed exception in Inventory when agents don't have S.O. information [#6177](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6177)
- Fixed pinned agent state in URL [#6177](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6177)
- Fixed the reporting notification toast, that showed an incorrect path[#6226](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6226)

### Removed

Expand Down
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
Loading