diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index 01f0cdaeb49a..0ed5da176a6e 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -62,7 +62,7 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' @@ -72,7 +72,7 @@ jobs: distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -88,7 +88,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -170,7 +170,7 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' @@ -180,7 +180,7 @@ jobs: distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -196,7 +196,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -249,13 +249,14 @@ jobs: JOB: ci${{ matrix.group }} CACHE_DIR: ciGroup${{ matrix.group }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: failure-artifacts-ci${{ matrix.group }} path: | test/*/failure_debug/ test/*/screenshots/ + overwrite: true plugin-functional-tests: name: Run plugin functional tests on ${{ matrix.name }} @@ -286,7 +287,7 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK (Windows only) if: matrix.os == 'windows-latest' @@ -296,7 +297,7 @@ jobs: distribution: 'adopt' - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -312,7 +313,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -360,13 +361,14 @@ jobs: id: plugin-ftr-tests run: node scripts/functional_tests.js --config test/plugin_functional/config.ts - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: failure-artifacts-plugin-functional-${{ matrix.os }} path: | test/*/failure_debug/ test/*/screenshots/ + overwrite: true build-min-artifact-tests: name: Build min release artifacts on ${{ matrix.name }} @@ -418,12 +420,12 @@ jobs: disk-root: 'C:' - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./artifacts - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -439,7 +441,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: matrix.os != 'windows-latest' with: path: ${{ env.YARN_CACHE_LOCATION }} @@ -473,12 +475,13 @@ jobs: - name: Build `${{ matrix.name }}` run: yarn ${{ matrix.script }} --release - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() with: name: ${{ matrix.suffix }}-${{ env.VERSION }} path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} retention-days: 1 + overwrite: true bwc-tests: needs: [build-min-artifact-tests] @@ -507,7 +510,7 @@ jobs: ] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ./artifacts @@ -515,7 +518,7 @@ jobs: - run: echo [NOTE] These tests will be ran using Linux x64 release builds without security - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -550,7 +553,7 @@ jobs: run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV - name: Download OpenSearch Dashboards - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 id: download with: name: linux-x64-${{ env.VERSION }} @@ -562,7 +565,7 @@ jobs: run: | yarn test:bwc -s false -o ${{ env.OPENSEARCH_URL }} -d ${{ steps.download.outputs.download-path }}/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz -v ${{ matrix.version }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() && steps.verify-opensearch-exists.outputs.version-exists == 'true' }} with: name: ${{ matrix.version }}-test-failures @@ -571,3 +574,4 @@ jobs: ./artifacts/bwc_tmp/test/cypress/screenshots/* ./artifacts/bwc_tmp/test/cypress/results/* retention-days: 1 + overwrite: true diff --git a/.github/workflows/build_base.yml b/.github/workflows/build_base.yml index 0fac06eaa850..8e0179f74dc8 100644 --- a/.github/workflows/build_base.yml +++ b/.github/workflows/build_base.yml @@ -39,7 +39,7 @@ jobs: ref: ${{ inputs.CHECKOUT_TO }} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: './artifacts/.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -54,7 +54,7 @@ jobs: run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV - name: Initialize Yarn Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.YARN_CACHE_LOCATION }} key: yarn-${{ hashFiles('**/yarn.lock') }} @@ -85,9 +85,10 @@ jobs: - name: Rename artifact run: mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-${{ env.VERSION }}-linux-${{ matrix.ARCHITECTURE }}.${{ matrix.DISTRIBUTION }} /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: success() with: name: ${{ env.ARTIFACT_BUILD_NAME }} path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} retention-days: 30 + overwrite: true diff --git a/.github/workflows/build_wazuh_dashboard_with_plugins.yml b/.github/workflows/build_wazuh_dashboard_with_plugins.yml index 744bbb32cd0c..e73e422602df 100644 --- a/.github/workflows/build_wazuh_dashboard_with_plugins.yml +++ b/.github/workflows/build_wazuh_dashboard_with_plugins.yml @@ -96,12 +96,20 @@ jobs: PRODUCTION: ${{ steps.setup-variables.outputs.PRODUCTION }} WAZUH_DASHBOARD_SLIM: ${{ steps.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }} WAZUH_SECURITY_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }} - WAZUH_PLUGINS: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS }} + WAZUH_PLUGINS_WAZUH: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_WAZUH }} + WAZUH_PLUGINS_CORE: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CORE }} + WAZUH_PLUGINS_CHECK_UPDATES: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }} PACKAGE_NAME: ${{ steps.setup-variables.outputs.PACKAGE_NAME }} steps: - name: Checkout code uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + - name: Setup variables id: setup-variables run: | @@ -115,8 +123,10 @@ jobs: PRODUCTION="" fi WAZUH_DASHBOARD_SLIM=wazuh-dashboard_${VERSION}-${REVISION}_x64.tar.gz - WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_${{ inputs.reference_security_plugins }}.zip - WAZUH_PLUGINS=wazuh-dashboard-plugins_${VERSION}-${REVISION}_${{ inputs.reference_wazuh_plugins }}.zip + WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_security_plugins }} | sed 's/\//-/g').zip + WAZUH_PLUGINS_WAZUH=wazuh-dashboard-plugins_wazuh_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip + WAZUH_PLUGINS_CORE=wazuh-dashboard-plugins_wazuh-core_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip + WAZUH_PLUGINS_CHECK_UPDATES=wazuh-dashboard-plugins_wazuh-check-updates_${VERSION}-${REVISION}_$(echo ${{ inputs.reference_wazuh_plugins }} | sed 's/\//-/g').zip if [ "${{ inputs.system }}" = "deb" ]; then if [ "${{ inputs.is_stage }}" = "true" ]; then PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}.deb @@ -137,13 +147,15 @@ jobs: echo "PRODUCTION=$PRODUCTION" >> $GITHUB_OUTPUT echo "WAZUH_DASHBOARD_SLIM=$WAZUH_DASHBOARD_SLIM" >> $GITHUB_OUTPUT echo "WAZUH_SECURITY_PLUGIN=$WAZUH_SECURITY_PLUGIN" >> $GITHUB_OUTPUT - echo "WAZUH_PLUGINS=$WAZUH_PLUGINS" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS_WAZUH=$WAZUH_PLUGINS_WAZUH" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS_CORE=$WAZUH_PLUGINS_CORE" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS_CHECK_UPDATES=$WAZUH_PLUGINS_CHECK_UPDATES" >> $GITHUB_OUTPUT echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_OUTPUT validate-job: runs-on: ubuntu-latest needs: setup-variables - name: Validate job + name: Validate inputs steps: - name: Validate inputs run: | @@ -163,18 +175,6 @@ jobs: aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }} aws-region: ${{ secrets.CI_AWS_REGION }} - - name: Verify if package is already built - run: | - set +e - echo "Verifying package" - PACKAGE_NAME=${{ needs.setup-variables.outputs.PACKAGE_NAME }} - exists=$(aws s3 ls s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/$PACKAGE_NAME) - if [ -n "$exists" ]; then - echo "Package already exists" - exit 1 - fi - set -e - build-base: needs: [validate-job] name: Build dashboard @@ -205,27 +205,37 @@ jobs: uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' - name: Download dashboard artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ needs.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard - name: Download security plugin artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ needs.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin - - name: Download plugins artifacts - uses: actions/download-artifact@v3 + - name: Download main plugin's artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_WAZUH }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins + - name: Download core plugin's artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_CORE }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins + - name: Download check update plugin's artifact + uses: actions/download-artifact@v4 with: - name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS }} + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }} path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins - name: Zip plugins diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 092c298a32e4..8c7e91460365 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/cypress_workflow.yml b/.github/workflows/cypress_workflow.yml index 03547e89fcf8..6820c727a876 100644 --- a/.github/workflows/cypress_workflow.yml +++ b/.github/workflows/cypress_workflow.yml @@ -64,7 +64,7 @@ jobs: - name: Get source information from PR number if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }} id: get_pr_info - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const { data: result } = await github.rest.pulls.get({ @@ -82,13 +82,13 @@ jobs: echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.head_ref }}" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: ${{ env.SOURCE_REPO }} ref: '${{ env.SOURCE_BRANCH }}' - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: 'https://registry.npmjs.org' @@ -105,7 +105,7 @@ jobs: run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12 - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: ${{ env.FTR_PATH }} repository: ${{ env.TEST_REPO }} @@ -135,7 +135,7 @@ jobs: - name: Cache Cypress id: cache-cypress - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/Cypress key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }} @@ -145,7 +145,7 @@ jobs: - run: npx cypress cache path - name: Run tests - uses: cypress-io/github-action@v2 + uses: cypress-io/github-action@v6 with: working-directory: ${{ env.FTR_PATH }} start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }} @@ -153,26 +153,29 @@ jobs: command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --config ignoreTestFiles="dashboard_sanity_test_spec.js" --spec ${{ env.SPEC }} # Screenshots are only captured on failure, will change this once we do visual regression tests - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: ftr-cypress-screenshots path: ${{ env.FTR_PATH }}/cypress/screenshots retention-days: 1 + overwrite: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ftr-cypress-videos path: ${{ env.FTR_PATH }}/cypress/videos retention-days: 1 + overwrite: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ftr-cypress-results path: ${{ env.FTR_PATH }}/cypress/results retention-days: 1 + overwrite: true add-comment: needs: [cypress-tests] if: ${{ always() && github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d8c55a098ca2..c3b1ae51bc19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Support for Wazuh 4.10.1 -## Wazuh dashboard v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 03 +## Wazuh dashboard v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 06 ### Changed @@ -17,7 +17,7 @@ All notable changes to the Wazuh app project will be documented in this file. ### Removed -- Removed the setting home:useNewHomePage from the advanced settings because the views are not finished. [#282](https://github.com/wazuh/wazuh-dashboard/pull/282) +- Removed the setting home:useNewHomePage from the advanced settings because the views are not finished [#282](https://github.com/wazuh/wazuh-dashboard/pull/282) ## Wazuh dashboard v4.9.2 - OpenSearch Dashboards 2.13.0 - Revision 01 diff --git a/dev-tools/build-packages/base/generate_base.sh b/dev-tools/build-packages/base/generate_base.sh index cda6aac36071..99662a8df072 100755 --- a/dev-tools/build-packages/base/generate_base.sh +++ b/dev-tools/build-packages/base/generate_base.sh @@ -148,7 +148,7 @@ build() { # Move installed plugins from categories after generating the package category_explore='{id:"explore",label:"Explore",order:100,euiIconType:"search"}' - category_dashboard_management='{id:"management",label:"Indexer management",order:6e3,euiIconType:"managementApp"}' + category_dashboard_management='{id:"management",label:"Indexer management",order:5e3,euiIconType:"managementApp"}' # Replace app category to Reporting app sed -i -e "s|category:{id:\"opensearch\",label:_i18n.i18n.translate(\"opensearch.reports.categoryName\",{defaultMessage:\"OpenSearch Plugins\"}),order:2e3}|category:${category_explore}|" ./plugins/reportsDashboards/target/public/reportsDashboards.plugin.js @@ -160,7 +160,7 @@ build() { sed -i -e "s|category:{id:\"opensearch\",label:\"OpenSearch Plugins\",order:2e3}|category:${category_explore}|" ./plugins/customImportMapDashboards/target/public/customImportMapDashboards.plugin.js # Replace app category to Notifications app - sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_explore}|" ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js + sed -i -e "s|category:(_core\$chrome=core.chrome)!==null&&_core\$chrome!==void 0&&(_core\$chrome=_core\$chrome.navGroup)!==null&&_core\$chrome!==void 0&&_core\$chrome.getNavGroupEnabled()?undefined:DEFAULT_APP_CATEGORIES.management|category:${category_explore}|" ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js # Replace app category to Indexer Management app sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_dashboard_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js diff --git a/dev-tools/build-packages/wazuh-dashboard.Dockerfile b/dev-tools/build-packages/wazuh-dashboard.Dockerfile index 59c8b04b0ba3..77382cf2a3c3 100644 --- a/dev-tools/build-packages/wazuh-dashboard.Dockerfile +++ b/dev-tools/build-packages/wazuh-dashboard.Dockerfile @@ -1,4 +1,4 @@ -# Usage: docker build --build-arg NODE_VERSION=18.19.0 --build-arg WAZUH_DASHBOARDS_BRANCH=4.10.0 --build-arg WAZUH_DASHBOARDS_PLUGINS=4.10.0 --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=4.10.0 --build-arg OPENSEARCH_DASHBOARDS_VERSION=2.13.0 -t wzd:4.10.0 -f wazuh-dashboard.Dockerfile . +# Usage: docker build --build-arg NODE_VERSION=18.19.0 --build-arg WAZUH_DASHBOARDS_BRANCH=4.10.0 --build-arg WAZUH_DASHBOARDS_PLUGINS=4.10.0 --build-arg WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH=4.10.0 --build-arg OPENSEARCH_DASHBOARDS_VERSION=2.16.0 -t wzd:4.10.0 -f wazuh-dashboard.Dockerfile . ARG NODE_VERSION FROM node:${NODE_VERSION} AS base diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index d52f6694ee06..04d9c3e51b6d 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -320,6 +320,7 @@ export class ChromeService { navGroupsMap$={navGroup.getNavGroupsMap$()} setCurrentNavGroup={navGroup.setCurrentNavGroup} workspaceList$={workspaces.workspaceList$} + darkmode={uiSettings.get('theme:darkMode')} /> ), diff --git a/src/core/public/chrome/constants.ts b/src/core/public/chrome/constants.ts index d16393088a16..27fe2c2db3e3 100644 --- a/src/core/public/chrome/constants.ts +++ b/src/core/public/chrome/constants.ts @@ -27,6 +27,10 @@ * specific language governing permissions and limitations * under the License. */ +import wazuh from '../../../../package.json'; + +export const WAZUH_MAJOR = wazuh.wazuh.version.split('.')[0]; +export const WAZUH_MINOR = wazuh.wazuh.version.split('.')[1]; export const OPENSEARCH_DASHBOARDS_FEEDBACK_LINK = 'https://wazuh.com/community/join-us-on-slack'; export const OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK = OPENSEARCH_DASHBOARDS_FEEDBACK_LINK; @@ -37,3 +41,4 @@ export enum RightNavigationOrder { Settings = 10, DevTool = 20, } +export const WAZUH_DOCUMENTATION_URL = `https://documentation.wazuh.com/${WAZUH_MAJOR}.${WAZUH_MINOR}/`; diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap index 98cb378e46ee..0866ba0010e4 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap @@ -455,6 +455,7 @@ exports[`Header handles visibility and lock changes 1`] = ` "thrownError": null, } } + darkmode={false} forceAppSwitcherNavigation$={ BehaviorSubject { "_isScalar": false, @@ -4445,6 +4446,7 @@ exports[`Header handles visibility and lock changes 1`] = ` className="euiHeaderSectionItem euiHeaderSectionItem--borderLeft" > + - Wazuh documentation + Documentation
- +
@@ -1849,7 +1863,7 @@ exports[`Header help menu hides survey link 1`] = ` /> @@ -1859,12 +1873,12 @@ exports[`Header help menu hides survey link 1`] = ` - Open an issue in GitHub + Google Group @@ -2013,13 +2027,14 @@ exports[`Header help menu hides survey link 1`] = ` > @@ -2027,6 +2042,7 @@ exports[`Header help menu hides survey link 1`] = ` className="euiButtonEmpty__content" iconSide="left" iconSize="s" + iconType="/ui/logos/icon_light.svg" textProps={ Object { "className": "euiButtonEmpty__text", @@ -2036,15 +2052,28 @@ exports[`Header help menu hides survey link 1`] = ` + + + - Wazuh documentation + Documentation @@ -2060,19 +2089,22 @@ exports[`Header help menu hides survey link 1`] = ` - + @@ -2128,7 +2173,7 @@ exports[`Header help menu hides survey link 1`] = ` className="euiButtonEmpty__content" iconSide="left" iconSize="s" - iconType="logoGithub" + iconType="/ui/logos/google_groups.svg" textProps={ Object { "className": "euiButtonEmpty__text", @@ -2142,12 +2187,12 @@ exports[`Header help menu hides survey link 1`] = ` className="euiButtonContent__icon" color="inherit" size="s" - type="logoGithub" + type="/ui/logos/google_groups.svg" > @@ -2155,11 +2200,11 @@ exports[`Header help menu hides survey link 1`] = ` className="euiButtonEmpty__text" > - Open an issue in GitHub + Google Group @@ -2183,6 +2228,7 @@ exports[`Header help menu hides survey link 1`] = ` exports[`Header help menu renders survey link 1`] = ` + - Wazuh documentation + Documentation
- +
+ - Give feedback + Projects on Github @@ -4050,7 +4114,7 @@ exports[`Header help menu renders survey link 1`] = ` /> @@ -4060,12 +4124,12 @@ exports[`Header help menu renders survey link 1`] = ` - Open an issue in GitHub + Google Group @@ -4214,13 +4278,14 @@ exports[`Header help menu renders survey link 1`] = ` > @@ -4228,6 +4293,7 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonEmpty__content" iconSide="left" iconSize="s" + iconType="/ui/logos/icon_light.svg" textProps={ Object { "className": "euiButtonEmpty__text", @@ -4237,15 +4303,28 @@ exports[`Header help menu renders survey link 1`] = ` + + + - Wazuh documentation + Documentation @@ -4261,19 +4340,22 @@ exports[`Header help menu renders survey link 1`] = ` - + @@ -4322,6 +4418,7 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonEmpty__content" iconSide="left" iconSize="s" + iconType="logoGithub" textProps={ Object { "className": "euiButtonEmpty__text", @@ -4331,15 +4428,28 @@ exports[`Header help menu renders survey link 1`] = ` + + + - Give feedback + Projects on Github @@ -4363,14 +4473,14 @@ exports[`Header help menu renders survey link 1`] = ` @@ -4378,7 +4488,7 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonEmpty__content" iconSide="left" iconSize="s" - iconType="logoGithub" + iconType="/ui/logos/google_groups.svg" textProps={ Object { "className": "euiButtonEmpty__text", @@ -4392,12 +4502,12 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonContent__icon" color="inherit" size="s" - type="logoGithub" + type="/ui/logos/google_groups.svg" > @@ -4405,11 +4515,11 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonEmpty__text" > - Open an issue in GitHub + Google Group diff --git a/src/core/public/chrome/ui/header/header.test.tsx b/src/core/public/chrome/ui/header/header.test.tsx index 1cfcc84acee5..1956b4e41a6c 100644 --- a/src/core/public/chrome/ui/header/header.test.tsx +++ b/src/core/public/chrome/ui/header/header.test.tsx @@ -85,6 +85,7 @@ function mockProps() { navControlsLeftBottom$: new BehaviorSubject([]), setCurrentNavGroup: jest.fn(() => {}), workspaceList$: new BehaviorSubject([]), + darkmode: false, }; } diff --git a/src/core/public/chrome/ui/header/header.tsx b/src/core/public/chrome/ui/header/header.tsx index 9c4ae18d4a39..e536433a1742 100644 --- a/src/core/public/chrome/ui/header/header.tsx +++ b/src/core/public/chrome/ui/header/header.tsx @@ -111,6 +111,7 @@ export interface HeaderProps { navGroupsMap$: Observable>; setCurrentNavGroup: ChromeNavGroupServiceStartContract['setCurrentNavGroup']; workspaceList$: Observable; + darkmode: boolean; } export function Header({ @@ -288,6 +289,7 @@ export function Header({ opensearchDashboardsDocLink={opensearchDashboardsDocLink} opensearchDashboardsVersion={opensearchDashboardsVersion} surveyLink={survey} + darkmode={observables.darkmode} /> diff --git a/src/core/public/chrome/ui/header/header_help_menu.test.tsx b/src/core/public/chrome/ui/header/header_help_menu.test.tsx index fbcd47367120..2099b9a2a471 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.test.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.test.tsx @@ -15,6 +15,7 @@ function mockProps() { opensearchDashboardsDocLink: '/doclink', opensearchDashboardsVersion: '1.0', useDefaultContent: true, + darkmode: false, }; } diff --git a/src/core/public/chrome/ui/header/header_help_menu.tsx b/src/core/public/chrome/ui/header/header_help_menu.tsx index feec39386c4e..678e5cdb382f 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.tsx @@ -51,7 +51,7 @@ import { ExclusiveUnion } from '@elastic/eui'; import { combineLatest } from 'rxjs'; import { HeaderExtension } from './header_extension'; import { ChromeHelpExtension } from '../../chrome_service'; -import { GITHUB_CREATE_ISSUE_LINK } from '../../constants'; +import { WAZUH_DOCUMENTATION_URL } from '../../constants'; /** @public */ export type ChromeHelpExtensionMenuGitHubLink = EuiButtonEmptyProps & { @@ -124,6 +124,7 @@ interface Props { useDefaultContent?: boolean; opensearchDashboardsDocLink: string; surveyLink?: string; + darkmode: boolean; } interface State { @@ -199,26 +200,38 @@ class HeaderHelpMenuUI extends Component { intl, opensearchDashboardsVersion, useDefaultContent, - opensearchDashboardsDocLink, surveyLink, + darkmode, } = this.props; - const { helpExtension, helpSupportUrl } = this.state; + const { helpExtension } = this.state; const defaultContent = useDefaultContent ? ( - + - + @@ -226,10 +239,16 @@ class HeaderHelpMenuUI extends Component { {surveyLink && (
- + @@ -239,15 +258,15 @@ class HeaderHelpMenuUI extends Component { diff --git a/src/core/server/core_app/assets/logos/google_groups.svg b/src/core/server/core_app/assets/logos/google_groups.svg new file mode 100644 index 000000000000..934cf1d86d56 --- /dev/null +++ b/src/core/server/core_app/assets/logos/google_groups.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/icon_dark.svg b/src/core/server/core_app/assets/logos/icon_dark.svg new file mode 100644 index 000000000000..966e74def86c --- /dev/null +++ b/src/core/server/core_app/assets/logos/icon_dark.svg @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/icon_light.svg b/src/core/server/core_app/assets/logos/icon_light.svg new file mode 100644 index 000000000000..cc9df8577f88 --- /dev/null +++ b/src/core/server/core_app/assets/logos/icon_light.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/tsconfig.json b/src/core/tsconfig.json index 3281d2f19cfe..fedd701d7e3c 100644 --- a/src/core/tsconfig.json +++ b/src/core/tsconfig.json @@ -5,7 +5,8 @@ "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, - "declarationMap": true + "declarationMap": true, + "rootDir": "../../" }, "include": [ "public/**/*", @@ -15,9 +16,8 @@ "test_helpers/**/*", "utils/**/*", "index.ts", - "typings.ts" + "typings.ts", + "../../package.json" ], - "references": [ - { "path": "../test_utils/" } - ] + "references": [{ "path": "../test_utils/" }] } diff --git a/src/core/utils/default_app_categories.ts b/src/core/utils/default_app_categories.ts index 6d112473fc58..57ecaeb4bbe2 100644 --- a/src/core/utils/default_app_categories.ts +++ b/src/core/utils/default_app_categories.ts @@ -73,22 +73,22 @@ export const DEFAULT_APP_CATEGORIES: Record = Object.freeze order: 4000, euiIconType: 'logoSecurity', }, - dashboardManagement: { - id: 'wz-category-dashboard-management', - label: i18n.translate('core.ui.dashboardManagementNavList.label', { - defaultMessage: 'Dashboard management', - }), - order: 5000, - euiIconType: 'dashboardApp', - }, management: { id: 'management', label: i18n.translate('core.ui.managementNavList.label', { defaultMessage: 'Indexer management', }), - order: 6000, + order: 5000, euiIconType: 'managementApp', }, + dashboardManagement: { + id: 'wz-category-dashboard-management', + label: i18n.translate('core.ui.dashboardManagementNavList.label', { + defaultMessage: 'Dashboard management', + }), + order: 6000, + euiIconType: 'dashboardApp', + }, investigate: { id: 'investigate', label: i18n.translate('core.ui.investigate.label', {