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

Reactify users roles #20739

Merged
merged 32 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1d209ca
partial progress on reactifying users
bmcconaghy Jun 29, 2018
0b9f706
progress on EUIfication of users screen
bmcconaghy Jul 12, 2018
a8b6aa0
removing Angular stuff
bmcconaghy Jul 12, 2018
3f2111c
adding data-test-subj="passwordConfirmationInput"
bmcconaghy Jul 13, 2018
3dfc4e9
removing data-test-subj="userFormEmailInput" refs from tests
bmcconaghy Jul 13, 2018
6ae9785
fixing selector for role assignment
bmcconaghy Jul 13, 2018
aba4df5
Merge branch 'master' of github.com:elastic/kibana into reactify_user…
bmcconaghy Jul 13, 2018
1cdd642
some functional test fixes
bmcconaghy Jul 13, 2018
a6b9f0c
Merge branch 'master' of github.com:elastic/kibana into reactify_user…
bmcconaghy Jul 16, 2018
0645315
fixing some functional tests
bmcconaghy Jul 17, 2018
a75d9f3
fixing last functional test
bmcconaghy Jul 17, 2018
0e95c45
removing stray console log
bmcconaghy Jul 17, 2018
29e5537
fixing warnings
bmcconaghy Jul 17, 2018
89ae92a
attempting to fix flaky test
bmcconaghy Jul 17, 2018
8c90d9c
trying again to fix flaky test
bmcconaghy Jul 17, 2018
f76a77c
PR feedback
bmcconaghy Jul 17, 2018
4f9ab79
PR feedback
bmcconaghy Jul 17, 2018
74cb8b4
fixing issue where form tried to submit
bmcconaghy Jul 17, 2018
4c72e45
adding sleep to allow user to load
bmcconaghy Jul 17, 2018
fb4f27e
Design edits
cchaos Jul 17, 2018
5819a4e
Fixed console error and added responsive prop to table
cchaos Jul 17, 2018
ed1040a
Merge pull request #1 from cchaos/bmcconaghy_reactify_users_roles
bmcconaghy Jul 17, 2018
8f73767
addressing PR feedback
bmcconaghy Jul 18, 2018
f12db47
Merge branch 'master' of github.com:elastic/kibana into reactify_user…
bmcconaghy Jul 18, 2018
b1d41ac
A few more PR feedback
cchaos Jul 18, 2018
b4495d9
Merge pull request #2 from cchaos/bmcconaghy_reactify_users_roles
bmcconaghy Jul 18, 2018
f8afe3b
addressing more PR feedback
bmcconaghy Jul 18, 2018
8480f43
Merge branch 'master' of github.com:elastic/kibana into reactify_user…
bmcconaghy Jul 18, 2018
9624a2b
adding email field back in
bmcconaghy Jul 19, 2018
61428b0
adding back username validation
bmcconaghy Jul 19, 2018
70c0efc
restoring original error message
bmcconaghy Jul 19, 2018
f1bc298
fixing dumb null error
bmcconaghy Jul 19, 2018
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
2 changes: 2 additions & 0 deletions test/functional/services/dashboard/add_panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ export function DashboardAddPanelProvider({ getService, getPageObjects }) {
async addVisualization(vizName) {
log.debug(`DashboardAddPanel.addVisualization(${vizName})`);
await this.ensureAddPanelIsShowing();
// workaround for timing issue with slideout animation
await PageObjects.common.sleep(500);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to the user management changeset, or is it a fix for an unrelated flaky test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated flaky test, @stacey-gammon opened a bug for it.

await this.filterEmbeddableNames(`"${vizName.replace('-', ' ')}"`);
await testSubjects.click(`addPanel${vizName.split(' ').join('-')}`);
await this.closeAddPanel();
Expand Down
4 changes: 1 addition & 3 deletions test/functional/services/test_subjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ export function TestSubjectsProvider({ getService }) {

async setValue(selector, text) {
return await retry.try(async () => {
const element = await this.find(selector);
await element.click();

await this.click(selector);
// in case the input element is actually a child of the testSubject, we
// call clearValue() and type() on the element that is focused after
// clicking on the testSubject
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import React, { Component, Fragment } from 'react';
import { EuiOverlayMask, EuiConfirmModal } from '@elastic/eui';
import { toastNotifications } from 'ui/notify';
export class ConfirmDelete extends Component {
deleteUsers = () => {
const { usersToDelete, apiClient, callback } = this.props;
const errors = [];
usersToDelete.forEach(async username => {
try {
await apiClient.deleteUser(username);
toastNotifications.addSuccess(`Deleted user ${username}`);
} catch (e) {
errors.push(username);
toastNotifications.addDanger(`Error deleting user ${username}`);
}
if (callback) {
callback(usersToDelete, errors);
}
});
};
render() {
const { usersToDelete, onCancel } = this.props;
const moreThanOne = usersToDelete.length > 1;
const title = moreThanOne
? `Delete ${usersToDelete.length} users`
: `Delete user '${usersToDelete[0]}'`;
return (
<EuiOverlayMask>
<EuiConfirmModal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cchaos This modal looks like it's missing flex-direction: column. I reinstalled the dependencies. Is anyone else seeing this?

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this will be fixed by the followup PR updating EUI in X-Pack.

title={title}
onCancel={onCancel}
onConfirm={this.deleteUsers}
cancelButtonText="Cancel"
confirmButtonText="Delete"
buttonColor="danger"
>
<div>
{moreThanOne ? (
<Fragment>
<p>
You are about to delete these users:
</p>
<ul>{usersToDelete.map(username => <li key={username}>{username}</li>)}</ul>
</Fragment>
) : null}
<p>This operation cannot be undone.</p>
</div>
</EuiConfirmModal>
</EuiOverlayMask>
);
}
}
Loading