Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi datasources on service accounts page #1870

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions public/apps/configuration/panels/service-account-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>) {
if (isEmpty(items)) {
Expand Down Expand Up @@ -159,6 +161,12 @@ export function ServiceAccountList(props: AppDependencies) {

return (
<>
<SecurityPluginTopNavMenu
{...props}
dataSourcePickerReadOnly={true}
setDataSource={() => {}}
selectedDataSource={LocalCluster}
/>
<EuiPageHeader>
<EuiTitle size="l">
<h1>Service accounts</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
// Create an action group
cy.get('[id="Create action group"]').click();
cy.get('[id="create-from-blank"]').click();
cy.get('[data-test-subj="name-text"]')

Check warning on line 161 in test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

View workflow job for this annotation

GitHub Actions / Run unit tests (ubuntu-latest)

Do not use force on click and type calls

Check warning on line 161 in test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

View workflow job for this annotation

GitHub Actions / Run unit tests (macos-latest)

Do not use force on click and type calls

Check warning on line 161 in test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

View workflow job for this annotation

GitHub Actions / Run unit tests (windows-latest)

Do not use force on click and type calls
.focus()
.type('test_permission_ag', { force: true })
.should('have.value', 'test_permission_ag');
Expand Down Expand Up @@ -191,6 +191,16 @@
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');
Expand Down
Loading