Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Jan 2, 2020
1 parent e4a7c43 commit 1ff6eda
Show file tree
Hide file tree
Showing 157 changed files with 2,251 additions and 2,814 deletions.
23 changes: 0 additions & 23 deletions x-pack/legacy/plugins/security/common/model.ts

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/security/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { Legacy } from 'kibana';
import { AuthenticatedUser } from './common/model';
import { AuthenticatedUser } from '../../../plugins/security/public';

/**
* Public interface of the security plugin.
Expand Down
1 change: 0 additions & 1 deletion x-pack/legacy/plugins/security/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const security = kibana =>
'plugins/security/hacks/on_unauthorized_response',
'plugins/security/hacks/register_account_management_app',
],
home: ['plugins/security/register_feature'],
injectDefaultVars: server => {
const securityPlugin = server.newPlatform.setup.plugins.security;
if (!securityPlugin) {
Expand Down
3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/security/public/images/logout.svg

This file was deleted.

3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/security/public/images/person.svg

This file was deleted.

3 changes: 3 additions & 0 deletions x-pack/legacy/plugins/security/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ $secFormWidth: 460px;
// Public views
@import './views/index';

// Styles of Kibana Platform plugin
@import '../../../../plugins/security/public/index';

49 changes: 0 additions & 49 deletions x-pack/legacy/plugins/security/public/lib/__tests__/util.js

This file was deleted.

19 changes: 0 additions & 19 deletions x-pack/legacy/plugins/security/public/lib/util.js

This file was deleted.

29 changes: 0 additions & 29 deletions x-pack/legacy/plugins/security/public/register_feature.js

This file was deleted.

18 changes: 0 additions & 18 deletions x-pack/legacy/plugins/security/public/services/shield_indices.js

This file was deleted.

30 changes: 0 additions & 30 deletions x-pack/legacy/plugins/security/public/services/shield_role.js

This file was deleted.

3 changes: 0 additions & 3 deletions x-pack/legacy/plugins/security/public/views/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
// Login styles
@import './login/index';

// Management styles
@import './management/index';

This file was deleted.

27 changes: 10 additions & 17 deletions x-pack/legacy/plugins/security/public/views/account/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
* you may not use this file except in compliance with the Elastic License.
*/

import routes from 'ui/routes';
import template from './account.html';
import { i18n } from '@kbn/i18n';
import { I18nContext } from 'ui/i18n';
import { npSetup } from 'ui/new_platform';
import { AccountManagementPage } from './components';
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { i18n } from '@kbn/i18n';
import { npStart } from 'ui/new_platform';
import routes from 'ui/routes';

routes.when('/account', {
template,
template: '<div id="userProfileReactRoot" />',
k7Breadcrumbs: () => [
{
text: i18n.translate('xpack.security.account.breadcrumb', {
Expand All @@ -24,19 +21,15 @@ routes.when('/account', {
],
controllerAs: 'accountController',
controller($scope) {
$scope.$on('$destroy', () => {
const elem = document.getElementById('userProfileReactRoot');
if (elem) {
unmountComponentAtNode(elem);
}
});
$scope.$$postDigest(() => {
const domNode = document.getElementById('userProfileReactRoot');

render(
<I18nContext>
<AccountManagementPage securitySetup={npSetup.plugins.security} />
</I18nContext>,
document.getElementById('userProfileReactRoot')
<npStart.plugins.security.__legacyCompat.account_management.AccountManagementPage />,
domNode
);

$scope.$on('$destroy', () => unmountComponentAtNode(domNode));
});
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { EuiButton, EuiCallOut } from '@elastic/eui';
import React from 'react';
import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers';
import { LoginState } from '../../../../../common/login_state';
import { LoginState } from '../../login_state';
import { BasicLoginForm } from './basic_login_form';

const createMockHttp = ({ simulateError = false } = {}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
import React, { ChangeEvent, Component, FormEvent, Fragment, MouseEvent } from 'react';
import ReactMarkdown from 'react-markdown';
import { EuiText } from '@elastic/eui';
import { LoginState } from '../../../../../common/login_state';
import { LoginState } from '../../login_state';

interface Props {
http: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { shallow } from 'enzyme';
import React from 'react';
import { LoginLayout, LoginState } from '../../../../../common/login_state';
import { LoginLayout, LoginState } from '../../login_state';
import { LoginPage } from './login_page';

const createMockHttp = ({ simulateError = false } = {}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
EuiTitle,
} from '@elastic/eui';
import classNames from 'classnames';
import { LoginState } from '../../../../../common/login_state';
import { LoginState } from '../../login_state';
import { BasicLoginForm } from '../basic_login_form';
import { DisabledLoginForm } from '../disabled_login_form';

Expand Down

This file was deleted.

8 changes: 3 additions & 5 deletions x-pack/legacy/plugins/security/public/views/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@

import { i18n } from '@kbn/i18n';
import { get } from 'lodash';
import { parseNext } from 'plugins/security/lib/parse_next';
import { LoginPage } from 'plugins/security/views/login/components';
// @ts-ignore
import template from 'plugins/security/views/login/login.html';
import React from 'react';
import { render } from 'react-dom';
import chrome from 'ui/chrome';
import { I18nContext } from 'ui/i18n';
import { parse } from 'url';
import { LoginState } from '../../../common/login_state';
import { parseNext } from './parse_next';
import { LoginState } from './login_state';
const messageMap = {
SESSION_EXPIRED: i18n.translate('xpack.security.login.sessionExpiredDescription', {
defaultMessage: 'Your session has timed out. Please log in again.',
Expand All @@ -31,7 +29,7 @@ interface AnyObject {

(chrome as AnyObject)
.setVisible(false)
.setRootTemplate(template)
.setRootTemplate('<div id="reactLoginRoot" />')
.setRootController(
'login',
(
Expand Down
Loading

0 comments on commit 1ff6eda

Please sign in to comment.