diff --git a/public/apps/configuration/panels/service-account-list.tsx b/public/apps/configuration/panels/service-account-list.tsx index 9feebba4a..c775f7589 100644 --- a/public/apps/configuration/panels/service-account-list.tsx +++ b/public/apps/configuration/panels/service-account-list.tsx @@ -42,6 +42,8 @@ import { ExternalLink, tableItemsUIProps, truncatedListView } from '../utils/dis import { getUserList, InternalUsersListing } from '../utils/internal-user-list-utils'; import { showTableStatusMessage } from '../utils/loading-spinner-utils'; import { buildHashUrl } from '../utils/url-builder'; +import { LocalCluster } from '../app-router'; +import { SecurityPluginTopNavMenu } from '../top-nav-menu'; export function dictView(items: Dictionary) { if (isEmpty(items)) { @@ -159,6 +161,12 @@ export function ServiceAccountList(props: AppDependencies) { return ( <> + {}} + selectedDataSource={LocalCluster} + />

Service accounts

diff --git a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js index 229fa448d..663c73e02 100644 --- a/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js +++ b/test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js @@ -193,6 +193,16 @@ describe('Multi-datasources enabled', () => { cy.get('[data-test-subj="dataSourceViewContextMenuHeaderLink"]').should('be.disabled'); }); + it('Checks Service Accounts Tab', () => { + // Datasource is locked to local cluster for service accounts tab + cy.visit('http://localhost:5601/app/security-dashboards-plugin#/serviceAccounts'); + cy.get('[data-test-subj="dataSourceViewContextMenuHeaderLink"]').should( + 'contain', + 'Local cluster' + ); + cy.get('[data-test-subj="dataSourceViewContextMenuHeaderLink"]').should('be.disabled'); + }); + it('Checks Audit Logs Tab', () => { cy.visit('http://localhost:5601/app/security-dashboards-plugin#/auditLogging'); cy.get('[data-test-subj="general-settings"]').should('exist');