diff --git a/.github/actions/download-plugin/action.yml b/.github/actions/download-plugin/action.yml index 6ed56c027..b20b0394a 100644 --- a/.github/actions/download-plugin/action.yml +++ b/.github/actions/download-plugin/action.yml @@ -28,24 +28,3 @@ runs: -Dtransitive=false \ -Ddest=${{ inputs.download-location }}.zip shell: bash - - - name: Create Setup Script for Linux - if: ${{ runner.os == 'Linux' }} - run: | - cat > setup.sh <<'EOF' - chmod +x ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh - /bin/bash -c "yes | ./opensearch-${{ inputs.opensearch-version}}-SNAPSHOT/plugins/${{ inputs.plugin-name }}/tools/install_demo_configuration.sh -t" - echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml - echo "cluster.routing.allocation.disk.threshold_enabled: false" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT/config/opensearch.yml - EOF - shell: bash - - - name: Create Setup Script for Windows - if: ${{ runner.os == 'Windows' }} - run: | - New-Item .\setup.bat -type file - Set-Content .\setup.bat -Value "powershell.exe -noexit -command `".\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\plugins\${{ inputs.plugin-name }}\tools\install_demo_configuration.bat -y -i -c -t`"" - Add-Content -Path .\setup.bat -Value "echo plugins.security.unsupported.restapi.allow_securityconfig_modification: true >> .\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\config\opensearch.yml" - Add-Content -Path .\setup.bat -Value "echo cluster.routing.allocation.disk.threshold_enabled: false >> .\opensearch-${{ inputs.opensearch-version}}-SNAPSHOT\config\opensearch.yml" - Get-Content .\setup.bat - shell: pwsh diff --git a/public/apps/configuration/top-nav-menu.tsx b/public/apps/configuration/top-nav-menu.tsx index ce2dfb1a0..c582700e5 100644 --- a/public/apps/configuration/top-nav-menu.tsx +++ b/public/apps/configuration/top-nav-menu.tsx @@ -16,7 +16,6 @@ import React from 'react'; import { DataSourceSelectableConfig } from 'src/plugins/data_source_management/public'; import { DataSourceOption } from 'src/plugins/data_source_management/public/components/data_source_menu/types'; -import { PLUGIN_NAME } from '../../../common'; import { AppDependencies } from '../types'; export interface TopNavMenuProps extends AppDependencies { @@ -25,6 +24,21 @@ export interface TopNavMenuProps extends AppDependencies { selectedDataSource: DataSourceOption; } +const compatibleVersion = new Set([ + '2.1', + '2.2', + '2.3', + '2.4', + '2.5', + '2.6', + '2.7', + '2.8', + '2.9', + '2.10', + '2.11', + '2.12', +]); + export const SecurityPluginTopNavMenu = (props: TopNavMenuProps) => { const { coreStart, @@ -48,6 +62,7 @@ export const SecurityPluginTopNavMenu = (props: TopNavMenuProps) => { savedObjects: coreStart.savedObjects.client, notifications: coreStart.notifications, activeOption: [selectedDataSource], + dataSourceFilter: (ds) => compatibleVersion.has(ds.attributes.version), onSelectedDataSources: (dataSources) => { // single select for now setDataSource(dataSources[0]); diff --git a/test/jest_integration/security_entity_api.test.ts b/test/jest_integration/security_entity_api.test.ts index c49f905e8..c3ca21986 100644 --- a/test/jest_integration/security_entity_api.test.ts +++ b/test/jest_integration/security_entity_api.test.ts @@ -468,7 +468,7 @@ describe('start OpenSearch Dashboards server multi datasources enabled', () => { attributes: { title: 'test', description: '', - endpoint: 'http://localhost:9202', + endpoint: 'https://localhost:9202', auth: { type: 'username_password', credentials: {