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 665a7e4f69f8..1d98475c4b81 100644 --- a/.github/workflows/build_base.yml +++ b/.github/workflows/build_base.yml @@ -48,7 +48,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' @@ -63,7 +63,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') }} @@ -89,9 +89,10 @@ jobs: - name: Rename artifact run: mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-${{ env.VERSION }}-linux-${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.${{ 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 6dd86ea5d4ff..2b1f444e1ffe 100644 --- a/.github/workflows/build_wazuh_dashboard_with_plugins.yml +++ b/.github/workflows/build_wazuh_dashboard_with_plugins.yml @@ -98,12 +98,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: | @@ -117,8 +125,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 @@ -139,13 +149,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: | @@ -165,18 +177,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 @@ -201,34 +201,44 @@ jobs: build-and-test-package: needs: [setup-variables, build-main-plugins, build-base, build-security-plugin] - runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-22.04' }} + runs-on: ubuntu-latest name: Generate packages steps: - name: Checkout code 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 55059ba9a9df..222f63b60325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,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 @@ -23,7 +23,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/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__/collapsible_nav.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 0d11a8e4a6f7..122a66fdc214 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -242,7 +242,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "euiIconType": "managementApp", "id": "management", "label": "Indexer management", - "order": 6000, + "order": 5000, }, "data-test-subj": "monitoring", "href": "monitoring", 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', {