Skip to content

Commit

Permalink
Change PDF report year number to 2024 (#6492)
Browse files Browse the repository at this point in the history
* Change pdf report year number to 2024

* Add changelog

* Fix unit test
  • Loading branch information
asteriscos committed Mar 8, 2024
1 parent d1772f9 commit b54d12c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -25,6 +25,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Upgraded the `axios` dependency to `1.6.1` [#6114](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6114)
- Changed the api configuration title in the Server APIs section. [#6373](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6373)
- Changed overview home top KPIs. [#6379](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6379) [#6408](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6408)
- Updated the PDF report year number. [#6492](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6492)

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion plugins/main/common/constants.ts
Expand Up @@ -311,7 +311,7 @@ export const ASSETS_PUBLIC_URL = '/plugins/wazuh/public/assets/';
export const REPORTS_LOGO_IMAGE_ASSETS_RELATIVE_PATH =
'images/logo_reports.png';
export const REPORTS_PRIMARY_COLOR = '#256BD1';
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © 2023 Wazuh, Inc.';
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © 2024 Wazuh, Inc.';
export const REPORTS_PAGE_HEADER_TEXT = 'info@wazuh.com\nhttps://wazuh.com';

// Plugin platform
Expand Down
8 changes: 4 additions & 4 deletions plugins/main/common/services/settings.test.ts
Expand Up @@ -43,10 +43,10 @@ describe('[settings] Methods', () => {
${false} | ${'customization.logo.app'} | ${'custom-image-app.png'} | ${''}
${false} | ${'customization.logo.app'} | ${''} | ${''}
${true} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Custom footer'}
${true} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2023 Wazuh, Inc.'}
${false} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Copyright © 2023 Wazuh, Inc.'}
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2023 Wazuh, Inc.'}
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2023 Wazuh, Inc.'}
${true} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2024 Wazuh, Inc.'}
${false} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Copyright © 2024 Wazuh, Inc.'}
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2024 Wazuh, Inc.'}
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2024 Wazuh, Inc.'}
${true} | ${'customization.reports.header'} | ${'Custom header'} | ${'Custom header'}
${true} | ${'customization.reports.header'} | ${''} | ${'info@wazuh.com\nhttps://wazuh.com'}
${false} | ${'customization.reports.header'} | ${'Custom header'} | ${'info@wazuh.com\nhttps://wazuh.com'}
Expand Down
6 changes: 3 additions & 3 deletions plugins/main/server/routes/wazuh-reporting.test.ts
Expand Up @@ -204,11 +204,11 @@ describe('[endpoint] PUT /utils/configuration', () => {
// If any of the parameters is changed this variable should be updated with the new md5
it.each`
footer | header | responseStatusCode | expectedMD5 | tab
${null} | ${null} | ${200} | ${'301281824427c6ea8546fd14ee1aa5d8'} | ${'pm'}
${null} | ${null} | ${200} | ${'5b5211a0514e36cc43d18d7d54cc4c35'} | ${'pm'}
${'Custom\nFooter'} | ${'info@company.com\nFake Avenue 123'} | ${200} | ${'c2adfd7ab05ae3ed1548abd3c8be8f7e'} | ${'general'}
${''} | ${''} | ${200} | ${'06726f42a4129dd47262ea7228939006'} | ${'fim'}
${''} | ${''} | ${200} | ${'1b121407ad7748bbcc2f9973bafb2a85'} | ${'fim'}
${'Custom Footer'} | ${null} | ${200} | ${'1ea187181c307a4be5e90a38f614c42d'} | ${'aws'}
${null} | ${'Custom Header'} | ${200} | ${'f2fc0804eb52ebca21291eb5a40dec35'} | ${'gcp'}
${null} | ${'Custom Header'} | ${200} | ${'01fa7a09aba3aa99d4d56c915d733646'} | ${'gcp'}
`(
`Set custom report header and footer - Verify PDF output`,
async ({ footer, header, responseStatusCode, expectedMD5, tab }) => {
Expand Down

0 comments on commit b54d12c

Please sign in to comment.