diff --git a/.github/ISSUE_TEMPLATE/compatibility_request.md b/.github/ISSUE_TEMPLATE/compatibility_request.md new file mode 100644 index 000000000000..b294b6fc8704 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/compatibility_request.md @@ -0,0 +1,23 @@ +--- +name: Compatibility request +about: Suggest supporting a new version of OpenSearch +title: 'Compatibility with OpenSearch (version)' +labels: compatibility, level/task, type/research +assignees: '' + +--- + +## Description +We need to ensure the UI compatibility with the next version of OpenSearch vX.X. +This update is still being discussed, but we need to be aware of potential issues. + +For that, we need to: + +- [ ] Review opensearch and opensearch-dashboard latest stable changelog. +- [ ] Identify improvements and potential impact on the UI. +- [ ] Create new tracking and development branches. +- [ ] Develop a testing environment to verify our components would work under this new build. + + +## Issues +- _List here the detected issues_ diff --git a/.github/ISSUE_TEMPLATE/new_release.md b/.github/ISSUE_TEMPLATE/new_release.md new file mode 100644 index 000000000000..2a8fb24f0e4d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_release.md @@ -0,0 +1,33 @@ +--- +name: New release +about: "[wazuh-team] Track the effort of the team to release a new version of Wazuh" +title: Support for Wazuh 4.x.x +labels: level/task, type/enhancement +assignees: '' + +--- + +## Description + +Example: +> Wazuh 4.3.8 will be released shortly. Our Wazuh Dashboard app need to support this new version. From our side, no changes will be included, so we only need to bump the version. + + +## Tasks + +### Pre-release +- [ ] Add support for Wazuh 4.x.x (bump). +- [ ] Generate the required tags. +- [ ] Generate the packages. +- [ ] Test the packages, to verify they install, and the app works as expected. +- [ ] [Optional] Run Regression Testing (#issue) +- [ ] Generate draft releases. +- [ ] Notify the @wazuh/cicd and @wazuh/content teams that the release is good to go, from our side. + +### Post-release +- [ ] Make draft releases final and public. +- [ ] Sync branches. + +### Supported versions + +Same as on [previous releases](https://github.com/wazuh/wazuh-dashboard/wiki/Compatibility) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index 751f8e83ef91..ac1733ab24db 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -6,7 +6,7 @@ name: Build and test # trigger on every commit push and PR for all branches except feature branches and pushes for backport branches on: push: - branches: [ '**', '!feature/**', '!backport/**' ] + branches: ['**', '!feature/**', '!backport/**'] paths-ignore: - '**/*.md' - 'docs/**' @@ -14,7 +14,7 @@ on: - 'CODEOWNERS' - 'changelogs/fragments/**' pull_request: - branches: [ '**', '!feature/**' ] + branches: ['**', '!feature/**'] paths-ignore: - '**/*.md' - 'docs/**' @@ -31,7 +31,7 @@ env: TEST_OPENSEARCH_TRANSPORT_PORT: 9403 TEST_OPENSEARCH_PORT: 9400 OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true - NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first" + NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first' jobs: build-test: @@ -39,13 +39,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] #Removed 'windows-latest' group: [1, 2, 3, 4] include: - os: ubuntu-latest name: Linux - - os: windows-latest - name: Windows + # - os: windows-latest + # name: Windows runs-on: ${{ matrix.os }} steps: - name: Configure git's autocrlf (Windows only) @@ -59,7 +59,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -178,13 +178,13 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] - group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + os: [ubuntu-latest] #Removed 'windows-latest' + group: [1, 2, 4, 6, 7, 8, 9, 10, 11, 13] include: - os: ubuntu-latest name: Linux - - os: windows-latest - name: Windows + # - os: windows-latest + # name: Windows runs-on: ${{ matrix.os }} steps: - run: echo Running functional tests for ciGroup${{ matrix.group }} @@ -200,7 +200,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -295,12 +295,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] #Removed 'windows-latest' include: - os: ubuntu-latest name: Linux - - os: windows-latest - name: Windows + # - os: windows-latest + # name: Windows runs-on: ${{ matrix.os }} steps: - run: echo Running plugin functional tests @@ -316,7 +316,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -416,21 +416,21 @@ jobs: ext: tar.gz suffix: linux-arm64 script: build-platform --linux-arm --skip-os-packages - - os: macos-latest - name: macOS x64 - ext: tar.gz - suffix: darwin-x64 - script: build-platform --darwin --skip-os-packages - - os: macos-latest - name: macOS ARM64 - ext: tar.gz - suffix: darwin-arm64 - script: build-platform --darwin-arm --skip-os-packages - - os: windows-latest - name: Windows x64 - ext: zip - suffix: windows-x64 - script: build-platform --windows --skip-os-packages + # - os: macos-latest + # name: macOS x64 + # ext: tar.gz + # suffix: darwin-x64 + # script: build-platform --darwin --skip-os-packages + # - os: macos-latest + # name: macOS ARM64 + # ext: tar.gz + # suffix: darwin-arm64 + # script: build-platform --darwin-arm --skip-os-packages + # - os: windows-latest + # name: Windows x64 + # ext: zip + # suffix: windows-x64 + # script: build-platform --windows --skip-os-packages runs-on: ${{ matrix.os }} defaults: run: @@ -448,7 +448,7 @@ jobs: with: minimum-size: 16GB maximum-size: 64GB - disk-root: "C:" + disk-root: 'C:' - name: Checkout code uses: actions/checkout@v3 @@ -525,7 +525,19 @@ jobs: working-directory: ./artifacts strategy: matrix: - version: [osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0, osd-2.5.0, osd-2.6.0, osd-2.7.0, osd-2.8.0, osd-2.9.0] + version: + [ + osd-2.0.0, + osd-2.1.0, + osd-2.2.0, + osd-2.3.0, + osd-2.4.0, + osd-2.5.0, + osd-2.6.0, + osd-2.7.0, + osd-2.8.0, + osd-2.9.0, + ] steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/build_base.yml b/.github/workflows/build_base.yml new file mode 100644 index 000000000000..665a7e4f69f8 --- /dev/null +++ b/.github/workflows/build_base.yml @@ -0,0 +1,97 @@ +# This is a basic workflow that is manually triggered + +name: Build base + +on: + workflow_call: + inputs: + CHECKOUT_TO: # This is the branch to checkout to. Defaults to 'master' + description: 'The branch/tag/commit to checkout to' + required: true + default: '' + type: string + ARCHITECTURE: + description: 'The architecture to build the package for' + required: true + default: 'amd64' + type: string + + workflow_dispatch: + inputs: + CHECKOUT_TO: # This is the branch to checkout to. Defaults to 'master' + description: 'The branch/tag/commit to checkout to' + required: true + default: '' + ARCHITECTURE: + description: 'The architecture to build the package for' + required: true + default: 'amd64' + type: string + +jobs: + build: + runs-on: ${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'ubuntu-latest' || 'wz-linux-arm64' }} + name: Build + defaults: + run: + working-directory: ./artifacts + strategy: + matrix: + DISTRIBUTION: [tar.gz] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + repository: wazuh/wazuh-dashboard + path: ./artifacts + ref: ${{ inputs.CHECKOUT_TO }} + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: './artifacts/.nvmrc' + registry-url: 'https://registry.npmjs.org' + + - name: Setup Yarn + run: | + npm uninstall -g yarn + npm i -g yarn@1.22.10 + yarn config set network-timeout 1000000 -g + + - name: Configure Yarn Cache + run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV + + - name: Initialize Yarn Cache + uses: actions/cache@v3 + with: + path: ${{ env.YARN_CACHE_LOCATION }} + key: yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + yarn- + + - name: Get package version + run: | + echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV + echo "WZD_VERSION=$(yarn --silent wzd-version)" >> $GITHUB_ENV + echo "WZD_REVISION=$(yarn --silent wzd-revision)" >> $GITHUB_ENV + + - name: Get artifact build name + run: | + echo "ARTIFACT_BUILD_NAME=wazuh-dashboard_${{ env.WZD_VERSION }}-${{ env.WZD_REVISION }}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.${{ matrix.DISTRIBUTION }}" >> $GITHUB_ENV + + - name: Run bootstrap + run: yarn osd bootstrap + + - name: Build + run: yarn build-platform --${{(inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'linux' || 'linux-arm'}} --skip-os-packages --release + + - 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 + if: success() + with: + name: ${{ env.ARTIFACT_BUILD_NAME }} + path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }} + retention-days: 30 diff --git a/.github/workflows/build_wazuh_dashboard_with_plugins.yml b/.github/workflows/build_wazuh_dashboard_with_plugins.yml new file mode 100644 index 000000000000..9518bfe52e4e --- /dev/null +++ b/.github/workflows/build_wazuh_dashboard_with_plugins.yml @@ -0,0 +1,351 @@ +run-name: Build ${{ inputs.system }} wazuh-dashboard on ${{ inputs.architecture }} ${{ inputs.is_stage && '- is stage' || '' }} ${{ inputs.checksum && '- checksum' || '' }} ${{ inputs.id }} +name: Build Wazuh dashboard with plugins + +on: + workflow_dispatch: + inputs: + system: + type: choice + description: 'Package OS' + required: true + options: + - deb + - rpm + default: 'deb' + architecture: + type: choice + description: 'Package architecture' + required: true + options: + - amd64 + - x86_64 + - aarch64 + - arm64 + default: amd64 + revision: + type: string + description: 'Package revision' + required: true + default: '0' + reference_security_plugins: + type: string + description: 'Branch/tag/commit of the wazuh-security-dashboards-plugin repository to build the security plugin' + required: true + default: 'master' + reference_wazuh_plugins: + type: string + description: 'Branch/tag/commit of the wazuh-dashboard-plugins repository to build the main plugins' + required: true + default: 'master' + reference_report_plugins: + type: string + description: 'Branch/tag/commit of the wazuh-dashboard-reporting repository to build the report plugin' + required: true + default: 'master' + is_stage: + type: boolean + description: 'Set production nomenclature' + required: true + default: false + upload: + description: 'Upload ?' + type: boolean + default: true + checksum: + type: boolean + description: 'Generate package checksum' + required: true + default: false + id: + description: 'ID used to identify the workflow uniquely.' + type: string + required: false + + workflow_call: + inputs: + system: + type: string + required: true + default: 'deb' + architecture: + type: string + required: true + default: amd64 + revision: + type: string + required: true + default: '0' + reference_security_plugins: + type: string + required: true + default: 'master' + reference_wazuh_plugins: + type: string + required: true + default: 'master' + reference_report_plugins: + type: string + required: true + default: 'master' + is_stage: + type: boolean + required: true + default: false + upload: + type: boolean + default: true + checksum: + type: boolean + required: true + default: false + id: + type: string + required: false + +jobs: + setup-variables: + runs-on: ubuntu-latest + name: Setup variables + outputs: + CURRENT_DIR: ${{ steps.setup-variables.outputs.CURRENT_DIR }} + VERSION: ${{ steps.setup-variables.outputs.VERSION }} + REVISION: ${{ steps.setup-variables.outputs.REVISION }} + COMMIT_SHA: ${{ steps.setup-variables.outputs.COMMIT_SHA }} + 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_REPORT_PLUGIN: ${{ steps.setup-variables.outputs.WAZUH_REPORT_PLUGIN }} + WAZUH_PLUGINS: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS }} + PACKAGE_NAME: ${{ steps.setup-variables.outputs.PACKAGE_NAME }} + FINAL_NAME: ${{ steps.setup-variables.outputs.FINAL_NAME }} + ARCHITECTURE_FLAG: ${{ steps.setup-variables.outputs.ARCHITECTURE_FLAG }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get SHA of wazuh-dashboard-plugins + id: get-plugins-sha + run: | + git clone -b ${{ inputs.reference_wazuh_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboard-plugins.git wzdp + cd wzdp + echo "WAZUH_PLUGINS_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Get SHA of wazuh-security-dashboards-plugin + id: get-security-sha + run: | + git clone -b ${{ inputs.reference_security_plugins }} --single-branch https://github.com/wazuh/wazuh-security-dashboards-plugin.git wzsp + cd wzsp + echo "WAZUH_SECURITY_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Get SHA of wazuh-dashboards-reporting + id: get-reporting-sha + run: | + git clone -b ${{ inputs.reference_report_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboards-reporting.git wzrp + cd wzrp + echo "WAZUH_REPORTING_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Setup variables + id: setup-variables + run: | + CURRENT_DIR=$(pwd -P) + VERSION=$(tail -c +2 VERSION) + REVISION=$(yarn --silent wzd-revision) + COMMIT_SHA=$(git rev-parse --short HEAD) + PLUGINS_SHA=${{steps.get-plugins-sha.outputs.WAZUH_PLUGINS_SHA}} + SECURITY_SHA=${{steps.get-security-sha.outputs.WAZUH_SECURITY_SHA}} + REPORTING_SHA=${{steps.get-reporting-sha.outputs.WAZUH_REPORTING_SHA}} + if [ "${{ inputs.is_stage }}" = "true" ]; then + PRODUCTION=--production + else + PRODUCTION="" + fi + WAZUH_DASHBOARD_SLIM=wazuh-dashboard_${VERSION}-${REVISION}_${{ (inputs.ARCHITECTURE == 'x86_64' || inputs.ARCHITECTURE == 'amd64') && 'x64' || 'arm64' }}.tar.gz + WAZUH_SECURITY_PLUGIN=wazuh-security-dashboards-plugin_${VERSION}-${REVISION}_${{ inputs.reference_security_plugins }}.zip + WAZUH_REPORT_PLUGIN=reports-dashboards_${VERSION}-${REVISION}_${{ inputs.reference_report_plugins }}.zip + WAZUH_PLUGINS=wazuh-dashboard-plugins_${VERSION}-${REVISION}_${{ inputs.reference_wazuh_plugins }}.zip + if [ "${{ inputs.system }}" = "deb" ]; then + if [ "${{ inputs.is_stage }}" = "true" ]; then + PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}.deb + FINAL_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}.deb + else + PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}.deb + FINAL_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}-${PLUGINS_SHA}-${SECURITY_SHA}-${REPORTING_SHA}.deb + fi + else + if [ "${{ inputs.is_stage }}" = "true" ]; then + PACKAGE_NAME=wazuh-dashboard-${VERSION}-${{ inputs.revision }}.${{ inputs.architecture }}.rpm + FINAL_NAME=wazuh-dashboard-${VERSION}-${{ inputs.revision }}.${{ inputs.architecture }}.rpm + else + PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}.rpm + FINAL_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}-${PLUGINS_SHA}-${SECURITY_SHA}-${REPORTING_SHA}.rpm + fi + fi + if [[ "${{ inputs.architecture }}" == "x86_64" || "${{ inputs.architecture }}" == "amd64" ]]; then + ARCHITECTURE_FLAG="" + else + ARCHITECTURE_FLAG=--arm + fi + echo "CURRENT_DIR=$CURRENT_DIR" >> $GITHUB_OUTPUT + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "REVISION=$REVISION" >> $GITHUB_OUTPUT + echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_OUTPUT + 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_REPORT_PLUGIN=$WAZUH_REPORT_PLUGIN" >> $GITHUB_OUTPUT + echo "WAZUH_PLUGINS=$WAZUH_PLUGINS" >> $GITHUB_OUTPUT + echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_OUTPUT + echo "FINAL_NAME=$FINAL_NAME" >> $GITHUB_OUTPUT + echo "ARCHITECTURE_FLAG=$ARCHITECTURE_FLAG" >> $GITHUB_OUTPUT + + validate-job: + runs-on: ubuntu-latest + needs: setup-variables + name: Validate job + steps: + - name: Validate inputs + run: | + if [[ "${{ inputs.architecture }}" == "amd64" || "${{ inputs.architecture }}" == "arm64" ]] && [[ "${{ inputs.system }}" == "rpm" ]]; then + echo "Invalid combination of architecture and system" + exit 1 + fi + if [[ "${{ inputs.architecture }}" == "x86_64" || "${{ inputs.architecture }}" == "aarch64" ]] && [[ "${{ inputs.system }}" == "deb" ]]; then + echo "Invalid combination of architecture and system" + exit 1 + fi + + - name: Set up AWS CLI + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }} + aws-region: ${{ secrets.CI_AWS_REGION }} + + build-base: + needs: [validate-job] + name: Build dashboard + uses: wazuh/wazuh-dashboard/.github/workflows/build_base.yml@master + with: + CHECKOUT_TO: ${{ github.head_ref || github.ref_name }} + ARCHITECTURE: ${{ inputs.architecture }} + + build-main-plugins: + needs: [validate-job] + name: Build plugins + uses: wazuh/wazuh-dashboard-plugins/.github/workflows/manual-build.yml@master + with: + reference: ${{ inputs.reference_wazuh_plugins }} + + build-security-plugin: + needs: [validate-job] + name: Build security plugin + uses: wazuh/wazuh-security-dashboards-plugin/.github/workflows/manual-build.yml@master + with: + reference: ${{ inputs.reference_security_plugins }} + + build-report-plugin: + needs: [validate-job] + name: Build reporting plugin + uses: wazuh/wazuh-dashboards-reporting/.github/workflows/manual-build.yml@master + with: + reference: ${{ inputs.reference_report_plugins }} + build-and-test-package: + needs: + [setup-variables, build-main-plugins, build-base, build-security-plugin, build-report-plugin] + runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-22.04' }} + name: Generate packages + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + + - name: Download dashboard artifact + uses: actions/download-artifact@v3 + 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 + 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 + with: + name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins + - name: Download report plugin artifact + uses: actions/download-artifact@v3 + with: + name: ${{ needs.setup-variables.outputs.WAZUH_REPORT_PLUGIN }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/report-plugin + + - name: Zip plugins + run: | + zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/wazuh-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins + zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin + zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard/${{ needs.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }} + zip -r -j ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/report-package.zip ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/report-plugin + + - name: Build package + run: | + cd ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages + bash ./build-packages.sh \ + -v ${{ needs.setup-variables.outputs.VERSION }} \ + -r ${{ inputs.revision }} ${{ needs.setup-variables.outputs.ARCHITECTURE_FLAG }} \ + -a file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/wazuh-package.zip \ + -s file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/security-package.zip \ + -b file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/dashboard-package.zip \ + -rp file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/report-package.zip \ + ${{ needs.setup-variables.outputs.PRODUCTION }} --${{ inputs.system }} --debug + + - name: Test package + run: | + cd ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages + cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}} ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages/${{ inputs.system }} + bash ./test-packages.sh \ + -p ${{needs.setup-variables.outputs.PACKAGE_NAME}} + + - name: Set package final name + run: | + mv ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}} ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.FINAL_NAME}} + - name: Set SHA final name + if: ${{ inputs.checksum }} + run: | + mv ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}}.sha512 ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.FINAL_NAME}}.sha512 + + - uses: actions/upload-artifact@v3 + if: success() + with: + name: ${{ needs.setup-variables.outputs.FINAL_NAME }} + path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.FINAL_NAME}} + retention-days: 30 + + - name: Set up AWS CLI + if: ${{ inputs.upload }} + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }} + aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }} + aws-region: ${{ secrets.CI_AWS_REGION }} + + - name: Upload package + if: ${{ inputs.upload }} + run: | + echo "Uploading package" + aws s3 cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.FINAL_NAME}} s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/ + s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/${{needs.setup-variables.outputs.FINAL_NAME}}" + echo "S3 URI: ${s3uri}" + + - name: Upload SHA512 + if: ${{ inputs.checksum }} + run: | + echo "Uploading checksum" + aws s3 cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.FINAL_NAME}}.sha512 s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/ + s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/${{needs.setup-variables.outputs.FINAL_NAME}}.sha512" + echo "S3 sha512 URI: ${s3uri}" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000000..092c298a32e4 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,77 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "main", "[0-9].[0-9]", "[0-9].x" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + schedule: + - cron: '00 8 * * 5' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/cypress_workflow.yml b/.github/workflows/cypress_workflow.yml index b404f9c46240..03547e89fcf8 100644 --- a/.github/workflows/cypress_workflow.yml +++ b/.github/workflows/cypress_workflow.yml @@ -3,7 +3,7 @@ name: Run cypress tests # trigger on every PR for all branches except feature branches on: pull_request: - branches: [ '**', '!feature/**' ] + branches: ['**', '!feature/**'] paths-ignore: - '**/*.md' - '.lycheeignore' @@ -32,7 +32,7 @@ env: TEST_REPO: ${{ inputs.test_repo != '' && inputs.test_repo || 'opensearch-project/opensearch-dashboards-functional-test' }} TEST_BRANCH: "${{ inputs.test_branch != '' && inputs.test_branch || github.base_ref }}" FTR_PATH: 'ftr' - START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=false' + START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=false --opensearchDashboards.branding.useExpandedHeader=true' OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false' CYPRESS_BROWSER: 'chromium' CYPRESS_VISBUILDER_ENABLED: true @@ -42,6 +42,7 @@ env: COMMENT_TAG: '[MANUAL CYPRESS TEST RUN RESULTS]' COMMENT_SUCCESS_MSG: ':white_check_mark: Cypress test run succeeded!' COMMENT_FAILURE_MSG: ':x: Cypress test run failed!' + OPENSEARCH_VERSION: ${{ vars.OPENSEARCH_VERSION }} jobs: cypress-tests: @@ -49,7 +50,7 @@ jobs: strategy: fail-fast: false matrix: - group: [1, 2, 3, 4, 5, 6, 7, 8, 9] + group: [1, 2, 3, 4, 5] container: image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2 options: --user 1001 @@ -108,7 +109,7 @@ jobs: with: path: ${{ env.FTR_PATH }} repository: ${{ env.TEST_REPO }} - ref: '${{ env.TEST_BRANCH }}' + ref: '${{ env.OPENSEARCH_VERSION }}' - name: Setup spec files by input if: ${{ inputs.specs != '' }} @@ -149,7 +150,7 @@ jobs: working-directory: ${{ env.FTR_PATH }} start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }} wait-on: 'http://localhost:9200, http://localhost:5601' - command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.SPEC }} + 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 @@ -158,7 +159,7 @@ jobs: name: ftr-cypress-screenshots path: ${{ env.FTR_PATH }}/cypress/screenshots retention-days: 1 - + - uses: actions/upload-artifact@v3 if: always() with: @@ -172,7 +173,6 @@ jobs: name: ftr-cypress-results path: ${{ env.FTR_PATH }}/cypress/results retention-days: 1 - add-comment: needs: [cypress-tests] if: ${{ always() && github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }} @@ -186,7 +186,7 @@ jobs: with: issue-number: ${{ inputs.pr_number }} comment-author: 'github-actions[bot]' - body-includes: "${{ env.COMMENT_TAG }}" + body-includes: '${{ env.COMMENT_TAG }}' - name: Add comment on the PR uses: peter-evans/create-or-update-comment@v3 @@ -207,6 +207,6 @@ jobs: '${{ env.SPEC }}' ``` - #### Link to results: + #### Link to results: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} edit-mode: replace diff --git a/.gitignore b/.gitignore index f62e798ad6a5..7117a9591831 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ .aws-config.json .signing-config.json .ackrc +/dev-tools/build-packages/output +/dev-tools/build-packages/tmp /.opensearch /.chromium /package.json.bak @@ -70,4 +72,7 @@ snapshots.js .yarn-local-mirror # Ignore the generated antlr files -/src/plugins/data/public/antlr/**/grammar/.antlr/ \ No newline at end of file +/src/plugins/data/public/antlr/opensearch_sql/grammar/.antlr + +# Ignore the generated packages +/dev-tools/build-packages/base-packages-to-base/packages diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f52bf2fca34..2f82d4b28818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1349 +1,55 @@ -# CHANGELOG +# Change Log -Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +All notable changes to the Wazuh app project will be documented in this file. -## [Unreleased] +## Wazuh dashboard v5.0.0 - OpenSearch Dashboards 2.16.0 - Revision 00 -## [2.17.0-2024-09-06](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.17.0) +### Changed -### 💥 Breaking Changes +- Changed the reportingDashboards platform plugin to a customized one and adapt the build tools [#340](https://github.com/wazuh/wazuh-dashboard/pull/340) -### Deprecations +## Wazuh dashboard v4.10.2 - OpenSearch Dashboards 2.16.0 - Revision 00 - - Deprecating `CssDistFilename` exports in favor of `themeCssDistFilenames` in `@osd/ui-shared-deps` ([#7625](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7625)) +### Added -### 🛡 Security +- Support for Wazuh 4.10.2 -### 📈 Features/Enhancements +## Wazuh dashboard v4.10.1 - OpenSearch Dashboards 2.16.0 - Revision 00 - - DQL Autocomplete ([#7391](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7391)) - - Provide new embeddable option to hide embeddable panel action button ([#7503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7503)) - - [Workspace]Optimize workspace permission validation for bulk operations ([#7516](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7516)) - - [VisBuilder-Next] Migration of legacy visualizations to VisBuilder by constructing the URL. ([#7529](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7529)) - - [Workspace] Refactor workspace detail page ([#7598](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7598)) - - Add a util function to generate the relative redirectUrl. ([#7600](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7600)) - - Only allow essential use case when creating workspace if all data sources are serverless ([#7612](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7612)) - - Use essentials as the nav group name ([#7618](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7618)) - - Make parent item unclickable and fix duplicate items in landing page. ([#7619](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7619)) - - [Workspace] Set default color for workspace create form ([#7627](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7627)) - - Register section and content with the same id will not throw error but overrides the exist one ([#7633](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7633)) - - Introduce the redesign page and applications headers behind a switch ([#7637](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7637)) - - [Workspace] Update workspace list page table ([#7640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7640)) - - [contentManagement] allow to update section input after page rendered ([#7651](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7651)) - - Update permission settings appearance ([#7652](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7652)) - - [navigation] Left navigation collective ([#7655](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7655)) - - [Workspace]Add name and description characters limitation ([#7656](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7656)) - - [Workspace]Essential/Analytics(All) use case overview page ([#7673](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7673)) - - Change the locale dynamically by adding &i18n-locale to URL ([#7686](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7686)) - - Allow customizing `restrictWidth` and `paddingSize` of `TableListView` ([#7691](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7691)) - - Integrate new page header for workspace pages ([#7697](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7697)) - - Add a unit test case to indicate React is anti-xss ([#7699](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7699)) - - Refractor the homepage assets list section ([#7702](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7702)) - - [Workspaces]Add features in use case card and preselect first use case ([#7703](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7703)) - - Support workspace initial page ([#7708](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7708)) - - Add New Page Header to Visualize ([#7712](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7712)) - - Display workspace picker content when outside workspace ([#7716](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7716)) - - Allow `screenTitle` to be present when SearchBar is not in Application header ([#7721](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7721)) - - Simplify `TopNavControlDescriptionData` to to be followed by links ([#7723](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7723)) - - [Workspace]Fix click on workspace name not navigates to use case overview page ([#7748](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7748)) - - [Workspace]Add right sidebar to workspace create form ([#7750](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7750)) - - Add v9 theme (preview) ([#7757](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7757)) - - Minor interface change and move suggestion provider registration location ([#7758](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7758)) - - [Workspace] Add workspace navigation for default route ([#7785](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7785)) - - Adjust the appearance of collaborator panel ([#7795](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7795)) - - Add external icon to `TopNavControlButtonData` and `TopNavControlLinkData` with `target: '_blank'` ([#7799](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7799)) - - Add `iconGap` to `TopNavControlButtonData` and `TopNavControlLinkData` ([#7799](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7799)) - - Bump OUI to 1.11.0 ([#7799](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7799)) - - Add `flush` to `TopNavControlLinkData` ([#7801](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7801)) - - Add home icon in left bottom ([#7802](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7802)) - - Refractor the style of recent items card ([#7805](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7805)) - - Add OpenSearch PPL autocomplete to discover 2.0 with query enhancements ([#7810](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7810)) - - Add workspace icon to left nav / workspace picker menu / home page. ([#7823](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7823)) - - [Workspace]Remove default appended features ([#7841](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7841)) - - Query editor UI changes ([#7866](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7866)) - - Support injecting `DataStructureMeta` from `QueryEditorExtensions` for Query Assist ([#7871](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7871)) - - Align essentials use case id ([#7873](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7873)) - - [Workspace] Add search use case overview page ([#7877](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7877)) - - Update the collaborator input from a combobox to a text field ([#7879](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7879)) - - Refactor content menu picker in side bar and enable searching ([#7881](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7881)) - - [Workspace]Validate features parameter in workspace create and update API ([#7884](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7884)) - - Add S3 data exploration for connections, databases, and tables ([#7917](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7917)) - - Introduce a data-connection saved-object type for external data connections ([#7925](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7925)) - - [Workspace]Redirect to use case landing page after workspace create ([#7933](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7933)) - - Async query search and caching, also adding tests to related components ([#7943](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7943)) - - Add query result and time to the query editor footer ([#7951](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7951)) - - [Data source] Add data source permission wrapper and dataSourceAdmin role ([#7959](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7959)) - - Support DQCs in create page ([#7961](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7961)) - - [Workspace] Hide home breadcrumbs when in a workspace ([#7992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7992)) - - [Workspace]Deny get or bulkGet for global data source ([#8043](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8043)) +### Added -### 🐛 Bug Fixes +- Support for Wazuh 4.10.1 - - [Workspace]add workspace name blank/empty check ([#7512](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7512)) - - Not highlighting Droppable Areas while dragging a field ([#7527](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7527)) - - [Workspace] updating workspace-list-card and home-list-card ([#7547](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7547)) - - Resolve some browser warnings ([#7550](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7550)) - - Do not show surround doc links for PPL ([#7585](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7585)) - - Update DQL Autocomplete in code and functionality ([#7593](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7593)) - - Add validation for data source in get and bulk_get methods ([#7596](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7596)) - - [navigation] add sample data to left navigation ([#7613](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7613)) - - [contentManagement] display cards by specifying a column size or display all cards in one row ([#7624](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7624)) - - [Workspace] Move set default source order to avoid dev server crash ([#7636](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7636)) - - [Workspace]Fix page crash caused by invalid workspace color ([#7671](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7671)) - - Breadcrumb is not correct when clicking inspect / edit in Assets page ([#7749](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7749)) - - Fix the parameter misalignment in the workspace_detail_page ([#7768](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7768)) - - Fix new header allowing their single-child's overflowing ([#7796](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7796)) - - Fix query assistant fetching agent bug ([#7804](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7804)) - - Correct size of dashboard panel options icon button ([#7812](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7812)) - - [Workspace] maximum call stack error in use case service ([#7817](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7817)) - - Enable direct query connections to support in workspace ([#7839](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7839)) - - [Workspace] Revert new home page ui setting for workspace default route ([#7858](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7858)) - - Clean up language search interceptors and fix aggs for PPL ([#7870](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7870)) - - Query editor UI clean up ([#7896](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7896)) - - Fix bootstrap errors in 2.x ([#7901](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7901)) - - Refactor the style for the work list table ([#7913](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7913)) - - Show alias fields in Discover tab ([#7930](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7930)) - - [Workspace]dynamicConfigServiceMock not found in workspace routes UT ([#7954](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7954)) - - Fix workspace detail classname definition ([#7986](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7986)) - - Hide delete button for non OSD admin ([#7987](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7987)) +## Wazuh dashboard v4.10.0 - OpenSearch Dashboards 2.16.0 - Revision 02 -### 🚞 Infrastructure +### Removed -### 📝 Documentation +- Removed the setting home:useNewHomePage from the advanced settings because the views are not finished. [#282](https://github.com/wazuh/wazuh-dashboard/pull/282) - - Add documentation for dynamic page creation ([#7575](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7575)) - - Add Huy as maintainer ([#8025](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8025)) +## Wazuh dashboard v4.9.1 - OpenSearch Dashboards 2.13.0 - Revision 04 -### 🛠 Maintenance +### Added - - Update oui to 1.12 ([#7865](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7865)) +- Support for Wazuh 4.9.1 -### 🪛 Refactoring +### Changed - - [Workspace] Support getting workspaces client from coreStart ([#7501](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7501)) - - [Look&Feel] Update paragraph text sizes across remaining OSD ([#7603](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7603)) - - [Look&Feel] Use semantic headers for page, modal, & flyouts across the board ([#7616](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7616)) - - Simplify theme configuration and defaulting ([#7625](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7625)) - - Refactor search bar & filters to conditionally render new look with application header ([#7687](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7687)) - - MDS and MQL features to use generic structured types, abstract data querying, and language service ([#7731](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7731)) - - Update page header for settings, objects and index pattern page ([#7744](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7744)) - - [Workspace] Refactor: workspace detail page header ([#7771](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7771)) - - [Look & Feel] Appearance Popover Button Change ([#7777](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7777)) - - [Workspace] Use small button, small padding and compressed. ([#7842](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7842)) - - [Workspace] workspace initial page ([#7857](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7857)) - - Add workspace info in index pattern and asset header and update workspace header ([#7859](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7859)) - - Update page header for edit object page ([#7910](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7910)) - - Update header for data source management when in workspace ([#7916](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7916)) - - [Workspace] Refactor get start card at new home page ([#7920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7920)) - - Hide saved object import button when user is outside workspace ([#7989](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7989)) +- Changed link to sample data in the dashboards section and references to Opensearch Dashboards [#311](https://github.com/wazuh/wazuh-dashboard/pull/311) -### 🔩 Tests +### Fixed -## [2.16.0-2024-07-30](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.16.0) +- Fixed bug that caused the terminal to freeze on deb upgrades [#301](https://github.com/wazuh/wazuh-dashboard/pull/301) +- Fixed the name of the "Index management" category to "Indexer management" [#330](https://github.com/wazuh/wazuh-dashboard/pull/330) -### 💥 Breaking Changes +## Wazuh dashboard v4.9.0 - OpenSearch Dashboards 2.13.0 - Revision 07 -### Deprecations +### Added - - Remove data enhancements config and readonly flag. Removes dead url link, ([#7291](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7291)) +- Support for Wazuh 4.9.0 -### 🛡 Security +### Changed - - [CVE-2024-28863] Bump tar from 6.1.11 to 6.2.1 ([#6492](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6492)) - - [CVE-2024-33883] Bump ejs from `3.1.7` to `3.1.10` ([#6770](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6770)) - - [CVE-2024-4067][CVE-2024-4068] Bump packages dependent on `braces` versions lower than 3.0.3 ([#6911](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6911)) - - [GHSA-x565-32qp-m3vf] Bump `jimp` to remove phin dependency ([#6977](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6977)) - - [SNYK-JS-AXIOS-6144788] Bump axios to `1.7.2` ([#7149](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7149)) - - [CVE-2024-37890] Bump ws from `8.5.0` to `8.17.1` and from `7.5.7` to `7.5.10` ([#7153](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7153)) - -### 📈 Features/Enhancements - - - Make theme and dark mode settings user/device specific (in local storage), with opt-out ([#5652](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5652)) - - [Workspace]Import sample data to current workspace ([#6105](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6105)) - - [Data Explorer] Allow render from View directly, not from Data Explorer ([#6167](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6167)) - - [MDS] Allow querying from data sources in Timeline visualizations ([#6385](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6385)) - - [MDS] Prevent importing of data source object when MDS is not enabled ([#6395](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6395)) - - [VisBuilder] Change VisBuilder from experimental to production ([#6436](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6436)) - - Adds `migrations.delete` to delete saved objects by type during a migration ([#6443](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6443)) - - [Workspace] Duplicate selected/all saved objects ([#6478](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6478)) - - [Workspace] Dashboard admin(groups/users) implementation. ([#6554](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6554)) - - Support language selector from the data plugin ([#6613](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6613)) - - Add Server Side Batching for UI Metric Colector ([#6721](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6721)) - - Make Field Name Search Filter Case Insensitive ([#6759](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6759)) - - Add data source selection service to support storing and getting selected data source updates ([#6827](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6827)) - - [Workspace] Only OSD admin can create workspace ([#6831](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6831)) - - [Workspace]Add use cases to workspace form ([#6887](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6887)) - - Add missing aria-label for discover page ([#6898](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6898)) - - Remove endpoint validation for create data source saved object API ([#6899](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6899)) - - [Workspace] Change description field to textarea ([#6907](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6907)) - - Use JSON11 for handling long numerals ([#6915](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6915)) - - [MDS] Allow adding sample data for Timeline visualizations ([#6919](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6919)) - - [Multi DataSource] Add removedComponentIds for data source selection service ([#6920](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6920)) - - [MD]Use placeholder for data source credentials fields when export saved object ([#6928](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6928)) - - Query editor and UI settings toggle ([#7001](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7001)) - - Add search bar extensions ([#7034](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7034)) - - [Workspace] Refactor the UI of workspace picker ([#7045](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7045)) - - Render the datasource selector component conditionally ([#7059](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7059)) - - Introduce new interface for group ([#7060](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7060)) - - Support data source assignment in workspace. ([#7101](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7101)) - - [Workspace] Capabilities service add dashboard admin flag ([#7103](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7103)) - - Onboard dataframes support to MDS and create dataframe before request ([#7106](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7106)) - - Enhance Drag & Drop functionality in Vis Builder ([#7107](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7107)) - - Comply `recent items` with workspace ([#7115](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7115)) - - [Navigation-next] Add register nav group updater in chrome service ([#7117](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7117)) - - [Workspace] Refactor workspace form UI ([#7133](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7133)) - - [MDS] Observability Datasource Plugin migration with MDS support ([#7143](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7143)) - - Add description field in App. ([#7152](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7152)) - - Query editor and dataframes datasources container ([#7157](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7157)) - - [Workspace] Delete the virtual global workspace ([#7165](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7165)) - - 1. Add current nav group into chrome service 2. Prepend current nav group into breadcrumb ([#7166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7166)) - - [QueryEditorExtensions] change `isEnabled` to an observable ([#7183](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7183)) - - Support workspace level default data source ([#7188](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7188)) - - Introduced an new plugin contentManagement for dynamic content rendering ([#7201](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7201)) - - Address styling of non-primary buttons by making secondary/empty ([#7211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7211)) - - Add query enhancements plugin as a core plugin ([#7212](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7212)) - - Hide select data source panel for non dashboard admin in workspace create/edit page ([#7213](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7213)) - - [DataSource] Restrict to edit data source on the DSM UI. ([#7214](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7214)) - - Use registered nav group as workspace use case ([#7221](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7221)) - - [navigation-next] Add new left navigation ([#7230](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7230)) - - Add all use case ([#7235](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7235)) - - [navigation-next] add recent works in new homepage ([#7237](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7237)) - - [Workspace] Support workspace detail page ([#7241](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7241)) - - [Workspace] Register workspace settings under setup and settings ([#7242](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7242)) - - Register workspace list card into home page ([#7247](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7247)) - - Add recent items popup in top navigation ([#7257](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7257)) - - [navigation-next] Add new category ([#7275](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7275)) - - Enable landing page for settings and data administration ([#7282](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7282)) - - Support PPL in vega visualization ([#7285](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7285)) - - [VisBuilder] Add Capability to generate dynamic vega ([#7288](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7288)) - - Recover data source management in workspace ([#7296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7296)) - - Disable certain routes when data_source.manageableBy is none ([#7298](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7298)) - - [navigation-next] fix: redirect to standard index pattern applications while nav group is enabled ([#7305](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7305)) - - Disable inputs in edit data source screen when data_source.manageableBy is none ([#7307](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7307)) - - Update query enhancement UI ([#7309](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7309)) - - [Workspace]Add "All use case" option to workspace form ([#7318](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7318)) - - [MDS] Data Connection details page with MDS support ([#7323](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7323)) - - Use compressed DataSourceSelector ([#7329](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7329)) - - [Workspace] Register four get started cards in home page ([#7333](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7333)) - - [Auto Suggest] OpenSearch SQL autosuggest with ANTLR ([#7336](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7336)) - - [navigation-next] update category ([#7339](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7339)) - - Add home page static list card ([#7351](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7351)) - - [Workspace]Hide create workspace button for non dashboard admin ([#7357](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7357)) - - Enrich breadcrumbs by workspace and use case ([#7360](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7360)) - - Bump OUI to 1.8.0 ([#7363](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7363)) - - [MDS] Observability Datasource Plugin migration with MDS support for Data Connection Table ([#7371](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7371)) - - Add MDS support along with a few cleanup and tests update ([#7463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7463)) - - Add back data set navigator to control state issues ([#7492](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7492)) - - Fix discover options' location ([#7581](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7581)) - -### 🐛 Bug Fixes - - - [VisBuilder][BUG] Flat render structure in Metric and Table Vis ([#6674](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6674)) - - [MDS] Add a new message to data source components when there are no compatible datasources ([#6678](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6678)) - - Adjust the padding size for aggregated view ([#6715](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6715)) - - Add more test for icon and aggregated view ([#6729](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6729)) - - [OSD Availability] Prevent OSD process crashes when disk is full ([#6733](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6733)) - - Add test for edit data source form ([#6742](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6742)) - - Add test for data_source_error_menu, data_source_item, data_source_multi_selectable ([#6752](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6752)) - - Add test for toast button and validation form ([#6755](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6755)) - - Show error toast when fail to delete saved objects ([#6756](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6756)) - - Lint checker failure fix ([#6771](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6771)) - - Fix workspace name duplication check ([#6776](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6776)) - - Error message is not formatted in vis_type_vega url parser. ([#6777](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6777)) - - [Discover][Bug] Migrate global state from legacy URL ([#6780](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6780)) - - Quickrange selection fix ([#6782](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6782)) - - Bug Fixes for Vis Builder ([#6811](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6811)) - - Fix endpoint validation by passing in request when creating datasource client ([#6822](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6822)) - - Update index pattern references with data source when import sample data ([#6851](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6851)) - - Remove unused import and property which broke compilation ([#6879](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6879)) - - Fix not setting the default data source when creating data source bug ([#6908](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6908)) - - Close any open system flyout when changing view mode of the dashboard ([#6923](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6923)) - - Add TSVB Support for adding sample data ([#6940](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6940)) - - Fix web log sample visualization & vis-builder not rendering with data source issue ([#6948](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6948)) - - [MDS] Include data source name when importing a timeline visualization ([#6954](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6954)) - - Update z-index of sidecar container to make it more than mask, from 1000 to 1001. ([#6964](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6964)) - - [Discover] Check if the timestamp is already included to remove duplicate col ([#6983](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6983)) - - Highlight the anchor row in surrounding doc view ([#7025](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7025)) - - [MDS] Add data source engine type to data source saved object ([#7026](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7026)) - - Fix colors of the visualizations with more than 10 items ([#7051](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7051)) - - [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission ([#7054](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7054)) - - [Discover] Allow the last column of a table wider than the window to show up properly ([#7058](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7058)) - - Update error message in timeline visualization when MDS disabled ([#7069](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7069)) - - Fix object empty check and minor perf issue in query editor extensions ([#7077](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7077)) - - Remove angular related comment and code ([#7087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7087)) - - [MDS][Version Decoupling] Add support of Version Decoupling in Index Patterns Dashboards Plugin ([#7100](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7100)) - - [Workspace]Restrict saved objects finding when workspace enabled ([#7125](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7125)) - - [MDS][Version Decoupling] Add support of required backend plugins check on data sources ([#7146](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7146)) - - [MDS] Fix the dsm plugin setup when mds feature flag is disabled ([#7163](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7163)) - - [MDS][Version Decoupling] Add dataSourceVersion' and 'installedPlugins in viewer returns ([#7172](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7172)) - - Break new lines in table cell in legacy discover ([#7207](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7207)) - - [Sample Data] Updates sample dashboard title in sample web logs data ([#7233](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7233)) - - Discover page status stuck in loading State ([#7252](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7252)) - - Unassign data source before deleteByWorkspace ([#7279](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7279)) - - Unused config setting and remove data sources as a required plugin. ([#7314](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7314)) - - Fix wrapping of labels in filter by type popover ([#7327](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7327)) - - [Navigation] Update dev tools tab css for new left navigation ([#7328](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7328)) - - Data source selector in dev tools tab moved to left ([#7347](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7347)) - - [navigation-next] Fix issues. ([#7356](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7356)) - - [DataSource] No restriction on setting default data source ([#7396](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7396)) - - Make breadcrumb of 4 new added applications comply with BrowserRouter. ([#7401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7401)) - - [Bug][Workspace] Navigate to detail page when clicking all use case workspace ([#7405](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7405)) - - [Version Decoupling] Add data source version and installed plugins in data source viewer returns ([#7420](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7420)) - - [Bug][Workspace] Add permission validation at workspace detail page ([#7435](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7435)) - - [Bug][Data Source] Move data source manageable feature flag to DSM plugin ([#7440](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7440)) - - Update recent items icon from SVG to react component ([#7478](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7478)) - - [MDS] Fix the hide local cluster config ([#7497](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7497)) - - Update icon of recent items from OUI library to enable dark mode ([#7508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7508)) - - Fix data source picker trigger local cluster call by default ([#7528](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7528)) - - Fix babel error ([#7541](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7541)) - - Fix tables not displaying in navigator and add local cluster to datasources ([#7542](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7542)) - - Fixes Discover next styling ([#7546](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7546)) - - [navigation]feat: redirect user to home in global when workspace is enabled ([#7551](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7551)) - - [Workspace]Add workspaces and permissions fields into saved objects _bulk_get response ([#7565](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7565)) - - Fixes databases not being displayed upon success ([#7567](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7567)) - -### 🚞 Infrastructure - -### 📝 Documentation - - - Add zhyuanqi as maintainer ([#6788](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6788)) - - Move @BSFishy to emeritus maintainer ([#6790](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6790)) - - Add mengweieric as maintainer ([#6798](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6798)) - - Add OpenAPI specification for GET and CREATE saved object API ([#6799](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6799)) - - Add example for saved object creation part for openapi doc. ([#6855](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6855)) - - Add openAPI doc for saved_object find api ([#6856](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6856)) - - Add OpenAPI specification for bulk create and bulk update saved object APIs ([#6859](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6859)) - - Add OpenAPI specification for bulk_get saved object APIs ([#6860](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6860)) - - Add OpenAPI specification for update, delete and migrate saved object API ([#6864](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6864)) - - Add OpenAPI specification for import and export saved object api ([#6872](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6872)) - - Add OpenAPI specifications for resolve import errors api ([#6885](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6885)) - - Add Suchit as maintainer ([#6980](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6980)) - - Add Viraj as maintainer ([#7196](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7196)) - - Add OpenAPI specification for API for retrieving fields of index patterns ([#7270](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7270)) - - Add Sean as maintainer ([#7458](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7458)) - - Add Joshua as maintainer ([#7553](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7553)) - -### 🛠 Maintenance - - - Skip running tests for updates in CODEOWNERS ([#7197](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7197)) - -### 🪛 Refactoring - - - Unify getDefaultDataSourceId and export ([#6843](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6843)) - - [MDS] Refactor error handling in data source management plugin to use DataSourceError ([#6903](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6903)) - - [Look&Feel] Refactor to use semantic headers for page, modal & flyout ([#7192](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7192)) - - [Look&Feel] Consistency of Plus Icons ([#7195](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7195)) - - [Look&Feel] Update Popover Padding Size ([#7200](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7200)) - - [Look&Feel] Replace browser tooltip usage with OUI tooltip ([#7231](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7231)) - - [Look&Feel] Use small EuiTabs and EuiTabbedContent across the board ([#7232](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7232)) - - Density and consistency changes for discover and query bar ([#7299](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7299)) - - [Look&Feel] Apply guidance for visBuilder ([#7341](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7341)) - - [Look&Feel] Apply small popover padding and add Oui tooltips ([#7523](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7523)) - - [Look&Feel] Discover and Query Management fix ([#7530](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7530)) - -### 🔩 Tests - -### 💥 Breaking Changes - -### Deprecations - -### 🛡 Security - -- [CVE-2023-45857] Bump `axios` from `0.27.2` to `0.28.0` ([#6147](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6147)) -- [CVE-2024-27088] Bump es5-ext from `0.10.59` to `0.10.64` ([#6021](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6021)) - -### 📈 Features/Enhancements - -- [Multiple Datasource] Add TLS configuration for multiple data sources ([#6171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6171)) -- [Multiple DataSource] Do not support import data source object to Local cluster when not enable data source ([#6395](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6395)) - -### 🐛 Bug Fixes - -### 🚞 Infrastructure - -### 📝 Documentation - -### 🛠 Maintenance - -### 🪛 Refactoring - -### 🔩 Tests - -## [2.12.0 - 2024-02-20](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.12.0) - -### 💥 Breaking Changes - -### Deprecations - -- Rename `withLongNumerals` to `withLongNumeralsSupport` in `HttpFetchOptions` [#5592](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5592) - -### 🛡 Security - -- [WS-2021-0638] Bump mocha from `7.2.0` to `10.1.0` ([#2711](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2711)) -- Add support for TLS v1.3 ([#5133](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5133)) -- [CVE-2023-45133] Bump all babel dependencies from `7.16.x` to `7.22.9` to fix upstream vulnerability ([#5428](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5428)) -- [CVE-2023-26159] Bump `follow-redirects` from `1.15.2` to `1.15.4` ([#5669](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5669)) -- [CVE-2020-8203] Bump `cheerio` from `0.22.0` to `1.0.0-rc.1` to fix vulnerable `lodash` dependency ([#5797](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5797)) - -### 📈 Features/Enhancements - -- Add support for read-only mode through tenants ([#4498](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4498)) -- Replace OuiSelect component with OuiSuperSelect in data-source plugin ([#5315](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5315)) -- [Workspace] Add core workspace service module to enable the implementation of workspace features within OSD plugins ([#5092](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5092)) -- [Workspace] Setup workspace skeleton and implement basic CRUD API ([#5075](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5075)) -- [Decouple] Add new cross compatibility check core service which export functionality for plugins to verify if their OpenSearch plugin counterpart is installed on the cluster or has incompatible version to configure the plugin behavior([#4710](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4710)) -- [Discover] Add long numerals support [#5592](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5592) -- [Discover] Display inner properties in the left navigation bar [#5429](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5429) -- [Discover] Added customizable pagination options based on Discover UI settings [#5610](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5610) -- [Chrome] Introduce registerCollapsibleNavHeader to allow plugins to customize the rendering of nav menu header ([#5244](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5244)) -- [PM] Enhance single version requirements imposed during bootstrapping ([#5675](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5675)) -- [Custom Branding] Relative URL should be allowed for logos ([#5572](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5572)) -- [Discover] Enhanced the data source selector with added sorting functionality ([#5609](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/5609)) -- [Multiple Datasource] Add datasource picker component and use it in devtools and tutorial page when multiple datasource is enabled ([#5756](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5756)) -- [Multiple Datasource] Add datasource picker to import saved object flyout when multiple data source is enabled ([#5781](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5781)) -- [Multiple Datasource] Add interfaces to register add-on authentication method from plug-in module ([#5851](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5851)) -- [Multiple Datasource] Able to Hide "Local Cluster" option from datasource DropDown ([#5827](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5827)) -- [Multiple Datasource] Add api registry and allow it to be added into client config in data source plugin ([#5895](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5895)) -- [Multiple Datasource] Refactor client and legacy client to use authentication registry ([#5881](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5881)) - -### 🐛 Bug Fixes - -- [Chore] Update deprecated url methods (url.parse(), url.format()) ([#2910](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2910)) -- Cleanup unused url ([#3847](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3847)) -- [TSVB, Dashboards] Fix inconsistent dark mode code editor themes ([#4609](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4609)) -- Fix `maps.proxyOpenSearchMapsServiceInMaps` config definition so it can be set ([#5170](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5170)) -- [Discover] Fix inactive state on 'Discover' tab in side navigation menu ([#5432](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5432)) -- [BUG] Add platform "darwin-arm64" to unit test ([#5290](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5290)) -- [BUG][Dev Tool] Add dev tool documentation link to dev tool's help menu [#5166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5166) -- Fix missing border for header navigation control on right ([#5450](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5450)) -- [BUG] Fix filtering issue in data source selector ([5484](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5484)) -- [BUG][Data] Support for custom filters with heterogeneous data fields ([5577](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5577)) -- [BUG][Data] Fix empty suggestion history when querying in search bar [#5349](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5349) -- [BUG][Discover] Fix what is displayed in `selected fields` when removing columns from canvas [#5537](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5537) -- [BUG][Discover] Fix advanced setting `discover:modifyColumnsOnSwitch` ([#5508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5508)) -- [BUG][Discover] Show 0 filters when there are no active filters ([#5508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5508)) -- [Discover] Fix missing index pattern field from breaking Discover [#5626](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5626) -- [BUG] Remove duplicate sample data as id 90943e30-9a47-11e8-b64d-95841ca0b247 ([5668](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5668)) -- [BUG][Multiple Datasource] Fix datasource testing connection unexpectedly passed with wrong endpoint [#5663](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5663) -- [BUG][Multiple Datasource] Fix missing customApiRegistryPromise param for test connection ([#5944](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5944)) - - -### 🚞 Infrastructure - -- Re-enable CI workflows for feature branches ([#2908](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2908)) -- Upgrade yarn version to be compatible with @opensearch-project/opensearch ([#3443](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3443)) -- Add an achievement badger to the PR ([#3721](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3721)) -- [CI] Enable inputs for manually triggered Cypress test jobs ([#5134](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5134)) -- [CI] Replace usage of deprecated `set-output` in workflows ([#5340](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5340)) -- [Chore] Add `--security` for `opensearch snapshot` and `opensearch_dashboards` to configure local setup with the security plugin ([#5451](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5451)) -- [Chore] Updates default dev environment security credentials ([#5736](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5736)) - -### 📝 Documentation - -- [Doc] Add COMMUNICATIONS.md with info about Slack, forum, office hours ([#3837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3837)) -- Add plugin development section in DEVELOPER_GUIDE.md ([#3989](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3989)) -- Remove ftr test step from PR template ([#5217](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5217)) -- [Doc] Update EUI doc site links to point to OUI doc site ([#5293](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5293)) - -### 🛠 Maintenance - -- Removes `minimatch` manual resolution ([#3019](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3019)) -- Upgrade `vega-lite` dependency from `4.17.0` to `^5.6.0` ([#3076](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3076)). Backwards-compatible version included in v2.5.0 release. -- Bump `js-yaml` from `3.14.0` to `4.1.0` ([#3770](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3770)) -- Replace `node-sass` with `sass-embedded` ([#5338](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5338)) -- Bump `chromedriver` from `107.0.3` to `119.0.1` ([#5465](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5465)) -- Bump `typescript` resolution from `4.0.2` to `4.6.4` ([#5470](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5470)) -- Bump `OUI` to `1.5.1` ([#5862](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5862)) -- Add @SuZhou-Joe as a maintainer ([#5594](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5594)) -- Move @seanneumann to emeritus maintainer ([#5634](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5634)) -- Remove `ui-select` dev dependency ([#5660](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5660)) -- Add @BionIT as a maintainer ([#5988](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5988)) - -### 🪛 Refactoring - -- [Console] Remove unused ul element and its custom styling ([#3993](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3993)) -- Remove unused Sass in `tile_map` plugin ([#4110](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4110)) -- [Home] Remove unused tutorials ([#5212](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5212)) -- [UiSharedDeps] Standardize theme JSON imports to be light/dark-mode aware ([#5662](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5662)) - -### 🔩 Tests - -- [Home] Add more unit tests for other complications of overview ([#5418](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5418)) - -## [2.11.1 - 2023-11-21](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.11.1) - -### 🛡 Security - -- [CVE-2023-45133] Add package resolution for `@babel/traverse` to `7.23.2` to fix vulnerability ([#5309](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5309)) -- [CVE-2023-46234] Bump `eslint-import-resolver-webpack` from `0.11.1` to `0.13.8` and `browserify-sign` from `4.2.1` to `4.2.2` ([#5414](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5414/)) - -### 📈 Features/Enhancements - -### 🐛 Bug Fixes - -- Fix navigation issue across dashboards ([#5435](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5435)) -- [Discover] Fix table panel auto-sizing ([#5441](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5441)) - -### 🚞 Infrastructure - -- [CI][Test] Add plugin functional tests on GitHub Actions ([#5383](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5383)) - -### 📝 Documentation - -- Add Release Notes and update CHANGELOG.md for 2.11.1 ([#5486](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5486)) - -### 🔩 Tests - -### 🛠 Maintenance - -## [2.11.0 - 2023-10-18](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.11.0) - -### 🛡 Security - -- [CVE-2022-25869] Remove AngularJS `1.8` ([#5086](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5086)) - -### 📈 Features/Enhancements - -- [Console] Add support for JSON with long numerals ([#4562](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4562)) -- [Data] Add `DataSource` service and `DataSourceSelector` for multiple datasource support ([#5167](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5167)) -- [Discover] Update embeddable for saved searches ([#5081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5081)) - -### 🐛 Bug Fixes - -- Bump `agentkeepalive` to `4.5.0` to solve a problem preventing the use `https://ip` in `opensearch.hosts` ([#4949](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4949)) -- [Data Explorer][Discover] Add `onQuerySubmit` to top nav and allow force update to embeddable ([#5160](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5160)) -- [Data Explorer][Discover] Automatically load default index pattern ([#5171](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5171)) -- [Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087)) -- [Data Explorer][Discover] Allow data grid to auto adjust size based on fetched data count ([#5191](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5191)) -- [Data Explorer][Discover] Allow filter and query persist when refresh page or paste url to a new tab ([#5206](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5206)) -- [Data Explorer][Discover] Fix misc navigation issues ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) -- [Data Explorer][Discover] Fix mobile view ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) -- [Table Visualization] Fix width of multiple tables when rendered in column view ([#4638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4638)) -- [Table Visualization] Fix filter actions on data table vis cells ([#4837](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4837)) -- [Vis Augmenter] Fix errors in conditions for activating `vizAugmenter` ([#5213](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5213)) -- [Vis Augmenter] Fix `visAugmenter` forming empty key-value pairs in its calls to the `SavedObject` API ([#5190](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5190)) -- [Data Explorer] Remove the `X` icon in data source selection field ([#5238](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5238)) -- [BUG][Fuctional Test] Make setDefaultAbsoluteRange more robust and update doc views tests ([#5242](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5242)) - -### 🚞 Infrastructure - -- [CI] Add `NODE_OPTIONS` and disable disk allocation threshold ([#5172](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5172)) -- [CI] Supprt CI Groups for Cypress test jobs ([#5298](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5298)) - -### 🛠 Maintenance - -- [Version] Version increment from 2.10 to 2.11 ([#4975](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4975)) -- Remove angular html extractor ([#4680](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4680)) -- Add @bandinib-amzn as maintainer ([#5113](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5113)) -- Add @bandinib-amzn to CODEOWNERS file. ([#5456](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5456)) - -### 🔩 Tests - -- [Functional][Doc Views] Remove angular code from `plugin_functional` and update tests ([#5221](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5221)) -- [Unit][Data Explorer][Discover] Fix wrong test due to time conversion ([#5174](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5174)) -- [Unit][Data Explorer][Discover]Fix `buildPointSeriesData` unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992)) - -## [2.10.0 - 2023-09-25](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.10.0) - -### 🛡 Security - -- Bump word-wrap from 1.2.3 to 1.2.4 ([#4589](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4589)) -- Bump version of tinygradient from 0.4.3 to 1.1.5 ([#4742](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4742)) -- Bump lmdb from 2.8.0 to 2.8.5 ([#4804](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4804)) -- Alias and bump mocha ([#4874](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4874)) -- Remove examples and other unwanted artifacts from installed dependencies ([#4896](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4896)) - -### 📈 Features/Enhancements - -- [Vis colors] Update legacy mapped colors in charts plugin to use ouiPaletteColorBlind() ([#4398](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4398)) -- [Saved Objects Management] Add new or remove extra tags and styles ([#4069](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4069)) -- Chore (home): Update visual consistency dashboard TSVB colors ([#4501](http://github.com/opensearch-project/OpenSearch-Dashboards/pull/4501)) -- Feature (home): Update visual consistency sample dashboard with more vis ([#4581](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4581)) -- Add resource ID filtering in fetch augment-vis obj queries ([#4608](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4608)) -- Enable theme-switching via Advanced Settings to preview the Next theme ([#4475](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4475)) -- Feat (home): Add remaining vis type examples ([#4619](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4619)) -- Feat (Discover): Update styles to be compatible with next theme ([#4644](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4644)) -- Update webpack environment targets ([#4649](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4649)) -- [Table Visualization] Replace div containers with OuiFlex components ([#4272](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4272)) -- Reduce the amount of comments in compiled CSS ([#4648](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4648)) -- Feat (home): Remove color customizations from sample dashboards ([#4741](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4741)) -- Remove visualization editor background ([#4719](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4719)) -- Add saved objects service status api ([#4696](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4696)) -- Allow plugin manifest config to define semver compatible OpenSearch plugin and verify if it is installed on the cluster ([#4612](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4612)) -- Eliminate duplicate dashboard breadcrumb text ID ([#4805](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4805)) -- [@osd/pm] Automate multi-target bootstrap and build ([#4650](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4650)) -- [Home] Add modal to introduce the `next` theme ([#4715](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4715)) -- [Home] Add new theme sample dashboard screenshots ([#4906](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4906)) -- Change color fn used to calculate icon colors for search typeahead suggestions ([#4884](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4884)) -- [Next Theme] Make next theme the default ([#4854](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4854)) -- [Vis Colors] Update color mapper to prioritize unique colors per vis ([#4890](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4890)) -- [Advanced Settings] Consolidate settings into new "Appearance" category and add category IDs ([#4845](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4845)) -- Adds Data explorer framework and implements Discover using it ([#4806](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4806)) -- Use themes' definitions to render the initial view. This impacts the loading screen font and colors ([#4936](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4936)) - -### 🐛 Bug Fixes - -- [VisLib] Replace legend color palette with OUI color palette ([#4365](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4365)) -- Fix (styles): Make ace code editor themes consistent ([#4609](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4609)) -- [i18n] fix generation scripts ([#4252](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4252)) -- Fix (Legacy Maps): Add necessary specificity for dark mode style overrides ([#4658](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4658)) -- Fix --font-text CSS var usage and add more leaflet font overrides ([#4674](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4674)) -- Fix snapshots that didn't get updated between PRs ([#4863](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4863)) -- [BUG] Fix management overview page duplicate rendering ([#4636](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4636)) -- Fixes broken app when management is turned off ([#4891](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4891)) -- [CCI] Fix EUI/OUI type errors ([#3798](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3798)) -- Correct the generated path for downloading plugins by their names on Windows ([#4953](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4953)) - -### 📝 Documentation - -- Add missing 1.3.x patch release notes to 2.x branch ([#4771](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4771)) -- [Vis Augmenter] Add documentation to `vis_augmenter` plugin ([#4527](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4527)) - -### 🛠 Maintenance - -- Version increment from 2.9 to 2.10 ([#4545](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4545)) -- Bump OpenSearch-Dashboards 2.10.0 to use nodejs 18.16.0 version ([#4948](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4948)) -- Bump `oui` to `1.3.0` ([#4941](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4941)) -- Add @curq as maintainer ([#4760](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4760)) - -### 🪛 Refactoring - -- [Markdown] Replace custom css styles and native html with OUI ([#4390](http://github.com/opensearch-project/OpenSearch-Dashboards/pull/4390)) -- Removed KUI usage in `maps_legacy` plugin ([#3998](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3998)) -- [Console] Converted all `/lib/autocomplete/**/*.js` files to typescript ([#4148](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4148)) -- [Console] Convert all non-autocomplete lib files to typescript ([#4150](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4150)) -- Refactor/remove breadcrumb styling main ([#4621](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4621)) -- Bump `node-sass` to a version that uses a newer `libsass` ([#4651](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4651)) -- [Dashboards] restructure folder to be more cohesive with the project ([#4575](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4575)) -- Remove minimum constraint on opensearch hosts ([#4701](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4701)) -- [CCI] Remove unused tags in the navigation plugin ([#3964](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3964)) -- Refactor logo usage ([#4702](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4702)) -- [Markdown] Replace custom CSS styles and HTML markup with OUI components ([#4390](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4390)) -- Fix EUI/OUI type errors ([#3798](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3798)) - -### 🔩 Tests - -- [CI] Fix BWC related CI failures by swapping dist url with snapshot url ([#4828](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4828)) -- [Dashboard De-Angular] Add unit tests for `dashboard_listing` and `dashboard_top_nav` ([#4640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4640)) -- [Tests] Add BWC tests for 2.9 and 2.10 versions ([#4762](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4762)) -- [Stylelint] Add `no_restricted_values` linter rule ([#4413](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4413)) -- Units test for utils folder ([#4641](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4641)) -- Test (linkchecker): Exclude checking dead link ([#4720](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4720)) -- Update baseline images for functional tests ([#4879](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4879)) - -## [1.3.13 - 2023-09-21](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.13) - -### 🛡 Security - -- [CVE-2019-11358] Bump version of `tinygradient` from `0.4.3` to `1.1.5` ([#4571](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4751)) -- [CVE-2023-26136] Bump `word-wrap` from `1.2.3` to `1.2.4` ([#5002](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5002)) -- [CVE-2022-21670] Bump `markdown-it` from `10.0.0` to `12.3.2` ([#5016](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5016)) -- [CVE-2022-33987] Partially fix security issues for `got` by bumping `@elastic/makelogs` from `6.0.0` to `6.1.1` and updating yarn.lock ([#5006](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5006)) -- Bump `yo` from `2.0.6` to `3.1.1` ([#5005]( https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5005)) -- [CVE-2023-0842] Bump `xml2js` from `0.4.22` to `0.6.2` ([#5024](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5024)) - -### 📈 Features/Enhancements - -### 🐛 Bug Fixes - -### 🚞 Infrastructure - -### 📝 Documentation - -### 🛠 Maintenance - -- [Version] Increment version to 1.3.13 ([#4721](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4721)) -- [Chore] Add company.net to exclusion list in linkchecker ([#4704](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4704)) -- [Chore] Exclude checking dead link in linkchecker ([#4868](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4868)) - -## [1.3.12 - 2023-08-10](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.12) - -### 🛡 Security - -- [CVE-2021-23382] Bump postcss from `8.2.10` to `8.4.24` ([#4403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4403)) -- Bump `joi` to v14 to avoid the possibility of prototype poisoning in a nested dependency ([#3952](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3952)) -- [WS-2018-0347] Bump `sass-lint` from `1.12.1` to `1.13.0` to fix `eslint` security issue ([#4338](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4338)) -- [CVE-2022-25883] Resolve `semver` to `7.5.3` and remove unused package ([#4411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4411), [#4686](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4686)) -- [CVE-2022-1537] Bump grunt from `1.4.1` to `1.5.3` ([#3723](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3723)) -- [CVE-2022-0436] Bump grunt from `1.4.1` to `1.5.3` ([#3723](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3723)) -- [CVE-2023-26136] Resolve `tough-cookie` to `4.1.3` ([#4682](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4682)) - -### 📈 Features/Enhancements - -### 🐛 Bug Fixes - -### 🚞 Infrastructure - -### 📝 Documentation - -- added js documentation and a readme file to files in utils folder ([#5540])(https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5540/) - -### 🛠 Maintenance - -- Adding @ZilongX and @Flyingliuhub as maintainers. ([#4137](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4137)) -- Add new MAINTAINERS to CODEOWNERS file. ([#4199](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4199)) -- Adding @BSFishy as maintainer. ([#4469](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4469)) -- [Version] Increment version to 1.3.12 ([#4656](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4656)) - -## [2.9.0 - 2023-07-24](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.9.0) - -### 🛡 Security - -- Bump `joi` to v14 to avoid the possibility of prototype poisoning in a nested dependency ([#3952](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3952)) -- [CVE-2022-25883] Resolve `semver` to `7.5.3` and remove unused package ([#4411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4411)) -- Bump tough-cookie from 4.0.0 to 4.1.3 ([#4531](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4531)) - -### 📈 Features/Enhancements - -- Add plugin manifest config to define OpenSearch plugin dependency and verify if it is installed on the cluster ([#3116](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3116)) -- Replace re2 with RegExp in timeline and add unit tests ([#3908](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3908)) -- Hide any output from use_node checking for Node compatibility ([#4237](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4237)) -- Add category option within groups for context menus ([#4144](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4144)) -- [Saved Object Service] Add Repository Factory Provider ([#4149](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4149)) -- [Sample Data] Add visual consistency dashboard to sample logs data ([#4339](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4339), [#4619](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4619)) -- [@osd/pm] Fix `file:`-linked dependencies' resolution to improve ability to test with local packages ([#4342](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4342)) -- [Multiple DataSource] Backend support for adding sample data ([#4268](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4268)) -- Add configurable defaults and overrides to uiSettings ([#4344](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4344)) -- Update header logo selection logic to match the header's theme ([#4383](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4383)) -- Introduce new fonts for the Next theme ([#4381](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4381)) -- Bump OUI to `1.1.2` to make `anomalyDetection` icon available ([#4408](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4408)) -- Add `color-scheme` to the root styling ([#4477](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4477)) -- [Multiple DataSource] Frontend support for adding sample data ([#4412](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4412)) -- Enable plugins to augment visualizations with additional data and context ([#4361](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4361)) -- Dashboard De-Angularization ([#4502](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4502)) -- New management overview page and rename stack management to dashboard management ([#4287](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4287)) -- [Console] Add support for JSON with long numerals ([#4562](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4562)) -- [Vis Augmenter] Update base vis height in view events flyout ([#4535](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4535)) -- [Dashboard De-Angular] Add more unit tests for utils folder ([#4641](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4641)) -- [Dashboard De-Angular] Add unit tests for dashboard_listing and dashboard_top_nav ([#4640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4640)) -- Optimize `augment-vis` saved obj searching by adding arg to saved obj client ([#4595](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4595)) - -### 🐛 Bug Fixes - -- [Chore] Update deprecated url methods (url.parse(), url.format()) ([#2910](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2910)) -- Cleanup unused url ([#3847](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3847)) -- Fix `i18n` generation scripts ([#4252](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4252)) -- [Saved Objects Management] Fix relationships header overflow ([#4070](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4070)) -- Update main menu to display 'Dashboards' for consistency ([#4453](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4453)) -- [Multiple DataSource] Retain the original sample data API ([#4526](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4526)) -- Remove `lmdb-store` to fix backport issue ([#4266](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4266)) -- Fix Node.js download link ([#4556](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4556)) - -### 🚞 Infrastructure - -- Upgrade the backport workflow ([#4343](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4343)) -- [Lint] Add custom stylelint rules and config to prevent unintended style overrides ([#4290](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4290)) -- [Lint] Add stylelint rule to define properties that are restricted from being used ([#4374](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4374)) -- [Lint] Add stylelint rule to define values that are restricted from being used ([#4413](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4413)) -- [Lint] Add typing to Stylelint rules ([#4392](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4392)) -- [CI] Split build and verify into parallel jobs ([#4467](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4467)) - -### 📝 Documentation - -- [Saved Object Service] Adds design doc for new Saved Object Service Interface for Custom Repository [#3954](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3954) - -### 🛠 Maintenance - -- Adding @ZilongX and @Flyingliuhub as maintainers. ([#4137](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4137)) -- Add new MAINTAINERS to CODEOWNERS file. ([#4199](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4199)) -- Adding @BSFishy as maintainer. ([#4469](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4469)) - -### 🪛 Refactoring - -- [Table Visualization] Remove custom styling for text-align:center in favor of OUI utility class. ([#4164](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4164)) -- [Table Visualization] Replace div containers with OuiFlex components ([#4272](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4272)) -- Migrate from legacy elasticsearch client to opensearch-js client in `osd-opensearch-archiver` package([#4142](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4142)) -- Replace the use of `bluebird` in `saved_objects` plugin ([#4026](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4026)) -- Relocate tutorials imagery into `src/plugins/home/public/assets/tutorials/logos` ([#4382](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4382)) -- [VisBuilder] Use OUI icon ([#4446](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4446)) -- [Vis Colors] [Region Maps] Replace hardcode color to OUI color in `region_map` plugin ([#4299](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4299)) -- [Vis Colors] Replace color maps with OUI color palettes ([#4293](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4293)) -- [Vis Colors] [Maps] Replace hardcoded color to OUI color in `maps_legacy` plugin ([#4294](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4294)) -- [Vis Colors] [TSVB] Update default color in `vis_type_timeseries` to use `ouiPaletteColorBlind()[0]`([#4363](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4363)) -- [Vis Colors] [Timeline] Replace `vis_type_timeline` colors with `ouiPaletteColorBlind()` ([#4366](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4366)) -- [Vis Colors] Update legacy seed colors to use `ouiPaletteColorBlind()` ([#4348](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4348)) -- [Console] Migrate `/lib/mappings/` module to TypeScript ([#4008](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4008)) -- [Console] Migrate `/lib/autocomplete/` module to TypeScript ([#4148](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4148)) -- [Dashboard] Restructure the `Dashboard` plugin folder to be more cohesive with the project ([#4575](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4575)) -- [Chrome] Remove breadcrumb style overrrides ([#4621](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4621)) -- Replace tinymath with math.js ([#4492](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4492)) - -### 🔩 Tests - -- [Vis Augmenter Add UT for few fns ([#4516](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4516)) -- [BWC Tests] Add BWC tests for 2.7.0 and 2.8.0 ([#4023](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4023)) - -## [1.3.11 - 2023-06-29](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.11) - -### 🛡 Security - -- [CVE-2022-1537] Bump grunt from `1.5.2` to `1.5.3` ([#4276](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4276)) -- [CVE-2020-15366] Bump ajv from `4.11.8` to `6.12.6` ([#3769](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3769)) - -### 📈 Features/Enhancements - -### 🐛 Bug Fixes - -### 🚞 Infrastructure - -- Upgrade the backport workflow ([#4343](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4343)) - -### 📝 Documentation - -### 🛠 Maintenance - -## [2.8.0 - 2023-06-06](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.8.0) - -### Deprecations - -- Remove timeline application ([#3971](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3971)) - -### 🛡 Security - -- [CVE-2023-2251] Bump `yaml` to `2.2.2` ([#3947](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3947)) - -### 📈 Features/Enhancements - -- [Multiple Datasource] Support Amazon OpenSearch Serverless ([#3957](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3957)) -- Add support for Node.js >=14.20.1 <19 ([#4071](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4071)) -- Bundle Node.js 14 as a fallback for operating systems that cannot run Node.js 18 ([#4151](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4151)) -- Enhance grouping for context menus ([#3924](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3924)) - -### 🐛 Bug Fixes - -- [BUG] Fix bottom bar visibility using createPortal ([#3978](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3978)) -- [Dashboards Listing] Fix listing limit to utilize `savedObjects:listingLimit` instead of `savedObjects:perPage` ([#4021](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4021)) - -### 🚞 Infrastructure - -- Install chrome driver for functional tests from path set by environment variable `TEST_BROWSER_BINARY_PATH`([#3997](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3997)) -- Add threshold to code coverage config to prevent workflow failures ([#4040](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4040)) -- [CI] Skip checksum verification on OpenSearch snapshot for cypress tests ([#4188](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4188)) - -### 📝 Documentation - -### 🛠 Maintenance - -- Use `exec` in the CLI shell scripts to prevent new process creation ([#3955](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3955)) - -### 🪛 Refactoring - -### 🔩 Tests - -## [1.3.10 - 2023-05-18](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.7.0) - -### 🛡 Security - -- [CVE-2020-15366][1.x] Bump ajv from 4.11.8 to 6.12.6 ([#4035](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4035)) -- [CVE-2022-48285][1.x] Bump jszip from 3.7.1 to 3.10.1 ([#4011](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4011)) -- [CVE-2021-35065][1.x] Bump glob-parent from 6.0.0 to 6.0.2 ([#4005](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4005)) -- [CVE-2022-25851][1.x] Bump jpeg-js from 0.4.1 to 0.4.4 ([#3860](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3860)) -- [CVE-2022-25858][1.x] Bump terser from 4.8.0 to 4.8.1 ([#3786](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3786)) -- [CVE-2021-23490][1.x] Bump parse-link-header from 1.0.1 to 2.0.0 ([#3820](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3820)) -- [CVE-2021-3765][1.x] Bump validator from 8.2.0 to 13.9.0 ([#3753](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3753)) -- [CVE-2022-25758][1.x] Bump scss-tokenizer from 0.3.0 to 0.4.3 ([#3789](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3789)) -- [CVE-2021-3803][1.x] Bump nth-check from 1.0.2 to 2.0.1 ([#3745](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3745)) -- Bump highlight.js from 9.18.5 to 10.7.3 to solve security concerns ([#4062](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4062)) - -### 📈 Features/Enhancements - -- Add tooltip to help icon ([#3872](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3872)) - -### 🐛 Bug Fixes - -### 📝 Documentation - -- Update jest documentation links ([#3939](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3939)) - -### 🛠 Maintenance - -- Add threshold to code coverage changes for project ([#4050](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4050)) -- Temporarily hardcode chromedriver to 112.0.0 to enable all ftr tests ([#4039](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4039)) -- Update MAINTAINERS.md and CODEOWNERS ([#3938](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3938)) -- Add opensearch-dashboards-docker-dev to .gitignore ([#3781](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3781)) - -### 🪛 Refactoring - -### 🔩 Tests - -## [2.7.0 - 2023-05-02](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.7.0) - -### Deprecations - -### 🛡 Security - -- [CVE-2023-26486] Bump vega from `5.22.1` to `5.23.0` ([#3533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3533)) -- [CVE-2023-26487] Bump vega from `5.22.1` to `5.23.0` ([#3533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3533)) -- [CVE-2023-0842] Bump xml2js from `0.4.23` to `0.5.0` ([#3842](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3842)) -- [Multi DataSource] Add private IP blocking validation on server side ([#3912](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3912)) - -### 📈 Features/Enhancements - -- Add satisfaction survey link to help menu ([#3676](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3676)) -- Add `osd-xsrf` header to all requests that incorrectly used `node-version` to satisfy XSRF protection ([#3643](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3643)) -- [Dashboard] Add Dashboards-list integrations for Plugins ([#3090](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3090) ) -- [Data] Add geo shape filter field ([#3605](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3605)) -- [Doc Links] Add downgrade logic for branch in DocLinkService ([#3483](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3483)) -- [Monaco editor] Add json worker support ([#3424](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3424)) -- [Multiple DataSource] Allow create and distinguish index pattern with same name but from different datasources ([#3604](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3604)) -- [Multiple DataSource] Integrate multiple datasource with dev tool console ([#3754](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3754)) -- [Navigation] Remove unused tags ([#3964](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3964)) -- [Notifications] Add id to toast api for deduplication ([#3752](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3752)) -- [UI] Add support for comma delimiters in the global filter bar ([#3686](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3686)) -- [UI] Indicate that IE is no longer supported ([#3641](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3641)) -- [Vega] Add Filter custom label for opensearchDashboardsAddFilter ([#3640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3640)) -- [VisBuilder] Add metric to metric, bucket to bucket aggregation persistence ([#3495](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3495)) -- [VisBuilder] Add UI actions handler ([#3732](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3732)) -- [VisBuilder] Add persistence to visualizations inner state ([#3751](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3751)) -- [Console] Add support for exporting and restoring commands in Dev Tools ([#3810](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3810)) - -### 🐛 Bug Fixes - -- Clean up and rebuild `@osd/pm` ([#3570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3570)) -- Omit adding the `osd-version` header when the Fetch request is to an external origin ([#3643](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3643)) -- [Console] Fix/update documentation links in Dev Tools console ([#3724](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3724)) -- [Console] Fix dev tool console autocomplete not loading issue ([#3775](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3775)) -- [Console] Fix dev tool console run command with query parameter error ([#3813](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3813)) -- [Table Visualization] Fix table rendering empty unused space ([#3797](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3797)) -- [Table Visualization] Fix data table not adjusting height on the initial load ([#3816](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3816)) -- [Timeline] Fix y-axis label color in dark mode ([#3698](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3698)) -- [TSVB] Fix undefined serial diff aggregation documentation link ([#3503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3503)) -- [UI] Add clarifying tooltips to header navigation icons ([#3626](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3626)) -- [VisBuilder] Fix multiple warnings thrown on page load ([#3732](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3732)) -- [VisBuilder] Fix Firefox legend selection issue ([#3732](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3732)) -- [VisBuilder] Fix type errors ([#3732](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3732)) -- [VisBuilder] Fix indexpattern selection in filter bar ([#3751](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3751)) -- [Console] Fix dev tool console autocomplete not loading issue for aliases ([#5568](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5568)) - -### 🚞 Infrastructure - -- Use mirrors to download Node.js binaries to escape sporadic 404 errors ([#3619](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3619)) -- [CI] Update NOTICE file, add validation to GitHub CI ([#3051](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3051)) -- [CI] Reduce redundancy by using matrix strategy on Windows and Linux workflows ([#3514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3514)) -- [Darwin] Add support for Darwin for running OpenSearch snapshots with `yarn opensearch snapshot` ([#3537](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3537)) - -### 📝 Documentation - -- Correct copyright date range of NOTICE file and notice generator ([#3308](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3308)) -- Simplify the in-code instructions for upgrading `re2` ([#3328](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3328)) -- [Doc] Improve DEVELOPER_GUIDE to make first time setup quicker and easier ([#3421](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3421)) -- [Doc] Update DEVELOPER_GUIDE with added manual bootstrap timeout solution and max virtual memory error solution with docker ([#3764](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3764)) -- [Doc] Add second command to install yarn step in DEVELOPER_GUIDE ([#3633](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3633)) -- [Doc] Add docker dev set up instruction ([#3444](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3444)) -- [Doc] Add docker files and instructions for debugging Selenium functional tests ([#3747](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3747)) -- [Doc] Update SECURITY with instructions for nested dependencies and backporting ([#3497](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3497)) -- [TSVB] Fix typo in TSVB README ([#3518](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3518)) -- [UI Actions] Improve UI actions explorer ([#3614](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3614)) - -### 🛠 Maintenance - -- Relax the Node.js requirement to `^14.20.1` ([#3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463)) -- Bump the version of Node.js installed by `nvm` to `14.21.3` ([#3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463)) -- Allow selecting the Node.js binary using `NODE_HOME` and `OSD_NODE_HOME` ([#3508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3508)) -- Remove the unused `renovate.json5` file ([#3489](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3489)) -- Bump `styled-components` from `5.3.5` to `5.3.9` ([#3678](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3678)) -- [Timeline] Update default expressions from `.es(*)` to `.opensearch(*)`. ([#2720](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2720)) - -### 🪛 Refactoring - -- Remove automatic addition of `osd-version` header to requests outside of OpenSearch Dashboards ([#3643](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3643)) -- [Console] Replace jQuery usage in console plugin with native methods ([#3733](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3733)) -- [Doc Links] Clean up docs_link_service organization so that strings are in the right categories. ([#3685](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3685)) -- [I18n] Fix Listr type errors and error handlers ([#3629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3629)) -- [Multiple DataSource] Refactor dev tool console to use opensearch-js client to send requests ([#3544](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3544)) -- [Multiple DataSource] Present the authentication type choices in a drop-down ([#3693](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3693)) -- [Table Visualization] Move format table, consolidate types and add unit tests ([#3397](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3397)) - -### 🔩 Tests - -- Update caniuse to `1.0.30001460` to fix failed integration tests ([#3538](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3538)) -- [Tests] Fix unit tests for `get_keystore` ([#3854](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3854)) -- [BWC Tests] Add BWC tests for 2.7.0 and 2.8.0 ([#4023](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4023)) - -## [1.3.9 - 2023-04-04](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.9) - -### 🛡 Security - -- [CVE-2022-2499] Resolve qs from 6.5.2 and 6.7.0 to 6.11.0 in 1.x ([#3451](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3451)) -- [CVE-2020-36632] [REQUIRES PLUGIN VALIDATION] Bump flat from 4.1.1 to 5.0.2 ([#3539](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3539)). To the best of our knowledge, this is a non-breaking change, but if your plugin relies on `mocha` tests, validate that they still work correctly (and plan to migrate them to `jest` [in preparation for `mocha` deprecation](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1572). -- [CVE-2023-25653] Bump node-jose to 2.2.0 ([#3445](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3445)) -- [CVE-2021-23807] Bump jsonpointer from 4.1.0 to 5.0.1 ([#3535](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3535)) -- [CVE-2021-23424] Bump ansi-html from 0.0.7 to 0.0.8 ([#3536](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3536)) -- [CVE-2022-24999] Bump express from 4.17.1 to 4.18.2 ([#3542](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3542)) - -### 📈 Features/Enhancements - -- [I18n] Register ru, ru-RU locale ([#2817](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2817)) - -### 🐛 Bug Fixes - -- [TSVB] Fix the link to "serial differencing aggregation" documentation ([#3503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3503)) - -### 📝 Documentation - -- [TSVB] Fix a spelling error in the README file ([#3518](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3518)) -- Simplify the in-code instructions for upgrading `re2` ([#3328](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3328)) -- [Doc] Improve DEVELOPER_GUIDE to make first time setup quicker and easier ([#3421](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3421)) - -### 🛠 Maintenance - -- Update MAINTAINERS.md formatting and maintainer list ([#3338](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3338)) -- Remove `github-checks-reporter`, an unused dependency ([#3126](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3126)) -- [Version] Increment to 1.3.9 ([#3375](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3375)) -- Remove the unused `renovate.json5` file ([3489](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3489)) - -## [2.6.0 - 2023-02-28](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.6.0) - -### Deprecations - -- [CVE-2020-36632] [REQUIRES PLUGIN VALIDATION] Bump flat from `4.1.1` to `5.0.2` ([#3419](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3419)). To the best of our knowledge, this is a non-breaking change, but if your plugin relies on `mocha` tests, validate that they still work correctly (and plan to migrate them to `jest` [in preparation for `mocha` deprecation](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1572). - -### 🛡 Security - -- [CVE-2022-37599] Bump loader-utils from `2.0.3` to `2.0.4` ([#3318](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3318)) -- [CVE-2022-37603] Bump loader-utils from `2.0.3` to `2.0.4` ([#3318](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3318)) -- [CVE-2022-25860] Bump simple-git from `3.15.1` to `3.16.0` ([#3345](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3345)) -- [CVE-2022-25881] Resolve http-cache-semantics from `4.1.0` to `4.1.1` ([#3409](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3409)) -- [Security] Bump hapi/statehood from `7.0.3` to `7.0.4` ([#3411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3411)) -- [CVE-2023-25166] Bump formula from `3.0.0` to `3.0.1` ([#3416](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3416)) -- [CVE-2020-36632] [REQUIRES PLUGIN VALIDATION] Bump flat from `4.1.1` to `5.0.2` ([#3419](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3419)). To the best of our knowledge, this is a non-breaking change, but if your plugin relies on `mocha` tests, validate that they still work correctly (and plan to migrate them to `jest` [in preparation for `mocha` deprecation](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1572). -- [CVE-2023-25653] Bump node-jose from `2.1.1` to `2.2.0` ([#3445](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3445)) -- [CVE-2022-24999] Resolve qs from `6.5.3` to `6.11.0` ([#3450](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3450)) -- [CVE-2022-25758] Bump node-sass from `6.0.1` to `7.0.3` and sass-loader from `10.2.1` to `10.4.1` to bump scss-tokenizer from `0.2.3` to `0.4.3` ([#3455](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3455)) -- [CVE-2020-24025] Bump node-sass from `6.0.1` to `7.0.3` ([#3455](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3455)) - -### 📈 Features/Enhancements - -- Add disablePrototypePoisoningProtection configuration to prevent JS client from erroring when cluster utilizes JS reserved words ([#2992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2992)) -- [Multiple DataSource] Add support for SigV4 authentication ([#3058](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3058)) -- [Multiple DataSource] Refactor test connection to support SigV4 auth type ([#3456](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3456)) -- [Multiple Datasource] Add datasource picker to import saved object flyout when multiple data source is enabled ([#5781](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5781)) - -### 🐛 Bug Fixes - -- [Search Telemetry] Fix search telemetry's observable object that won't be GC-ed([#3390](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3390)) -- [Region Maps] Add ui setting to configure custom vector map's size parameter([#3399](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3399)) - -### 🚞 Infrastructure - -- Fix detection of Chrome's version on Darwin during CI ([#3296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3296)) - -### 📝 Documentation - -- [Docs] Fix documentation link for date math ([#3207](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3207)) - -### 🛠 Maintenance - -- Bump `re2` and `supertest` ([#3018](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3018)) -- Upgrade vega-tooltip to `0.30.0` to support custom tooltips ([#3359](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3359)) -- Allow relaxing the Node.js runtime version requirement ([#3402](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3402)) -- Make build scripts find and use the latest version of Node.js that satisfies `engines.node` ([#3467](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3467)) -- Add `@opensearch-project/opensearch@^2.x` as dependency aliased as `@opensearch-project/opensearch-next` ([#3469](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3469)) - -### 🪛 Refactoring - -### 🔩 Tests - -- [BWC Tests] Add BWC tests for `2.6.0` ([#3356](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3356)) -- Prevent primitive linting limitations from being applied to unit tests found under `src/setup_node_env` ([#3403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3403)) - -## [1.3.8 - 2023-02-15](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.8) - -### 🛡 Security - -- [CVE-2022-25901] Bump supertest from 2.0.5 to 2.0.12 ([#3326](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3326)) -- [CVE-2022-25860] Bump simple-git from 3.15.1 to 3.16.0 ([#3345](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3345)) -- [CVE-2022-46175] Bump json5 version from 1.0.1 and 2.2.1 to 1.0.2 and 2.2.3 ([#3201](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3201)) -- [CVE-2022-25912] Bump simple-git from 3.4.0 to 3.15.0 ([#3036](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3036)) -- Bump decode-uri-component from 0.2.0 to 0.2.2 ([#3009](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3009)) - -### 🐛 Bug Fixes - -- [BUG] Fixes misleading embeddable plugin error message ([#3043](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3043)) -- [BUG] Trim trailing slashes before checking no-restricted-path rule ([#3020](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3020)) - -### 🚞 Infrastructure - -- Lock workflow tests to Chrome and ChromeDriver 107 as the last combination that run on Node.js v10 ([#3299](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3299)) -- Update yarn timeout for GitHub workflow on Windows ([#3118](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3118)) -- Add Windows CI to the GitHub workflow ([#2966](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2966)) - -### 📝 Documentation - -- Fix documentation link for date math ([#3207](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3207)) - -### 🔩 Tests - -- [BWC] Updates to BWC tests ([#1190](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1190)) -- Automates chromedriver version selection for tests ([#2990](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2990)) - -## [2.5.0 - 2023-01-25](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.5.0) - -### 🛡 Security - -- Introduce guidelines for reporting vulnerable dependencies ([#2674](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2674)) -- Bump decode-uri-component from 0.2.0 to 0.2.2 ([3009](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3009)) -- [CVE-2022-25912] Bump simple-git from 3.4.0 to 3.15.0 ([#3036](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3036)) -- [CVE-2022-35256] Bump node version from 14.20.0 to 14.20.1 [#3166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3166)) -- [CVE-2022-46175] Bump json5 version from 1.0.1 and 2.2.1 to 1.0.2 and 2.2.3 ([#3201](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3201)) - -### 📈 Features/Enhancements - -- [CLI] Enhance `yarn opensearch snapshot` to facilitate installing plugins on an OpenSearch cluster ([#2734](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2734)) -- [I18n] Register ru, ru-RU locale ([#2817](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2817)) -- [Multi DataSource] Introduce validation of new or modified connections to external data sources ([#2973](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2973), [#3110](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3110)) -- [VisBuilder] Create global data persistence for VisBuilder ([#2896](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2896)) -- [VisBuilder] Introduce Redux store persistence ([#3088](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3088)) -- [VisBuilder] Enable persistence for app filter and query without using state containers ([#3100](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3100)) -- [Data] Make the newly created configurations get added to beginning of the `aggConfig` array when using `createAggConfig` ([#3160](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3160)) -- [Optimizer] Increase the amount of time an optimizer worker is provided to exit before throwing an error ([#3193](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193)) - -### 🐛 Bug Fixes - -- Upgrade the `del` library to fix a race condition on macOS ([#2847](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2873)) -- [Table Visualization] Fix a problem with table visualizations that prevented URLs from being rendered correctly ([#2918](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2918)) -- [Embeddable] Fix a misleading error message ([#3043](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3043)) -- Fix rendering issues when the obsolete `v8 (beta)` theme was carried over by an upgrade ([#3045](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3045)) -- [Multi Datasource] Replace the mock URL in tests ([#3099](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3099)) -- [CI] Increase Yarn's timeout for installing dependencies in workflows ([#3118](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3118)) -- [VisBuilder] Fix an issue that caused a crash when certain filters were added to a table visualization ([#3210](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3210)) -- [VisBuilder] Fix errors throws when pipeline aggregations, like cumulative sum, were used in VisBuilder ([#3137](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3137)) -- [Region Maps] Fix the problem of join fields being unusable ([#3213](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3213)) -- [Multi DataSource] Update test connection button text ([#3247](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3247)) - -### 🚞 Infrastructure - -- Bump the version of the `2.x` branch to 2.5.0 ([#2884](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2884)) -- [CI] Create workflows that test and build on Windows ([#2966](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2966)) -- [CI] Automate ChromeDriver installation for running functional tests ([#2990](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2990)) -- Create the Release Notes for the 1.3.7 release ([#3066](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3066)) -- [CI] Improve workflows by retaining Yarn's cache folder ([#3194](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3194)) - -### 📝 Documentation - -- Publish the release runbook ([#2533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2533)) -- Document the capabilities of the Charts plugin and its current usage ([#2695](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2695)) -- Document the correct version selection switch in `@osd/plugin-helpers` ([#2810](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2810)) -- Document the global query persistence ([#3001](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3001)) -- Document data persistence for plugins ([#3081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3081)) - -### 🪛 Refactoring - -- [VisBuilder] Extend the use of i18n ([#2867](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2867)) -- [Console] Switch to using `core.http` when calling OSD APIs in console ([#3080](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3080)) -- [Table Visualization] Refactor table visualization using React and DataGrid component ([#2863](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2863)) - -### 🛠 Maintenance - -- Remove an unused dependency on `github-checks-reporter` ([#3126](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3126)) -- Introduce `vega-lite@5`, aliased as `vega-lite-next` ([#3151](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3151)) - -### 🔩 Tests - -- Enable retrying of flaky tests ([#2967](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2967)) -- Enhance cross-platform testing of plugin installation on cluster snapshots ([#2994](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2994)) -- [Tests] Bump `chromedriver` to v107 ([#3017](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3017)) -- [CI] Disable the execution of the Build and Test workflow when the changes are limited to the docs folder ([#3197](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3197)) -- Correct the linting logic for `no-restricted-path` to ignore trailing slashes ([#3020](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3020)) -- [VisBuilder] Create unit tests for field utilities ([#3211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3211)) - -## [2.4.1 - 2022-12-14](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.4.1) - -### 🐛 Bug Fixes - -- Update `leaflet-vega` and fixed its usage ([#3005](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3005)) - -### 🔩 Tests - -- Correct the linting logic for `no-restricted-path` to ignore trailing slashes ([#3020](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3020)) - -## [1.3.7 - 2022-12-14](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.7) - -### 🛡 Security - -- [CVE-2022-0144] Bump shelljs from 0.8.4 to 0.8.5 ([#2511](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2511)) -- [Legacy Maps Plugin] Prevent reverse-tabnabbing ([#2540](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2540)) -- [CVE-2022-3517] Bump minimatch from 3.0.4 to 3.0.5 and [IBM X-Force ID: 220063] unset-value from 1.0.1 to 2.0.1 ([#2640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2640)) -- [CVE-2022-0155] Bump follow-redirects to 1.15.2 ([#2653](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2653)) -- [CVE-2022-0536] Bump follow-redirects to 1.15.2 ([#2653](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2653)) -- [CVE-2021-24033] Remove storybook package ([#2660](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2660)) -- [CVE-2021-42740] Remove storybook package ([#2660](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2660)) -- [CVE-2022-23647] Bump prismjs to 1.29.0 ([#2668](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2668)) -- [CVE-2022-37599] Bump loader-utils to 2.0.4 ([#2995](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2995)) -- [CVE-2022-37603] Bump loader-utils to 2.0.4 ([#2995](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2995)) - -### 📈 Features/Enhancements - -- [Windows] Facilitate building and running OSD and plugins on Windows platforms ([#2601](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2601)) -- [Windows] Add helper functions to work around the differences of platforms ([#2681](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2681)) -- [Windows] Add `@osd/cross-platform` package to standardize path handling across platforms ([#2703](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2703)) - -### 🐛 Bug Fixes - -- [Chore] Visualize link fix [#2395](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2395) -- [BUG] Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607)) -- Remove Leftover X Pack references ([#2638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2638)) -- Bump `del` version to fix MacOS race condition ([#2847](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2873)) -- Temporary workaround for task-kill exceptions on Windows when it is passed a pid for a process that is already dead ([#2842](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2842)) -- [Build] Fixed "Last Access Time" not being set by `scanCopy` on Windows ([#2964](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2964)) -- Update `leaflet-vega` and fix its usage ([#3005](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3005)) - -### 🚞 Infrastructure - -- Update backport custom branch name to utilize head template ([#2766](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2766)) - -### 📝 Documentation - -- Add the release runbook to RELEASING.md ([#2533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2533)) -- Security-CVEs fixes guidelines [#2674](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2674) -- Correct README and help command of osd-plugin-helpers ([#2810](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2810)) - -### 🛠 Maintenance - -- Increment version to 1.3.7 [#2528](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2528) - -### 🔩 Tests - -- Bump `chromedriver` to 106 to fix function test fail issue [#2514](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2514) -- Fix incorrect validation of time values in JUnit Reporter ([#2965](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2965)) - -## [2.4.0 - 2022-11-15](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/2.4.0) - -### 🛡 Security - -- Bump percy-agent to use non-beta version ([#2415](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2415)) -- Use a forced CSP-compliant interpreter with Vega visualizations ([#2352](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2352)) -- [CVE-2022-33987] Bump makelogs to remove dependency on got ([#2801](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2801)) -- [CVE-2022-33987] Upgrade geckodriver to 3.0.2 ([#2166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2166)) -- [CVE-2022-3517] Bump minimatch to 3.0.5 and [IBM X-Force ID: 220063] unset-value to 2.0.1 ([#2640](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2640)) -- [CVE-2022-37601] Bump loader-utils to 2.0.3 ([#2706](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2706)) -- [GMS-2022-4708] Resolve sub-dependent d3-color version and potential security issue ([#2454](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2454)) -- [Legacy Maps] Prevent reverse-tabnabbing ([#2540](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2540)) -- [WS-2022-0284] [WS-2022-0280] Bump moment-timezone from 0.5.34 to 0.5.37 ([#2361](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2361)) -- [Multi DataSource] Prevent spell-checking the password fields ([#2818](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2818)) - -### 📈 Features/Enhancements - -- Add DataSource service and DataSourceSelector for multiple datasource support ([#5167](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5167)) -- Add extension point in saved object management to register namespaces and show filter ([#2656](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2656)) -- Add updated_at column to Saved Objects' tables ([#1218](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1218)) -- Change the links in the visualize plugin to use `href` rather than `onClick` ([#2395](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2395)) -- Improve Discover field summaries ([#2391](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2391)) -- Remove Add Integration button ([#2723](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2723)) -- [Multi DataSource] Add data source column into index pattern table ([#2542](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2542)) -- [Multi DataSource] Add data source config to opensearch-dashboards-docker ([#2557](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2557)) -- [Multi DataSource] Add data source signing support ([#2510](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2510)) -- [Multi DataSource] Add experimental callout for index pattern section ([#2523](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2523)) -- [Multi DataSource] Address UX comments on Data source list and create page ([#2625](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2625)) -- [Multi DataSource] Apply get indices error handling in step index pattern ([#2652](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2652)) -- [Multi DataSource] Display error toast for create index pattern with data source ([#2506](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2506)) -- [Multi DataSource] Make text content dynamically translated & update unit tests ([#2570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2570)) -- [Multi DataSource] Support legacy client for data source ([#2204](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2204)) -- [Multi DataSource] UX enhancement on Data source management creation page ([#2051](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2501)) -- [Multi DataSource] UX enhancement on Data source management stack ([#2521](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2521)) -- [Multi DataSource] UX enhancement on Index Pattern management stack ([#2505](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2505))([#2527](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2527)) -- [Multi DataSource] UX enhancement on Update stored password modal for Data source management stack ([#2532](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2532)) -- [Plugin Helpers] Facilitate version changes ([#2398](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2398)) -- [VisBuilder] Add an experimental table visualization in vis builder ([#2705](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2705)) -- [VisBuilder] Add field summary popovers ([#2682](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2682)) -- [VisBuilder] Add index pattern info when loading embeddable ([#2363](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2363)) -- [VisBuilder] Add state validation before dispatching and loading ([#2351](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2351)) -- [VisBuilder] Change VisBuilder flag for docker config ([#2804](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2804)) -- [VisBuilder] Change classname prefix wiz to vb ([#2581](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2581/files)) -- [VisBuilder] Change save object type, wizard id and name to visBuilder ([#2673](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2673)) -- [VisBuilder] Change wizard to vis_builder in file names and paths ([#2587](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2587)) -- [VisBuilder] Create a new wizard directly on a dashboard ([#2384](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2384)) -- [VisBuilder] Edit wizard directly on dashboard ([#2508](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2508)) -- [VisBuilder] Enable VisBuilder by default ([#2725](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2725)) -- [VisBuilder] Rename wizard on save modal and visualization table ([#2645](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2645)) -- [VisBuilder] Rename wizard to visBuilder in class name, type name and function name ([#2639](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2639)) -- [VisBuilder] Rename wizard to visBuilder in i18n id and formatted message id ([#2635](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2635)) -- [Windows] Add cross-platform helpers ([#2681](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2681)) -- [Windows] Consume `@osd/cross-platform` package to standardize path handling across platforms ([#2703](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2703)) -- [Windows] Facilitate building and running OSD and plugins on Windows platforms ([#2601](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2601)) - -### 🐛 Bug Fixes - -- Fix management app breadcrumb error ([#2344](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2344)) -- Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607)) -- Remove Leftover X Pack references ([#2638](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2638)) -- [Multi DataSource] Add data source param to low-level search call in Discover ([#2431](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2431)) -- [Multi DataSource] Address UX comments on Edit Data source page ([#2629](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2629)) -- [Multi DataSource] Address UX comments on index pattern management stack ([#2611](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2611)) -- [Multi DataSource] Enhance data source error handling ([#2661](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2661)) -- [Multi DataSource] Skip data source view in index pattern step when default is chosen ([#2574](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2574)) -- [Multi DataSource] Update default audit log path ([#2793](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2793)) -- [Save Object Aggregation View] Fix for export all after scroll count response changed ([#2696](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2696)) -- [VisBuilder] Add additional aggregation parameters to Vislib charts (Bar, Line and Area) ([#2610](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2610)) -- [VisBuilder] Add missing test subject property of `DisabledVisualization` ([#2610](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2610)) -- [VisBuilder] Fix Date Histogram auto bounds showing per 0 millisecond ([#2632](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2632)) -- [VisBuilder] Fix Histogram updating bounds when date range updates ([#2632](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2632)) -- [VisBuilder] Fix auto bounds for time-series bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) -- [VisBuilder] Fix broken UX after switching index pattern while editing an aggregation ([#2632](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2632)) -- [VisBuilder] Fix rendering issues with time series for new chart types ([#2309](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2309)) -- [VisBuilder] Fix the missing `Last Updated` timestamp in visualization list ([#2628](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2628)) -- [VisBuilder] Fix visualization shift when editing an aggregation ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) -- [VisBuilder] Rename "Histogram" to "Bar" in visualization type picker ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401)) -- [Table Visualization] Fix an issue preventing sorting the first column ([#2828](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2828)) -- Temporary workaround for task-kill exceptions on Windows when it is passed a pid for a process that is already dead ([#2842](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2842)) - -### 🚞 Infrastructure - -- Add CHANGELOG.md and related workflows ([#2414](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2414)) -- Update WhiteSource scans to ignore Backward Compatibility artifacts in `cypress` ([#2408](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2408)) -- [CI] Add Backward Compatibility tests for 2.4.0 ([#2393](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2393)) -- [CI] Add path ignore for markdown files ([#2312](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2312)) -- [CI] Prevent backport workflow from running on unmerged PRs ([#2746](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2746)) -- [CI] Run functional test repo as workflow ([#2503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2503)) -- [CI] Update backport custom branch name ([#2766](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2766)) -- [CI] Update backport workflow to ignore changelog conflicts ([#2729](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2729)) - -### 📝 Documentation - -- Add CHANGELOG.md and Release Notes for 2.4.0 ([#2809](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2809)) -- Add README.md for `dataSource` and `dataSourceManagement` plugins ([#2448](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2448)) -- Add README.md for saving index pattern relationship ([#2276](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2276)) -- Remove a repeated "to" from the README.md file ([#2403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2403)) -- Update functional testing information in TESTING.md ([#2492](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2492)) -- [Multi DataSource] Add design documents of multiple data source feature [#2538](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2538) -- [Multi DataSource] Add sample configuration for multi data source to the yml template ([#2428](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2428)) -- [Multi DataSource] Tweak multiple data source design doc ([#2724](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2724)) -- [Multi DataSource] Update MD data source documentation link ([#2693](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2693)) - -### 🔩 Tests - -- Update caniuse to fix failed integration tests ([#2322](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322)) -- [Multi DataSource] Add unit test coverage for Update Data source management stack ([#2567](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2567)) -- [VisBuilder] Enable VisBuilder cypress tests ([#2728](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2728)) - -### 🛠 Maintenance - -- Add @zengyan-amazon as a maintainer ([#2419](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2419)) -- Increment from 2.3 to 2.4. ([#2295](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2295)) -- Add CHANGELOG.md for 2.4.0 ([#2809](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2809)) - -## [1.3.6 - 2022-10-06](https://github.com/opensearch-project/OpenSearch-Dashboards/releases/tag/1.3.6) - -### 🛡 Security - -- [CVE-2021-3807] Resolves ansi-regex to v5.0.1 ([#2425](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2425)) -- [CVE-2022-23713] Handle invalid query, index and date in vega charts filter handlers ([#1932](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1932)) -- Use a forced CSP-compliant interpreter with Vega visualizations ([#2352](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2352)) -- Bump moment-timezone from 0.5.34 to 0.5.37 ([#2361](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2361)) - -### 📈 Features/Enhancements - -- Custom healthcheck with filters ([#2232](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2232), [#2277](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2277)). To configure see example in [config/opensearch_dashboards.yml](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/6e2ec97459ae179c86201c611ce744c2c24ce150/config/opensearch_dashboards.yml#L44-L46) - -### 🚞 Infrastructure - -- Add CHANGELOG.md and related workflows ([#2414](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2414)) -- Extends plugin-helpers to be used for automating version changes ([#2398](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2398),[#2486](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2486)) - -### 🛠 Maintenance - -- Version Increment to 1.3.6 ([#2420](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2420)) - -### 🔩 Tests - -- Update caniuse to fix failed integration tests ([#2322](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322)) +- Changed default theme [#174](https://github.com/wazuh/wazuh-dashboard/pull/174) +- Changed default logos and main menu app categories [141](https://github.com/wazuh/wazuh-dashboard/pull/141) +- Changed default value of useExpandedHeader to false [#247](https://github.com/wazuh/wazuh-dashboard/pull/247) +- Changed build number to match the Wazuh standard [#284](https://github.com/wazuh/wazuh-dashboard/pull/284) diff --git a/README.md b/README.md index 0bd86bec6560..c4c1bf3909c2 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,41 @@ - +
+ +
- [Welcome!](#welcome) - [Project Resources](#project-resources) -- [Code of Conduct](#code-of-conduct) +- [Wazuh UI](#wazuh-ui) - [License](#license) - [Copyright](#copyright) ## Welcome -OpenSearch Dashboards is an open-source data visualization tool designed to work with OpenSearch. OpenSearch Dashboards gives you data visualization tools to improve and automate business intelligence and support data-driven decision-making and strategic planning. +Wazuh dashboard is a fork of the [OpenSearch Dashboards][opensearch-dashboards] which +incorporate changes to make it easier to use for Wazuh users. Our aim is to contribute +back any work not tied specifically to Wazuh. -We aim to be an exceptional community-driven platform and to foster open participation and collective contribution with all contributors. Stay up to date on what's happening with the OpenSearch Project by tracking GitHub [issues](https://github.com/opensearch-project/OpenSearch-Dashboards/issues) and [pull requests](https://github.com/opensearch-project/OpenSearch-Dashboards/pulls). +Wazuh is a security detection, visibility, and compliance open-source project. Wazuh +helps you to gain deeper security visibility into your infrastructure by monitoring +hosts at an operating system and application level. -You can [contribute to this project](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/CONTRIBUTING.md) by [opening issues](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/new/choose) to give feedback, share ideas, identify bugs, and contribute code. - -Set up your [OpenSearch Dashboards development environment](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md#getting-started-guide) today! The project team looks forward to your contributions. - -## Code Summary - -[![Build and Test][build-and-test-badge]][build-and-test-link] -[![Unit Test Code Coverage][codecov-badge]][codecov-link] -[![Link Checker][link-checker-badge]][link-checker-link] +You can learn more about it at [wazuh.com][wazuh-web]. ## Project Resources -- [Project Website](https://opensearch.org/) -- [Downloads](https://opensearch.org/downloads.html) -- [Documentation](https://opensearch.org/docs/) -- Need help? See the [communication guide](COMMUNICATIONS.md) for various options -- [Project Principles](https://opensearch.org/#principles) +- [Project Website][wazuh-web] +- [Documentation][wazuh-docs] +- Need help? Joins us on [Slack][slack-invite]! - [Developer Guide](DEVELOPER_GUIDE.md) -- [Contributing to OpenSearch](CONTRIBUTING.md) +- [Contributing](CONTRIBUTING.md) - [Maintainer Responsibilities](MAINTAINERS.md) - [Release Management](RELEASING.md) - [Testing](TESTING.md) - [Security](SECURITY.md) -## Code of Conduct +## Wazuh UI -This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [opensource-codeofconduct@amazon.com](mailto:opensource-codeofconduct@amazon.com) with any additional questions or comments. +This repository is not a new Wazuh UI, but the platform on which Wazuh UI will run. +The UI can be found on its own [repository][wazuh-plugin]. ## License @@ -46,11 +43,13 @@ This project is licensed under the [Apache v2.0 License](LICENSE.txt). ## Copyright -Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details. +- Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details. +- Copyright Wazuh, Inc. + + -[build-and-test-badge]: https://github.com/opensearch-project/OpenSearch-Dashboards/actions/workflows/build_and_test_workflow.yml/badge.svg -[build-and-test-link]: https://github.com/opensearch-project/OpenSearch-Dashboards/actions/workflows/build_and_test_workflow.yml -[codecov-badge]: https://codecov.io/gh/opensearch-project/OpenSearch-Dashboards/branch/main/graphs/badge.svg -[codecov-link]: https://app.codecov.io/gh/opensearch-project/OpenSearch-Dashboards -[link-checker-badge]: https://github.com/opensearch-project/OpenSearch-Dashboards/actions/workflows/links_checker.yml/badge.svg -[link-checker-link]: https://github.com/opensearch-project/OpenSearch-Dashboards/actions/workflows/links_checker.yml +[opensearch-dashboards]: https://github.com/opensearch-project/OpenSearch-Dashboards +[wazuh-plugin]: https://github.com/wazuh/wazuh-kibana-app +[wazuh-web]: https://wazuh.com +[wazuh-docs]: https://documentation.wazuh.com +[slack-invite]: https://join.slack.com/t/wazuh/shared_invite/zt-1lgu531ur-7M_k_ZQbpdo4QCn_pHee3w diff --git a/SECURITY.md b/SECURITY.md index 22c3b51933e3..164723b5d872 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,67 +1,45 @@ -## Reporting a Vulnerability +# Wazuh Open Source Project Security Policy -If you discover a potential security issue in this project we ask that you notify OpenSearch Security directly via email to security@opensearch.org. Please do **not** create a public GitHub issue. +Version: 2023-06-12 -## Fixing a Vulnerability +## Introduction +This document outlines the Security Policy for Wazuh's open source projects. It emphasizes our commitment to maintain a secure environment for our users and contributors, and reflects our belief in the power of collaboration to identify and resolve security vulnerabilities. -- For direct dependencies (listed explicitly in `package.json`) - After identifying a version of the package that is both compatible with OpenSearch Dashboards and includes a fix for the vulnerability, update the dependency in `package.json` and run `yarn osd bootstrap` to build the project and update the `yarn.lock` file. +## Scope +This policy applies to all open source projects developed, maintained, or hosted by Wazuh. -- For nested dependencies (sub-dependencies) +## Reporting Security Vulnerabilities +If you believe you've discovered a potential security vulnerability in one of our open source projects, we strongly encourage you to report it to us responsibly. - - Check the package range in package.json: Open the `package.json` file and locate the dependency entry for the package you're interested in. The version range is specified after the package name, using a combination of version numbers and symbols. Examples of version ranges are ^1.0.0, ~1.0.0, or >=1.0.0 <2.0.0. Ensure that the desired version falls within the specified range. +Please submit your findings as security advisories under the "Security" tab in the relevant GitHub repository. Alternatively, you may send the details of your findings to [security@wazuh.com](mailto:security@wazuh.com). - - Check the desired version in `yarn.lock`: Open the `yarn.lock` file and search for the package name. If the package is listed, check the version number specified for the package. Compare this version number with the desired version. +## Vulnerability Disclosure Policy +Upon receiving a report of a potential vulnerability, our team will initiate an investigation. If the reported issue is confirmed as a vulnerability, we will take the following steps: - - If the package range is suitable but `yarn.lock` does not include the desired version, edit the `yarn.lock` file and remove the lines corresponding to the package. Then, run `yarn osd bootstrap` to have the latest version of the package, that satisfies the range from `package.json`, added to `yarn.lock`. +1. Acknowledgment: We will acknowledge the receipt of your vulnerability report and begin our investigation. +2. Validation: We will validate the issue and work on reproducing it in our environment. +3. Remediation: We will work on a fix and thoroughly test it +4. Release & Disclosure: After 90 days from the discovery of the vulnerability, or as soon as a fix is ready and thoroughly tested (whichever comes first), we will release a security update for the affected project. We will also publicly disclose the vulnerability by publishing a CVE (Common Vulnerabilities and Exposures) and acknowledging the discovering party. +5. Exceptions: In order to preserve the security of the Wazuh community at large, we might extend the disclosure period to allow users to patch their deployments. - - If the package range is not suitable and there is no resolutions or the package range in the resolutions is not correct, we can add or update version in the resolutions for all the package sub-deps or specific package sub-dep. For more on version updates please see [Why](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/#toc-why-would-you-want-to-do-this) and [How](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/#toc-how-to-use-it) to upgrade. +This 90-day period allows for end-users to update their systems and minimizes the risk of widespread exploitation of the vulnerability. - ``` - Example: If foobar@1.x exists for subdeps in yarn.lock file. But foobar@1.y is the target version. +## Automatic Scanning +We leverage GitHub Actions to perform automated scans of our supply chain. These scans assist us in identifying vulnerabilities and outdated dependencies in a proactive and timely manner. - Step 1: remove the entry from lockfile and bootstrap; if a suitable version was installed, you can stop. - Step 2: use resolutions to require a specific range for the nested dependency in package.json: - 'resolutions': { "**/foobar": "^1.y", - "**/foo": "^2.x" , - "**/bar": "^3.k"} - Step 3: repeat step 1 +## Credit +We believe in giving credit where credit is due. If you report a security vulnerability to us, and we determine that it is a valid vulnerability, we will publicly credit you for the discovery when we disclose the vulnerability. If you wish to remain anonymous, please indicate so in your initial report. - ``` +We do appreciate and encourage feedback from our community, but currently we do not have a bounty program. We might start bounty programs in the future. - Please be aware of that fixing nested dependencies can be tricky. Sometimes, bumping a parent package of the nested dependency can upgrade several of the nested dependencies at once to solve multiple security vulnerabilities and provide a more maintainable code base. +## Compliance with this Policy +We consider the discovery and reporting of security vulnerabilities an important public service. We encourage responsible reporting of any vulnerabilities that may be found in our site or applications. -## Backport a Vulnerability Fix +Furthermore, we will not take legal action against or suspend or terminate access to the site or services of those who discover and report security vulnerabilities in accordance with this policy because of the fact. -To backport a CVE fix to previous versions of OpenSearch Dashboards, add the desired backport labels (e.g., backport 1.x) to the PR. Upon merging the PR, a workflow will attempt to backport it. If this process fails, the PR will be updated with a comment detailing the failure, and you'll need to follow the provided instructions to manually backport the changes in a new PR. Keep in mind that some CVEs may require distinct resolutions for each branch, such as a major version bump in the main branch, a minor version bump in the 2.x branch, and a specific resolution in the 1.x branch. Refer to the following steps for guidance: +We ask that all users and contributors respect this policy and the security of our community's users by disclosing vulnerabilities to us in accordance with this policy. -1. Identify the pull request you want to backport and the target backport version. -2. Create a new local branch from the target version. -3. Cherry-pick the changes from the pull request into the new branch. To do this, you can use the `git cherry-pick` command followed by the hash of the pull request commit. For example: `git cherry-pick 123456`. -4. Resolve any conflicts. This step may require some manual intervention. -5. Run `yarn osd bootstrap` in the root directory. This will update the dependencies, install the latest version of the package that satisfies the range from `package.json`, and add the updated package information to the `yarn.lock` file. -5. Test the changes thoroughly. -6. Push the new branch to the appropriate remote repository. -7. Submit a new pull request to the target version for the backported changes. +## Changes to this Security Policy +This policy may be revised from time to time. Each version of the policy will be identified at the top of the page by its effective date. -``` - Example: backport a pull request with hash 123 in main to 1.3 - - * Fetch the latest changes from upstream repo: - git pull upstream - - * Create a new local branch from the target version: - git checkout -b backport-cve upstream/1.3 - - * Cherry pick the changes: - git cherry-pick 123 - - * Resolve any conflicts. - - * Push to your origin forked repo: - git push -u origin backport-cve - - * Submit a new pull request to 1.3. - -``` - -It's worth noting that backporting a pull request can be a complex process and depending on the changes involved, additional steps might be required to resolve conflicts. It's important to carefully review and test the changes to ensure they are compatible with the version of OpenSearch Dashboards in the target branch and that the changes are applied correctly. +If you have any questions about this Security Policy, please contact us at [security@wazuh.com](mailto:security@wazuh.com) diff --git a/VERSION b/VERSION new file mode 100644 index 000000000000..d3845ad3c5da --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +v5.0.0 diff --git a/config/node.options.prod b/config/node.options.prod new file mode 100644 index 000000000000..ed533b559152 --- /dev/null +++ b/config/node.options.prod @@ -0,0 +1,9 @@ +## Node command line options +## See `node --help` and `node --v8-options` for available options +## Please note you should specify one option per line + +## max size of old space in megabytes +#--max-old-space-size=4096 + +## Wazuh - do not terminate process on unhandled promise rejection +--unhandled-rejections=warn diff --git a/config/opensearch_dashboards.prod.yml b/config/opensearch_dashboards.prod.yml new file mode 100644 index 000000000000..650b0bc3d0bf --- /dev/null +++ b/config/opensearch_dashboards.prod.yml @@ -0,0 +1,14 @@ +server.host: 0.0.0.0 +server.port: 443 +opensearch.hosts: https://localhost:9200 +opensearch.ssl.verificationMode: certificate +#opensearch.username: +#opensearch.password: +opensearch.requestHeadersAllowlist: ["securitytenant","Authorization"] +opensearch_security.multitenancy.enabled: false +opensearch_security.readonly_mode.roles: ["kibana_read_only"] +server.ssl.enabled: true +server.ssl.key: "/etc/wazuh-dashboard/certs/dashboard-key.pem" +server.ssl.certificate: "/etc/wazuh-dashboard/certs/dashboard.pem" +opensearch.ssl.certificateAuthorities: ["/etc/wazuh-dashboard/certs/root-ca.pem"] +uiSettings.overrides.defaultRoute: /app/home diff --git a/config/opensearch_dashboards.yml b/config/opensearch_dashboards.yml index 7b21bbd5c0dc..efe1bde7458b 100644 --- a/config/opensearch_dashboards.yml +++ b/config/opensearch_dashboards.yml @@ -347,11 +347,7 @@ # Set the value to true to enable workspace feature # Please note, workspace will not work with multi-tenancy. To enable workspace feature, you need to disable multi-tenancy first with `opensearch_security.multitenancy.enabled: false` -# Please uncomment below uiSettings to enable new home/navigation experience when workspace is enabled # workspace.enabled: false -# uiSettings: -# overrides: -# "home:useNewHomePage": true # Optional settings to specify saved object types to be deleted during migration. # This feature can help address compatibility issues that may arise during the migration of saved objects, such as types defined by legacy applications. diff --git a/dev-tools/build-dev-image/README.md b/dev-tools/build-dev-image/README.md new file mode 100644 index 000000000000..bc23c20cdfb3 --- /dev/null +++ b/dev-tools/build-dev-image/README.md @@ -0,0 +1,40 @@ +## Images + +To setup the crendentials (**this only has to be done once**): + +1. Login to Quay.io and navigate to User Settings. +2. Click on `CLI Password: Generate Encrypted Password` +3. In the new window that opens, click on `Docker Configuration` and follow the steps. + +To build an image, use the docker build command like: + +Use the `--build-arg` flag to specify the version of Node and the version of +the platform. The version of Node to use is defined in the `.nvmrc` file. Use +the Node version defined in that file for the target platform version, as the +version of Node might be increased between platfform's versions. + +For example, to build the image for OpenSearch Dashboards `5.0.0`: + +```bash +# Usage: +docker build \ + --build-arg NODE_VERSION=18.19.0 \ + --build-arg OPENSEARCH_DASHBOARD_VERSION=2.18.0.0 \ + --build-arg WAZUH_DASHBOARD_BRANCH=5.0.0 \ + --build-arg WAZUH_DASHBOARD_SECURITY_BRANCH=5.0.0 \ + --build-arg WAZUH_DASHBOARD_REPORTING_BRANCH=5.0.0 \ + --build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH=5.0.0 \ + -t quay.io/wazuh/osd-dev:2.18.0 \ + -f wzd.dockerfile . +``` + +For arm architecture if you have amd architecture you need to add `--platform linux/arm64` and if you have arm for amd architecture you need to add `--platform linux/amd64` + +Push the image to Quay: + +```bash +docker push quay.io/wazuh/image-name:version +``` + +If you're creating a new image, copy one of the ones already present +in the directory, and adapt it to the new version. \ No newline at end of file diff --git a/dev-tools/build-dev-image/entrypoint.sh b/dev-tools/build-dev-image/entrypoint.sh new file mode 100755 index 000000000000..e9102969143b --- /dev/null +++ b/dev-tools/build-dev-image/entrypoint.sh @@ -0,0 +1,18 @@ +#!/bin/bash +if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then + base_path_plugins="/home/node/kbn/plugins" + plugins=$(ls $base_path_plugins) + for plugin in $plugins; do + echo "Checking if $plugin has node_modules" + if [ ! -d "$base_path_plugins/$plugin/node_modules" ]; then + cd $base_path_plugins/$plugin + echo "Installing dependencies for $plugin" + yarn install + fi + done + cd /home/node/kbn + yarn start --no-base-path + tail -f /dev/null +fi + +exec "$@" diff --git a/dev-tools/build-dev-image/install-plugins.sh b/dev-tools/build-dev-image/install-plugins.sh new file mode 100644 index 000000000000..b93fd665ffc9 --- /dev/null +++ b/dev-tools/build-dev-image/install-plugins.sh @@ -0,0 +1,63 @@ +plugins=$(cat /home/node/plugins) +base_path_plugins="/home/node/kbn/plugins" +category_explore="id: 'explore',label: 'Explore',order: 100,euiIconType: 'search'," +category_dashboard_management='{id:"management",label:"Indexer management",order:5e3,euiIconType:"managementApp"}' +old_category_default="DEFAULT_APP_CATEGORIES\.management," +old_category_object="id: 'opensearch',/{ + N + N + s/id: 'opensearch',\n\s*label: 'OpenSearch Plugins',\n\s*order: 2000," +for plugin in $plugins; do + cd $base_path_plugins + if [[ $plugin =~ wazuh* ]]; then + # Clone the Wazuh security plugin + if [[ $plugin == "wazuh-security-dashboards-plugin" ]]; then + git clone --depth 1 --branch ${WAZUH_DASHBOARD_SECURITY_BRANCH} https://github.com/wazuh/$plugin.git + fi + # Clone the Wazuh dashboards reporting plugin + if [[ $plugin == "wazuh-dashboards-reporting" ]]; then + git clone --depth 1 --branch ${WAZUH_DASHBOARD_REPORTING_BRANCH} https://github.com/wazuh/$plugin.git + fi + # Clone the Wazuh dashboards plugins and move the plugins to the plugins folder + if [[ $plugin == "wazuh-dashboard-plugins" ]]; then + git clone --depth 1 --branch ${WAZUH_DASHBOARD_PLUGINS_BRANCH} https://github.com/wazuh/$plugin.git + wazuh_dashboard_plugins=$(ls $base_path_plugins/$plugin/plugins) + mv $plugin/plugins/* ./ + for wazuh_dashboard_plugin in $wazuh_dashboard_plugins; do + cd $base_path_plugins/$wazuh_dashboard_plugin + yarn install + done + cd $base_path_plugins + rm -rf $plugin + fi + + else + git clone --depth 1 --branch ${OPENSEARCH_DASHBOARD_VERSION} https://github.com/opensearch-project/$plugin.git + cd $base_path_plugins/$plugin/public + + # Notification plugin: Modify the plugin.ts file to add the Explore category + if [[ $plugin == "dashboards-notifications" ]]; then + sed -i -e "s/${old_category_default}/{${category_explore}},/g" ./plugin.ts + fi + + # Alerting plugin: Modify the plugin.ts file to add the Explore category + if [[ $plugin == "alerting-dashboards-plugin" ]]; then + sed -i -e "/${old_category_object}/${category_explore}/}" plugin.tsx + fi + + # Maps plugin: Modify the plugin.ts file to add the Explore category + if [[ $plugin == "dashboards-maps" ]]; then + sed -i -e "/${old_category_object}/${category_explore}/}" plugin.tsx + fi + + # Index Management plugin: Modify the plugin.ts file to add the Explore category + if [[ $plugin == "index-management-dashboards-plugin" ]]; then + sed -i -e "s/${old_category_default}/${category_dashboard_management},/g" ./plugin.ts + fi + + fi + if [[ $plugin != "wazuh-dashboard-plugins" ]]; then + cd $base_path_plugins/$plugin + yarn install + fi +done diff --git a/dev-tools/build-dev-image/plugins b/dev-tools/build-dev-image/plugins new file mode 100644 index 000000000000..ae394742f456 --- /dev/null +++ b/dev-tools/build-dev-image/plugins @@ -0,0 +1,9 @@ +dashboards-notifications +alerting-dashboards-plugin +dashboards-maps +index-management-dashboards-plugin +dashboards-visualizations +dashboards-observability +wazuh-security-dashboards-plugin +wazuh-dashboard-plugins +wazuh-dashboards-reporting diff --git a/dev-tools/build-dev-image/wzd.dockerfile b/dev-tools/build-dev-image/wzd.dockerfile new file mode 100644 index 000000000000..ebc753c20296 --- /dev/null +++ b/dev-tools/build-dev-image/wzd.dockerfile @@ -0,0 +1,41 @@ +# Usage: +# docker build \ +# --build-arg NODE_VERSION=18.19.0 \ +# --build-arg OPENSEARCH_DASHBOARD_VERSION=2.18.0.0 \ +# --build-arg WAZUH_DASHBOARD_BRANCH=master \ +# --build-arg WAZUH_DASHBOARD_SECURITY_BRANCH=master \ +# --build-arg WAZUH_DASHBOARD_REPORTING_BRANCH=master \ +# --build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH=master \ +# -t quay.io/wazuh/osd-dev:2.18.0 \ +# -f wzd.dockerfile . + +ARG NODE_VERSION=18.19.0 +FROM node:${NODE_VERSION} AS base +ARG OPENSEARCH_DASHBOARD_VERSION +ARG WAZUH_DASHBOARD_BRANCH +ARG WAZUH_DASHBOARD_SECURITY_BRANCH +ARG WAZUH_DASHBOARD_REPORTING_BRANCH +ARG WAZUH_DASHBOARD_PLUGINS_BRANCH +USER node +RUN git clone --depth 1 --branch ${WAZUH_DASHBOARD_BRANCH} https://github.com/wazuh/wazuh-dashboard.git /home/node/kbn +RUN chown node.node /home/node/kbn + +WORKDIR /home/node/kbn +RUN yarn osd bootstrap --production + +WORKDIR /home/node/kbn/plugins + +ADD ./install-plugins.sh /home/node/install-plugins.sh +ADD ./plugins /home/node/plugins +RUN bash /home/node/install-plugins.sh +RUN mkdir -p /home/node/kbn/data/wazuh/config + +FROM node:${NODE_VERSION} +USER node +COPY --chown=node:node --from=base /home/node/kbn /home/node/kbn +WORKDIR /home/node/kbn +ADD ./entrypoint.sh /usr/local/bin/entrypoint.sh +USER root +RUN chmod +x /usr/local/bin/entrypoint.sh +USER node +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] diff --git a/dev-tools/build-packages/README.md b/dev-tools/build-packages/README.md new file mode 100644 index 000000000000..d12169a404ba --- /dev/null +++ b/dev-tools/build-packages/README.md @@ -0,0 +1,59 @@ +# Package building + +This folder contains tools used to create `tar`, `rpm` and `deb` packages. + +## Requirements + +- A system with Docker. +- Internet connection (to download the docker images the first time). + +## How to build packages + +The script `build-packages.sh` is in charge of coordinating the different steps to build each type of packages. + +### Pre-requisites + +The script needs 4 different zip files, containing the following respectively: + +- The base of Wazuh Dashboard, generated by running `yarn build --linux --skip-os-packages --release` or `yarn build --linux-arm --skip-os-packages --release` for arm packages +- The build of each plugin in `wazuh-dashboard-plugins` repo +- The build of the `wazuh-security-dashboards-plugin` repo +- The build of the `wazuh-dashboards-reporting ` repo + +### Building packages + +The script can build a `.tar.gz` (former base), and `rpm` and `deb` packages. This can be for x64 and arm architectures (it is not cross-architecture building. You need to run the script in a machine of the same architecture that you are building). + +The inputs are the following: + +- `-a`, `--app`: URL or path to the zip that contains the `wazuh-dashboard-plugins` plugins build. +- `-b`, `--base`: URL or path to the zip that contains the `wazuh-dashboard build`. +- `-s`, `--security`: URL or path to the zip that contains the `wazuh-security-dashboards-plugin` build. +- `-rp`, `--reportPlugin`: URL or path to the zip that contains the `wazuh-dashboards-reporting` build. +- `-v`, `--version`: Set the version of this build. +- `-r`, `--revision`: [Optional] Set the revision of this build. By default, it is set to 1. +- `--all-platforms`: Build all platforms. +- `--deb`: Build deb. +- `--rpm`: Build rpm. +- `--tar`: Build tar.gz. +- `--production`:[Optional] The naming of the package will be ready for production. Otherwise, it will include the hash of the current commit. +- `--arm`: [Optional] Build for arm64 instead of x64. +- `--debug`: [Optional] Enables debug mode, which will show detailed information during the script run. +- `--silent`: [Optional] Enables silent mode, which will show the minimum possible information during the script run. `--debug` has priority over this. + +> [!IMPORTANT] +> In the inputs where a local path is available, use `file://` to indicate it. + +> [!WARNING] +> To build `arm` packages, you need to run the script in an arm machine, and use an arm build of the wazuh-dashboard base with `-b` + +Example: + +```bash +bash build-packages.sh \ + --app file:///home/user/packages/wazuh-package.zip \ + --base file:///home/user/packages/dashboard-package.zip \ + --security file:///home/user/packages/security-package.zip \ + --reportPlugin file:///home/user/packages/report-package.zip + --version 5.0.0 --revision 2 --deb --silent +``` diff --git a/dev-tools/build-packages/base-packages-to-base/README.md b/dev-tools/build-packages/base-packages-to-base/README.md new file mode 100644 index 000000000000..da7ce1954294 --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/README.md @@ -0,0 +1,39 @@ +# Package building + +This folder contains the tools used to create packages from the different repositories necessary for the creation of deb and rpm packages. + +## Requirements + +- A system with Docker. +- Internet connection (to download the docker images the first time). + +## How to build packages + +The script `run-docker-compose.sh` is in charge of coordinating the different steps to build each package. + +### Building packages + +The script can build a `.tar.gz` (former base), and `rpm` and `deb` packages. This can be for x64 and arm architectures (it is not cross-architecture building. You need to run the script in a machine of the same architecture that you are building). + +The inputs are the following: + +- `-a`, `--app`: Set the `wazuh-dashboard-plugins` branch. +- `-b`, `--base`: Set the `wazuh-dashboard` branch. +- `-s`, `--security`: Set the `wazuh-security-dashboards-plugin` branch. +- `-r`, `--reporting`: Set the `wazuh-dashboards-reporting` branch. +- `--node-version`: [Optional] Set the node version. +- `--arm`: [Optional] Build for arm64 instead of x64. + +Example: + +```bash +bash run-docker-compose.sh \ + --app master \ + --base master \ + --security master \ + --reporting master \ + --arm \ + --node-version 18.19.0 +``` + +This example will create a packages folder that inside will have the packages divided by repository of the master branch of each one. \ No newline at end of file diff --git a/dev-tools/build-packages/base-packages-to-base/base-packages.Dockerfile b/dev-tools/build-packages/base-packages-to-base/base-packages.Dockerfile new file mode 100644 index 000000000000..72a5dd28dadb --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/base-packages.Dockerfile @@ -0,0 +1,33 @@ +# Usage: +# docker build \ +# --build-arg NODE_VERSION=18.19.0 \ +# --build-arg WAZUH_DASHBOARD_BRANCH=4.10.2 \ +# --build-arg WAZUH_DASHBOARD_SECURITY_BRANCH=4.10.2 \ +# --build-arg WAZUH_DASHBOARD_PLUGINS_BRANCH=4.10.2 \ +# --build-arg ARCHITECTURE=arm \ +# -t wazuh-packages-to-base:4.10.2 \ +# -f base-packages.Dockerfile . + +ARG NODE_VERSION=18.19.0 +FROM node:${NODE_VERSION} AS base +ARG ARCHITECTURE='amd' +ARG WAZUH_DASHBOARD_BRANCH +ARG WAZUH_DASHBOARD_SECURITY_BRANCH +ARG WAZUH_DASHBOARD_PLUGINS_BRANCH +ARG WAZUH_DASHBOARD_REPORTING_BRANCH +ENV OPENSEARCH_DASHBOARDS_VERSION=2.16.0 +ENV ENV_ARCHITECTURE=${ARCHITECTURE} +USER root +RUN apt-get update && apt-get install -y jq +USER node +ADD ./clone-plugins.sh /home/node/clone-plugins.sh +ADD ./repositories/wazuh-dashboard.sh /home/node/repositories/wazuh-dashboard.sh +ADD ./repositories/plugins/wazuh-security-dashboards-plugin.sh /home/node/repositories/plugins/wazuh-security-dashboards-plugin.sh +ADD ./repositories/plugins/wazuh-dashboard-reporting.sh /home/node/repositories/plugins/wazuh-dashboard-reporting.sh +ADD ./repositories/plugins/wazuh-dashboard-plugins.sh /home/node/repositories/plugins/wazuh-dashboard-plugins.sh +RUN bash /home/node/clone-plugins.sh + +FROM node:${NODE_VERSION} +USER node +COPY --chown=node:node --from=base /home/node/packages /home/node/packages +WORKDIR /home/node/packages diff --git a/dev-tools/build-packages/base-packages-to-base/clone-plugins.sh b/dev-tools/build-packages/base-packages-to-base/clone-plugins.sh new file mode 100644 index 000000000000..2a70c6f141fd --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/clone-plugins.sh @@ -0,0 +1,16 @@ +base_path_plugins="/home/node/app/plugins" +base_path_repositories_scripts="/home/node/repositories" +base_path_repositories_plugins_scripts="/home/node/repositories/plugins" +plugins=$(ls $base_path_repositories_plugins_scripts) + +mkdir /home/node/packages +echo "Cloning Wazuh dashboards" +source $base_path_repositories_scripts/wazuh-dashboard.sh + +for plugin in $plugins; do + echo "Cloning $plugin" + source $base_path_repositories_plugins_scripts/$plugin +done + + + diff --git a/dev-tools/build-packages/base-packages-to-base/docker-compose.yml b/dev-tools/build-packages/base-packages-to-base/docker-compose.yml new file mode 100644 index 000000000000..cae02d0d36dd --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/docker-compose.yml @@ -0,0 +1,23 @@ + +services: + base: + image: base-${WAZUH_DASHBOARD_BRANCH}-${WAZUH_SECURITY_PLUGIN_BRANCH}-${WAZUH_DASHBOARD_PLUGINS_BRANCH}-${ARCHITECTURE} + build: + context: . + dockerfile: base-packages.Dockerfile + args: + NODE_VERSION: ${NODE_VERSION} + WAZUH_DASHBOARD_BRANCH: ${WAZUH_DASHBOARD_BRANCH} + WAZUH_DASHBOARD_SECURITY_BRANCH: ${WAZUH_SECURITY_PLUGIN_BRANCH} + WAZUH_DASHBOARD_PLUGINS_BRANCH: ${WAZUH_DASHBOARD_PLUGINS_BRANCH} + WAZUH_DASHBOARD_REPORTING_BRANCH: ${WAZUH_DASHBOARD_REPORTING_BRANCH} + ARCHITECTURE: ${ARCHITECTURE} + container_name: base-${WAZUH_DASHBOARD_BRANCH}-${WAZUH_SECURITY_PLUGIN_BRANCH}-${WAZUH_DASHBOARD_PLUGINS_BRANCH}-${WAZUH_DASHBOARD_REPORTING_BRANCH}-${ARCHITECTURE} + environment: + OPENSEARCH_DASHBOARDS_VERSION: 2.16.0 + volumes: + - ./:/home/node/output + command: > + bash -c ' + cp -r /home/node/packages /home/node/output + ' diff --git a/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-dashboard-plugins.sh b/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-dashboard-plugins.sh new file mode 100644 index 000000000000..7bde0a71da4b --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-dashboard-plugins.sh @@ -0,0 +1,17 @@ +base_path_plugins="/home/node/app/plugins" +cd $base_path_plugins +git clone --depth 1 --branch ${WAZUH_DASHBOARD_PLUGINS_BRANCH} https://github.com/wazuh/wazuh-dashboard-plugins.git +wazuh_dashboard_plugins=$(ls $base_path_plugins/wazuh-dashboard-plugins/plugins) +mv wazuh-dashboard-plugins/plugins/* ./ +mkdir /home/node/packages/wazuh-dashboard-plugins +for wazuh_dashboard_plugin in $wazuh_dashboard_plugins; do + cd $base_path_plugins/$wazuh_dashboard_plugin + yarn install + echo "Building $wazuh_dashboard_plugin" + yarn build + echo "Copying $wazuh_dashboard_plugin" + package_name=$(jq -r '.id' ./opensearch_dashboards.json) + cp $base_path_plugins/$wazuh_dashboard_plugin/build/$package_name-$OPENSEARCH_DASHBOARDS_VERSION.zip /home/node/packages/wazuh-dashboard-plugins/$package_name-$OPENSEARCH_DASHBOARDS_VERSION.zip +done +cd $base_path_plugins +rm -rf wazuh-dashboard-plugins diff --git a/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-dashboard-reporting.sh b/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-dashboard-reporting.sh new file mode 100644 index 000000000000..9e35b09e378f --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-dashboard-reporting.sh @@ -0,0 +1,10 @@ +# Clone the Wazuh security plugin +cd /home/node/app/plugins +git clone --depth 1 --branch ${WAZUH_DASHBOARD_REPORTING_BRANCH} https://github.com/wazuh/wazuh-dashboards-reporting.git +cd wazuh-dashboards-reporting +yarn install +echo "Building Wazuh reporting plugin" +yarn build +echo "Copying Wazuh reporting plugin" +mkdir /home/node/packages/wazuh-dashboards-reporting +cp -r build/* /home/node/packages/wazuh-dashboards-reporting diff --git a/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-security-dashboards-plugin.sh b/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-security-dashboards-plugin.sh new file mode 100644 index 000000000000..6ccbb4c0a5b1 --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/repositories/plugins/wazuh-security-dashboards-plugin.sh @@ -0,0 +1,10 @@ +# Clone the Wazuh security plugin +cd /home/node/app/plugins +git clone --depth 1 --branch ${WAZUH_DASHBOARD_SECURITY_BRANCH} https://github.com/wazuh/wazuh-security-dashboards-plugin.git +cd wazuh-security-dashboards-plugin +yarn install +echo "Building Wazuh security plugin" +yarn build +echo "Copying Wazuh security plugin" +mkdir /home/node/packages/wazuh-security-dashboards-plugin +cp -r build/* /home/node/packages/wazuh-security-dashboards-plugin diff --git a/dev-tools/build-packages/base-packages-to-base/repositories/wazuh-dashboard.sh b/dev-tools/build-packages/base-packages-to-base/repositories/wazuh-dashboard.sh new file mode 100644 index 000000000000..967dd36268de --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/repositories/wazuh-dashboard.sh @@ -0,0 +1,13 @@ +git clone --depth 1 --branch ${WAZUH_DASHBOARD_BRANCH} https://github.com/wazuh/wazuh-dashboard.git /home/node/app +cd /home/node/app +yarn osd bootstrap --production +echo "Building Wazuh dashboards" +if [ $ENV_ARCHITECTURE == "arm" ]; then + yarn build-platform --linux-arm --skip-os-packages --release +else + yarn build-platform --linux --skip-os-packages --release +fi +mkdir /home/node/packages/wazuh-dashboard +echo "Copying Wazuh dashboards" +ls -la /home/node/app/target +cp -r /home/node/app/target/*.tar.gz /home/node/packages/wazuh-dashboard diff --git a/dev-tools/build-packages/base-packages-to-base/run-docker-compose.sh b/dev-tools/build-packages/base-packages-to-base/run-docker-compose.sh new file mode 100644 index 000000000000..478c0da5893f --- /dev/null +++ b/dev-tools/build-packages/base-packages-to-base/run-docker-compose.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +export WAZUH_DASHBOARD_PLUGINS_BRANCH="" +export WAZUH_DASHBOARD_BRANCH="" +export WAZUH_SECURITY_PLUGIN_BRANCH="" +export WAZUH_DASHBOARD_REPORTING_BRANCH="" +export ARCHITECTURE="amd" +export NODE_VERSION="18.19.0" + + +run_docker_compose() { + echo "WAZUH_DASHBOARD_PLUGINS_BRANCH: $WAZUH_DASHBOARD_PLUGINS_BRANCH" + echo "WAZUH_SECURITY_PLUGIN_BRANCH: $WAZUH_SECURITY_PLUGIN_BRANCH" + echo "WAZUH_DASHBOARD_BRANCH: $WAZUH_DASHBOARD_BRANCH" + echo "WAZUH_DASHBOARD_REPORTING_BRANCH: $WAZUH_DASHBOARD_REPORTING_BRANCH" + echo "ARCHITECTURE: $ARCHITECTURE" + echo "NODE_VERSION: $NODE_VERSION" + docker-compose up -d +} + +help() { + echo + echo "Usage: $0 [OPTIONS]" + echo " -a, --app Set the Wazuh plugin branch." + echo " -b, --base Set the wazuh-dashboard branch." + echo " -s, --security Set the wazuh-security-dashboards-plugin branch." + echo " -r, --reporting Set the wazuh-dashboards-reporting branch." + echo " --arm [Optional] Build for arm64 instead of x64." + echo " --node-version [Optional] Set the node version." + echo " -h, --help Show this help." + echo + exit $1 +} + +# ----------------------------------------------------------------------------- + +main() { + while [ -n "${1}" ]; do + case "${1}" in + "-h" | "--help") + help 0 + ;; + "-a" | "--app") + if [ -n "$2" ]; then + WAZUH_DASHBOARD_PLUGINS_BRANCH="$2" + shift 2 + else + help 1 + fi + ;; + "-s" | "--security") + if [ -n "${2}" ]; then + WAZUH_SECURITY_PLUGIN_BRANCH="${2}" + shift 2 + else + help 0 + fi + ;; + "-b" | "--base") + if [ -n "${2}" ]; then + WAZUH_DASHBOARD_BRANCH="${2}" + shift 2 + else + help 0 + fi + ;; + "-r" | "--reporting") + if [ -n "${2}" ]; then + WAZUH_DASHBOARD_REPORTING_BRANCH="${2}" + shift 2 + else + help 0 + fi + ;; + "--arm") + ARCHITECTURE="arm" + shift 1 + ;; + "--node-version") + if [ -n "${2}" ]; then + NODE_VERSION="${2}" + shift 2 + else + help 0 + fi + ;; + *) + echo "help" + + help 1 + ;; + esac + done + + if [ -z "$WAZUH_DASHBOARD_PLUGINS_BRANCH" ] | [ -z "$WAZUH_DASHBOARD_BRANCH" ] | [ -z "$WAZUH_SECURITY_PLUGIN_BRANCH" ]; then + echo "You must specify the app, base, security." + help 1 + fi + + run_docker_compose || exit 1 + + exit 0 +} + +main "$@" diff --git a/dev-tools/build-packages/base/Docker/Dockerfile b/dev-tools/build-packages/base/Docker/Dockerfile new file mode 100644 index 000000000000..6614bda6ce49 --- /dev/null +++ b/dev-tools/build-packages/base/Docker/Dockerfile @@ -0,0 +1,35 @@ +FROM rockylinux:8.5 + +# Install all the necessary tools to build the packages +RUN yum clean all && yum update -y +RUN yum install -y \ + curl \ + tar \ + findutils \ + git \ + xz \ + gcc \ + make \ + bc \ + sed \ + gzip \ + autoconf \ + automake \ + libtool \ + python3-devel \ + python3-pip \ + jq \ + unzip + +RUN git clone https://github.com/google/brotli.git -b v1.0.9 + +RUN cd brotli && chmod +x ./bootstrap && ./bootstrap && ./configure --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib64/brotli --libdir=/usr/lib64/brotli --datarootdir=/usr/share --mandir=/usr/share/man/man1 --docdir=/usr/share/doc \ + && make && make install + +# Add the scripts to build the RPM package +ADD base-builder.sh /usr/local/bin/builder +ADD plugins /usr/local/bin/plugins +RUN chmod +x /usr/local/bin/builder + +# Set the entrypoint +ENTRYPOINT ["/usr/local/bin/builder"] diff --git a/dev-tools/build-packages/base/base-builder.sh b/dev-tools/build-packages/base/base-builder.sh new file mode 100755 index 000000000000..4a245af2aeef --- /dev/null +++ b/dev-tools/build-packages/base/base-builder.sh @@ -0,0 +1,162 @@ +#!/bin/bash + +# Wazuh package generator +# Copyright (C) 2022, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +# Inputs +version="$1" +revision="$2" +architecture="$3" +verbose="$4" + +if [ "$verbose" = "debug" ]; then + set -x +fi + +trap clean INT +trap clean EXIT + +log() { + if [ "$verbose" = "info" ] || [ "$verbose" = "debug" ]; then + echo "$@" + fi +} + +clean() { + exit_code=$? + # Clean the files + rm -rf ${tmp_dir}/* + trap '' EXIT + exit ${exit_code} +} + +# Paths +current_path="$( cd $(dirname $0) ; pwd -P )" + +# Folders +tmp_dir="/tmp" +out_dir="/output" +config_path=$tmp_dir/config + + +# ----------------------------------------------------------------------------- +cd $tmp_dir + +log +log "Extracting packages" +log + +mkdir -p applications +mkdir -p base +packages_list=(app base security reportPlugin) +packages_names=("Wazuh plugins" "Wazuh Dashboard" "Security plugin" "Report plugin") + + +for i in "${!packages_list[@]}"; do + package_var="${packages_list[$i]}" + package_name="${packages_names[$i]}" + if [[ "$package_var" == "base" ]]; then + wzd_package_name=$(unzip -l "packages/${package_var}.zip" | awk 'NR==4 {print $4}') + unzip -o -q "packages/${package_var}.zip" -d base + else + unzip -o -q "packages/${package_var}.zip" -d applications + fi +done + +cd base + +log +log "Installing plugins" +log + +tar -zxf $wzd_package_name +directory_name=$(ls -td */ | head -1) +cd $directory_name +plugins=$(ls $tmp_dir/applications)' '$(cat $current_path/plugins) + for plugin in $plugins; do + if [[ $plugin =~ .*\.zip ]]; then + install="file://${tmp_dir}/applications/${plugin}" + else + install=$plugin + fi + log "Installing ${plugin} plugin" + if ! bin/opensearch-dashboards-plugin install $install 2>&1 --allow-root> /dev/null; then + echo "Plugin ${plugin} installation failed" + exit 1 + fi + log "Plugin ${plugin} installed successfully" + log + done + +log +log "Replacing application categories" +log + +category_explore='{id:"explore",label:"Explore",order:100,euiIconType:"search"}' +category_dashboard_management='{id:"management",label:"Indexer management",order:6e3,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 + +# Replace app category to Alerting app +sed -i -e "s|category:{id:\"opensearch\",label:\"OpenSearch Plugins\",order:2e3}|category:${category_explore}|" ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js + +# Replace app category to Maps app +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 + +# Replace app category to Index Management app +sed -i -e "s|category:DEFAULT_APP_CATEGORIES.management|category:${category_dashboard_management}|g" ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js + + +log +log "Recreating plugin files" +log + +# Generate compressed files +files_to_recreate=( + ./plugins/reportsDashboards/target/public/reportsDashboards.plugin.js + ./plugins/alertingDashboards/target/public/alertingDashboards.plugin.js + ./plugins/customImportMapDashboards/target/public/customImportMapDashboards.plugin.js + ./plugins/notificationsDashboards/target/public/notificationsDashboards.plugin.js + ./plugins/indexManagementDashboards/target/public/indexManagementDashboards.plugin.js +) + +for value in "${files_to_recreate[@]}" +do + gzip -c "$value" > "$value.gz" + brotli -c "$value" > "$value.br" +done + +log +log "Adding configuration files" +log + +cp -f $config_path/opensearch_dashboards.prod.yml config/opensearch_dashboards.yml +cp -f $config_path/node.options.prod config/node.options + +log +log "Fixing shebangs" +log +# TODO: investigate to remove this if possible +# Fix ambiguous shebangs (necessary for RPM building) +grep -rnwl './node_modules/' -e '#!/usr/bin/env python$' | xargs -I {} sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/env python3/g' {} +grep -rnwl './node_modules/' -e '#!/usr/bin/python$' | xargs -I {} sed -i 's/#!\/usr\/bin\/python/#!\/usr\/bin\/python3/g' {} + +log +log "Compressing final package" +log + +mkdir -p $out_dir +tar -czf $out_dir/wazuh-dashboard-$version-$revision-linux-$architecture.tar.gz * + +log Done! diff --git a/dev-tools/build-packages/base/plugins b/dev-tools/build-packages/base/plugins new file mode 100644 index 000000000000..ccb3cc3ec1cb --- /dev/null +++ b/dev-tools/build-packages/base/plugins @@ -0,0 +1,5 @@ +alertingDashboards +customImportMapDashboards +ganttChartDashboards +indexManagementDashboards +notificationsDashboards diff --git a/dev-tools/build-packages/build-packages.sh b/dev-tools/build-packages/build-packages.sh new file mode 100755 index 000000000000..75f16b28735f --- /dev/null +++ b/dev-tools/build-packages/build-packages.sh @@ -0,0 +1,315 @@ +#!/bin/bash +set -e + +app="" +base="" +revision="1" +security="" +version="" +reportPlugin="" +all_platforms="no" +deb="no" +rpm="no" +tar="no" +architecture="x64" +production="no" +commit_sha=$(git rev-parse --short HEAD) +current_path="$( cd $(dirname $0) ; pwd -P )" +output_dir="${current_path}/output" +tmp_dir="${current_path}/tmp" +config_dir="${current_path}/../../config" +package_config_dir="${current_path}/config" +verbose="info" + +trap clean INT +trap clean EXIT + +log() { + if [ "$verbose" = "info" ] || [ "$verbose" = "debug" ]; then + echo "$@" + fi +} + +clean() { + exit_code=$? + echo + echo "Cleaning temporary files..." + echo + # Clean the files + rm -rf ${tmp_dir} + rm -f ${current_path}/base/Docker/base-builder.sh + rm -f ${current_path}/base/Docker/plugins + rm -f ${current_path}/rpm/Docker/rpm-builder.sh + rm -f ${current_path}/rpm/Docker/wazuh-dashboard.spec + rm -f ${current_path}/deb/Docker/deb-builder.sh + rm -rf ${current_path}/deb/Docker/debian + trap '' EXIT + exit ${exit_code} +} + +ctrl_c() { + clean 1 +} + +get_packages(){ + packages_list=(app base security reportPlugin) + packages_names=("Wazuh plugins" "Wazuh Dashboard" "Security plugin" "Report plugin") + valid_url='(https?|ftp|file)://[-[:alnum:]\+&@#/%?=~_|!:,.;]*[-[:alnum:]\+&@#/%=~_|]' + mkdir -p ${tmp_dir} + cd ${tmp_dir} + mkdir -p packages + for i in "${!packages_list[@]}"; do + package_var="${packages_list[$i]}" + package_name="${packages_names[$i]}" + package_url="${!package_var}" + + log + log "Downloading ${package_name}" + + if [[ $package_url =~ $valid_url ]]; then + if ! curl --output "packages/${package_var}.zip" --silent --fail "${package_url}"; then + echo "The given URL or Path to the ${package_name} is not working: ${package_url}" + clean 1 + fi + else + echo "The given URL or Path to the ${package_name} is not valid: ${package_url}" + clean 1 + fi + log "Done!" + log + done + cd .. +} + +source ../utils/retry-operation.sh + +build_tar() { + log + log "Building base package..." + log + mkdir -p ${output_dir} + cp -r ${config_dir} ${tmp_dir} + cd ./base + dockerfile_path="${current_path}/base/Docker" + container_name="dashboard-base-builder" + cp ./base-builder.sh ${dockerfile_path} + cp ./plugins ${dockerfile_path} + retry_operation "build base package" 5 15 \ + "docker build -t ${container_name} ${dockerfile_path} && \ + docker run -t --rm \ + -v ${tmp_dir}/:/tmp:Z \ + -v ${output_dir}/:/output:Z \ + ${container_name} ${version} ${revision} ${architecture} ${verbose}" || exit 1 + cd .. +} + +build_rpm() { + log "Building rpm package..." + cd ./rpm + dockerfile_path="${current_path}/rpm/Docker" + container_name="dashboard-rpm-builder" + cp -r ${package_config_dir} ${tmp_dir} + cp ./rpm-builder.sh ${dockerfile_path} + cp ./wazuh-dashboard.spec ${dockerfile_path} + retry_operation "build rpm package" 5 15 \ + "docker build -t ${container_name} ${dockerfile_path} && \ + docker run -t --rm \ + -v ${tmp_dir}/:/tmp:Z \ + -v ${output_dir}/:/output:Z \ + ${container_name} ${version} ${revision} ${architecture} \ + ${commit_sha} ${production} ${verbose}" || exit 1 + cd ../ +} + + +build_deb() { + log "Building deb package..." + cd ./deb + dockerfile_path="${current_path}/deb/Docker" + container_name="dashboard-deb-builder" + cp -r ${package_config_dir} ${tmp_dir} + cp ./deb-builder.sh ${dockerfile_path} + cp -r ./debian ${dockerfile_path} + docker build -t ${container_name} ${dockerfile_path} || return 1 + retry_operation "build deb package" 5 15 \ + "docker build -t ${container_name} ${dockerfile_path} && \ + docker run -t --rm \ + -v ${tmp_dir}/:/tmp:Z \ + -v ${output_dir}/:/output:Z \ + ${container_name} ${version} ${revision} ${architecture} \ + ${commit_sha} ${production} ${verbose}" || exit 1 + cd .. +} + + + + +build(){ + log "Building package..." + if [ "$all_platforms" == "yes" ]; then + deb="yes" + rpm="yes" + tar="yes" + fi + get_packages + build_tar + + if [ $deb == "yes" ]; then + echo "Building deb package..." + build_deb + fi + + if [ $rpm == "yes" ]; then + echo "Building rpm package..." + build_rpm + fi + + if [ "$tar" == "no" ]; then + echo "Removing tar package..." + rm -r $(find $output_dir -name "*.tar.gz") + fi +} + +help() { + echo + echo "Usage: $0 [OPTIONS]" + echo " -a, --app Set the location of the .zip file containing the Wazuh plugin." + echo " -b, --base Set the location of the .tar.gz file containing the base wazuh-dashboard build." + echo " -s, --security Set the location of the .zip file containing the wazuh-security-dashboards-plugin." + echo " -rp, --reportPlugin Set the location of the .zip file containing the wazuh-reporting-plugin." + echo " -v, --version Set the version of this build." + echo " --all-platforms Build for all platforms." + echo " --deb Build for deb." + echo " --rpm Build for rpm." + echo " --tar Build for tar." + echo " --production [Optional] The naming of the package will be ready for production." + echo " --arm [Optional] Build for arm64 instead of x64." + echo " --debug [Optional] Debug mode." + echo " --silent [Optional] Silent mode. Will not work if --debug is set." + echo " -r, --revision [Optional] Set the revision of this build. By default, it is set to 1." + echo " -h, --help Show this help." + echo + exit $1 +} + +# ----------------------------------------------------------------------------- + +main() { + while [ -n "${1}" ]; do + case "${1}" in + "-h" | "--help") + help 0 + ;; + "-a" | "--app") + if [ -n "$2" ]; then + app="$2" + shift 2 + else + help 1 + fi + ;; + "-s" | "--security") + if [ -n "${2}" ]; then + security="${2}" + shift 2 + else + help 0 + fi + ;; + "-b" | "--base") + if [ -n "${2}" ]; then + base="${2}" + shift 2 + else + help 0 + fi + ;; + "-rp" | "--reportPlugin") + if [ -n "${2}" ]; then + reportPlugin="${2}" + shift 2 + else + help 0 + fi + ;; + "-v" | "--version") + if [ -n "${2}" ]; then + version="${2}" + shift 2 + else + help 0 + fi + ;; + "-r" | "--revision") + if [ -n "${2}" ]; then + revision="${2}" + shift 2 + fi + ;; + "--production") + production="yes" + shift 1 + ;; + "--all-platforms") + all_platforms="yes" + shift 1 + ;; + "--deb") + deb="yes" + shift 1 + ;; + "--rpm") + rpm="yes" + shift 1 + ;; + "--tar") + tar="yes" + shift 1 + ;; + "--arm") + architecture="arm64" + shift 1 + ;; + "--silent") + verbose="silent" + shift 1 + ;; + "--debug") + verbose="debug" + shift 1 + ;; + + "-o" | "--output") + if [ -n "${2}" ]; then + output="${2}" + shift 2 + fi + ;; + *) + echo "help" + + help 1 + ;; + esac + done + + if [ -z "$app" ] | [ -z "$base" ] | [ -z "$security" ] | [ -z "$version" ]; then + echo "You must specify the app, base, security and version." + help 1 + fi + + if [ "$all_platforms" == "no" ] && [ "$deb" == "no" ] && [ "$rpm" == "no" ] && [ "$tar" == "no" ]; then + echo "You must specify at least one package to build." + help 1 + fi + + if [ "$verbose" = "debug" ]; then + set -x + fi + + build || exit 1 + + exit 0 +} + +main "$@" diff --git a/dev-tools/build-packages/config-dockerfile/entrypoint.sh b/dev-tools/build-packages/config-dockerfile/entrypoint.sh new file mode 100644 index 000000000000..76a7585d83a0 --- /dev/null +++ b/dev-tools/build-packages/config-dockerfile/entrypoint.sh @@ -0,0 +1,58 @@ +#!/bin/bash +set -e + +# Clone wazuh-dashboard +git clone --depth 1 --branch ${WAZUH_DASHBOARDS_BRANCH} https://github.com/wazuh/wazuh-dashboard.git /home/node/wzd +chown node.node /home/node/wzd + +## Install dependencies and build wazuh-dashboard + +cd /home/node/wzd +yarn osd bootstrap --production +yarn build --linux --skip-os-packages --release + +# Clone plugins +cd /home/node/wzd/plugins +git clone --depth 1 --branch ${WAZUH_SECURITY_DASHBOARDS_PLUGIN_BRANCH} https://github.com/wazuh/wazuh-security-dashboards-plugin.git +git clone --depth 1 --branch ${WAZUH_DASHBOARDS_PLUGINS} https://github.com/wazuh/wazuh-dashboard-plugins.git +git clone --depth 1 --branch ${WAZUH_DASHBOARDS_REPORTING_BRANCH} https://github.com/wazuh/wazuh-dashboards-reporting.git + +# Build wazuh-security-dashboards-plugin +cd /home/node/wzd/plugins/wazuh-security-dashboards-plugin +yarn +yarn build + +# Build wazuh-dashboards-reporting +cd /home/node/wzd/plugins/wazuh-dashboards-reporting +yarn +yarn build + +# Move plugins +cd /home/node/wzd/plugins +mv ./wazuh-dashboard-plugins/plugins/main ./wazuh +mv ./wazuh-dashboard-plugins/plugins/wazuh-core ./wazuh-core +mv ./wazuh-dashboard-plugins/plugins/wazuh-check-updates ./wazuh-check-updates + +# Build plugins +cd /home/node/wzd/plugins/wazuh +yarn +yarn build + +cd /home/node/wzd/plugins/wazuh-core +yarn +yarn build + +cd /home/node/wzd/plugins/wazuh-check-updates +yarn +yarn build + +# Zip packages +cd /home/node/ +mkdir packages +cd /home/node/packages +zip -r -j ./dashboard-package.zip ../wzd/target/opensearch-dashboards-${OPENSEARCH_DASHBOARDS_VERSION}-linux-x64.tar.gz +zip -r -j ./security-package.zip ../wzd/plugins/wazuh-security-dashboards-plugin/build/security-dashboards-${OPENSEARCH_DASHBOARDS_VERSION}.0.zip +zip -r -j ./wazuh-package.zip ../wzd/plugins/wazuh-check-updates/build/wazuhCheckUpdates-${OPENSEARCH_DASHBOARDS_VERSION}.zip ../wzd/plugins/wazuh/build/wazuh-${OPENSEARCH_DASHBOARDS_VERSION}.zip ../wzd/plugins/wazuh-core/build/wazuhCore-${OPENSEARCH_DASHBOARDS_VERSION}.zip +zip -r -j ./reporting-package.zip ../wzd/plugins/wazuh-dashboards-reporting/build/reportsDashboards-${OPENSEARCH_DASHBOARDS_VERSION}.zip + +exec "$@" diff --git a/dev-tools/build-packages/config/default b/dev-tools/build-packages/config/default new file mode 100644 index 000000000000..250239f4c827 --- /dev/null +++ b/dev-tools/build-packages/config/default @@ -0,0 +1,8 @@ +user="wazuh-dashboard" +group="wazuh-dashboard" +chroot="/" +chdir="/" +nice="" +KILL_ON_STOP_TIMEOUT=0 + +OSD_PATH_CONF="/etc/wazuh-dashboard" diff --git a/dev-tools/build-packages/config/wazuh-dashboard b/dev-tools/build-packages/config/wazuh-dashboard new file mode 100644 index 000000000000..ae87055c3a9d --- /dev/null +++ b/dev-tools/build-packages/config/wazuh-dashboard @@ -0,0 +1,170 @@ +#!/bin/sh +# chkconfig: 2345 95 20 +# description: Wazuh dashboard +# +# Source function libraries if present. +# (It improves integration with systemd) +# +# Red Hat +if [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions + +# Debian +elif [ -f /lib/lsb/init-functions ]; then + . /lib/lsb/init-functions + +# SUSE +elif [ -f /etc/rc.status ]; then + . /etc/rc.status + rc_reset +fi + +name=wazuh-dashboard +program=/usr/share/wazuh-dashboard/bin/opensearch-dashboards +args=-c\\\ /etc/wazuh-dashboard/opensearch_dashboards.yml +PID_DIR="/run/wazuh-dashboard" +pidfile="$PID_DIR/$name.pid" + +[ -r /etc/default/$name ] && . /etc/default/$name +[ -r /etc/sysconfig/$name ] && . /etc/sysconfig/$name + +export NODE_OPTIONS + +[ -z "$nice" ] && nice=0 + +trace() { + logger -t "/etc/init.d/wazuh-dashboard" "$@" +} + +emit() { + trace "$@" + echo "$@" +} + +start() { + + + # Setup any environmental stuff beforehand + + # Ensure that the PID_DIR exists (it is cleaned at OS startup time) + if [ -n "$PID_DIR" ] && [ ! -e "$PID_DIR" ]; then + mkdir -p "$PID_DIR" && chown "$user":"$group" "$PID_DIR" + fi + if [ -n "$pidfile" ] && [ ! -e "$pidfile" ]; then + touch "$pidfile" && chown "$user":"$group" "$pidfile" + fi + + + # Run the program! + + chroot --userspec "$user":"$group" "$chroot" sh -c "cd \"$chdir\";exec \"$program\" $args" & + + + + # Generate the pidfile from here. If we instead made the forked process + # generate it there will be a race condition between the pidfile writing + # and a process possibly asking for status. + echo $! > $pidfile + + emit "$name started" + return 0 +} + +stop() { + # Try a few times to kill TERM the program + if status ; then + pid=$(cat "$pidfile") + trace "Killing $name (pid $pid) with SIGTERM" + kill -TERM $pid + # Wait for it to exit. + for i in 1 2 3 4 5 ; do + trace "Waiting $name (pid $pid) to die..." + status || break + sleep 1 + done + if status ; then + if [ "$KILL_ON_STOP_TIMEOUT" -eq 1 ] ; then + trace "Timeout reached. Killing $name (pid $pid) with SIGKILL. This may result in data loss." + kill -KILL $pid + emit "$name killed with SIGKILL." + else + emit "$name stop failed; still running." + fi + else + emit "$name stopped." + fi + fi +} + +status() { + if [ -f "$pidfile" ] ; then + pid=$(cat "$pidfile") + if ps -p $pid > /dev/null 2> /dev/null ; then + # process by this pid is running. + # It may not be our pid, but that's what you get with just pidfiles. + # TODO(sissel): Check if this process seems to be the same as the one we + # expect. It'd be nice to use flock here, but flock uses fork, not exec, + # so it makes it quite awkward to use in this case. + return 0 + else + return 2 # program is dead but pid file exists + fi + else + return 3 # program is not running + fi +} + +force_stop() { + if status ; then + stop + status && kill -KILL $(cat "$pidfile") + fi +} + + +case "$1" in + force-start|start|stop|force-stop|restart) + trace "Attempting '$1' on wazuh-dashboard" + ;; +esac + +case "$1" in + force-start) + PRESTART=no + exec "$0" start + ;; + start) + status + code=$? + if [ $code -eq 0 ]; then + emit "$name is already running" + exit $code + else + start + exit $? + fi + ;; + stop) stop ;; + force-stop) force_stop ;; + status) + status + code=$? + if [ $code -eq 0 ] ; then + emit "$name is running" + else + emit "$name is not running" + fi + exit $code + ;; + restart) + + stop && start + ;; + *) + echo "Usage: $SCRIPTNAME {start|force-start|stop|force-start|force-stop|status|restart}" >&2 + exit 3 + ;; +esac + +exit $? + diff --git a/dev-tools/build-packages/config/wazuh-dashboard.service b/dev-tools/build-packages/config/wazuh-dashboard.service new file mode 100644 index 000000000000..ef1d2afd42f1 --- /dev/null +++ b/dev-tools/build-packages/config/wazuh-dashboard.service @@ -0,0 +1,15 @@ +[Unit] +Description=wazuh-dashboard + +[Service] +Type=simple +User=wazuh-dashboard +Group=wazuh-dashboard +EnvironmentFile=-/etc/default/wazuh-dashboard +EnvironmentFile=-/etc/sysconfig/wazuh-dashboard +ExecStart=/usr/share/wazuh-dashboard/bin/opensearch-dashboards +WorkingDirectory=/usr/share/wazuh-dashboard + +[Install] +WantedBy=multi-user.target + diff --git a/dev-tools/build-packages/deb/Docker/Dockerfile b/dev-tools/build-packages/deb/Docker/Dockerfile new file mode 100644 index 000000000000..6289cd35d3ad --- /dev/null +++ b/dev-tools/build-packages/deb/Docker/Dockerfile @@ -0,0 +1,17 @@ +FROM debian:10 + +ENV DEBIAN_FRONTEND=noninteractive + +# Installing necessary packages +RUN apt-get update && apt-get install -y --allow-change-held-packages apt-utils && \ + apt-get install -y --allow-change-held-packages \ + curl sudo wget expect gnupg build-essential \ + devscripts equivs selinux-basics procps gawk jq + +# Add the script to build the Debian package +ADD deb-builder.sh /usr/local/bin/builder +ADD debian /usr/local/src/debian +RUN chmod +x /usr/local/bin/builder + +# Set the entrypoint +ENTRYPOINT ["/usr/local/bin/builder"] diff --git a/dev-tools/build-packages/deb/deb-builder.sh b/dev-tools/build-packages/deb/deb-builder.sh new file mode 100755 index 000000000000..3e0e993d8c7a --- /dev/null +++ b/dev-tools/build-packages/deb/deb-builder.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +# Wazuh package builder +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +# Script parameters to build the package +target="wazuh-dashboard" +version=$1 +revision=$2 +architecture=$3 +commit_sha=$4 +is_production=$5 +verbose=$6 + +directory_base="/usr/share/wazuh-dashboard" + +# Paths +current_path="$( cd $(dirname $0) ; pwd -P )" + +# Folders +tmp_dir="/tmp" +out_dir="/output" +config_path=$tmp_dir/config + +if [ "$verbose" = "debug" ]; then + set -x +fi +trap clean INT +trap clean EXIT + +log() { + if [ "$verbose" = "info" ] || [ "$verbose" = "debug" ]; then + echo "$@" + fi +} + +clean() { + exit_code=$? + # Clean the files + rm -rf ${tmp_dir}/* + trap '' EXIT + exit ${exit_code} +} + +mkdir -p ${tmp_dir}/wazuh-dashboard-base +cd ${tmp_dir}/wazuh-dashboard-base +log "Extracting base tar.gz..." +tar -zxf ${out_dir}/wazuh-dashboard-$version-$revision-linux-$architecture.tar.gz +log "Preparing the package..." +jq '.wazuh.revision="'${revision}'"' package.json > pkgtmp.json && mv pkgtmp.json package.json +cp $config_path/* . +echo ${version} > VERSION +cd .. +tar -czf wazuh-dashboard.tar.gz wazuh-dashboard-base + +log "Setting up parameters" +if [ "${architecture}" = "x64" ]; then + architecture="amd64" +fi +# Build directories +build_dir=/build +pkg_name="${target}-${version}" +pkg_path="${build_dir}/${target}" +source_dir="${pkg_path}/${pkg_name}" +deb_file="${target}_${version}-${revision}_${architecture}.deb" +final_name="${target}_${version}-${revision}_${architecture}_${commit_sha}.deb" + +mkdir -p ${source_dir}/debian + +# Including spec files +cp -r /usr/local/src/debian/* ${source_dir}/debian/ + +# Generating directory structure to build the .deb package +cd ${build_dir}/${target} && tar -czf ${pkg_name}.orig.tar.gz "${pkg_name}" + +# Configure the package with the different parameters +sed -i "s:VERSION:${version}:g" ${source_dir}/debian/changelog +sed -i "s:RELEASE:${revision}:g" ${source_dir}/debian/changelog +sed -i "s:export INSTALLATION_DIR=.*:export INSTALLATION_DIR=${directory_base}:g" ${source_dir}/debian/rules + +# Installing build dependencies +cd ${source_dir} +mk-build-deps -ir -t "apt-get -o Debug::pkgProblemResolver=yes -y" + +log "Building the package..." +# Build package +debuild --no-lintian -b -uc -us \ + -eINSTALLATION_DIR="${directory_base}" \ + -eVERSION="${version}" \ + -eREVISION="${revision}" + +cd ${pkg_path} && sha512sum ${deb_file} >/${out_dir}/${deb_file}.sha512 + +if [ "${is_production}" = "no" ]; then + mv ${pkg_path}/${deb_file} /${out_dir}/${final_name} + mv /${out_dir}/${deb_file}.sha512 /${out_dir}/${final_name}.sha512 +else + mv ${pkg_path}/${deb_file} /${out_dir}/ +fi diff --git a/dev-tools/build-packages/deb/debian/changelog b/dev-tools/build-packages/deb/debian/changelog new file mode 100644 index 000000000000..3a5ac0f89eb2 --- /dev/null +++ b/dev-tools/build-packages/deb/debian/changelog @@ -0,0 +1,95 @@ +wazuh-dashboard (VERSION-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Fri, 05 May 2023 12:31:50 +0000 + +wazuh-dashboard (4.4.2-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 24 Apr 2023 12:31:50 +0000 + +wazuh-dashboard (4.4.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 17 Apr 2023 12:31:50 +0000 + +wazuh-dashboard (4.4.0-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Wed, 18 Jan 2023 12:31:50 +0000 + +wazuh-dashboard (4.3.10-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Thu, 10 Nov 2022 15:00:00 +0000 + +wazuh-dashboard (4.3.9-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 03 Oct 2022 15:00:00 +0000 + +wazuh-dashboard (4.3.8-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 19 Sep 2022 15:00:00 +0000 + +wazuh-dashboard (4.3.7-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 08 Aug 2022 15:00:00 +0000 + +wazuh-dashboard (4.3.6-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Thu, 07 Jul 2022 15:00:00 +0000 + +wazuh-dashboard (4.3.5-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Wed, 29 Jun 2022 15:00:00 +0000 + +wazuh-dashboard (4.3.4-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Tue, 07 Jun 2022 15:41:39 +0000 + +wazuh-dashboard (4.3.3-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Tue, 31 May 2022 15:41:39 +0000 + +wazuh-dashboard (4.3.2-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 30 May 2022 15:41:39 +0000 + +wazuh-dashboard (4.3.1-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Wed, 18 May 2022 12:14:41 +0000 + +wazuh-dashboard (4.3.0-RELEASE) unstable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Thu, 05 May 2022 12:15:57 +0000 + +wazuh-dashboard (4.2.5-1) UNRELEASED; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 15 Nov 2021 16:47:07 +0000 diff --git a/dev-tools/build-packages/deb/debian/control b/dev-tools/build-packages/deb/debian/control new file mode 100644 index 000000000000..5f35b4f6e601 --- /dev/null +++ b/dev-tools/build-packages/deb/debian/control @@ -0,0 +1,12 @@ +Source: wazuh-dashboard +Section: admin +Priority: extra +Maintainer: Wazuh, Inc +Build-Depends: debhelper-compat (= 12) +Standards-Version: 4.5.0 +Homepage: https://www.wazuh.com + +Package: wazuh-dashboard +Architecture: any +Depends: debconf, adduser, curl, tar, libcap2-bin +Description: Wazuh dashboard is a user interface and visualization tool for security-related data. This Wazuh central component enables exploring, visualizing, and analyzing the stored security alerts generated by the Wazuh server. Wazuh dashboard enables inspecting the status and managing the configurations of the Wazuh cluster and agents as well as creating and managing users and roles. In addition, it allows testing the ruleset and making calls to the Wazuh API. Documentation can be found at https://documentation.wazuh.com/current/getting-started/components/wazuh-dashboard.html diff --git a/dev-tools/build-packages/deb/debian/copyright b/dev-tools/build-packages/deb/debian/copyright new file mode 100644 index 000000000000..d2003bbbead7 --- /dev/null +++ b/dev-tools/build-packages/deb/debian/copyright @@ -0,0 +1,22 @@ +This work was packaged for Debian by: + + Wazuh, Inc on Sat, 04 Dec 2021 14:04:26 +0000 + +It was downloaded from: + + https://www.wazuh.com + +Copyright: + + GNU General Public License version 2. + +License: + + GNU General Public License version 2. + +The Debian packaging is: + + Copyright (C) 2021 Wazuh, Inc + +and is licensed under the GPL version 2, +see "/usr/share/common-licenses/GPL-2". \ No newline at end of file diff --git a/dev-tools/build-packages/deb/debian/postinst b/dev-tools/build-packages/deb/debian/postinst new file mode 100644 index 000000000000..8951ca33792a --- /dev/null +++ b/dev-tools/build-packages/deb/debian/postinst @@ -0,0 +1,55 @@ +#!/bin/sh +# postinst script for wazuh-dashboard +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +export NAME=wazuh-dashboard +export CONFIG_DIR=/etc/"${NAME}" +export INSTALLATION_DIR=/usr/share/"${NAME}" +export PID_DIR=/run/"${NAME}" + +# Setting Owner and group of own folders +mkdir -p "${PID_DIR}" +chown -R "${NAME}":"${NAME}" "${PID_DIR}" + +case "$1" in +configure) + chmod 750 "${TARGET_DIR}""${CONFIG_DIR}" + chown -R "${NAME}":"${NAME}" "${TARGET_DIR}""${CONFIG_DIR}" + chmod 750 "${TARGET_DIR}""${INSTALLATION_DIR}" + chown -R "${NAME}":"${NAME}" "${TARGET_DIR}""${INSTALLATION_DIR}" + setcap 'cap_net_bind_service=+ep' "${INSTALLATION_DIR}"/node/bin/node + setcap 'cap_net_bind_service=+ep' "${INSTALLATION_DIR}"/node/fallback/bin/node + if [ -f "${INSTALLATION_DIR}"/"${NAME}".restart ]; then + rm -f "${INSTALLATION_DIR}"/"${NAME}".restart + if command -v systemctl >/dev/null 2>&1 && systemctl >/dev/null 2>&1; then + systemctl daemon-reload >/dev/null 2>&1 + systemctl restart wazuh-dashboard.service >/dev/null 2>&1 + elif command -v service >/dev/null 2>&1 && service wazuh-dashboard status 2>/dev/null | grep "running" >/dev/null 2>&1; then + service wazuh-dashboard restart >/dev/null 2>&1 + fi + fi + if [ ! -f "${CONFIG_DIR}"/opensearch_dashboards.keystore ]; then + runuser "${NAME}" --shell="/bin/bash" --command="${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore create" >/dev/null 2>&1 + runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.username --stdin" >/dev/null 2>&1 + runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.password --stdin" >/dev/null 2>&1 + fi + /usr/share/wazuh-dashboard/bin/opensearch-dashboards-plugin remove wazuh --allow-root >/dev/null 2>&1 + ;; + +abort-upgrade | abort-remove | abort-deconfigure) ;; + +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +exit 0 diff --git a/dev-tools/build-packages/deb/debian/postrm b/dev-tools/build-packages/deb/debian/postrm new file mode 100644 index 000000000000..a5b88616434f --- /dev/null +++ b/dev-tools/build-packages/deb/debian/postrm @@ -0,0 +1,82 @@ +#!/bin/sh +# postinst script for wazuh-dashboard +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +export NAME=wazuh-dashboard +export CONFIG_DIR=/etc/"${NAME}" +export INSTALLATION_DIR=/usr/share/"${NAME}" +export PID_DIR=/run/${NAME} + +# +# This script is executed in the post-removal phase +# +# On Debian, +# $1=remove : indicates a removal +# $1=purge : indicates an upgrade + +# source the default env file +if [ -f "/etc/default/${NAME}" ]; then + . "/etc/default/${NAME}" +fi + +REMOVE_DIRS=false +REMOVE_CONFIG_DIRECTORY=false +REMOVE_USER_AND_GROUP=false + +case "$1" in +remove) + REMOVE_DIRS=true + ;; + +purge) + REMOVE_DIRS=true + REMOVE_CONFIG_DIRECTORY=true + REMOVE_USER_AND_GROUP=true + ;; +failed-upgrade | abort-install | upgrade | abort-upgrade | disappear) ;; + +*) + + echo "post remove script called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +if [ "$REMOVE_DIRS" = "true" ]; then + + if [ -d ${PID_DIR} ]; then + echo -n "Deleting PID directory..." + rm -rf ${PID_DIR} >/dev/null 2>&1 + echo " OK" + fi + + if [ -d "${INSTALLATION_DIR}" ]; then + echo -n "Deleting installation directory..." + rm -rf "${INSTALLATION_DIR}" + echo " OK" + fi + + # Delete the config directory if we are purging + if [ "$REMOVE_CONFIG_DIRECTORY" = "true" ]; then + rm -rf "${CONFIG_DIR}" + echo " OK" + fi + +fi + +if [ "$REMOVE_USER_AND_GROUP" = "true" ]; then + if id "${NAME}" >/dev/null 2>&1; then + userdel "${NAME}" + fi + + if getent group "${NAME}" >/dev/null 2>&1; then + groupdel "${NAME}" + fi +fi diff --git a/dev-tools/build-packages/deb/debian/preinst b/dev-tools/build-packages/deb/debian/preinst new file mode 100644 index 000000000000..1d955fd8dc1c --- /dev/null +++ b/dev-tools/build-packages/deb/debian/preinst @@ -0,0 +1,73 @@ +#!/bin/sh +# postinst script for wazuh-dashboard +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +# +# This script is executed in the pre-installation phase +# +# On Debian, +# $1=install : indicates an new install +# $1=upgrade : indicates an upgrade + +# configuration variables +export NAME=wazuh-dashboard +export CONFIG_DIR=/etc/"${NAME}" +export INSTALLATION_DIR=/usr/share/"${NAME}" + +case "$1" in +# Debian #################################################### +install) + # environment configuration + mkdir -p "${CONFIG_DIR}" + mkdir -p "${INSTALLATION_DIR}" + + # Create wazuh-dashboard group if not existing + if ! getent group "${NAME}" >/dev/null 2>&1; then + echo -n "Creating ${NAME} group..." + addgroup --quiet --system "${NAME}" + echo " OK" + fi + # Create wazuh-dashboard user if not existing + if ! id "${NAME}" >/dev/null 2>&1; then + echo -n "Creating ${NAME} user..." + adduser --quiet \ + --system \ + --no-create-home \ + --home /nonexistent \ + --ingroup "${NAME}" \ + --disabled-password \ + --shell /bin/false \ + "${NAME}" + echo " OK" + fi + + ;; +upgrade) + # Stop the services to upgrade the package + if command -v systemctl >/dev/null 2>&1 && systemctl >/dev/null 2>&1 && systemctl is-active --quiet "${NAME}" >/dev/null 2>&1; then + systemctl stop "${NAME}".service >/dev/null 2>&1 + touch "${INSTALLATION_DIR}"/"${NAME}".restart + # Check for SysV + elif command -v service >/dev/null 2>&1 && service "${NAME}" status 2>/dev/null | grep "running" >/dev/null 2>&1; then + service "${NAME}" stop >/dev/null 2>&1 + touch "${INSTALLATION_DIR}"/"${NAME}".restart + fi + ;; +abort-deconfigure | abort-upgrade | abort-remove) ;; + +*) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + + ;; + +esac + +exit 0 diff --git a/dev-tools/build-packages/deb/debian/prerm b/dev-tools/build-packages/deb/debian/prerm new file mode 100644 index 000000000000..eef54075a11b --- /dev/null +++ b/dev-tools/build-packages/deb/debian/prerm @@ -0,0 +1,82 @@ +#!/bin/sh +# postinst script for wazuh-dashboard +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +export NAME=wazuh-dashboard +export CONFIG_DIR=/etc/"${NAME}" +export INSTALLATION_DIR=/usr/share/"${NAME}" + +# +# This script is executed in the pre-remove phase +# +# On Debian, +# $1=remove : indicates a removal +# $1=upgrade : indicates an upgrade + +# source the default env file +if [ -f "/etc/default/${NAME}" ]; then + . "/etc/default/${NAME}" +fi + +STOP_REQUIRED=false +REMOVE_SERVICE=false + +case "$1" in + +# Debian #################################################### +remove) + STOP_REQUIRED=true + REMOVE_SERVICE=true + ;; +upgrade | deconfigure | failed-upgrade) ;; + +*) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +# Stops the service +if [ "$STOP_REQUIRED" = "true" ]; then + echo -n "Stopping wazuh-dashboard service..." + if command -v systemctl >/dev/null; then + systemctl --no-reload stop "${NAME}".service + + elif [ -x /etc/init.d/"${NAME}" ]; then + if command -v invoke-rc.d >/dev/null; then + invoke-rc.d "${NAME}" stop + else + /etc/init.d/"${NAME}" stop + fi + + # older suse linux distributions do not ship with systemd + # but do not have an /etc/init.d/ directory + # this tries to start the wazuh-dashboard service on these + # as well without failing this script + elif [ -x /etc/rc.d/init.d/"${NAME}" ]; then + /etc/rc.d/init.d/"${NAME}" stop + fi + echo " OK" +fi + +if [ "$REMOVE_SERVICE" = "true" ]; then + if command -v systemctl >/dev/null; then + systemctl disable "${NAME}".service >/dev/null 2>&1 || true + fi + + if command -v chkconfig >/dev/null; then + chkconfig --del "${NAME}" 2>/dev/null || true + fi + + if command -v update-rc.d >/dev/null; then + update-rc.d "${NAME}" remove >/dev/null || true + fi +fi diff --git a/dev-tools/build-packages/deb/debian/rules b/dev-tools/build-packages/deb/debian/rules new file mode 100644 index 000000000000..ac2087b35ef0 --- /dev/null +++ b/dev-tools/build-packages/deb/debian/rules @@ -0,0 +1,116 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 +# +# Modified by Wazuh +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +export TARGET_DIR=${CURDIR}/debian/wazuh-dashboard +export NAME=wazuh-dashboard +export CONFIG_DIR=/etc/$(NAME) +export INSTALLATION_DIR=$(INSTALLATION_DIR) +export USER=$(NAME) +export GROUP=$(NAME) +export DASHBOARD_FILE=wazuh-dashboard.tar.gz + +# ----------------------------------------------------------------------------- + +%: + dh $@ + +# ----------------------------------------------------------------------------- + +override_dh_shlibdeps: + +# ----------------------------------------------------------------------------- + +override_dh_auto_configure: + +# ----------------------------------------------------------------------------- + +override_dh_auto_install: + +# ----------------------------------------------------------------------------- + +override_dh_install: + cp /tmp/$(DASHBOARD_FILE) ./ + + groupadd $(GROUP) + useradd -g $(GROUP) $(USER) + + tar -xf $(DASHBOARD_FILE) + sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" + sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" + + + mkdir -p $(TARGET_DIR)$(CONFIG_DIR) + mkdir -p $(TARGET_DIR)$(INSTALLATION_DIR) + mkdir -p $(TARGET_DIR)/etc/systemd/system + mkdir -p $(TARGET_DIR)/etc/default + + cp wazuh-dashboard-base/config/node.options $(TARGET_DIR)$(CONFIG_DIR) + cp wazuh-dashboard-base/config/opensearch_dashboards.yml $(TARGET_DIR)$(CONFIG_DIR) + mv wazuh-dashboard-base/* $(TARGET_DIR)$(INSTALLATION_DIR) + + mkdir -p $(TARGET_DIR)$(INSTALLATION_DIR)/config + + cp $(TARGET_DIR)$(INSTALLATION_DIR)/wazuh-dashboard.service $(TARGET_DIR)/etc/systemd/system/wazuh-dashboard.service + cp $(TARGET_DIR)$(INSTALLATION_DIR)/wazuh-dashboard $(TARGET_DIR)/etc/systemd/system/$(NAME) + cp $(TARGET_DIR)$(INSTALLATION_DIR)/default $(TARGET_DIR)/etc/default/$(NAME) + + rm -rf $(TARGET_DIR)$(INSTALLATION_DIR)/etc + + chown -R $(USER):$(GROUP) $(TARGET_DIR)$(INSTALLATION_DIR) + chown -R $(USER):$(GROUP) $(TARGET_DIR)$(CONFIG_DIR) + + find $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/wazuh/ -exec chown $(USER):$(GROUP) {} \; + +# ----------------------------------------------------------------------------- + +override_dh_fixperms: + chmod 750 $(TARGET_DIR)$(CONFIG_DIR) + chown -R $(USER):$(GROUP) $(TARGET_DIR)$(CONFIG_DIR) + chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR) + chown -R $(USER):$(GROUP) $(TARGET_DIR)$(INSTALLATION_DIR) + chown root:root $(TARGET_DIR)/etc/systemd/system/wazuh-dashboard.service + chown root:root $(TARGET_DIR)/etc/systemd/system/"$(NAME)" + chown $(USER):$(GROUP) $(TARGET_DIR)/etc/default/"$(NAME)" + chown $(USER):$(GROUP) $(TARGET_DIR)$(INSTALLATION_DIR)/VERSION + chmod 440 $(TARGET_DIR)$(INSTALLATION_DIR)/VERSION + chmod 750 $(TARGET_DIR)/etc/systemd/system/wazuh-dashboard + chmod 750 $(TARGET_DIR)/etc/default/wazuh-dashboard + chmod 640 "$(TARGET_DIR)$(CONFIG_DIR)"/opensearch_dashboards.yml + chmod 640 "$(TARGET_DIR)$(CONFIG_DIR)"/node.options + chmod 640 $(TARGET_DIR)/etc/systemd/system/wazuh-dashboard.service + find "$(TARGET_DIR)$(INSTALLATION_DIR)" -type d -exec chmod 750 {} \; + find "$(TARGET_DIR)$(INSTALLATION_DIR)" -type f -perm 644 -exec chmod 640 {} \; + find "$(TARGET_DIR)$(INSTALLATION_DIR)" -type f -perm 755 -exec chmod 750 {} \; + find "$(TARGET_DIR)$(INSTALLATION_DIR)" -type f -perm 744 -exec chmod 740 {} \; + +# ----------------------------------------------------------------------------- + +override_dh_strip: + dh_strip --no-automatic-dbgsym -XlibGLESv2.so -XlibEGL.so + +# ----------------------------------------------------------------------------- + +.PHONY: override_dh_strip override_dh_auto_clean override_dh_auto_build override_dh_auto_configure diff --git a/dev-tools/build-packages/rpm/Docker/Dockerfile b/dev-tools/build-packages/rpm/Docker/Dockerfile new file mode 100644 index 000000000000..c62abf3820c1 --- /dev/null +++ b/dev-tools/build-packages/rpm/Docker/Dockerfile @@ -0,0 +1,22 @@ +FROM rockylinux:8.5 + +# Install all the necessary tools to build the packages +RUN yum clean all && yum update -y +RUN yum install -y openssh-clients sudo gnupg \ + yum-utils epel-release redhat-rpm-config rpm-devel \ + zlib zlib-devel rpm-build autoconf automake \ + glibc-devel libtool perl jq + +#RUN yum install -y --nobest https://repo.ius.io/ius-release-el7.rpm + +RUN yum update -y && yum install -y python3 + +RUN ln -fs /usr/bin/python3.6 /usr/bin/python + +# Add the scripts to build the RPM package +ADD rpm-builder.sh /usr/local/bin/builder +ADD wazuh-dashboard.spec /usr/local/src/wazuh-dashboard.spec +RUN chmod +x /usr/local/bin/builder + +# Set the entrypoint +ENTRYPOINT ["/usr/local/bin/builder"] diff --git a/dev-tools/build-packages/rpm/rpm-builder.sh b/dev-tools/build-packages/rpm/rpm-builder.sh new file mode 100644 index 000000000000..180139b121ff --- /dev/null +++ b/dev-tools/build-packages/rpm/rpm-builder.sh @@ -0,0 +1,112 @@ +#!/bin/bash + +# Wazuh package builder +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +set -e + +# Script parameters to build the package +target="wazuh-dashboard" +version=$1 +revision=$2 +architecture=$3 +commit_sha=$4 +is_production=$5 +verbose=$6 + +# Paths +current_path="$( cd $(dirname $0) ; pwd -P )" + +# Folders +tmp_dir="/tmp" +out_dir="/output" +config_path=$tmp_dir/config + +if [ "$verbose" = "debug" ]; then + set -x +fi + +trap clean INT +trap clean EXIT + +log() { + if [ "$verbose" = "info" ] || [ "$verbose" = "debug" ]; then + echo "$@" + fi +} + +clean() { + exit_code=$? + # Clean the files + rm -rf ${tmp_dir}/* + trap '' EXIT + exit ${exit_code} +} + +mkdir -p ${tmp_dir}/wazuh-dashboard-base +cd ${tmp_dir}/wazuh-dashboard-base +log "Extracting base tar.gz..." +tar -zxf ${out_dir}/wazuh-dashboard-$version-$revision-linux-$architecture.tar.gz +log "Preparing the package..." +jq '.wazuh.revision="'${revision}'"' package.json > pkgtmp.json && mv pkgtmp.json package.json +mkdir -p etc/services +cp $config_path/* etc/services +echo ${version} > VERSION +cd .. +tar -czf wazuh-dashboard.tar.gz wazuh-dashboard-base + +log "Setting up parameters" + +if [ "${architecture}" = "x64" ]; then + architecture="x86_64" +else + architecture="aarch64" +fi + +build_dir=/build +rpm_build_dir=${build_dir}/rpmbuild +directory_base="/usr/share/wazuh-dashboard" + + +pkg_name=${target}-${version} +pkg_path="${rpm_build_dir}/RPMS/${architecture}" +file_name="${target}-${version}-${revision}" +rpm_file="${file_name}.${architecture}.rpm" + +if [ "$is_production" = "no" ]; then + final_name="${target}_${version}-${revision}_${architecture}_${commit_sha}.rpm" +else + final_name="${target}_${version}-${revision}_${architecture}.rpm" +fi + +mkdir -p ${rpm_build_dir}/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} + +mkdir ${build_dir}/${pkg_name} + +# Including spec file +cp /usr/local/src/${target}.spec ${rpm_build_dir}/SPECS/${pkg_name}.spec +cd ${build_dir} && tar czf "${rpm_build_dir}/SOURCES/${pkg_name}.tar.gz" "${pkg_name}" + +log "Building RPM..." +/usr/bin/rpmbuild -v \ + --define "_topdir ${rpm_build_dir}" \ + --define "_version ${version}" \ + --define "_release ${revision}" \ + --define "_localstatedir ${directory_base}" \ + --target ${architecture} \ + -ba ${rpm_build_dir}/SPECS/${pkg_name}.spec + +cd ${pkg_path} && sha512sum ${rpm_file} >/${out_dir}/${rpm_file}.sha512 + +find ${pkg_path}/ -maxdepth 3 -type f -name "${file_name}*" -exec mv {} /${out_dir}/ \; +if [ "${is_production}" = "no" ]; then + mv /${out_dir}/${rpm_file} /${out_dir}/${final_name} + mv /${out_dir}/${rpm_file}.sha512 /${out_dir}/${final_name}.sha512 +fi + + diff --git a/dev-tools/build-packages/rpm/wazuh-dashboard.spec b/dev-tools/build-packages/rpm/wazuh-dashboard.spec new file mode 100644 index 000000000000..705c5f488117 --- /dev/null +++ b/dev-tools/build-packages/rpm/wazuh-dashboard.spec @@ -0,0 +1,432 @@ +# Wazuh dashboard SPEC +# Copyright (C) 2021, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. +Summary: Wazuh dashboard is a user interface and visualization tool for security-related data. Documentation can be found at https://documentation.wazuh.com/current/getting-started/components/wazuh-dashboard.html +Name: wazuh-dashboard +Version: %{_version} +Release: %{_release} +License: GPL +Group: System Environment/Daemons +Source0: %{name}-%{version}.tar.gz +URL: https://www.wazuh.com/ +buildroot: %{_tmppath}/%{name}-%{version}-%{release}-wazuh-dashboard-%(%{__id_u} -n) +Vendor: Wazuh, Inc +Packager: Wazuh, Inc +Requires(pre): /usr/sbin/groupadd /usr/sbin/useradd +Requires(preun): /sbin/service +Requires(postun): /sbin/service +AutoReqProv: no +Requires: libcap +ExclusiveOS: linux + +# ----------------------------------------------------------------------------- + +%global USER %{name} +%global GROUP %{name} +%global CONFIG_DIR /etc/%{name} +%global PID_DIR /run/%{name} +%global INSTALL_DIR /usr/share/%{name} +%global DASHBOARD_FILE wazuh-dashboard.tar.gz +%define _source_payload w9.gzdio +%define _binary_payload w9.gzdio + +# ----------------------------------------------------------------------------- + + +%description +Wazuh dashboard is a user interface and visualization tool for security-related data. This Wazuh central component enables exploring, visualizing, and analyzing the stored security alerts generated by the Wazuh server. Wazuh dashboard enables inspecting the status and managing the configurations of the Wazuh cluster and agents as well as creating and managing users and roles. In addition, it allows testing the ruleset and making calls to the Wazuh API. Documentation can be found at https://documentation.wazuh.com/current/getting-started/components/wazuh-dashboard.html + +# ----------------------------------------------------------------------------- + +%prep + +cp /tmp/%{DASHBOARD_FILE} ./ + +groupadd %{GROUP} +useradd -g %{GROUP} %{USER} + +# ----------------------------------------------------------------------------- + +%build + +tar -xf %{DASHBOARD_FILE} +sed -i 's/OSD_NODE_OPTS_PREFIX/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_NODE_OPTS_PREFIX/g' "wazuh-dashboard-base/bin/opensearch-dashboards" +sed -i 's/OSD_USE_NODE_JS_FILE_PATH/OSD_PATH_CONF="\/etc\/wazuh-dashboard" OSD_USE_NODE_JS_FILE_PATH/g' "wazuh-dashboard-base/bin/opensearch-dashboards-keystore" + + +# ----------------------------------------------------------------------------- + +%install + +mkdir -p %{buildroot}%{CONFIG_DIR} +mkdir -p %{buildroot}%{INSTALL_DIR} +mkdir -p %{buildroot}/etc/systemd/system +mkdir -p %{buildroot}%{_initrddir} +mkdir -p %{buildroot}/etc/default + +cp wazuh-dashboard-base/config/node.options %{buildroot}%{CONFIG_DIR} +cp wazuh-dashboard-base/config/opensearch_dashboards.yml %{buildroot}%{CONFIG_DIR} +cp wazuh-dashboard-base/VERSION %{buildroot}%{INSTALL_DIR} + +mv wazuh-dashboard-base/* %{buildroot}%{INSTALL_DIR} + +# Set custom welcome styles + +mkdir -p %{buildroot}%{INSTALL_DIR}/config + +cp %{buildroot}%{INSTALL_DIR}/etc/services/wazuh-dashboard.service %{buildroot}/etc/systemd/system/wazuh-dashboard.service +cp %{buildroot}%{INSTALL_DIR}/etc/services/default %{buildroot}/etc/default/wazuh-dashboard + +chmod 640 %{buildroot}/etc/systemd/system/wazuh-dashboard.service +chmod 640 %{buildroot}/etc/default/wazuh-dashboard + +rm -rf %{buildroot}%{INSTALL_DIR}/etc/ + +find %{buildroot}%{INSTALL_DIR} -exec chown %{USER}:%{GROUP} {} \; +find %{buildroot}%{CONFIG_DIR} -exec chown %{USER}:%{GROUP} {} \; + +chown root:root %{buildroot}/etc/systemd/system/wazuh-dashboard.service + +find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -exec chown %{USER}:%{GROUP} {} \; +find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 644 -exec chmod 640 {} \; +find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 755 -exec chmod 750 {} \; +find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type d -exec chmod 750 {} \; +find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 744 -exec chmod 740 {} \; + +# ----------------------------------------------------------------------------- + +%pre +# Create the wazuh-dashboard group if it doesn't exists +if [ $1 = 1 ]; then + if command -v getent > /dev/null 2>&1 && ! getent group %{GROUP} > /dev/null 2>&1; then + groupadd -r %{GROUP} + elif ! getent group %{GROUP} > /dev/null 2>&1; then + groupadd -r %{GROUP} + fi + # Create the wazuh-dashboard user if it doesn't exists + if ! getent passwd %{USER} > /dev/null 2>&1; then + useradd -g %{GROUP} -G %{USER} -d %{INSTALL_DIR}/ -r -s /sbin/nologin wazuh-dashboard + fi +fi +# Stop the services to upgrade the package +if [ $1 = 2 ]; then + if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1 && systemctl is-active --quiet wazuh-dashboard > /dev/null 2>&1; then + systemctl stop wazuh-dashboard.service > /dev/null 2>&1 + touch %{INSTALL_DIR}/wazuh-dashboard.restart + # Check for SysV + elif command -v service > /dev/null 2>&1 && service wazuh-dashboard status 2>/dev/null | grep "is running" > /dev/null 2>&1; then + service wazuh-dashboard stop > /dev/null 2>&1 + touch %{INSTALL_DIR}/wazuh-dashboard.restart + fi +fi + +# ----------------------------------------------------------------------------- + +%post +setcap 'cap_net_bind_service=+ep' %{INSTALL_DIR}/node/bin/node +setcap 'cap_net_bind_service=+ep' %{INSTALL_DIR}/node/fallback/bin/node + +if [ ! -f %{CONFIG_DIR}/opensearch_dashboards.keystore ]; then + runuser %{USER} --shell="/bin/bash" --command="%{INSTALL_DIR}/bin/opensearch-dashboards-keystore create" > /dev/null 2>&1 + runuser %{USER} --shell="/bin/bash" --command="echo kibanaserver | %{INSTALL_DIR}/bin/opensearch-dashboards-keystore add opensearch.username --stdin" > /dev/null 2>&1 + runuser %{USER} --shell="/bin/bash" --command="echo kibanaserver | %{INSTALL_DIR}/bin/opensearch-dashboards-keystore add opensearch.password --stdin" > /dev/null 2>&1 +fi + +# ----------------------------------------------------------------------------- + +%preun +if [ $1 = 0 ];then # Remove + echo -n "Stopping wazuh-dashboard service..." + if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1; then + systemctl stop wazuh-dashboard.service > /dev/null 2>&1 + # Check for SysV + elif command -v service > /dev/null 2>&1; then + service wazuh-dashboard stop > /dev/null 2>&1 + fi +fi + +# ----------------------------------------------------------------------------- + +%postun +if [ $1 = 0 ];then + # If the package is been uninstalled + # Remove the wazuh-dashboard user if it exists + if getent passwd %{USER} > /dev/null 2>&1; then + userdel %{USER} >/dev/null 2>&1 + fi + # Remove the wazuh-dashboard group if it exists + if command -v getent > /dev/null 2>&1 && getent group %{GROUP} > /dev/null 2>&1; then + groupdel %{GROUP} >/dev/null 2>&1 + elif getent group %{GROUP} > /dev/null 2>&1; then + groupdel %{GROUP} >/dev/null 2>&1 + fi + + # Remove /etc/wazuh-dashboard and /usr/share/wazuh-dashboard dirs + rm -rf %{INSTALL_DIR} + if [ -d %{PID_DIR} ]; then + rm -rf %{PID_DIR} + fi +fi + +# ----------------------------------------------------------------------------- + +# posttrans code is the last thing executed in a install/upgrade +%posttrans +if [ ! -d %{PID_DIR} ]; then + mkdir -p %{PID_DIR} + chown %{USER}:%{GROUP} %{PID_DIR} +fi + +if [ -f %{INSTALL_DIR}/wazuh-dashboard.restart ]; then + rm -f %{INSTALL_DIR}/wazuh-dashboard.restart + if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1; then + systemctl restart wazuh-dashboard.service > /dev/null 2>&1 + # Check for SysV + elif command -v service > /dev/null 2>&1; then + service wazuh-dashboard restart > /dev/null 2>&1 + fi + +fi +/usr/share/wazuh-dashboard/bin/opensearch-dashboards-plugin remove wazuh --allow-root + +# ----------------------------------------------------------------------------- + +%clean +rm -fr %{buildroot} + +# ----------------------------------------------------------------------------- + +%files +%defattr(-,%{USER},%{GROUP}) +%dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR} + +%attr(0750, %{USER}, %{GROUP}) "/etc/default/wazuh-dashboard" +%config(noreplace) %attr(0640, %{USER}, %{GROUP}) "%{CONFIG_DIR}/opensearch_dashboards.yml" +%config(noreplace) %attr(0640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/config/opensearch_dashboards.yml" +%config(noreplace) %attr(0640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/config/node.options" + +%attr(440, %{USER}, %{GROUP}) %{INSTALL_DIR}/VERSION +%dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR} +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/core" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/core/*" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/downloaders" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/utils" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin/foo" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/plugins" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/plugins/* +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/rotate" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/core" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/warnings" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/apm" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules/*" +%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node_modules/.yarn-integrity" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/node/*" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/data" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/plugins" +%attr(-, %{USER}, %{GROUP}) "%{INSTALL_DIR}/plugins/*" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/settings.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/remove/remove.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/dev.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/list/list.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/logger.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/errors.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/lib/log_warnings.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/opensearch_dashboards.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/downloaders/file.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/downloaders/http.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/zip.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/download.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/install.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/settings.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/rename.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/invalid_name.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin_different_version.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/banana.jpg" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin_no_opensearch_dashboards.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/corrupt.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/__fixtures__/replies/test_plugin_many.zip" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/cleanup.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/pack.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/install/progress.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/cli.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_plugin/dist.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/cli_keystore.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/add.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/create.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/utils/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/utils/prompt.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/dev.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/get_keystore.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/remove.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/dist.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli_keystore/list.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/apm.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/force.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/is_root.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/root/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/polyfill.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/node_version_validator.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/child_process.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/harden/lodash_template.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/no_transpilation.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/exit_on_warning.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/setup_node_env/dist.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/np_ui_plugin_public_dirs.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/optimize_mixin.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/proxy_bundles_route.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/file_hash.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/file_hash_cache.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/plugin/foo/plugin.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/__fixtures__/outside_output.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/bundles_route.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/optimize/bundles_route/dynamic_asset_response.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/command.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/help.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/cli.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/serve.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/read_keystore.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/invalid_config.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/opensearch_dashboards_log_file.test.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/opensearch_dashboards_log_console.test.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/serve/integration_tests/__fixtures__/reload_logging_config/opensearch_dashboards.test.yml" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/cli/dist.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/unset.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/version.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/artifact_type.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/utils/deep_clone_with_buffers.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/rotate/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/rotate/log_rotator.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/apply_filters_to_keys.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_format.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_reporter.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_format_json.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_with_metadata.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/configuration.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_interceptor.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/logging/log_format_string.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/core/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/telemetry_localization_collector.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/localization/file_integrity.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/get_translations_path.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/i18n/constants.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/osd_server.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/warnings/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/register_hapi_plugins.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/http/setup_base_path_provider.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/override.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/complete.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/schema.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/config/config.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/keystore.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/server/keystore/errors.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_mixin.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/ui_render_mixin.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/osd_bundles_loader_source.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/template.js.hbs" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/startup.js.hbs" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/ui_render/bootstrap/app_bootstrap.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/legacy/ui/apm/index.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs/docs_repo.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/src/docs/cli.js" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/package.json" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/LICENSE.txt" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/NOTICE.txt" +%attr(640, %{USER}, %{GROUP}) "%{INSTALL_DIR}/README.txt" +%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/use_node" +%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/opensearch-dashboards" +%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/opensearch-dashboards-plugin" +%attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/bin/opensearch-dashboards-keystore" +%dir %attr(750, %{USER}, %{GROUP}) "%{INSTALL_DIR}/config" +%attr(640, %{USER}, %{GROUP}) "%{CONFIG_DIR}/node.options" +%attr(640, root, root) "/etc/systemd/system/wazuh-dashboard.service" + +%changelog +* Fri May 05 2023 support - %{version} +- More info: https://documentation.wazuh.com/current/release-notes/ +* Mon Apr 24 2023 support - 4.4.2 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Mon Apr 17 2023 support - 4.4.1 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Wed Jan 18 2023 support - 4.4.0 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Thu Nov 10 2022 support - 4.3.10 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Mon Oct 03 2022 support - 4.3.9 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Mon Sep 19 2022 support - 4.3.8 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Mon Aug 08 2022 support - 4.3.7 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Thu Jul 07 2022 support - 4.3.6 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Wed Jun 29 2022 support - 4.3.5 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Tue Jun 07 2022 support - 4.3.4 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Tue May 31 2022 support - 4.3.3 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Mon May 30 2022 support - 4.3.2 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Wed May 18 2022 support - 4.3.1 +- More info: https://documentation.wazuh.com/current/release-notes/ +* Thu May 05 2022 support - 4.3.0 +- More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/dev-tools/signoff-check.sh b/dev-tools/signoff-check.sh index 683628c5664d..cb147e943cf9 100755 --- a/dev-tools/signoff-check.sh +++ b/dev-tools/signoff-check.sh @@ -5,7 +5,7 @@ # Validate input parameters if [ -z $1 ] || [ -z $2 ] then - echo usage: ./signoff-check.sh commit1 commit2 + echo usage: ./signoff_check.sh commit1 commit2 echo echo Checks all of the commits between commit1 \(exclusive\) and commit2 \(inclusive\) echo were made with the --signoff flag enabled diff --git a/dev-tools/test-packages/deb/Dockerfile b/dev-tools/test-packages/deb/Dockerfile new file mode 100644 index 000000000000..3220241e4a30 --- /dev/null +++ b/dev-tools/test-packages/deb/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:jammy +ARG PACKAGE +RUN mkdir -p /tmp +RUN apt-get update --fix-missing +RUN apt-get install -y curl libcap2-bin +COPY ${PACKAGE} /tmp/wazuh.deb +RUN dpkg -i /tmp/wazuh.deb diff --git a/dev-tools/test-packages/rpm/Dockerfile b/dev-tools/test-packages/rpm/Dockerfile new file mode 100644 index 000000000000..36c0500bb9ce --- /dev/null +++ b/dev-tools/test-packages/rpm/Dockerfile @@ -0,0 +1,11 @@ +FROM centos:latest + +RUN mkdir -p /tmp +FROM centos +ARG PACKAGE +RUN cd /etc/yum.repos.d/ +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* +RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* +RUN yum update -y +COPY ${PACKAGE} /tmp/wazuh.rpm +RUN yum install /tmp/wazuh.rpm -y diff --git a/dev-tools/test-packages/test-packages.sh b/dev-tools/test-packages/test-packages.sh new file mode 100644 index 000000000000..c40dcbf49e8f --- /dev/null +++ b/dev-tools/test-packages/test-packages.sh @@ -0,0 +1,174 @@ +#!/bin/sh + +# Package name +PACKAGE="" +# Container name +CONTAINER_NAME="wazuh-dashboard" +# Files to check +FILES="/etc/wazuh-dashboard/opensearch_dashboards.yml /usr/share/wazuh-dashboard" +# Owner of the files +FILE_OWNER="wazuh-dashboard" + +# Remove container and image +clean() { + docker stop $CONTAINER_NAME + docker rm $CONTAINER_NAME + docker rmi $CONTAINER_NAME +} + +# Check if files exist and are owned by wazuh-dashboard +files_exist() { + for FILE in $FILES; do + if docker exec $CONTAINER_NAME ls $FILE >/dev/null 2>&1; then + file_owner=$(docker exec $CONTAINER_NAME stat -c '%U' $FILE) + if [ "$file_owner" != "$FILE_OWNER" ]; then + echo "ERROR: $FILE is owned by $file_owner instead of $FILE_OWNER" + clean + exit 1 + fi + echo "$FILE exist and is owned by $FILE_OWNER" + else + echo "ERROR: $FILE does not exist" + clean + exit 1 + fi + done +} + +# Check if opensearch_dashboards.yml is the same as the one in the package +check_opensearch_dashboard_yml() { + docker cp ../../config/opensearch_dashboards.prod.yml $CONTAINER_NAME:/tmp/opensearch_dashboards.yml + + diff_opensearch_dashboard_yml=$(docker exec $CONTAINER_NAME diff /etc/wazuh-dashboard/opensearch_dashboards.yml /tmp/opensearch_dashboards.yml) + + if [ -n "$diff_opensearch_dashboard_yml" ]; then + echo "ERROR: opensearch_dashboards.yml is not the same as the one in the package" + echo $diff_opensearch_dashboard_yml + clean + exit 1 + fi + echo $(docker exec $CONTAINER_NAME diff /etc/wazuh-dashboard/opensearch_dashboards.yml /tmp/opensearch_dashboards.yml) + echo "opensearch_dashboards.yml is the same as the one in the package" +} + +# Check if metadata is correct for deb packages +check_metadata_deb() { + + IFS='_' read -r -a arrayNameFile <<< "$PACKAGE" + metadataVersion=$(docker exec $CONTAINER_NAME apt show wazuh-dashboard | grep Version | awk '{print $2}') + metadataPackage=$(docker exec $CONTAINER_NAME apt show wazuh-dashboard | grep Package | awk '{print $2}') + metadataStatus=$(docker exec $CONTAINER_NAME apt show wazuh-dashboard | grep Status) + + # Check if metadata is correct + if [ "${arrayNameFile[1]}" != "$metadataVersion" ]; then + echo "ERROR: metadata version is not the same as the one in the package" + echo "metadata version: $metadataVersion" + echo "package version: ${arrayNameFile[1]}" + clean + exit 1 + elif [ "${arrayNameFile[0]}" != "$metadataPackage" ]; then + echo "ERROR: metadata package is not the same as the one in the package" + echo "metadata package: $metadataPackage" + echo "package package: ${arrayNameFile[0]}" + clean + exit 1 + elif [ "$metadataStatus" != "Status: install ok installed" ]; then + echo "ERROR: metadata status is not 'Status: install ok installed'" + echo "metadata status: $metadataStatus" + clean + exit 1 + fi + + echo "metadata version is correct: $metadataVersion" + echo "metadata package is correct: $metadataPackage" + echo "metadata status is $metadataStatus" +} + +check_metadata_rpm() { + metadataVersion=$(docker exec $CONTAINER_NAME rpm -q --qf '%{VERSION}-%{RELEASE}' wazuh-dashboard) + metadataPackage=$(docker exec $CONTAINER_NAME rpm -q --qf '%{NAME}' wazuh-dashboard) + + # Check if metadata is correct + if [[ $PACKAGE != *"$metadataVersion"* ]]; then + echo "ERROR: metadata version is not the same as the one in the package" + echo "metadata version: $metadataVersion" + echo "package version: $PACKAGE" + clean + exit 1 + elif [[ $PACKAGE != "$metadataPackage"* ]]; then + echo "ERROR: metadata package is not the same as the one in the package" + echo "metadata package: $metadataPackage" + echo "package package: $PACKAGE" + clean + exit 1 + fi + + echo "metadata version is correct: $metadataVersion" + echo "metadata package is correct: $metadataPackage" +} + +source ../utils/retry-operation.sh + +# Run test +test() { + + if [[ $PACKAGE == *".deb" ]]; then + retry_operation "test deb package" 5 15 \ + "docker build --build-arg PACKAGE=$PACKAGE -t $CONTAINER_NAME ./deb/ && \ + docker run -it --rm -d --name $CONTAINER_NAME $CONTAINER_NAME && \ + check_metadata_deb" || exit 1 + elif [[ $PACKAGE == *".rpm" ]]; then + retry_operation "test rpm package" 5 15 \ + "docker build --build-arg PACKAGE=$PACKAGE -t $CONTAINER_NAME ./rpm/ && \ + docker run -it --rm -d --name $CONTAINER_NAME $CONTAINER_NAME && \ + check_metadata_rpm" || exit 1 + else + echo "ERROR: $PACKAGE is not a valid package (valid packages are .deb and .rpm ))" + exit 1 + fi + + files_exist + + check_opensearch_dashboard_yml +} + +# Show help +help() { + echo + echo "Usage: $0 [OPTIONS]" + echo + echo " -p, --package Set Wazuh Dashboard rpm package name,which has to be in the /dev-tools/test-packages// folder." + echo + exit $1 +} + +main() { + while [ -n "${1}" ]; do + case "${1}" in + "-h" | "--help") + help 0 + ;; + "-p" | "--package") + if [ -n "${2}" ]; then + PACKAGE="${2}" + shift 2 + else + help 1 + fi + ;; + *) + help 1 + ;; + esac + done + + if [ -z "$PACKAGE" ] ; then + help 1 + fi + + test + + clean +} + +main "$@" diff --git a/dev-tools/utils/retry-operation.sh b/dev-tools/utils/retry-operation.sh new file mode 100644 index 000000000000..e128ff0538cf --- /dev/null +++ b/dev-tools/utils/retry-operation.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Function to retry an operation a number of times +# Arguments: +# $1: Name of the operation +# $2: Number of attempts +# $3: Delay between attempts +# $4+: Command to execute +retry_operation() { + local operation_name=$1 + local max_attempts=$2 + local sleep_time=$3 + shift 3 # Delete the first 3 arguments + + for i in $(seq 1 $max_attempts); do + if eval "$@"; then + return 0 + else + if [ $i -eq $max_attempts ]; then + echo "Failed to $operation_name after $max_attempts attempts" + return 1 + fi + sleep $sleep_time + fi + done +} diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 000000000000..fa199650b978 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,75 @@ +# Frontend development environments + +Install [Docker Desktop][docker-desktop] as per its instructions, available for Windows, Mac +and Linux (Ubuntu, Debian & Fedora). +This ensures that the development experience between Linux, Mac and Windows is as +similar as possible. + +> IMPORTANT: be methodic during the installation of Docker Desktop, and proceed +> step by step as described in their documentation. Make sure that your system +> meets the system requirements before installing Docker Desktop, and read any +> post-installation note, specially on Linux: [Differences between +> Docker Desktop for Linux and Docker Engine][docker-variant]. + +## Pre-requisites + +1. Assign resources to [Docker Desktop][docker-desktop]. The requirements for the + environments are: + + - 8 GB of RAM (minimum) + - 4 cores + + The more resources the better ☺ + +2. Clone the [wazuh-dashboard][app-repo] and the [wazuh-security-dashboards-plugin][security-repo] + repositories at the same level. + +3. Set up user permissions + + The Docker volumes will be created by the internal Docker user, making them + read-only. To prevent this, a new group named `docker-desktop` and GUID 100999 + needs to be created, then added to your user and the source code folder: + + ```bash + sudo groupadd -g 100999 docker-desktop + sudo useradd -u 100999 -g 100999 -M docker-desktop + sudo chown -R docker-desktop:docker-desktop $WZD_HOME + sudo usermod -aG docker-desktop $USER + ``` + +## Understanding Docker contexts + +Before we begin starting Docker containers, we need to understand the +differences between Docker Engine and Docker Desktop, more precisely, that the +use different contexts. + +Carefully read these two sections of the Docker documentation: + +- [Differences between Docker Desktop for Linux and Docker Engine][docker-variant]. +- [Switch between Docker Desktop and Docker Engine][docker-context]. + +Docker Desktop will change to its context automatically at start, so be sure +that any existing Docker container using the default context is **stopped** +before starting Docker Desktop and any of the environments in this folder. + +## Starting up the environments + +Use the sh script to up the environment. + +Example: + +```bash +Usage: ./dev.sh {up|down|stop} [security] +``` + +Once the `wazuh-dashboard` container is up, attach a shell to it and run `yarn start --no-base-path` +to start the application. + +The dependencies of the project will be installed automatically by the `installed` container, +even for the security plugin, if the security flag is provided. + +[docker-desktop]: https://docs.docker.com/get-docker +[docker-variant]: https://docs.docker.com/desktop/install/linux-install/#differences-between-docker-desktop-for-linux-and-docker-engine +[docker-context]: https://docs.docker.com/desktop/install/linux-install/#context +[app-repo]: https://github.com/wazuh/wazuh-dashboard +[security-repo]: https://github.com/wazuh/wazuh-security-dashboards-plugin diff --git a/docker/config/opensearch_dashboards.dev.security.yml b/docker/config/opensearch_dashboards.dev.security.yml new file mode 100644 index 000000000000..52e711c9f6cc --- /dev/null +++ b/docker/config/opensearch_dashboards.dev.security.yml @@ -0,0 +1,13 @@ +server.host: "0.0.0.0" + +opensearch.hosts: ["https://indexer:9200"] +opensearch.ssl.verificationMode: none +opensearch.username: "kibanaserver" +opensearch.password: "kibanaserver" +opensearch.requestHeadersWhitelist: [ authorization,securitytenant ] +opensearch_security.multitenancy.enabled: true +opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"] +opensearch_security.readonly_mode.roles: ["kibana_read_only"] + +# Use this setting if you are running opensearch-dashboards without https +opensearch_security.cookie.secure: false diff --git a/docker/config/opensearch_dashboards.dev.yml b/docker/config/opensearch_dashboards.dev.yml new file mode 100644 index 000000000000..38dfc4f00f19 --- /dev/null +++ b/docker/config/opensearch_dashboards.dev.yml @@ -0,0 +1 @@ +server.host: "0.0.0.0" diff --git a/docker/dev.sh b/docker/dev.sh new file mode 100755 index 000000000000..3562d7dbbbf0 --- /dev/null +++ b/docker/dev.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# Change working directory to the root of the repository +cd "${0%/*}/.." + +COMPOSE_FILE=docker/dev.yml + +# Check if 2nd argument is security +if [ "$2" = "security" ]; then + export SECURITY_PLUGIN_REPO_PATH="../../wazuh-security-dashboards-plugin" + COMPOSE_FILE=docker/dev_security.yml + +fi + +# Common variables +export REPO_PATH=$(pwd) +export NODE_VERSION=$(cat $REPO_PATH/.nvmrc) +export OPENSEARCH_VERSION=$(bash $REPO_PATH/docker/get_version.sh) + +COMPOSE_CMD="docker compose -f $COMPOSE_FILE" + +print_variables() { + echo "NODE_VERSION: $NODE_VERSION" + echo "OPENSEARCH_VERSION: $OPENSEARCH_VERSION" +} + +case $1 in +up) + print_variables + $COMPOSE_CMD up -d + ;; +down) + echo "Cleaning up..." + $COMPOSE_CMD exec wazuh-dashboard yarn osd clean + $COMPOSE_CMD down + ;; +stop) + $COMPOSE_CMD stop + ;; +*) + echo "Usage: $0 {up|down|stop} [security]" + exit 1 + ;; +esac diff --git a/docker/dev.yml b/docker/dev.yml new file mode 100644 index 000000000000..8f41bf45eb0a --- /dev/null +++ b/docker/dev.yml @@ -0,0 +1,35 @@ +version: "3.9" + +services: + # Runs the bootstrap and exits + installer: + image: node:${NODE_VERSION} + container_name: installer-${OPENSEARCH_VERSION} + volumes: + - ${REPO_PATH}:/home/node/app + user: "1000:1000" + working_dir: /home/node/app + command: > + /bin/bash -c " + yarn osd bootstrap + " + + wazuh-dashboard: + image: node:${NODE_VERSION} + container_name: wazuh-dashboard-${OPENSEARCH_VERSION} + depends_on: + installer: + condition: service_completed_successfully + ports: + - 5601:5601 # Map host port 5601 to container port 5601 + expose: + - "5601" # Expose port 5601 for web access to Wazuh Dashboard + volumes: + - ${REPO_PATH}:/home/node/app + - ${REPO_PATH}/docker/config/opensearch_dashboards.dev.yml:/home/node/app/config/opensearch_dashboards.dev.yml + user: "1000:1000" + working_dir: /home/node/app + command: > + /bin/bash -c " + yarn opensearch snapshot + " diff --git a/docker/dev_security.yml b/docker/dev_security.yml new file mode 100755 index 000000000000..b35460eb9346 --- /dev/null +++ b/docker/dev_security.yml @@ -0,0 +1,86 @@ +version: "3.9" + +services: + indexer: + # Specifying the latest available image - modify if you want a specific version + image: opensearchproject/opensearch:${OPENSEARCH_VERSION} + container_name: indexer-${OPENSEARCH_VERSION} + environment: + # Name the cluster + - cluster.name=opensearch-cluster + # Name the node that will run in this container + - node.name=indexer + # Nodes to look for when discovering the cluster + - discovery.seed_hosts=indexer + # Nodes eligible to serve as cluster manager + - cluster.initial_cluster_manager_nodes=indexer + # Disable JVM heap memory swapping + - bootstrap.memory_lock=true + # Set min and max JVM heap sizes to at least 50% of system RAM + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + - OPENSEARCH_INITIAL_ADMIN_PASSWORD=yourStrongPassword123! + ulimits: + # Set memlock to unlimited (no soft or hard limit) + memlock: + soft: -1 + hard: -1 + # Maximum number of open files for the opensearch user - set to at least 65536 + nofile: + soft: 65536 + hard: 65536 + volumes: + # Creates volume called opensearch-data and mounts it to the container + - opensearch-data:/usr/share/opensearch/data + ports: + - 9200:9200 # REST API + - 9600:9600 # Performance Analyzer + networks: + # All of the containers will join the same Docker bridge network + - opensearch-net + + # Runs the bootstrap and exits + installer: + image: node:${NODE_VERSION} + container_name: installer-security-${OPENSEARCH_VERSION} + volumes: + - ${REPO_PATH}:/home/node/app + - ${SECURITY_PLUGIN_REPO_PATH}:/home/node/app/plugins/security + user: "1000:1000" + working_dir: /home/node/app + command: > + /bin/bash -c " + yarn osd bootstrap + cd plugins/security + yarn + " + + wazuh-dashboard: + image: node:${NODE_VERSION} + container_name: wazuh-dashboard-security-${OPENSEARCH_VERSION} + depends_on: + installer: + condition: service_completed_successfully + # indexer: + # condition: service_healthy + ports: + - 5601:5601 # Map host port 5601 to container port 5601 + expose: + - "5601" # Expose port 5601 for web access to Wazuh Dashboard + volumes: + - ${REPO_PATH}:/home/node/app + - ${SECURITY_PLUGIN_REPO_PATH}:/home/node/app/plugins/security + - ${REPO_PATH}/docker/config/opensearch_dashboards.dev.security.yml:/home/node/app/config/opensearch_dashboards.dev.yml + user: "1000" + working_dir: /home/node/app + networks: + - opensearch-net + command: > + /bin/bash -c " + tail -f /dev/null + " + +volumes: + opensearch-data: + +networks: + opensearch-net: diff --git a/docker/get_version.sh b/docker/get_version.sh new file mode 100755 index 000000000000..555dd89e9e9c --- /dev/null +++ b/docker/get_version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 + +set -e + +PACKAGE_VERSION=$(cat package.json \ +| grep version \ +| head -1 \ +| awk -F: '{ print $2 }' \ +| sed 's/[",]//g' \ +| tr -d [:space:]) + +echo "$PACKAGE_VERSION" \ No newline at end of file diff --git a/docs/docker-dev/docker-dev-setup-manual.md b/docs/docker-dev/docker-dev-setup-manual.md index 3263372a3d45..da40ab93f4a2 100644 --- a/docs/docker-dev/docker-dev-setup-manual.md +++ b/docs/docker-dev/docker-dev-setup-manual.md @@ -6,10 +6,10 @@ The following instructions demonstrate how to set up a development environment f 2. In the terminal, run the command below. * This should create a folder named `opensearch-dashboards-docker-dev` and it should contain two files: `docker-compose.yml` and `entrypoint.sh`. - * Here is the link to the installer script: `https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/main/dev-tools/install-docker-dev.sh` if needed. + * Here is the link to the installer script: `https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/main/dev_tools/install_docker_dev.sh` if needed. ```bash -curl -o- https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/main/dev-tools/install-docker-dev.sh | bash +curl -o- https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/main/dev_tools/install_docker_dev.sh | bash ``` 3. Open VS Code or [install it](https://code.visualstudio.com/download), if it's not already installed. @@ -66,7 +66,7 @@ This section explains how to run Selenium functional tests using Docker and debu 2. Make sure you have completed steps 1-5 in the [Docker Development Environment Setup](#docker-development-environment-setup). Now, ensure you have 5 files, `docker-compose.yml`, `docker-compose.selenium.yml`, `Dockerfile.selenium`, `entrypoint.sh` and `start-vnc.sh`. You can also download them by running the installer script. This time you need to pass a parameter `--ftr`. ```bash -curl -o- https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/main/dev-tools/install-docker-dev.sh | bash -s -- --ftr +curl -o- https://raw.githubusercontent.com/opensearch-project/OpenSearch-Dashboards/main/dev_tools/install_docker_dev.sh | bash -s -- --ftr ``` 3. In the terminal, run the following commands to stop any running containers, build the new configuration, and start the containers: diff --git a/package.json b/package.json index 5a27274c6263..97cc0a54a232 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,10 @@ "number": 8467, "sha": "6cb7fec4e154faa0a4a3fee4b33dfef91b9870d9" }, + "wazuh": { + "version": "5.0.0", + "revision": "00" + }, "homepage": "https://opensearch.org", "bugs": { "url": "http://github.com/opensearch-project/OpenSearch-Dashboards/issues" @@ -86,7 +90,9 @@ "osd:ciGroup10": "echo \"dashboard_sanity_test_spec.js\"", "osd:ciGroup11": "echo \"apps/vis_builder/*.js\"", "generate:opensearchsqlantlr": "./node_modules/antlr4ng-cli/index.js -Dlanguage=TypeScript -o ./src/plugins/data/public/antlr/opensearch_sql/.generated -visitor -no-listener -Xexact-output-dir ./src/plugins/data/public/antlr/opensearch_sql/grammar/OpenSearchSQLLexer.g4 ./src/plugins/data/public/antlr/opensearch_sql/grammar/OpenSearchSQLParser.g4", - "generate:opensearchpplantlr": "./node_modules/antlr4ng-cli/index.js -Dlanguage=TypeScript -o ./src/plugins/data/public/antlr/opensearch_ppl/.generated -visitor -no-listener -Xexact-output-dir ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLLexer.g4 ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4" + "generate:opensearchpplantlr": "./node_modules/antlr4ng-cli/index.js -Dlanguage=TypeScript -o ./src/plugins/data/public/antlr/opensearch_ppl/.generated -visitor -no-listener -Xexact-output-dir ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLLexer.g4 ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4", + "wzd-revision": "scripts/use_node -e \"console.log(require('./package.json').wazuh.revision)\"", + "wzd-version": "scripts/use_node -e \"console.log(require('./package.json').wazuh.version)\"" }, "repository": { "type": "git", @@ -504,4 +510,4 @@ "node": ">=14.20.1 <19", "yarn": "^1.22.10" } -} +} \ No newline at end of file diff --git a/packages/osd-config/src/__snapshots__/env.test.ts.snap b/packages/osd-config/src/__snapshots__/env.test.ts.snap index 74a05672b5d0..a5143dd6d9ea 100644 --- a/packages/osd-config/src/__snapshots__/env.test.ts.snap +++ b/packages/osd-config/src/__snapshots__/env.test.ts.snap @@ -34,6 +34,7 @@ Env { "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "dist": false, "version": "v1", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -77,6 +78,7 @@ Env { "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "dist": false, "version": "v1", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -119,6 +121,7 @@ Env { "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "dist": false, "version": "some-version", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -161,6 +164,7 @@ Env { "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "dist": false, "version": "some-version", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -203,6 +207,7 @@ Env { "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "dist": false, "version": "some-version", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -245,6 +250,7 @@ Env { "buildSha": "feature-v1-build-sha", "dist": true, "version": "v1", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -287,6 +293,7 @@ Env { "buildSha": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "dist": false, "version": "v1", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", @@ -329,6 +336,7 @@ Env { "buildSha": "feature-v1-build-sha", "dist": true, "version": "v1", + "wazuhVersion": "4.x.x", }, "pluginSearchPaths": Array [ "/some/home/dir/src/plugins", diff --git a/packages/osd-config/src/config_service.test.ts b/packages/osd-config/src/config_service.test.ts index 0f634537be7e..65a06598a6ec 100644 --- a/packages/osd-config/src/config_service.test.ts +++ b/packages/osd-config/src/config_service.test.ts @@ -48,6 +48,9 @@ const packageInfos: RawPackageInfo = { number: 42, sha: 'one', }, + wazuh: { + version: '4.5.0', + }, }; const emptyArgv = getEnvOptions(); const defaultEnv = new Env('/opensearch-dashboards', packageInfos, emptyArgv); @@ -270,6 +273,9 @@ test('correctly passes context', async () => { number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.5.0', + }, }; const env = new Env('/opensearch-dashboards', mockPackage, getEnvOptions()); diff --git a/packages/osd-config/src/env.test.ts b/packages/osd-config/src/env.test.ts index 32febbc52eb0..bffc1af4bf86 100644 --- a/packages/osd-config/src/env.test.ts +++ b/packages/osd-config/src/env.test.ts @@ -42,6 +42,9 @@ const packageInfos: RawPackageInfo = { number: 42, sha: 'one', }, + wazuh: { + version: '4.x.x', + }, }; beforeEach(() => { @@ -52,6 +55,9 @@ test('correctly creates default environment in dev mode when isDevClusterMaster mockPackage.raw = { branch: 'some-branch', version: 'some-version', + wazuh: { + version: '4.x.x', + }, }; const defaultEnv = Env.createDefault( @@ -71,6 +77,9 @@ test('correctly creates default environment in dev mode when isDevClusterManager mockPackage.raw = { branch: 'some-branch', version: 'some-version', + wazuh: { + version: '4.x.x', + }, }; const defaultEnv = Env.createDefault( @@ -90,6 +99,9 @@ test('correctly creates default environment in dev mode when isDevClusterManager mockPackage.raw = { branch: 'some-branch', version: 'some-version', + wazuh: { + version: '4.x.x', + }, }; const defaultEnv = Env.createDefault( @@ -114,6 +126,9 @@ test('correctly creates default environment in prod distributable mode.', () => number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.x.x', + }, }; const defaultEnv = Env.createDefault( @@ -136,6 +151,9 @@ test('correctly creates default environment in prod non-distributable mode.', () number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.x.x', + }, }; const defaultEnv = Env.createDefault( @@ -158,6 +176,9 @@ test('correctly creates default environment if `--env.name` is supplied.', () => number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.x.x', + }, }; const defaultDevEnv = Env.createDefault( @@ -191,6 +212,9 @@ test('correctly creates environment with constructor.', () => { number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.x.x', + }, }, getEnvOptions({ cliArgs: { dev: false }, diff --git a/packages/osd-config/src/env.ts b/packages/osd-config/src/env.ts index e27498c341a0..e82355595e99 100644 --- a/packages/osd-config/src/env.ts +++ b/packages/osd-config/src/env.ts @@ -67,6 +67,9 @@ export interface RawPackageInfo { number: number; sha: string; }; + wazuh: { + version: string; + }; } export class Env { @@ -159,6 +162,7 @@ export class Env { : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', version: pkg.version, dist: isOpenSearchDashboardsDistributable, + wazuhVersion: pkg.wazuh.version, }); } } diff --git a/packages/osd-config/src/types.ts b/packages/osd-config/src/types.ts index c4a82f68502b..1a0927770d08 100644 --- a/packages/osd-config/src/types.ts +++ b/packages/osd-config/src/types.ts @@ -37,6 +37,7 @@ export interface PackageInfo { buildNum: number; buildSha: string; dist: boolean; + wazuhVersion: string; } /** diff --git a/packages/osd-ui-shared-deps/theme.ts b/packages/osd-ui-shared-deps/theme.ts index cf769ab3f94a..965e1aa928bc 100644 --- a/packages/osd-ui-shared-deps/theme.ts +++ b/packages/osd-ui-shared-deps/theme.ts @@ -38,7 +38,7 @@ export type Theme = typeof LightTheme; // in the OpenSearch Dashboards app we can rely on this global being defined, but in // some cases (like jest) the global is undefined export const tag: string = globals.__osdThemeTag__; -const themeVersion = tag?.replace(/(light|dark)$/, '') || 'v8'; +const themeVersion = tag?.replace(/(light|dark)$/, '') || 'v7'; export const version = parseInt(themeVersion.replace(/[^\d]+/g, ''), 10) || 8; export const darkMode = tag?.endsWith?.('dark'); diff --git a/src/cli_plugin/install/settings.js b/src/cli_plugin/install/settings.js index cfd576f8ff5a..3a878dcfffd1 100644 --- a/src/cli_plugin/install/settings.js +++ b/src/cli_plugin/install/settings.js @@ -36,9 +36,12 @@ import { fromRoot } from '../../core/server/utils'; const LATEST_PLUGIN_BASE_URL = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards'; +const LATEST_WAZUH_PLUGIN_BASE_URL = 'https://packages-dev.wazuh.com/pre-release/ui/dashboard'; -function generateUrls({ version, plugin }) { - return [plugin, generatePluginUrl(version, plugin)]; +function generateUrls({ version, plugin, wazuhVersion }) { + return plugin.includes('wazuh') + ? [plugin, generateWazuhPluginUrl(wazuhVersion, plugin)] + : [plugin, generatePluginUrl(version, plugin)]; } function generatePluginUrl(version, plugin) { @@ -49,6 +52,10 @@ function generatePluginUrl(version, plugin) { return `${LATEST_PLUGIN_BASE_URL}/${version}/latest/${platform}/${arch}/${type}/builds/opensearch-dashboards/plugins/${plugin}-${version}.zip`; } +function generateWazuhPluginUrl(version, plugin) { + return `${LATEST_WAZUH_PLUGIN_BASE_URL}/${plugin}-${version}-1.zip`; +} + export function parseMilliseconds(val) { let result; @@ -70,6 +77,7 @@ export function parse(command, options, osdPackage) { config: options.config || '', plugin: command, version: osdPackage.version, + wazuhVersion: osdPackage.wazuh.version, pluginDir: fromRoot('plugins'), }; @@ -77,5 +85,8 @@ export function parse(command, options, osdPackage) { settings.workingPath = resolve(settings.pluginDir, '.plugin.installing'); settings.tempArchiveFile = resolve(settings.workingPath, 'archive.part'); + // Clean up. + delete settings.wazuhVersion; + return settings; } diff --git a/src/cli_plugin/install/settings.test.js b/src/cli_plugin/install/settings.test.js index 60313e3fe9b8..07b19da3ffeb 100644 --- a/src/cli_plugin/install/settings.test.js +++ b/src/cli_plugin/install/settings.test.js @@ -61,7 +61,12 @@ describe('parseMilliseconds function', function () { describe('parse function', function () { const command = 'plugin name'; const defaultOptions = { pluginDir: fromRoot('plugins') }; - const osdPackage = { version: 1234 }; + const osdPackage = { + version: 1234, + wazuh: { + version: 1234, + }, + }; afterAll(() => { Object.defineProperties(process, { diff --git a/src/core/common/logos/__snapshots__/get_logos.test.ts.snap b/src/core/common/logos/__snapshots__/get_logos.test.ts.snap index 6c7746f3533a..05ad8483e21d 100644 --- a/src/core/common/logos/__snapshots__/get_logos.test.ts.snap +++ b/src/core/common/logos/__snapshots__/get_logos.test.ts.snap @@ -512,102 +512,102 @@ colorScheme = "light" exports[`getLogos when unbranded returns the correct logos 1`] = ` AnimatedMark.dark.type = "default" -AnimatedMark.dark.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_dark.svg" +AnimatedMark.dark.url = "/mocked/base/path/ui/logos/spinner_on_dark.svg" AnimatedMark.light.type = "default" -AnimatedMark.light.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_light.svg" +AnimatedMark.light.url = "/mocked/base/path/ui/logos/spinner_on_light.svg" AnimatedMark.type = "default" -AnimatedMark.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_light.svg" +AnimatedMark.url = "/mocked/base/path/ui/logos/spinner_on_light.svg" Application.dark.type = "default" -Application.dark.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_dark.svg" +Application.dark.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_dark.svg" Application.light.type = "default" -Application.light.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_light.svg" +Application.light.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_light.svg" Application.type = "default" -Application.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_light.svg" +Application.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_light.svg" CenterMark.dark.type = "default" -CenterMark.dark.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_dark.svg" +CenterMark.dark.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_dark.svg" CenterMark.light.type = "default" -CenterMark.light.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_light.svg" +CenterMark.light.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_light.svg" CenterMark.type = "default" -CenterMark.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_light.svg" +CenterMark.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_light.svg" Mark.dark.type = "default" -Mark.dark.url = "/mocked/base/path/ui/logos/opensearch_mark_on_dark.svg" +Mark.dark.url = "/mocked/base/path/ui/logos/wazuh_mark_on_dark.svg" Mark.light.type = "default" -Mark.light.url = "/mocked/base/path/ui/logos/opensearch_mark_on_light.svg" +Mark.light.url = "/mocked/base/path/ui/logos/wazuh_mark_on_light.svg" Mark.type = "default" -Mark.url = "/mocked/base/path/ui/logos/opensearch_mark_on_light.svg" +Mark.url = "/mocked/base/path/ui/logos/wazuh_mark_on_light.svg" OpenSearch.dark.type = "default" -OpenSearch.dark.url = "/mocked/base/path/ui/logos/opensearch_on_dark.svg" +OpenSearch.dark.url = "/mocked/base/path/ui/logos/wazuh_on_dark.svg" OpenSearch.light.type = "default" -OpenSearch.light.url = "/mocked/base/path/ui/logos/opensearch_on_light.svg" +OpenSearch.light.url = "/mocked/base/path/ui/logos/wazuh_on_light.svg" OpenSearch.type = "default" -OpenSearch.url = "/mocked/base/path/ui/logos/opensearch_on_light.svg" +OpenSearch.url = "/mocked/base/path/ui/logos/wazuh_on_light.svg" colorScheme = "light" `; exports[`getLogos when unbranded returns the correct logos when dark color scheme is requested 1`] = ` AnimatedMark.dark.type = "default" -AnimatedMark.dark.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_dark.svg" +AnimatedMark.dark.url = "/mocked/base/path/ui/logos/spinner_on_dark.svg" AnimatedMark.light.type = "default" -AnimatedMark.light.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_light.svg" +AnimatedMark.light.url = "/mocked/base/path/ui/logos/spinner_on_light.svg" AnimatedMark.type = "default" -AnimatedMark.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_dark.svg" +AnimatedMark.url = "/mocked/base/path/ui/logos/spinner_on_dark.svg" Application.dark.type = "default" -Application.dark.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_dark.svg" +Application.dark.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_dark.svg" Application.light.type = "default" -Application.light.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_light.svg" +Application.light.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_light.svg" Application.type = "default" -Application.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_dark.svg" +Application.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_dark.svg" CenterMark.dark.type = "default" -CenterMark.dark.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_dark.svg" +CenterMark.dark.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_dark.svg" CenterMark.light.type = "default" -CenterMark.light.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_light.svg" +CenterMark.light.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_light.svg" CenterMark.type = "default" -CenterMark.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_dark.svg" +CenterMark.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_dark.svg" Mark.dark.type = "default" -Mark.dark.url = "/mocked/base/path/ui/logos/opensearch_mark_on_dark.svg" +Mark.dark.url = "/mocked/base/path/ui/logos/wazuh_mark_on_dark.svg" Mark.light.type = "default" -Mark.light.url = "/mocked/base/path/ui/logos/opensearch_mark_on_light.svg" +Mark.light.url = "/mocked/base/path/ui/logos/wazuh_mark_on_light.svg" Mark.type = "default" -Mark.url = "/mocked/base/path/ui/logos/opensearch_mark_on_dark.svg" +Mark.url = "/mocked/base/path/ui/logos/wazuh_mark_on_dark.svg" OpenSearch.dark.type = "default" -OpenSearch.dark.url = "/mocked/base/path/ui/logos/opensearch_on_dark.svg" +OpenSearch.dark.url = "/mocked/base/path/ui/logos/wazuh_on_dark.svg" OpenSearch.light.type = "default" -OpenSearch.light.url = "/mocked/base/path/ui/logos/opensearch_on_light.svg" +OpenSearch.light.url = "/mocked/base/path/ui/logos/wazuh_on_light.svg" OpenSearch.type = "default" -OpenSearch.url = "/mocked/base/path/ui/logos/opensearch_on_dark.svg" +OpenSearch.url = "/mocked/base/path/ui/logos/wazuh_on_dark.svg" colorScheme = "dark" `; exports[`getLogos when unbranded returns the correct logos when light color scheme is requested 1`] = ` AnimatedMark.dark.type = "default" -AnimatedMark.dark.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_dark.svg" +AnimatedMark.dark.url = "/mocked/base/path/ui/logos/spinner_on_dark.svg" AnimatedMark.light.type = "default" -AnimatedMark.light.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_light.svg" +AnimatedMark.light.url = "/mocked/base/path/ui/logos/spinner_on_light.svg" AnimatedMark.type = "default" -AnimatedMark.url = "/mocked/base/path/ui/logos/opensearch_spinner_on_light.svg" +AnimatedMark.url = "/mocked/base/path/ui/logos/spinner_on_light.svg" Application.dark.type = "default" -Application.dark.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_dark.svg" +Application.dark.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_dark.svg" Application.light.type = "default" -Application.light.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_light.svg" +Application.light.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_light.svg" Application.type = "default" -Application.url = "/mocked/base/path/ui/logos/opensearch_dashboards_on_light.svg" +Application.url = "/mocked/base/path/ui/logos/wazuh_dashboards_on_light.svg" CenterMark.dark.type = "default" -CenterMark.dark.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_dark.svg" +CenterMark.dark.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_dark.svg" CenterMark.light.type = "default" -CenterMark.light.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_light.svg" +CenterMark.light.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_light.svg" CenterMark.type = "default" -CenterMark.url = "/mocked/base/path/ui/logos/opensearch_center_mark_on_light.svg" +CenterMark.url = "/mocked/base/path/ui/logos/wazuh_center_mark_on_light.svg" Mark.dark.type = "default" -Mark.dark.url = "/mocked/base/path/ui/logos/opensearch_mark_on_dark.svg" +Mark.dark.url = "/mocked/base/path/ui/logos/wazuh_mark_on_dark.svg" Mark.light.type = "default" -Mark.light.url = "/mocked/base/path/ui/logos/opensearch_mark_on_light.svg" +Mark.light.url = "/mocked/base/path/ui/logos/wazuh_mark_on_light.svg" Mark.type = "default" -Mark.url = "/mocked/base/path/ui/logos/opensearch_mark_on_light.svg" +Mark.url = "/mocked/base/path/ui/logos/wazuh_mark_on_light.svg" OpenSearch.dark.type = "default" -OpenSearch.dark.url = "/mocked/base/path/ui/logos/opensearch_on_dark.svg" +OpenSearch.dark.url = "/mocked/base/path/ui/logos/wazuh_on_dark.svg" OpenSearch.light.type = "default" -OpenSearch.light.url = "/mocked/base/path/ui/logos/opensearch_on_light.svg" +OpenSearch.light.url = "/mocked/base/path/ui/logos/wazuh_on_light.svg" OpenSearch.type = "default" -OpenSearch.url = "/mocked/base/path/ui/logos/opensearch_on_light.svg" +OpenSearch.url = "/mocked/base/path/ui/logos/wazuh_on_light.svg" colorScheme = "light" `; diff --git a/src/core/common/logos/get_logos.ts b/src/core/common/logos/get_logos.ts index c27a5306e9e1..8fe28956cfe8 100644 --- a/src/core/common/logos/get_logos.ts +++ b/src/core/common/logos/get_logos.ts @@ -9,21 +9,21 @@ import { ColorScheme, ImageType } from './constants'; import { Branding } from '../../types'; // The logos are stored at `src/core/server/core_app/assets/logos` to have a pretty URL -export const OPENSEARCH_DASHBOARDS_THEMED = 'ui/logos/opensearch_dashboards.svg'; -export const OPENSEARCH_DASHBOARDS_ON_LIGHT = 'ui/logos/opensearch_dashboards_on_light.svg'; -export const OPENSEARCH_DASHBOARDS_ON_DARK = 'ui/logos/opensearch_dashboards_on_dark.svg'; -export const OPENSEARCH_THEMED = 'ui/logos/opensearch.svg'; -export const OPENSEARCH_ON_LIGHT = 'ui/logos/opensearch_on_light.svg'; -export const OPENSEARCH_ON_DARK = 'ui/logos/opensearch_on_dark.svg'; -export const MARK_THEMED = 'ui/logos/opensearch_mark.svg'; -export const MARK_ON_LIGHT = 'ui/logos/opensearch_mark_on_light.svg'; -export const MARK_ON_DARK = 'ui/logos/opensearch_mark_on_dark.svg'; -export const CENTER_MARK_THEMED = 'ui/logos/opensearch_center_mark.svg'; -export const CENTER_MARK_ON_LIGHT = 'ui/logos/opensearch_center_mark_on_light.svg'; -export const CENTER_MARK_ON_DARK = 'ui/logos/opensearch_center_mark_on_dark.svg'; -export const ANIMATED_MARK_THEMED = 'ui/logos/opensearch_spinner.svg'; -export const ANIMATED_MARK_ON_LIGHT = 'ui/logos/opensearch_spinner_on_light.svg'; -export const ANIMATED_MARK_ON_DARK = 'ui/logos/opensearch_spinner_on_dark.svg'; +export const OPENSEARCH_DASHBOARDS_THEMED = 'ui/logos/wazuh_dashboards.svg'; +export const OPENSEARCH_DASHBOARDS_ON_LIGHT = 'ui/logos/wazuh_dashboards_on_light.svg'; +export const OPENSEARCH_DASHBOARDS_ON_DARK = 'ui/logos/wazuh_dashboards_on_dark.svg'; +export const OPENSEARCH_THEMED = 'ui/logos/wazuh.svg'; +export const OPENSEARCH_ON_LIGHT = 'ui/logos/wazuh_on_light.svg'; +export const OPENSEARCH_ON_DARK = 'ui/logos/wazuh_on_dark.svg'; +export const MARK_THEMED = 'ui/logos/wazuh_mark.svg'; +export const MARK_ON_LIGHT = 'ui/logos/wazuh_mark_on_light.svg'; +export const MARK_ON_DARK = 'ui/logos/wazuh_mark_on_dark.svg'; +export const CENTER_MARK_THEMED = 'ui/logos/wazuh_center_mark.svg'; +export const CENTER_MARK_ON_LIGHT = 'ui/logos/wazuh_center_mark_on_light.svg'; +export const CENTER_MARK_ON_DARK = 'ui/logos/wazuh_center_mark_on_dark.svg'; +export const ANIMATED_MARK_THEMED = 'ui/logos/spinner.svg'; +export const ANIMATED_MARK_ON_LIGHT = 'ui/logos/spinner_on_light.svg'; +export const ANIMATED_MARK_ON_DARK = 'ui/logos/spinner_on_dark.svg'; interface AssetOption { url?: string; diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index 9461f89ec773..963638a45946 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -370,14 +370,14 @@ export class ChromeService { breadcrumbs$={breadcrumbs$.pipe(takeUntil(this.stop$))} breadcrumbsEnricher$={breadcrumbsEnricher$.pipe(takeUntil(this.stop$))} customNavLink$={customNavLink$.pipe(takeUntil(this.stop$))} - opensearchDashboardsDocLink={docLinks.links.opensearchDashboards.introduction} + opensearchDashboardsDocLink={docLinks.links.wazuh.index} forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()} helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))} helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))} homeHref={application.getUrlForApp('home')} isVisible$={this.isVisible$} headerVariant$={this.headerVariant$} - opensearchDashboardsVersion={injectedMetadata.getOpenSearchDashboardsVersion()} + opensearchDashboardsVersion={injectedMetadata.getWazuhVersion()} navLinks$={navLinks.getNavLinks$()} recentlyAccessed$={recentlyAccessed.get$()} navControlsLeft$={navControls.getLeft$()} diff --git a/src/core/public/chrome/constants.ts b/src/core/public/chrome/constants.ts index ce65af852e07..2ef1068efd69 100644 --- a/src/core/public/chrome/constants.ts +++ b/src/core/public/chrome/constants.ts @@ -28,9 +28,9 @@ * under the License. */ -export const OPENSEARCH_DASHBOARDS_ASK_OPENSEARCH_LINK = 'https://forum.opensearch.org/'; -export const GITHUB_CREATE_ISSUE_LINK = - 'https://github.com/opensearch-project/OpenSearch-Dashboards/issues/new/choose'; +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; +export const GITHUB_CREATE_ISSUE_LINK = 'https://github.com/wazuh/wazuh/issues/new/choose'; export enum RightNavigationOrder { // order of dev tool should be after advance settings 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 1108d8184df4..a3b8a3c6b5b5 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 @@ -130,62 +130,62 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/test/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/test/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/test/ui/logos/opensearch_spinner_on_light.svg", + "url": "/test/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/test/ui/logos/opensearch_spinner_on_light.svg", + "url": "/test/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/test/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/test/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/test/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/test/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/test/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/test/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/test/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/test/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/test/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/test/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/test/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/test/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/test/ui/logos/opensearch_mark_on_dark.svg", + "url": "/test/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/test/ui/logos/opensearch_mark_on_light.svg", + "url": "/test/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/test/ui/logos/opensearch_mark_on_light.svg", + "url": "/test/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/test/ui/logos/opensearch_on_dark.svg", + "url": "/test/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/test/ui/logos/opensearch_on_light.svg", + "url": "/test/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/test/ui/logos/opensearch_on_light.svg", + "url": "/test/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -241,7 +241,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "category": Object { "euiIconType": "managementApp", "id": "management", - "label": "Management", + "label": "Indexer management", "order": 5000, }, "data-test-subj": "monitoring", @@ -569,7 +569,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = `
@@ -617,7 +617,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` >
@@ -1736,7 +1736,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` className="euiCollapsibleNavGroup__children" >
    @@ -2940,7 +2940,7 @@ exports[`CollapsibleNav renders the default nav 3`] = ` >
    @@ -74,33 +74,7 @@ exports[` should render correctly 1`] = `
    - -
    + /> @@ -174,7 +148,7 @@ exports[` should render correctly 1`] = ` > @@ -186,33 +160,7 @@ exports[` should render correctly 1`] = `
    - -
    + />
    @@ -7483,62 +7483,62 @@ exports[`Header handles visibility and lock changes 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -7877,7 +7877,7 @@ exports[`Header handles visibility and lock changes 1`] = `
    @@ -7925,7 +7925,7 @@ exports[`Header handles visibility and lock changes 1`] = ` >
    @@ -17178,62 +17178,62 @@ exports[`Header renders condensed header 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -18732,62 +18732,62 @@ exports[`Header renders page header with application title 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -20798,62 +20798,62 @@ exports[`Header renders page header with application title 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -23131,62 +23131,62 @@ exports[`Header toggles primary navigation menu when clicked 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -24162,62 +24162,62 @@ exports[`Header toggles primary navigation menu when clicked 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -24355,10 +24355,10 @@ exports[`Header toggles primary navigation menu when clicked 1`] = ` >
    @@ -27106,62 +27106,62 @@ exports[`Header toggles primary navigation menu when clicked 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -27345,7 +27345,7 @@ exports[`Header toggles primary navigation menu when clicked 1`] = `
    @@ -27393,7 +27393,7 @@ exports[`Header toggles primary navigation menu when clicked 1`] = ` > @@ -1850,7 +1850,7 @@ exports[`Header help menu hides survey link 1`] = ` /> @@ -2042,11 +2042,11 @@ exports[`Header help menu hides survey link 1`] = ` className="euiButtonEmpty__text" > - Documentation + Wazuh documentation @@ -2089,11 +2089,11 @@ exports[`Header help menu hides survey link 1`] = ` className="euiButtonEmpty__text" > - Community + Ask Wazuh @@ -2116,14 +2116,14 @@ exports[`Header help menu hides survey link 1`] = ` @@ -4005,7 +4005,7 @@ exports[`Header help menu renders survey link 1`] = ` - Documentation + Wazuh documentation @@ -4022,7 +4022,7 @@ exports[`Header help menu renders survey link 1`] = ` - Community + Ask Wazuh @@ -4055,7 +4055,7 @@ exports[`Header help menu renders survey link 1`] = ` /> @@ -4247,11 +4247,11 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonEmpty__text" > - Documentation + Wazuh documentation @@ -4294,11 +4294,11 @@ exports[`Header help menu renders survey link 1`] = ` className="euiButtonEmpty__text" > - Community + Ask Wazuh @@ -4371,14 +4371,14 @@ exports[`Header help menu renders survey link 1`] = ` diff --git a/src/core/public/chrome/ui/header/__snapshots__/header_logo.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header_logo.test.tsx.snap index ed8ee0c5f18c..b602a63ac12e 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header_logo.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header_logo.test.tsx.snap @@ -30,10 +30,10 @@ exports[`Header logo uses default application title when not branded 1`] = ` opensearch dashboards logo `; diff --git a/src/core/public/chrome/ui/header/__snapshots__/home_icon.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/home_icon.test.tsx.snap index c1a7c11b69f9..07ccc77c308e 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/home_icon.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/home_icon.test.tsx.snap @@ -25,21 +25,21 @@ exports[`Home icon, custom branded, uses the custom logo when header is not expa exports[`Home icon, unbranded, uses the home icon when header is expanded 1`] = ` `; exports[`Home icon, unbranded, uses the mark logo when header is not expanded 1`] = ` `; diff --git a/src/core/public/chrome/ui/header/__snapshots__/home_loader.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/home_loader.test.tsx.snap index b357f683ea35..29396eb80d65 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/home_loader.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/home_loader.test.tsx.snap @@ -23,62 +23,62 @@ exports[`Home loader displays a EuiToolTip 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -130,62 +130,62 @@ exports[`Home loader shows the loading indicator if loading count > 0 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } diff --git a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx b/src/core/public/chrome/ui/header/collapsible_nav.test.tsx index 955b7d7ca242..03445dffbe4c 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.test.tsx @@ -43,7 +43,13 @@ jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({ htmlIdGenerator: () => () => 'mockId', })); -const { opensearchDashboards, observability, security, management } = DEFAULT_APP_CATEGORIES; +const { + explore, + opensearchDashboards, + observability, + security, + management, +} = DEFAULT_APP_CATEGORIES; function mockLink({ title = 'discover', category }: Partial) { return { @@ -159,11 +165,10 @@ describe('CollapsibleNav', () => { expect(component).toMatchSnapshot(); }); + // Wazuh dashboards change: The menu is collapsed at the beginning, + // that's why it changes to 0 at the beginning and when pressing the buttons it changes to 2 because it would be displaying the submenu. it('remembers collapsible section state', () => { - const navLinks = [ - mockLink({ category: opensearchDashboards }), - mockLink({ category: observability }), - ]; + const navLinks = [mockLink({ category: explore }), mockLink({ category: observability })]; const recentNavLinks = [mockRecentNavLink({})]; const component = mount( { recentlyAccessed$={new BehaviorSubject(recentNavLinks)} /> ); - expectShownNavLinksCount(component, 3); - clickGroup(component, 'opensearchDashboards'); + expectShownNavLinksCount(component, 0); + clickGroup(component, 'explore'); clickGroup(component, 'recentlyViewed'); - expectShownNavLinksCount(component, 1); + expectShownNavLinksCount(component, 2); component.setProps({ isNavOpen: false }); expectNavIsClosed(component); component.setProps({ isNavOpen: true }); - expectShownNavLinksCount(component, 1); + expectShownNavLinksCount(component, 2); }); it('closes the nav after clicking a link', () => { diff --git a/src/core/public/chrome/ui/header/collapsible_nav_groups.test.tsx b/src/core/public/chrome/ui/header/collapsible_nav_groups.test.tsx index f536896e455c..9e6484ebe2e3 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav_groups.test.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav_groups.test.tsx @@ -64,15 +64,15 @@ describe('', () => { onNavItemClick={onNavItemClick} /> ); + // Wazuh: Changes of the test because the menu starts collapsed expect(container).toMatchSnapshot(); - expect(container.querySelectorAll('.nav-link-item-btn').length).toEqual(5); - fireEvent.click(getByTestId('collapsibleNavAppLink-pure')); - expect(navigateToApp).toBeCalledTimes(0); // The accordion is collapsed by default + expect(container.querySelectorAll('.nav-link-item-btn').length).toEqual(3); expect(queryByTestId('collapsibleNavAppLink-subLink')).toBeNull(); - - // Expand the accordion fireEvent.click(getByTestId('collapsibleNavAppLink-pure')); + expect(navigateToApp).toBeCalledTimes(0); + // Expand the accordion + expect(queryByTestId('collapsibleNavAppLink-subLink')).toBeInTheDocument(); fireEvent.click(getByTestId('collapsibleNavAppLink-subLink')); expect(navigateToApp).toBeCalledWith('subLink'); }); 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 5f1c66a15b16..9e25f4b79647 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.tsx @@ -212,7 +212,7 @@ class HeaderHelpMenuUI extends Component { @@ -221,7 +221,7 @@ class HeaderHelpMenuUI extends Component { diff --git a/src/core/public/chrome/ui/header/home_icon.test.tsx b/src/core/public/chrome/ui/header/home_icon.test.tsx index 05ffd5591594..7cb5db1f14f4 100644 --- a/src/core/public/chrome/ui/header/home_icon.test.tsx +++ b/src/core/public/chrome/ui/header/home_icon.test.tsx @@ -18,13 +18,18 @@ describe('Home icon,', () => { }); it('uses the home icon by default', () => { - const props = mockProps(); + const props = { + ...mockProps(), + branding: { + useExpandedHeader: true, + }, + }; const component = shallow(); const icon = component.find('EuiIcon'); expect(icon.prop('data-test-subj')).toEqual('homeIcon'); - expect(icon.prop('type')).toEqual('home'); + expect(icon.prop('type')).toEqual(props.logos.Mark.url); expect(icon.prop('size')).toEqual('m'); - expect(icon.prop('title')).toEqual('opensearch dashboards home'); + expect(icon.prop('title')).toEqual('Wazuh dashboard home'); }); it('uses the home icon when header is expanded', () => { @@ -37,9 +42,9 @@ describe('Home icon,', () => { const component = shallow(); const icon = component.find('EuiIcon'); expect(icon.prop('data-test-subj')).toEqual('homeIcon'); - expect(icon.prop('type')).toEqual('home'); + expect(icon.prop('type')).toEqual(props.logos.Mark.url); expect(icon.prop('size')).toEqual('m'); - expect(icon.prop('title')).toEqual('opensearch dashboards home'); + expect(icon.prop('title')).toEqual('Wazuh dashboard home'); expect(component).toMatchSnapshot(); }); @@ -56,7 +61,7 @@ describe('Home icon,', () => { expect(icon.prop('data-test-subj')).toEqual('defaultMark'); expect(icon.prop('type')).toEqual(props.logos.Mark.url); expect(icon.prop('size')).toEqual('l'); - expect(icon.prop('title')).toEqual('opensearch dashboards home'); + expect(icon.prop('title')).toEqual('Wazuh dashboard home'); expect(component).toMatchSnapshot(); }); diff --git a/src/core/public/chrome/ui/header/home_icon.tsx b/src/core/public/chrome/ui/header/home_icon.tsx index 2c0beb5a26cb..b141fb95e09b 100644 --- a/src/core/public/chrome/ui/header/home_icon.tsx +++ b/src/core/public/chrome/ui/header/home_icon.tsx @@ -17,18 +17,17 @@ interface Props { * Use branding configurations to render the header mark on the nav bar. */ export const HomeIcon = ({ branding, logos }: Props) => { - const { applicationTitle = 'opensearch dashboards', useExpandedHeader = true } = branding; + // Removed prop unnecessary useExpandedHeader Wazuh dashboard + const { applicationTitle = 'Wazuh dashboard', useExpandedHeader } = branding; const { url: markURL, type: markType } = logos.Mark; - let markIcon = markURL; let testSubj = `${markType}Mark`; // Marks look better at the large size let markIconSize: IconSize = 'l'; - // If no custom branded mark was set, use `home` icon only for expanded headers + // If no custom branded mark was set, use `home` icon Wazuh dashboard if (markType !== 'custom' && useExpandedHeader) { - markIcon = 'home'; testSubj = 'homeIcon'; // Home icon should be medium to fit in with other icons markIconSize = 'm'; @@ -39,8 +38,8 @@ export const HomeIcon = ({ branding, logos }: Props) => { return ( { getOpenSearchDashboardsBuildNumber: jest.fn(), getBranding: jest.fn(), getSurvey: jest.fn(), + getWazuhVersion: jest.fn(), + getWazuhDocVersion: jest.fn(), }; setupContract.getCspConfig.mockReturnValue({ warnLegacyBrowsers: true }); setupContract.getOpenSearchDashboardsVersion.mockReturnValue('opensearchDashboardsVersion'); @@ -62,6 +64,8 @@ const createSetupContractMock = () => { }, } as any); setupContract.getPlugins.mockReturnValue([]); + setupContract.getWazuhVersion.mockReturnValue('4.x.x'); + setupContract.getWazuhDocVersion.mockReturnValue('4.x'); return setupContract; }; diff --git a/src/core/public/injected_metadata/injected_metadata_service.ts b/src/core/public/injected_metadata/injected_metadata_service.ts index f4c6a7f7b91a..941a07b46984 100644 --- a/src/core/public/injected_metadata/injected_metadata_service.ts +++ b/src/core/public/injected_metadata/injected_metadata_service.ts @@ -53,6 +53,7 @@ export interface InjectedMetadataParams { version: string; buildNumber: number; branch: string; + wazuhVersion: string; basePath: string; serverBasePath: string; category?: AppCategory; @@ -88,11 +89,11 @@ export interface InjectedMetadataParams { * @internal */ export class InjectedMetadataService { - private state = deepFreeze( - this.params.injectedMetadata - ) as InjectedMetadataParams['injectedMetadata']; + private state: InjectedMetadataParams['injectedMetadata']; - constructor(private readonly params: InjectedMetadataParams) {} + constructor(params: InjectedMetadataParams) { + this.state = deepFreeze(params.injectedMetadata) as InjectedMetadataParams['injectedMetadata']; + } public start(): InjectedMetadataStart { return this.setup(); @@ -151,6 +152,14 @@ export class InjectedMetadataService { getSurvey: () => { return this.state.survey; }, + + getWazuhVersion: () => { + return this.state.wazuhVersion; + }, + + getWazuhDocVersion: () => { + return this.state.wazuhVersion?.split('.').slice(0, 2).join('.') || 'current'; + }, }; } } @@ -186,6 +195,8 @@ export interface InjectedMetadataSetup { }; getBranding: () => Branding; getSurvey: () => string | undefined; + getWazuhVersion: () => string; + getWazuhDocVersion: () => string; } /** @internal */ diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts index d2c7f86f8216..6a070b4089ad 100644 --- a/src/core/public/mocks.ts +++ b/src/core/public/mocks.ts @@ -131,6 +131,7 @@ function pluginInitializerContextMock() { buildNum: 100, buildSha: 'buildSha', dist: false, + wazuhVersion: 'wazuhVersion', }, }, config: { @@ -156,6 +157,7 @@ function createCoreContext(): CoreContext { buildNum: 100, buildSha: 'buildSha', dist: false, + wazuhVersion: 'wazuhVersion', }, }, }; diff --git a/src/core/public/rendering/rendering_service.tsx b/src/core/public/rendering/rendering_service.tsx index 5ac8683b44da..466f71605fc9 100644 --- a/src/core/public/rendering/rendering_service.tsx +++ b/src/core/public/rendering/rendering_service.tsx @@ -58,9 +58,15 @@ export class RenderingService { const appUi = application.getComponent(); const bannerUi = overlays.banners.getComponent(); + /** + * This is done so that modifications to login styles are only applied to the login. + */ + const pathName = chromeUi.props.application?.history?.location?.pathname || ''; + const classContent = pathName === '/app/login' ? 'content wz-login' : 'content'; + ReactDOM.render( -
    +
    {chromeUi} + + + + + + + + + diff --git a/src/core/server/core_app/assets/legacy_light_theme.css b/src/core/server/core_app/assets/legacy_light_theme.css index d4f6d10e7022..1305f5f6ac52 100644 --- a/src/core/server/core_app/assets/legacy_light_theme.css +++ b/src/core/server/core_app/assets/legacy_light_theme.css @@ -931,7 +931,8 @@ table th[class*="col-"] { .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { - background-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, @@ -1050,7 +1051,8 @@ table th[class*="col-"] { transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { - border-color: #006BB4; + /* Wazuh's color palette */ + border-color: #3595F9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 107, 180, 0.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 107, 180, 0.6); @@ -1493,7 +1495,8 @@ a.text-danger:focus { color: #e6e6e6; } .bg-info { - background-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; } a.bg-info:hover, a.bg-info:focus { @@ -1609,9 +1612,10 @@ fieldset[disabled] a.btn { pointer-events: none; } .btn-default { + /* Wazuh's color palette */ color: #FFF; - background-color: #006BB4; - border-color: #006BB4; + background-color: #3595F9; + border-color: #3595F9; } .btn-default:focus, .btn-default.focus { @@ -1658,17 +1662,20 @@ fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus { - background-color: #006BB4; - border-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; + border-color: #3595F9; } .btn-default .badge { - color: #006BB4; + /* Wazuh's color palette */ + color: #3595F9; background-color: #FFF; } .btn-primary { + /* Wazuh's color palette */ color: #FFF; - background-color: #006BB4; - border-color: #006BB4; + background-color: #3595F9; + border-color: #3595F9; } .btn-primary:focus, .btn-primary.focus { @@ -1715,11 +1722,13 @@ fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus { - background-color: #006BB4; - border-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; + border-color: #3595F9; } .btn-primary .badge { - color: #006BB4; + /* Wazuh's color palette */ + color: #3595F9; background-color: #FFF; } .btn-xs { @@ -2401,7 +2410,8 @@ button.close { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-info { - background-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; } .progress-striped .progress-bar-info { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); @@ -2539,8 +2549,9 @@ button.list-group-item-success.active:focus { border-color: #FFF; } .list-group-item-info { + /* Wazuh's color palette */ color: #FFF; - background-color: #006BB4; + background-color: #3595F9; } a.list-group-item-info, button.list-group-item-info { @@ -2665,8 +2676,9 @@ button.list-group-item-danger.active:focus { .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { + /* Wazuh's color palette */ background-color: #D3DAE6; - border-color: #006BB4; + border-color: #3595F9; } .nav .nav-divider { height: 1px; @@ -2759,8 +2771,9 @@ button.list-group-item-danger.active:focus { .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { + /* Wazuh's color palette */ color: #FFF; - background-color: #006BB4; + background-color: #3595F9; } .nav-stacked > li { float: none; @@ -2869,7 +2882,8 @@ button.list-group-item-danger.active:focus { color: #e6e6e6; } .alert-info { - background-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; border-color: #004d81; color: #FFF; } @@ -3503,7 +3517,8 @@ select[multiple].input-group-sm > .input-group-addon { padding: 5px 15px; line-height: 1.42857143; text-decoration: none; - color: #006BB4; + /* Wazuh's color palette */ + color: #3595F9; background-color: transparent; border: 1px solid transparent; margin-left: -1px; @@ -3524,7 +3539,8 @@ select[multiple].input-group-sm > .input-group-addon { .pagination > li > a:focus, .pagination > li > span:focus { z-index: 2; - color: #006BB4; + /* Wazuh's color palette */ + color: #3595F9; background-color: rgba(0, 0, 0, 0); border-color: transparent; } @@ -3643,7 +3659,8 @@ a.label:focus { display: none; } .label-default { - background-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; } .label-default[href]:hover, .label-default[href]:focus { @@ -3664,7 +3681,8 @@ a.label:focus { background-color: #014a44; } .label-info { - background-color: #006BB4; + /* Wazuh's color palette */ + background-color: #3595F9; } .label-info[href]:hover, .label-info[href]:focus { @@ -3977,15 +3995,17 @@ a.label:focus { border-color: #004d81; } .panel-info > .panel-heading { + /* Wazuh's color palette */ color: #FFF; - background-color: #006BB4; + background-color: #3595F9; border-color: #004d81; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #004d81; } .panel-info > .panel-heading .badge { - color: #006BB4; + /* Wazuh's color palette */ + color: #3595F9; background-color: #FFF; } .panel-info > .panel-footer + .panel-collapse > .panel-body { @@ -4305,7 +4325,8 @@ a.label:focus { } .text-info, .text-info:hover { - color: #006BB4; + /* Wazuh's color palette */ + color: #3595F9; } table .success, .table .success, @@ -4428,3 +4449,71 @@ input:focus { -webkit-box-shadow: none; box-shadow: none; } + +/* -------------------------------- WAZUH -------------------------------- */ +.wz-login { + background: url(./wazuh_login_bg.svg) !important; + width: 100% !important; + height: 100% !important; + background-size: cover !important; +} + +.login-wrapper { + text-align: center; + width: 430px!important; + top: 55px; + border-radius: 1px; + padding: 1em; +} + +#opensearch-dashboards-body > div > div.app-wrapper.hidden-chrome > div > div.application > div > ul > div.euiText.euiText--medium > div { + text-align: center; + padding-bottom: 10px; + color: #ffffff !important; + font-size: 35px !important; + font-weight: 300; +} + +#opensearch-dashboards-body > div > div.app-wrapper.hidden-chrome > div > div.application > div > ul > div.euiText.euiText--small > div { + text-align: center; + padding-bottom: 15px; + color: #ffffff !important; + font-size: 16px !important; +} + +#opensearch-dashboards-body > div > div.app-wrapper.hidden-chrome > div > div.application > div > ul > form { + padding: 16px; + box-shadow: 0 2px 2px -1px rgba(152, 162, 179, 0.3), 0 1px 5px -2px rgba(152, 162, 179, 0.3); + background-color: #FFF; + border: 1px solid #D3DAE6; + border-radius: 4px; + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + margin-top: 32px; +} + +.loginWelcome__logo { + display: inline-block; + width: 80px; + height: 80px; + line-height: 80px; + text-align: center; + background-color: #FFF; + border-radius: 100%; + padding: 16px; + box-shadow: 0 6px 12px -1px rgba(152, 162, 179, 0.2), 0 4px 4px -1px rgba(152, 162, 179, 0.2), 0 2px 2px 0 rgba(152, 162, 179, 0.2); + margin-bottom: 32px; +} + +.wz-login .btn-login { + background-color: #3595F9!important; + border-color: #3595F9!important; + color: #fff; +} + +.loginWelcome__logo { + background: url(./wazuh_logo_circle.svg) center center no-repeat !important; +} + +/* -------------------------------- WAZUH -------------------------------- */ diff --git a/src/core/server/core_app/assets/logos/opensearch.svg b/src/core/server/core_app/assets/logos/opensearch.svg deleted file mode 100644 index 9795f6c332ab..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_center_mark.svg b/src/core/server/core_app/assets/logos/opensearch_center_mark.svg deleted file mode 100644 index 42a29b55050c..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_center_mark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_center_mark_on_dark.svg b/src/core/server/core_app/assets/logos/opensearch_center_mark_on_dark.svg deleted file mode 100644 index 43091f7d039a..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_center_mark_on_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_center_mark_on_light.svg b/src/core/server/core_app/assets/logos/opensearch_center_mark_on_light.svg deleted file mode 100644 index 5a0d83c568b7..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_center_mark_on_light.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_dashboards.svg b/src/core/server/core_app/assets/logos/opensearch_dashboards.svg deleted file mode 100644 index 35f56544a26c..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_dashboards.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_dashboards_on_dark.svg b/src/core/server/core_app/assets/logos/opensearch_dashboards_on_dark.svg deleted file mode 100644 index ba023b5b9a37..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_dashboards_on_dark.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_dashboards_on_light.svg b/src/core/server/core_app/assets/logos/opensearch_dashboards_on_light.svg deleted file mode 100644 index bb85dcdd10ed..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_dashboards_on_light.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_mark.svg b/src/core/server/core_app/assets/logos/opensearch_mark.svg deleted file mode 100644 index b1986db87913..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_mark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_mark_on_dark.svg b/src/core/server/core_app/assets/logos/opensearch_mark_on_dark.svg deleted file mode 100644 index d202064dea30..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_mark_on_dark.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_mark_on_light.svg b/src/core/server/core_app/assets/logos/opensearch_mark_on_light.svg deleted file mode 100644 index 2c6bc1ee17e0..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_mark_on_light.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_on_dark.svg b/src/core/server/core_app/assets/logos/opensearch_on_dark.svg deleted file mode 100644 index 1830ff7f6683..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_on_dark.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_on_light.svg b/src/core/server/core_app/assets/logos/opensearch_on_light.svg deleted file mode 100644 index f716c67e58f9..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_on_light.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_spinner.svg b/src/core/server/core_app/assets/logos/opensearch_spinner.svg deleted file mode 100644 index 98c6f2af6189..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_spinner.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_spinner_on_dark.svg b/src/core/server/core_app/assets/logos/opensearch_spinner_on_dark.svg deleted file mode 100644 index 8d2b16595121..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_spinner_on_dark.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/opensearch_spinner_on_light.svg b/src/core/server/core_app/assets/logos/opensearch_spinner_on_light.svg deleted file mode 100644 index 41ab3c960b94..000000000000 --- a/src/core/server/core_app/assets/logos/opensearch_spinner_on_light.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/core/server/core_app/assets/logos/spinner_on_dark.svg b/src/core/server/core_app/assets/logos/spinner_on_dark.svg new file mode 100644 index 000000000000..81e7e1ea474c --- /dev/null +++ b/src/core/server/core_app/assets/logos/spinner_on_dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/spinner_on_light.svg b/src/core/server/core_app/assets/logos/spinner_on_light.svg new file mode 100644 index 000000000000..24bdbd09bee9 --- /dev/null +++ b/src/core/server/core_app/assets/logos/spinner_on_light.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh.svg b/src/core/server/core_app/assets/logos/wazuh.svg new file mode 100644 index 000000000000..7445c31da2ba --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_center_mark.svg b/src/core/server/core_app/assets/logos/wazuh_center_mark.svg new file mode 100644 index 000000000000..7445c31da2ba --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_center_mark.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_center_mark_on_dark.svg b/src/core/server/core_app/assets/logos/wazuh_center_mark_on_dark.svg new file mode 100644 index 000000000000..94ee90ea11c7 --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_center_mark_on_dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_center_mark_on_light.svg b/src/core/server/core_app/assets/logos/wazuh_center_mark_on_light.svg new file mode 100644 index 000000000000..afc9c79926b7 --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_center_mark_on_light.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_dashboards.svg b/src/core/server/core_app/assets/logos/wazuh_dashboards.svg new file mode 100644 index 000000000000..a931095bb7b4 --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_dashboards.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_dashboards_on_dark.svg b/src/core/server/core_app/assets/logos/wazuh_dashboards_on_dark.svg new file mode 100644 index 000000000000..ea25e5d2f97e --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_dashboards_on_dark.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_dashboards_on_light.svg b/src/core/server/core_app/assets/logos/wazuh_dashboards_on_light.svg new file mode 100644 index 000000000000..a931095bb7b4 --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_dashboards_on_light.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_mark.svg b/src/core/server/core_app/assets/logos/wazuh_mark.svg new file mode 100644 index 000000000000..7445c31da2ba --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_mark.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_mark_on_dark.svg b/src/core/server/core_app/assets/logos/wazuh_mark_on_dark.svg new file mode 100644 index 000000000000..902e504f753b --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_mark_on_dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_mark_on_light.svg b/src/core/server/core_app/assets/logos/wazuh_mark_on_light.svg new file mode 100644 index 000000000000..7445c31da2ba --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_mark_on_light.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_on_dark.svg b/src/core/server/core_app/assets/logos/wazuh_on_dark.svg new file mode 100644 index 000000000000..902e504f753b --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_on_dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/logos/wazuh_on_light.svg b/src/core/server/core_app/assets/logos/wazuh_on_light.svg new file mode 100644 index 000000000000..7445c31da2ba --- /dev/null +++ b/src/core/server/core_app/assets/logos/wazuh_on_light.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/core/server/core_app/assets/wazuh_login_bg.svg b/src/core/server/core_app/assets/wazuh_login_bg.svg new file mode 100644 index 000000000000..ebe5663263a8 --- /dev/null +++ b/src/core/server/core_app/assets/wazuh_login_bg.svg @@ -0,0 +1,758 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/server/core_app/assets/wazuh_logo.svg b/src/core/server/core_app/assets/wazuh_logo.svg new file mode 100644 index 000000000000..b74126093841 --- /dev/null +++ b/src/core/server/core_app/assets/wazuh_logo.svg @@ -0,0 +1,51 @@ + + + + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/core/server/http/__snapshots__/http_service.test.ts.snap b/src/core/server/http/__snapshots__/http_service.test.ts.snap index 037c8990ea77..4d757cce8d5d 100644 --- a/src/core/server/http/__snapshots__/http_service.test.ts.snap +++ b/src/core/server/http/__snapshots__/http_service.test.ts.snap @@ -12,7 +12,7 @@ exports[`spins up notReady server until started if configured with \`autoListen: Object { "body": Array [ Array [ - "OpenSearch Dashboards server is not ready yet", + "Wazuh dashboard server is not ready yet", ], ], "code": Array [ diff --git a/src/core/server/http/http_service.ts b/src/core/server/http/http_service.ts index e58a5081234e..8d6e62b61e9d 100644 --- a/src/core/server/http/http_service.ts +++ b/src/core/server/http/http_service.ts @@ -202,15 +202,13 @@ export class HttpService path: '/{p*}', method: '*', handler: (req, responseToolkit) => { - this.log.debug( - `OpenSearch Dashboards server is not ready yet ${req.method}:${req.url.href}.` - ); + this.log.debug(`Wazuh dashboard server is not ready yet ${req.method}:${req.url.href}.`); // If server is not ready yet, because plugins or core can perform // long running tasks (build assets, saved objects migrations etc.) // we should let client know that and ask to retry after 30 seconds. return responseToolkit - .response('OpenSearch Dashboards server is not ready yet') + .response('Wazuh dashboard server is not ready yet') .code(503) .header('Retry-After', '30'); }, diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 37d90bcfa93f..a4639c11fd5b 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -125,6 +125,7 @@ function pluginInitializerContextMock(config: T = {} as T) { buildNum: 100, buildSha: 'buildSha', dist: false, + wazuhVersion: 'wazuhVersion', }, instanceUuid: 'instance-uuid', }, diff --git a/src/core/server/opensearch_dashboards_config.ts b/src/core/server/opensearch_dashboards_config.ts index 62a1128356d6..03caf97b695c 100644 --- a/src/core/server/opensearch_dashboards_config.ts +++ b/src/core/server/opensearch_dashboards_config.ts @@ -80,10 +80,10 @@ export const config = { defaultValue: '/', }), applicationTitle: schema.string({ - defaultValue: '', + defaultValue: 'Wazuh', }), useExpandedHeader: schema.boolean({ - defaultValue: true, + defaultValue: false, }), }), survey: schema.object({ diff --git a/src/core/server/plugins/discovery/plugin_manifest_parser.test.ts b/src/core/server/plugins/discovery/plugin_manifest_parser.test.ts index 17600d421480..6b924f092a53 100644 --- a/src/core/server/plugins/discovery/plugin_manifest_parser.test.ts +++ b/src/core/server/plugins/discovery/plugin_manifest_parser.test.ts @@ -45,6 +45,7 @@ const packageInfo = { buildSha: '', version: '7.0.0-alpha1', dist: false, + wazuhVersion: '4.0.0', }; afterEach(() => { diff --git a/src/core/server/plugins/discovery/plugins_discovery.test.ts b/src/core/server/plugins/discovery/plugins_discovery.test.ts index 0f3db651defc..484014dea587 100644 --- a/src/core/server/plugins/discovery/plugins_discovery.test.ts +++ b/src/core/server/plugins/discovery/plugins_discovery.test.ts @@ -83,6 +83,9 @@ const packageMock = { number: 1, sha: '', }, + wazuh: { + version: '4.x.x', + }, }; const manifestPath = (...pluginPath: string[]) => diff --git a/src/core/server/plugins/integration_tests/plugins_service.test.ts b/src/core/server/plugins/integration_tests/plugins_service.test.ts index c30d78a18249..b83d74253031 100644 --- a/src/core/server/plugins/integration_tests/plugins_service.test.ts +++ b/src/core/server/plugins/integration_tests/plugins_service.test.ts @@ -107,6 +107,9 @@ describe('PluginsService', () => { number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.x.x', + }, }; const env = Env.createDefault(REPO_ROOT, getEnvOptions()); diff --git a/src/core/server/plugins/plugins_service.test.ts b/src/core/server/plugins/plugins_service.test.ts index 502e882dc28e..8a56688d0c01 100644 --- a/src/core/server/plugins/plugins_service.test.ts +++ b/src/core/server/plugins/plugins_service.test.ts @@ -130,6 +130,9 @@ describe('PluginsService', () => { number: 100, sha: 'feature-v1-build-sha', }, + wazuh: { + version: '4.x.x', + }, }; coreId = Symbol('core'); diff --git a/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap b/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap index 00d2fc0cfd5c..47a4342f8205 100644 --- a/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap +++ b/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap @@ -6,13 +6,13 @@ Object { "basePath": "/mock-server-basepath", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/mock-server-basepath/ui/default_branding", "darkMode": false, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -30,6 +30,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -50,6 +51,7 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; @@ -59,13 +61,13 @@ Object { "basePath": "/mock-server-basepath", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/mock-server-basepath/ui/default_branding", "darkMode": false, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -83,6 +85,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -103,6 +106,7 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; @@ -112,13 +116,13 @@ Object { "basePath": "/mock-server-basepath", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/mock-server-basepath/ui/default_branding", "darkMode": true, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -136,6 +140,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -156,6 +161,7 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; @@ -165,13 +171,13 @@ Object { "basePath": "/mock-server-basepath", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/mock-server-basepath/ui/default_branding", "darkMode": true, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -189,6 +195,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -213,6 +220,7 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; @@ -222,13 +230,13 @@ Object { "basePath": "", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/ui/default_branding", "darkMode": false, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -246,6 +254,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -266,6 +275,7 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; @@ -275,13 +285,13 @@ Object { "basePath": "/mock-server-basepath", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/mock-server-basepath/ui/default_branding", "darkMode": false, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -299,6 +309,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -315,6 +326,7 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; @@ -324,13 +336,13 @@ Object { "basePath": "/mock-server-basepath", "branch": Any, "branding": Object { - "applicationTitle": "OpenSearch Dashboards", + "applicationTitle": "Wazuh", "assetFolderUrl": "/mock-server-basepath/ui/default_branding", "darkMode": false, "loadingLogo": Object {}, "logo": Object {}, "mark": Object {}, - "useExpandedHeader": true, + "useExpandedHeader": false, }, "buildNumber": Any, "csp": Object { @@ -348,6 +360,7 @@ Object { "buildSha": Any, "dist": Any, "version": Any, + "wazuhVersion": Any, }, }, "i18n": Object { @@ -368,5 +381,6 @@ Object { "uiPlugins": Array [], "vars": Object {}, "version": Any, + "wazuhVersion": "5.0.0", } `; diff --git a/src/core/server/rendering/rendering_service.test.ts b/src/core/server/rendering/rendering_service.test.ts index 7ec3320c8791..764fe08d11ba 100644 --- a/src/core/server/rendering/rendering_service.test.ts +++ b/src/core/server/rendering/rendering_service.test.ts @@ -71,6 +71,7 @@ const INJECTED_METADATA = { buildSha: expect.any(String), dist: expect.any(Boolean), version: expect.any(String), + wazuhVersion: expect.any(String), }, }, }; diff --git a/src/core/server/rendering/rendering_service.tsx b/src/core/server/rendering/rendering_service.tsx index e5f4cbfea99c..5fb00c861a7b 100644 --- a/src/core/server/rendering/rendering_service.tsx +++ b/src/core/server/rendering/rendering_service.tsx @@ -145,6 +145,7 @@ export class RenderingService { version: env.packageInfo.version, buildNumber: env.packageInfo.buildNum, branch: env.packageInfo.branch, + wazuhVersion: env.packageInfo.wazuhVersion, basePath, serverBasePath, env, diff --git a/src/core/server/rendering/types.ts b/src/core/server/rendering/types.ts index 15e6af4c83f4..cb8b53ffe96e 100644 --- a/src/core/server/rendering/types.ts +++ b/src/core/server/rendering/types.ts @@ -51,6 +51,7 @@ export interface RenderingMetadata { version: string; buildNumber: number; branch: string; + wazuhVersion: string; basePath: string; serverBasePath: string; env: { diff --git a/src/core/server/rendering/views/__snapshots__/template.test.tsx.snap b/src/core/server/rendering/views/__snapshots__/template.test.tsx.snap index 36d073992ec8..5ab535db8183 100644 --- a/src/core/server/rendering/views/__snapshots__/template.test.tsx.snap +++ b/src/core/server/rendering/views/__snapshots__/template.test.tsx.snap @@ -66,7 +66,7 @@ Array [ data="{\\"strictCsp\\":true}" />, ,
    , ,
    , ,
    , ,
    , ,
    @@ -970,62 +789,62 @@ exports[`Overview renders with news, solutions, and features 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -1317,7 +1136,7 @@ exports[`Overview renders with news, solutions, and features 1`] = ` ], } } - path="/app/opensearch_dashboards_overview" + path="/app/home/" />
    @@ -1455,62 +1274,62 @@ exports[`Overview renders with news, with solutions, and without features 1`] = "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -1858,7 +1677,7 @@ exports[`Overview renders with news, with solutions, and without features 1`] = ], } } - path="/app/opensearch_dashboards_overview" + path="/app/home/" />
    @@ -1940,62 +1759,62 @@ exports[`Overview renders with news, without solutions, and with features 1`] = "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -2094,75 +1913,6 @@ exports[`Overview renders with news, without solutions, and with features 1`] = - - -
    @@ -2554,62 +2304,62 @@ exports[`Overview renders without news and features, with solutions 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -3024,7 +2774,7 @@ exports[`Overview renders without news and features, with solutions 1`] = ` ], } } - path="/app/opensearch_dashboards_overview" + path="/app/home/" />
    @@ -3218,62 +2968,62 @@ exports[`Overview renders without news and solutions, with features 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -3328,188 +3078,7 @@ exports[`Overview renders without news and solutions, with features 1`] = ` className="osdOverviewData osdOverviewData--expanded" > - - - -
    @@ -4123,62 +3692,62 @@ exports[`Overview renders without news, solutions, and features 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -4232,243 +3801,6 @@ exports[`Overview renders without news, solutions, and features 1`] = ` - - -
    @@ -5140,62 +4472,62 @@ exports[`Overview renders without news, with solutions and features 1`] = ` "AnimatedMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_dark.svg", + "url": "/ui/logos/spinner_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_spinner_on_light.svg", + "url": "/ui/logos/spinner_on_light.svg", }, "Application": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_dark.svg", + "url": "/ui/logos/wazuh_dashboards_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_dashboards_on_light.svg", + "url": "/ui/logos/wazuh_dashboards_on_light.svg", }, "CenterMark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_dark.svg", + "url": "/ui/logos/wazuh_center_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_center_mark_on_light.svg", + "url": "/ui/logos/wazuh_center_mark_on_light.svg", }, "Mark": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_dark.svg", + "url": "/ui/logos/wazuh_mark_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_mark_on_light.svg", + "url": "/ui/logos/wazuh_mark_on_light.svg", }, "OpenSearch": Object { "dark": Object { "type": "default", - "url": "/ui/logos/opensearch_on_dark.svg", + "url": "/ui/logos/wazuh_on_dark.svg", }, "light": Object { "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "type": "default", - "url": "/ui/logos/opensearch_on_light.svg", + "url": "/ui/logos/wazuh_on_light.svg", }, "colorScheme": "light", } @@ -5554,7 +4886,7 @@ exports[`Overview renders without news, with solutions and features 1`] = ` ], } } - path="/app/opensearch_dashboards_overview" + path="/app/home/" />
    diff --git a/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx b/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx index 30df4dbe8146..6cfcc7ec4f29 100644 --- a/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx +++ b/src/plugins/opensearch_dashboards_overview/public/components/overview/overview.tsx @@ -56,7 +56,6 @@ import { } from '../../../../../../src/plugins/home/public'; import { PLUGIN_ID, PLUGIN_PATH } from '../../../common'; import { AppPluginStartDependencies } from '../../types'; -import { AddData } from '../add_data'; import { GettingStarted } from '../getting_started'; import { ManageData } from '../manage_data'; import { NewsFeed } from '../news_feed'; @@ -264,10 +263,6 @@ export const Overview: FC = ({ newsFetchResult, solutions, features, logo : 'osdOverviewData--expanded' }`} > - - - - diff --git a/src/plugins/opensearch_dashboards_overview/public/plugin.ts b/src/plugins/opensearch_dashboards_overview/public/plugin.ts index f774acf0651f..e2c98a43372e 100644 --- a/src/plugins/opensearch_dashboards_overview/public/plugin.ts +++ b/src/plugins/opensearch_dashboards_overview/public/plugin.ts @@ -78,18 +78,13 @@ export class OpenSearchDashboardsOverviewPlugin return hasOpenSearchDashboardsApp; }), distinct(), - map((hasOpenSearchDashboardsApp) => { + map(() => { return () => { - if (!hasOpenSearchDashboardsApp) { - return { status: AppStatus.inaccessible, navLinkStatus: AppNavLinkStatus.hidden }; - } else { - return { - status: AppStatus.accessible, - navLinkStatus: core.chrome.navGroup.getNavGroupEnabled() - ? AppNavLinkStatus.hidden - : AppNavLinkStatus.default, - }; - } + // Wazuh: Hide the OpenSearch Dashboards Overview app + return { + status: AppStatus.inaccessible, + navLinkStatus: AppNavLinkStatus.hidden, + }; }; }) ); diff --git a/src/plugins/opensearch_dashboards_react/public/exit_full_screen_button/__snapshots__/exit_full_screen_button.test.tsx.snap b/src/plugins/opensearch_dashboards_react/public/exit_full_screen_button/__snapshots__/exit_full_screen_button.test.tsx.snap index 1a88da2e58f4..5ecea03e21c3 100644 --- a/src/plugins/opensearch_dashboards_react/public/exit_full_screen_button/__snapshots__/exit_full_screen_button.test.tsx.snap +++ b/src/plugins/opensearch_dashboards_react/public/exit_full_screen_button/__snapshots__/exit_full_screen_button.test.tsx.snap @@ -27,7 +27,7 @@ exports[`ExitFullScreenButton is rendered using the dark theme's mark by default > { expect(head.length).toBe(1); expect(head.first().text()).toEqual(mockTitle); }); - - it('renders with the toolbar by default', () => { + // Skip test because it is not used in Wazuh dashboards + it.skip('renders with the toolbar by default', () => { const props = { ...mockProps(), }; @@ -141,8 +141,8 @@ describe('OverviewPageHeader ', () => { // Would contain only the "Add Data" button expect(component).toMatchSnapshot(); }); - - it('renders with the toolbar when it is explicitly asked not to be hidden', () => { + // Skip test because it is not used in Wazuh dashboards + it.skip('renders with the toolbar when it is explicitly asked not to be hidden', () => { const props = { ...mockProps(), hideToolbar: false, diff --git a/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx b/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx index 6a6d1aa75881..9611bf1ee4c1 100644 --- a/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx +++ b/src/plugins/opensearch_dashboards_react/public/overview_page/overview_page_header/overview_page_header.tsx @@ -111,24 +111,6 @@ export const OverviewPageHeader: FC = ({ {!hideToolbar && ( - - - - {i18n.translate( - 'opensearch-dashboards-react.osdOverviewPageHeader.addDataButtonLabel', - { - defaultMessage: 'Add data', - } - )} - - - - {showManagementLink && isManagementEnabled ? ( diff --git a/src/plugins/visualize/public/plugin.ts b/src/plugins/visualize/public/plugin.ts index 6df26eb08d42..4d3b5ed14b6c 100644 --- a/src/plugins/visualize/public/plugin.ts +++ b/src/plugins/visualize/public/plugin.ts @@ -156,10 +156,10 @@ export class VisualizePlugin core.application.register({ id: visualizeAppId, title: 'Visualize', - order: 8000, + order: 102, euiIconType: 'inputOutput', defaultPath: '#/', - category: DEFAULT_APP_CATEGORIES.opensearchDashboards, + category: DEFAULT_APP_CATEGORIES.explore, updater$: this.appStateUpdater.asObservable(), // remove all references to visualize mount: async (params: AppMountParameters) => { diff --git a/src/translations/de-DE.json b/src/translations/de-DE.json index 8b79b35cf288..baf37c1cd563 100644 --- a/src/translations/de-DE.json +++ b/src/translations/de-DE.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Bearbeiten", "dashboard.listing. savedObjectWarning": "Nach Titel kann nicht gefiltert werden", "dashboard.listing.createButtonText": "Erstellen Sie", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Sie können Datenansichten aus jeder OpenSearch-Dashboards-App in einem Dashboard kombinieren und alles an einem Ort sehen.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Sie können Datenansichten aus jeder {appName} in einem Dashboard kombinieren und alles an einem Ort sehen.", "dashboard.listing.createNewDashboard.createButtonLabel": "Neues Dashboard erstellen", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Neu bei OpenSearch Dashboards? Öffnen Sie {sampleDataInstallLink} für einen Test.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Neu bei {appName}? Öffnen Sie {sampleDataInstallLink} für einen Test.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Installieren Sie einige Beispieldaten", "dashboard.listing.createNewDashboard.title": "Erstellen Sie Ihr erstes Dashboard", "dashboard.listing.dashboardsTitle": "Dashboards", diff --git a/src/translations/es-419.json b/src/translations/es-419.json index 2a616e3c92aa..f3bcdcbc3b01 100644 --- a/src/translations/es-419.json +++ b/src/translations/es-419.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Editar", "dashboard.listing. savedObjectWarning": "No se puede filtrar por título", "dashboard.listing.createButtonText": "Crear", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Puede combinar las vistas de datos de cualquier aplicación de OpenSearch Dashboards en un solo panel de control y ver todo en un solo lugar.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Puede combinar las vistas de datos de cualquier aplicación de {appName} en un solo panel de control y ver todo en un solo lugar.", "dashboard.listing.createNewDashboard.createButtonLabel": "Crear un nuevo panel de control", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "¿Es nuevo en OpenSearch Dashboards? {sampleDataInstallLink} para probarlo.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "¿Es nuevo en {appName}? {sampleDataInstallLink} para probarlo.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Instalar algunos datos de muestra", "dashboard.listing.createNewDashboard.title": "Crear su primer panel de control", "dashboard.listing.dashboardsTitle": "Paneles de control", diff --git a/src/translations/es-ES.json b/src/translations/es-ES.json index e2c40d7f13c4..0395e50cb9eb 100644 --- a/src/translations/es-ES.json +++ b/src/translations/es-ES.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Edit (Editar)", "dashboard.listing. savedObjectWarning": "No se puede filtrar por título", "dashboard.listing.createButtonText": "Cree", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Puede combinar las vistas de datos de cualquier aplicación de OpenSearch Dashboards en un solo panel y ver todo en un mismo lugar.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Puede combinar las vistas de datos de cualquier aplicación de {appName} en un solo panel y ver todo en un mismo lugar.", "dashboard.listing.createNewDashboard.createButtonLabel": "Crear un panel", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "¿Es la primera vez que usa OpenSearch Dashboards? {sampleDataInstallLink} para probarlo.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "¿Es la primera vez que usa {appName}? {sampleDataInstallLink} para probarlo.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Instale algunos datos de muestra", "dashboard.listing.createNewDashboard.title": "Cree su primer panel", "dashboard.listing.dashboardsTitle": "Paneles", diff --git a/src/translations/fr-CA.json b/src/translations/fr-CA.json index 9840d5dc7f78..2a4279d8deba 100644 --- a/src/translations/fr-CA.json +++ b/src/translations/fr-CA.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Modifier", "dashboard.listing. savedObjectWarning": "Impossible de filtrer par titre", "dashboard.listing.createButtonText": "Créer", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Vous pouvez combiner les affichages de données de n’importe quelle application OpenSearch Dashboards en un seul tableau de bord et tout voir au même endroit.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Vous pouvez combiner les affichages de données de n’importe quelle application {appName} en un seul tableau de bord et tout voir au même endroit.", "dashboard.listing.createNewDashboard.createButtonLabel": "Créer un nouveau tableau de bord", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "OpenSearch Dashboards est tout nouveau pour vous? {sampleDataInstallLink} pour en faire un essai.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "{appName} est tout nouveau pour vous? {sampleDataInstallLink} pour en faire un essai.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Installer des exemples de données", "dashboard.listing.createNewDashboard.title": "Créer votre premier tableau de bord", "dashboard.listing.dashboardsTitle": "Tableaux de bord", diff --git a/src/translations/fr-FR.json b/src/translations/fr-FR.json index 60fc652eedb7..9e57aac51f56 100644 --- a/src/translations/fr-FR.json +++ b/src/translations/fr-FR.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Modifier", "dashboard.listing. savedObjectWarning": "Impossible de filtrer par titre", "dashboard.listing.createButtonText": "Créez", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Vous pouvez combiner les vues de données de n’importe quelle application OpenSearch Dashboards dans un seul tableau de bord et tout voir au même endroit.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Vous pouvez combiner les vues de données de n’importe quelle application {appName} dans un seul tableau de bord et tout voir au même endroit.", "dashboard.listing.createNewDashboard.createButtonLabel": "Créer un nouveau tableau de bord", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Vous êtes nouveau sur OpenSearch Dashboards ? {sampleDataInstallLink} pour faire un essai routier.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Vous êtes nouveau sur {appName} ? {sampleDataInstallLink} pour faire un essai routier.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Installer quelques exemples de données", "dashboard.listing.createNewDashboard.title": "Créez votre premier tableau de bord", "dashboard.listing.dashboardsTitle": "Tableaux de bord", diff --git a/src/translations/id-ID.json b/src/translations/id-ID.json index 3bf5f13127ee..c5dcbaae51f5 100644 --- a/src/translations/id-ID.json +++ b/src/translations/id-ID.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Edit", "dashboard.listing. savedObjectWarning": "Tidak dapat memfilter berdasarkan judul", "dashboard.listing.createButtonText": "Buat", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Anda dapat menggabungkan tampilan data dari aplikasi OpenSearch Dashboards ke dalam satu dasbor dan melihat semuanya di satu tempat.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Anda dapat menggabungkan tampilan data dari aplikasi {appName} ke dalam satu dasbor dan melihat semuanya di satu tempat.", "dashboard.listing.createNewDashboard.createButtonLabel": "Buat dasbor baru", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Baru mengenal OpenSearch Dashboards? {sampleDataInstallLink} untuk melakukan uji coba.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Baru mengenal {appName}? {sampleDataInstallLink} untuk melakukan uji coba.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Instal beberapa data sampel", "dashboard.listing.createNewDashboard.title": "Buat dasbor pertama Anda", "dashboard.listing.dashboardsTitle": "Dasbor", diff --git a/src/translations/it-IT.json b/src/translations/it-IT.json index c5bb4a67e553..af3ecceb87ab 100644 --- a/src/translations/it-IT.json +++ b/src/translations/it-IT.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Modifica", "dashboard.listing. savedObjectWarning": "Impossibile filtrare per titolo", "dashboard.listing.createButtonText": "Crea", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Puoi combinare in un'unica dashboard le visualizzazioni dei dati provenienti da qualsiasi app OpenSearch Dashboards e vedere tutto in un unico posto.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Puoi combinare in un'unica dashboard le visualizzazioni dei dati provenienti da qualsiasi app {appName} e vedere tutto in un unico posto.", "dashboard.listing.createNewDashboard.createButtonLabel": "Crea nuova dashboard", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Stai iniziando a usare OpenSearch Dashboards? {sampleDataInstallLink} per fare un test.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Stai iniziando a usare {appName}? {sampleDataInstallLink} per fare un test.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Installa alcuni dati di esempio", "dashboard.listing.createNewDashboard.title": "Crea la tua prima dashboard", "dashboard.listing.dashboardsTitle": "Dashboard", diff --git a/src/translations/ja-JP.json b/src/translations/ja-JP.json index 5c47b47fddfe..d999b3c145dc 100644 --- a/src/translations/ja-JP.json +++ b/src/translations/ja-JP.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "編集", "dashboard.listing. savedObjectWarning": "タイトルで絞り込めません", "dashboard.listing.createButtonText": " で", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "任意の OpenSearch Dashboards アプリケーションのデータビューを 1 つのダッシュボードにまとめて、すべてを 1 か所で表示できます。", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "任意の {appName} アプリケーションのデータビューを 1 つのダッシュボードにまとめて、すべてを 1 か所で表示できます。", "dashboard.listing.createNewDashboard.createButtonLabel": "新しいダッシュボードを作成", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "OpenSearch ダッシュボードは初めてですか? {sampleDataInstallLink} を試してみましょう。", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "{appName} ダッシュボードは初めてですか? {sampleDataInstallLink} を試してみましょう。", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "サンプルデータをインストールする", "dashboard.listing.createNewDashboard.title": "初めてのダッシュボードを作成", "dashboard.listing.dashboardsTitle": "ダッシュボード", diff --git a/src/translations/ko-KR.json b/src/translations/ko-KR.json index 23c236429209..f323ec29e420 100644 --- a/src/translations/ko-KR.json +++ b/src/translations/ko-KR.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "편집", "dashboard.listing. savedObjectWarning": "제목별로 필터링할 수 없음", "dashboard.listing.createButtonText": "그리고", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "모든 OpenSearch 대시보드 앱의 데이터 보기를 하나의 대시보드로 결합하여 모두 한곳에서 볼 수 있습니다.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "모든 {appName} 대시보드 앱의 데이터 보기를 하나의 대시보드로 결합하여 모두 한곳에서 볼 수 있습니다.", "dashboard.listing.createNewDashboard.createButtonLabel": "새 대시보드 생성", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "OpenSearch 대시보드를 처음 사용하시나요? {sampleDataInstallLink} 링크를 통해 테스트 드라이브를 해보세요.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "{appName} 대시보드를 처음 사용하시나요? {sampleDataInstallLink} 링크를 통해 테스트 드라이브를 해보세요.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "일부 샘플 데이터 설치", "dashboard.listing.createNewDashboard.title": "첫 대시보드 생성", "dashboard.listing.dashboardsTitle": "대시보드", diff --git a/src/translations/pt-BR.json b/src/translations/pt-BR.json index 5bbb843ba522..d435b6de0ab7 100644 --- a/src/translations/pt-BR.json +++ b/src/translations/pt-BR.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Editar", "dashboard.listing. savedObjectWarning": "Não é possível filtrar por título", "dashboard.listing.createButtonText": "crie", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Você pode combinar visualizações de dados de qualquer aplicação do OpenSearch Dashboards em um único painel e ver tudo em um só lugar.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Você pode combinar visualizações de dados de qualquer aplicação do {appName} em um único painel e ver tudo em um só lugar.", "dashboard.listing.createNewDashboard.createButtonLabel": "Criar painel", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "É iniciante no OpenSearch Dashboards? {sampleDataInstallLink} para fazer um teste.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "É iniciante no {appName}? {sampleDataInstallLink} para fazer um teste.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Instale alguns dados de amostra", "dashboard.listing.createNewDashboard.title": "Crie seu primeiro painel", "dashboard.listing.dashboardsTitle": "Painéis", diff --git a/src/translations/pt-PT.json b/src/translations/pt-PT.json index e1c2e4d1325b..453f17eae189 100644 --- a/src/translations/pt-PT.json +++ b/src/translations/pt-PT.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Editar", "dashboard.listing. savedObjectWarning": "Não é possível filtrar por título", "dashboard.listing.createButtonText": "Criar", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Pode combinar vistas de dados a partir de qualquer aplicação OpenSearch Dashboards num único dashboard e ver tudo no mesmo local.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Pode combinar vistas de dados a partir de qualquer aplicação {appName} num único dashboard e ver tudo no mesmo local.", "dashboard.listing.createNewDashboard.createButtonLabel": "Criar novo dashboard", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Nunca utilizou a aplicação Opensearch Dashboards antes? {sampleDataInstallLink} para experimentar.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "Nunca utilizou a aplicação {appName} antes? {sampleDataInstallLink} para experimentar.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Instalar dados de amostra", "dashboard.listing.createNewDashboard.title": "Criar o seu primeiro dashboard", "dashboard.listing.dashboardsTitle": "Dashboards", diff --git a/src/translations/tr-TR.json b/src/translations/tr-TR.json index bf507e037edf..00335714965c 100644 --- a/src/translations/tr-TR.json +++ b/src/translations/tr-TR.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "Düzenle", "dashboard.listing. savedObjectWarning": "Başlığa göre filtrelenemiyor", "dashboard.listing.createButtonText": "Oluştur", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Herhangi bir OpenSearch Dashboards uygulamasındaki veri görünümlerini tek bir panoda birleştirebilir ve her şeyi tek bir yerde görebilirsiniz.", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "Herhangi bir {appName} uygulamasındaki veri görünümlerini tek bir panoda birleştirebilir ve her şeyi tek bir yerde görebilirsiniz.", "dashboard.listing.createNewDashboard.createButtonLabel": "Yeni pano oluştur", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "OpenSearch Dashboards'da yeni misiniz? Deneme yapmak için {sampleDataInstallLink} bağlantısına tıklayın.", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "{appName}'da yeni misiniz? Deneme yapmak için {sampleDataInstallLink} bağlantısına tıklayın.", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "Bazı örnek verileri yükleyin", "dashboard.listing.createNewDashboard.title": "İlk panonuzu oluşturun", "dashboard.listing.dashboardsTitle": "Panolar", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index df63527d3299..225f8b3878d8 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "编辑", "dashboard.listing. savedObjectWarning": "无法按标题筛选", "dashboard.listing.createButtonText": "创建", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "您可以将任何 OpenSearch Dashboards 应用程序中的数据视图合并到一个控制面板中,并在单个位置查看所有内容。", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "您可以将任何 {appName} 应用程序中的数据视图合并到一个控制面板中,并在单个位置查看所有内容。", "dashboard.listing.createNewDashboard.createButtonLabel": "新建控制面板", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "还未使用过 OpenSearch Dashboards? 进入 {sampleDataInstallLink} 来试试。", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "还未使用过 {appName}? 进入 {sampleDataInstallLink} 来试试。", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "安装一些示例数据", "dashboard.listing.createNewDashboard.title": "创建第一个控制面板", "dashboard.listing.dashboardsTitle": "控制面板", diff --git a/src/translations/zh-TW.json b/src/translations/zh-TW.json index 5ac43d1fce0a..8577374a75db 100644 --- a/src/translations/zh-TW.json +++ b/src/translations/zh-TW.json @@ -184,9 +184,9 @@ "dashboard.howToStartWorkingOnNewDashboardEditLinkText": "編輯", "dashboard.listing. savedObjectWarning": "無法依標題篩選", "dashboard.listing.createButtonText": "建立", - "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "您可以將任何 OpenSearch Dashboards 應用程式中的資料檢視合併到一個儀表板,並從同一位置查看所有內容。", + "dashboard.listing.createNewDashboard.combineDataViewFromOpenSearchDashboardsAppDescription": "您可以將任何 {appName} 應用程式中的資料檢視合併到一個儀表板,並從同一位置查看所有內容。", "dashboard.listing.createNewDashboard.createButtonLabel": "建立新儀表板", - "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "是否為 OpenSearch Dashboards 的新增內容?可進行試用的 {sampleDataInstallLink}。", + "dashboard.listing.createNewDashboard.newToOpenSearchDashboardsDescription": "是否為 {appName} 的新增內容?可進行試用的 {sampleDataInstallLink}。", "dashboard.listing.createNewDashboard.sampleDataInstallLinkText": "安裝一些範例資料", "dashboard.listing.createNewDashboard.title": "建立您的第一個儀表板", "dashboard.listing.dashboardsTitle": "儀表板", diff --git a/test/common/config.js b/test/common/config.js index 5793e01d823a..d65923c041d5 100644 --- a/test/common/config.js +++ b/test/common/config.js @@ -80,6 +80,7 @@ export default function () { `--opensearchDashboards.branding.mark.darkModeUrl=https://opensearch.org/assets/brand/SVG/Mark/opensearch_mark_darkmode.svg`, `--opensearchDashboards.branding.applicationTitle=OpenSearch`, `--uiSettings.overrides['query:enhancements:enabled']=false`, + `--opensearchDashboards.branding.useExpandedHeader=true`, ], }, services, diff --git a/test/functional/apps/home/_home.ts b/test/functional/apps/home/_home.ts index fb09ad836272..6c0a1a55ddb1 100644 --- a/test/functional/apps/home/_home.ts +++ b/test/functional/apps/home/_home.ts @@ -55,7 +55,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(url.includes('/app/home')).to.be(true); }); - it('clicking on console on homepage should take you to console app', async () => { + // Wazuh: The home page of Wazuh is different from the OpenSearch Dashboards home page + // and the console app is not available on the Wazuh home page + it.skip('clicking on console on homepage should take you to console app', async () => { await PageObjects.home.clickSynopsis('console'); const url = await browser.getCurrentUrl(); expect(url.includes('/app/dev_tools#/console')).to.be(true); diff --git a/test/functional/apps/home/_navigation.ts b/test/functional/apps/home/_navigation.ts index 733888f59711..68549bb3d3af 100644 --- a/test/functional/apps/home/_navigation.ts +++ b/test/functional/apps/home/_navigation.ts @@ -48,6 +48,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('detect navigate back issues', async () => { + // Wazuh: Set a local storage item to show the nav group + // because the nav group is hidden by default in our fork + await browser.setLocalStorageItem('core.navGroup.explore', 'true'); let currUrl; // Detects bug described in issue #31238 - where back navigation would get stuck to URL encoding handling in Angular. // Navigate to home app diff --git a/test/functional/apps/home/_sample_data.ts b/test/functional/apps/home/_sample_data.ts index fb2f6115efbf..5221075c7b49 100644 --- a/test/functional/apps/home/_sample_data.ts +++ b/test/functional/apps/home/_sample_data.ts @@ -42,7 +42,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardExpect = getService('dashboardExpect'); const PageObjects = getPageObjects(['common', 'header', 'home', 'dashboard', 'timePicker']); - describe('sample data', function describeIndexTests() { + /** + * This test suite is skipped because the seccion of the sample data set is not available in the UI. + */ + describe.skip('sample data', function describeIndexTests() { before(async () => { await security.testUser.setRoles([ 'opensearch_dashboards_admin', diff --git a/test/functional/apps/visualize/_custom_branding.ts b/test/functional/apps/visualize/_custom_branding.ts index 37f07e932ee5..3a80fbaf45c5 100644 --- a/test/functional/apps/visualize/_custom_branding.ts +++ b/test/functional/apps/visualize/_custom_branding.ts @@ -28,7 +28,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const expectedWelcomeMessage = 'Welcome to OpenSearch'; describe('OpenSearch Dashboards branding configuration', function customHomeBranding() { - describe('should render overview page', async () => { + /** + * This test is skipped because the overview page is not available. + */ + describe.skip('should render overview page', async () => { this.tags('includeFirefox'); before(async function () { @@ -81,7 +84,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - it('with customized logo', async () => { + /** + * This test is omitted because the welcome page has been removed. + */ + it.skip('with customized logo', async () => { await testSubjects.existOrFail('welcomeCustomLogo'); const actualLabel = await testSubjects.getAttribute( 'welcomeCustomLogo', @@ -90,7 +96,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(actualLabel.toUpperCase()).to.equal(expectedMarkLogo.toUpperCase()); }); - it('with customized title', async () => { + it.skip('with customized title', async () => { await testSubjects.existOrFail('welcomeCustomTitle'); const actualLabel = await testSubjects.getAttribute( 'welcomeCustomTitle', @@ -99,7 +105,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(actualLabel.toUpperCase()).to.equal(expectedWelcomeMessage.toUpperCase()); }); - it('with customized logo in dark mode', async () => { + it.skip('with customized logo in dark mode', async () => { await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings'); await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode'); await PageObjects.common.navigateToApp('home'); @@ -148,7 +154,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(url.includes('/app/home')).to.be(true); }); - it('with customized mark logo in home dashboard card', async () => { + // Wazuh: This test is omitted because OpenSearch Dashboards does not have a home dashboard card. + it.skip('with customized mark logo in home dashboard card', async () => { await testSubjects.existOrFail('dashboardCustomLogo'); const actualLabel = await testSubjects.getAttribute( 'dashboardCustomLogo', @@ -157,7 +164,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(actualLabel.toUpperCase()).to.equal(expectedMarkLogo.toUpperCase()); }); - it('with customized title in home dashboard card', async () => { + // Wazuh: This test is omitted because OpenSearch Dashboards does not have a home dashboard card. + it.skip('with customized title in home dashboard card', async () => { await testSubjects.existOrFail('dashboardCustomTitle'); const actualLabel = await testSubjects.getAttribute( 'dashboardCustomTitle', @@ -166,7 +174,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(actualLabel.toUpperCase()).to.equal(applicationTitle.toUpperCase()); }); - it('with customized mark logo for opensearch in side menu', async () => { + // Wazuh: This test is omitted because OpenSearch Dashboards does not appear in the side menu. + it.skip('with customized mark logo for opensearch in side menu', async () => { await appsMenu.openCollapsibleNav(); await testSubjects.existOrFail('collapsibleNavGroup-opensearchDashboards'); const actualLabel = await testSubjects.getAttribute( @@ -213,7 +222,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(url.includes('/app/home')).to.be(true); }); - it('with customized mark logo in home dashboard card', async () => { + // Wazuh: This test is omitted because OpenSearch Dashboards does not have a home dashboard card. + it.skip('with customized mark logo in home dashboard card', async () => { await testSubjects.existOrFail('dashboardCustomLogo'); const actualLabel = await testSubjects.getAttribute( 'dashboardCustomLogo', @@ -222,7 +232,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(actualLabel.toUpperCase()).to.equal(expectedMarkLogoDarkMode.toUpperCase()); }); - it('with customized mark logo for opensearch in side menu', async () => { + // Wazuh: This test is omitted because OpenSearch Dashboards does not appear in the side menu. + it.skip('with customized mark logo for opensearch in side menu', async () => { await appsMenu.openCollapsibleNav(); await testSubjects.existOrFail('collapsibleNavGroup-opensearchDashboards'); const actualLabel = await testSubjects.getAttribute( diff --git a/test/functional/page_objects/header_page.ts b/test/functional/page_objects/header_page.ts index f9a873c49ced..00f921ab6dcd 100644 --- a/test/functional/page_objects/header_page.ts +++ b/test/functional/page_objects/header_page.ts @@ -38,18 +38,25 @@ export function HeaderPageProvider({ getService, getPageObjects }: FtrProviderCo const appsMenu = getService('appsMenu'); const globalNav = getService('globalNav'); const PageObjects = getPageObjects(['common']); + const browser = getService('browser'); const defaultFindTimeout = config.get('timeouts.find'); class HeaderPage { public async clickDiscover() { - await appsMenu.clickLink('Discover', { category: 'opensearchDashboards' }); + // Wazuh: Set a local storage item to show the nav group + // because the nav group is hidden by default in our fork + await browser.setLocalStorageItem('core.navGroup.explore', 'true'); + await appsMenu.clickLink('Discover', { category: 'explore' }); await PageObjects.common.waitForTopNavToBeVisible(); await this.awaitGlobalLoadingIndicatorHidden(); } public async clickVisualize() { - await appsMenu.clickLink('Visualize', { category: 'opensearchDashboards' }); + // Wazuh: Set a local storage item to show the nav group + // because the nav group is hidden by default in our fork + await browser.setLocalStorageItem('core.navGroup.explore', 'true'); + await appsMenu.clickLink('Visualize', { category: 'explore' }); await this.awaitGlobalLoadingIndicatorHidden(); await retry.waitFor('first breadcrumb to be "Visualize"', async () => { const firstBreadcrumb = await globalNav.getFirstBreadcrumb(); @@ -63,7 +70,10 @@ export function HeaderPageProvider({ getService, getPageObjects }: FtrProviderCo } public async clickDashboard() { - await appsMenu.clickLink('Dashboard', { category: 'opensearchDashboards' }); + // Wazuh: Set a local storage item to show the nav group + // because the nav group is hidden by default in our fork + await browser.setLocalStorageItem('core.navGroup.explore', 'true'); + await appsMenu.clickLink('Dashboard', { category: 'explore' }); await retry.waitFor('dashboard app to be loaded', async () => { const isNavVisible = await testSubjects.exists('top-nav'); const isLandingPageVisible = await testSubjects.exists('dashboardLandingPage'); @@ -73,7 +83,12 @@ export function HeaderPageProvider({ getService, getPageObjects }: FtrProviderCo } public async clickStackManagement() { - await appsMenu.clickLink('Dashboards Management', { category: 'management' }); + // Wazuh: Set a local storage item to show the nav group + // because the nav group is hidden by default in our fork + await browser.setLocalStorageItem('core.navGroup.wz-category-dashboard-management', 'true'); + await appsMenu.clickLink('Dashboards Management', { + category: 'wz-category-dashboard-management', + }); await this.awaitGlobalLoadingIndicatorHidden(); }