Skip to content
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
1 change: 1 addition & 0 deletions x-pack/plugins/security/public/components/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './management/users/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './users';
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// HACK -- Fix for background color full-height of browser
.secUsersEditPage,
.secUsersListingPage {
min-height: calc(100vh - 70px);
}

.secUsersListingPage__content {
flex-grow: 0;
}

.secUsersEditPage__content {
max-width: $secFormWidth;
margin-left: auto;
margin-right: auto;
flex-grow: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ class EditUserUI extends Component {
}

return (
<EuiPage className="mgtUsersEditPage">
<EuiPage className="secUsersEditPage">
<EuiPageBody>
<EuiPageContent className="mgtUsersEditPage__content">
<EuiPageContent className="secUsersEditPage__content">
<EuiPageContentHeader>
<EuiPageContentHeaderSection>
<EuiTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class UsersUI extends Component {
const { apiClient, intl } = this.props;
if (permissionDenied) {
return (
<EuiPage className="mgtUsersListingPage">
<EuiPage className="secUsersListingPage">
<EuiPageBody>
<EuiPageContent horizontalPosition="center">
<EuiEmptyPrompt
Expand Down Expand Up @@ -222,9 +222,9 @@ class UsersUI extends Component {
return normalized.indexOf(normalizedQuery) !== -1;
}) : users;
return (
<EuiPage className="mgtUsersListingPage">
<EuiPage className="secUsersListingPage">
<EuiPageBody>
<EuiPageContent className="mgtUsersListingPage__content">
<EuiPageContent className="secUsersListingPage__content">
<EuiPageContentHeader>
<EuiPageContentHeaderSection>
<EuiTitle>
Expand Down
19 changes: 13 additions & 6 deletions x-pack/plugins/security/public/index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
@import 'ui/public/styles/styling_constants';

// Logged out styles
@import './views/logged_out/index';
// Prefix all styles with "kbn" to avoid conflicts.
// Examples
// secChart
// secChart__legend
// secChart__legend--small
// secChart__legend-isLoading

// Login styles
@import './views/login/index';
$secFormWidth: 460px;

// Public components
@import './components/index';

// Public views
@import './views/index';

// Management styles
@import './views/management/index';
8 changes: 8 additions & 0 deletions x-pack/plugins/security/public/views/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Public views
@import './logged_out/index';

// Login styles
@import './login/index';

// Management styles
@import './management/index';
2 changes: 2 additions & 0 deletions x-pack/plugins/security/public/views/management/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import './change_password_form/index';
@import './edit_role/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.secChangePasswordForm__panel {
max-width: $secFormWidth;
}

.secChangePasswordForm__subLabel {
margin-bottom: $euiSizeS;
}

.secChangePasswordForm__footer {
display: flex;
justify-content: flex-start;
align-items: center;

.kuiButton + .kuiButton {
margin-left: $euiSizeS;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './change_password_form';
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<!-- Changing password -->
<div
ng-show="changePasswordController.isFormVisible"
class="kuiFormPanel mgtForm__panel"
class="kuiFormPanel secChangePasswordForm__panel"
>
<!-- Current password -->
<div class="kuiFormSection" ng-if="requireCurrentPassword">
<label
for="password"
class="kuiFormSubLabel mgtForm__subLabel"
class="kuiFormSubLabel secChangePasswordForm__subLabel"
i18n-id="xpack.security.management.changePasswordForm.currentPasswordLabel"
i18n-default-message="Current password"
></label>
Expand All @@ -54,7 +54,7 @@
<div class="kuiFormSection">
<label
for="newPassword"
class="kuiFormSubLabel mgtForm__subLabel"
class="kuiFormSubLabel secChangePasswordForm__subLabel"
i18n-id="xpack.security.management.changePasswordForm.newPasswordLabel"
i18n-default-message="New password"
></label>
Expand Down Expand Up @@ -82,9 +82,9 @@
<div class="kuiFormSection">
<label
for="confirmPassword"
class="kuiFormSubLabel mgtForm__subLabel"
class="kuiFormSubLabel secChangePasswordForm__subLabel"
i18n-id="xpack.security.management.changePasswordForm.confirmPasswordLabel"
i18n-default-message="Confirm password"
i18n-default-message="Confirm password"
></label>
<input
type="password"
Expand Down Expand Up @@ -112,12 +112,12 @@
<span
i18n-id="xpack.security.management.changePasswordForm.updateAndRestartKibanaDescription"
i18n-default-message="After you change the password for the kibana user, you must update the kibana.yml file and restart Kibana"
></span>
></span>
</div>
</div>

<!-- Form actions -->
<div class="kuiFormFooter mgtForm__footer">
<div class="kuiFormFooter secChangePasswordForm__footer">
<button
type="button"
data-test-subj="saveChangesButton"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './components/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import './collapsible_panel/collapsible_panel';
@import './privileges/kibana/space_aware_privilege_section/index';

.secPrivilegeFeatureIcon {
flex-shrink: 0;
margin-right: $euiSizeS;
}
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class ElasticsearchPrivilegesUI extends Component<Props, {}> {
<EuiHorizontalRule />

{this.props.editable && (
<EuiButton size={'s'} iconType={'plusInCircle'} onClick={this.addIndexPrivilege}>
<EuiButton iconType={'plusInCircleFilled'} onClick={this.addIndexPrivilege}>
<FormattedMessage
id="xpack.security.management.editRoles.elasticSearchPrivileges.addIndexPrivilegesButtonLabel"
defaultMessage="Add index privilege"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

import {
EuiIcon,
// @ts-ignore
EuiIconTip,
// @ts-ignore
EuiInMemoryTable,
// @ts-ignore
EuiSuperSelect,
EuiText,
EuiTextProps,
} from '@elastic/eui';
import { EuiIconProps } from '@elastic/eui/src/components/icon/icon';
import { InjectedIntl } from '@kbn/i18n/react';
import _ from 'lodash';
import React, { Component } from 'react';
Expand Down Expand Up @@ -74,7 +73,7 @@ export class FeatureTable extends Component<Props, {}> {
role,
}));

return <EuiInMemoryTable columns={this.getColumns()} items={items} />;
return <EuiInMemoryTable responsive={false} columns={this.getColumns()} items={items} />;
}

public onChange = (featureId: string) => (privilege: string) => {
Expand Down Expand Up @@ -120,22 +119,23 @@ export class FeatureTable extends Component<Props, {}> {
</EuiText>
);
tooltipElement = (
<EuiIconTip type={'iInCircle'} color={'primary'} content={tooltipContent} />
<EuiIconTip
// TODO: Waiting on update from EUI
// iconProps={{
// className: 'eui-alignTop',
// }}
type={'iInCircle'}
color={'subdued'}
content={tooltipContent}
/>
);
}

const textProps: EuiTextProps = {};
const iconProps: EuiIconProps = {};
if (!feature.hasAnyPrivilegeAssigned) {
textProps.color = 'subdued';
iconProps.color = 'subdued';
}

return (
<EuiText {...textProps}>
<EuiIcon {...iconProps} type={feature.icon} />
&ensp; {feature.name} {tooltipElement}
</EuiText>
<span>
<EuiIcon size="m" type={feature.icon} className="secPrivilegeFeatureIcon" />
{feature.name} {tooltipElement}
</span>
);
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './privilege_matrix';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.secPrivilegeMatrix__row--isBasePrivilege,
.secPrivilegeMatrix__cell--isGlobalPrivilege,
.secPrivilegeTable__row--isGlobalSpace, {
background-color: $euiColorLightestShade;
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const SupercededPrivilegeDisplay: SFC<SupercededProps> = (props: Superced
return (
<PrivilegeDisplay
{...rest}
iconType={'questionInCircle'}
iconType={'lock'}
tooltipContent={
<FormattedMessage
id="foo"
Expand All @@ -62,11 +62,7 @@ function getDisplayValue(privilege: string | string[], styleMissingPrivilege?: b
privileges.length === 0 || (privileges.length === 1 && privileges.includes(NO_PRIVILEGE_VALUE));

if (isPrivilegeMissing && styleMissingPrivilege) {
displayValue = (
<EuiText>
<EuiIcon size={'s'} type={'minusInCircle'} /> none
</EuiText>
);
displayValue = <EuiIcon color="subdued" type={'minusInCircle'} />;
} else {
displayValue = privileges.map(p => _.capitalize(p)).join(', ');
}
Expand All @@ -79,7 +75,17 @@ function getIconTip(iconType?: IconType, tooltipContent?: ReactNode) {
return null;
}

return <EuiIconTip type={iconType} content={tooltipContent} size={'s'} />;
return (
<EuiIconTip
// TODO: Waiting on update from EUI
// iconProps={{
// className: 'eui-alignTop',
// }}
type={iconType}
content={tooltipContent}
size={'s'}
/>
);
}

function coerceToArray(privilege: string | string[]): string[] {
Expand Down
Loading