Skip to content

Commit

Permalink
Management core Less to Sass (elastic#23596) (elastic#23861)
Browse files Browse the repository at this point in the history
Converts management's less to sass. Makes minor adjustments to those pages for some design cleanup.
  • Loading branch information
snide authored Oct 5, 2018
1 parent 74f1bae commit 6a8a653
Show file tree
Hide file tree
Showing 51 changed files with 943 additions and 1,154 deletions.
3 changes: 3 additions & 0 deletions src/core_plugins/kibana/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
@import './visualize/index';
@import 'ui/public/vis/index';

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

// Dashboard styles
// MUST STAY AT THE BOTTOM BECAUSE OF DARK THEME IMPORTS
@import './dashboard/index';
46 changes: 46 additions & 0 deletions src/core_plugins/kibana/public/management/_hacks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SASSTODO: figure out why this is needed
kbn-management-app,
kbn-management-landing,
kbn-management-indices,
kbn-management-indices-edit,
kbn-management-indices-create,
kbn-management-advanced,
kbn-management-objects,
kbn-management-objects-view {
display: block;
}

// SASSTODO: Remove when Kibana has a proper background color
.tab-account, .tab-management {
background-color: $euiColorEmptyShade;
}

// SASSTODO: Remove when Kibana has a proper background color
kbn-management-objects, kbn-management-app {
background: $euiColorLightestShade;
min-height: 100vh;
}

.kbn-management-tab:first-letter {
text-transform: capitalize;
}

// SASSTODO: Remove when this is replaced with EuiCode
kbn-management-objects-view {
.ace_editor { height: 300px; }
}

// SASSTODO: These are some dragula settings.
.gu-handle {
cursor: move;
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
}

.gu-mirror,
.gu-mirror .gu-handle {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing;
}
55 changes: 55 additions & 0 deletions src/core_plugins/kibana/public/management/_management_app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.mgtPanel {
margin-bottom: $euiSize;
background: $euiColorEmptyShade;
}

// SASSTODO: Remove when this is replaced by the side nav
.mgtPanel__link {
@include euiFontSizeL;

line-height: 2; // Give some buffer for when they wrap

&.mgtPanel__link--disabled {
opacity: $euiColorDarkShade;
cursor: default;

&:hover, &:visited {
color: $euiColorPrimary;
}
}
}

// SASSTODO: Remove when this form is replaced by EUI
kbn-management-objects {
form {
margin-bottom: $euiSize;
}
.list-unstyled {
li {
border-bottom: $euiBorderThin;
padding: $euiSizeS;
}
}
.empty {
color: $euiColorDarkShade;
}

.item {
padding: $euiSizeM;

.item-title {
margin-left: $euiSizeL;
}

.actions {
margin-top: $euiSizeXS;
}
}

.header {
.title, .controls {
padding-right: 1em;
display: inline-block;
}
}
}
1 change: 0 additions & 1 deletion src/core_plugins/kibana/public/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/

import './sections';
import './styles/main.less';
import 'ui/filters/start_from';
import 'ui/field_editor';
import uiRoutes from 'ui/routes';
Expand Down
14 changes: 14 additions & 0 deletions src/core_plugins/kibana/public/management/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file is imported into src/core_plugings/kibana/publix/index.scss

// Prefix all styles with "dsh" to avoid conflicts.
// Examples
// mgtChart
// mgtChart__legend
// mgtChart__legend--small
// mgtChart__legend-isLoading

@import 'hacks';

// Core
@import 'management_app';
@import 'sections/settings/advanced_settings';
10 changes: 4 additions & 6 deletions src/core_plugins/kibana/public/management/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
ng-repeat="section in sections"
class="page-row"
>
<div class="kuiPanel management-panel" role="group">
<div class="kuiPanel mgtPanel" role="group">
<div class="kuiPanelHeader">
<div class="kuiPanelHeaderSection">
<div
class="management-panel__heading-icon management-panel__heading-icon--{{::section.id}}"
></div>
<icon type="'{{::section.icon}}'" size="'l'"></icon>
<h3 class="kuiPanelHeader__title">
{{::section.display}}
</h3>
Expand All @@ -32,8 +30,8 @@ <h3 class="kuiPanelHeader__title">
>
<a
data-test-subj="{{::item.id}}"
class="euiLink euiLink--primary management-panel__link"
ng-class="{ 'management-panel__link--disabled': item.disabled || !item.url }"
class="euiLink euiLink--primary mgtPanel__link"
ng-class="{ 'mgtPanel__link--disabled': item.disabled || !item.url }"
kbn-href="{{::item.disabled ? '' : item.url}}"
tooltip="{{::item.tooltip}}"
tooltip-placement="bottom"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,58 @@
<div class="col-md-2 sidebar-container" role="region" aria-label="{{'kbn.management.editIndexPatternAria' | i18n: { defaultMessage: 'Index patterns' } }}">
<div class="sidebar-list">
<div class="sidebar-item-title full-title">
<h5 data-test-subj="createIndexPatternParent">
<a
ng-if="editingId"
href="#/management/kibana/index"
class="kuiButton kuiButton--primary kuiButton--small"
data-test-subj="createIndexPatternButton"
<div class="euiPage">
<div class="col-md-2 sidebar-container" role="region" aria-label="{{'kbn.management.editIndexPatternAria' | i18n: { defaultMessage: 'Index patterns' } }}">
<div class="sidebar-list">
<div class="sidebar-item-title full-title">
<h5 data-test-subj="createIndexPatternParent">
<a
ng-if="editingId"
href="#/management/kibana/index"
class="kuiButton kuiButton--primary kuiButton--small"
data-test-subj="createIndexPatternButton"
>
<span aria-hidden="true" class="kuiIcon fa-plus"></span>
<span i18n-id="kbn.management.editIndexPattern.createIndexButton"
i18n-default-message="Create Index Pattern"></span>
</a>
</h5>
</div>
<ul class="list-unstyled">
<li
ng-if="!defaultIndex"
class="sidebar-item"
>
<span aria-hidden="true" class="kuiIcon fa-plus"></span>
<span i18n-id="kbn.management.editIndexPattern.createIndexButton"
i18n-default-message="Create Index Pattern"></span>
</a>
</h5>
</div>
<ul class="list-unstyled">
<li
ng-if="!defaultIndex"
class="sidebar-item"
>
<div class="sidebar-item-title full-title">
<div class="euiText euiText--extraSmall">
<div class="euiBadge euiBadge--warning"
i18n-id="kbn.management.editIndexPattern.createIndex.warningHeader"
i18n-default-message="Warning"></div>
<p i18n-id="kbn.management.editIndexPattern.createIndex.warningLabel"
i18n-default-message="No default index pattern. You must select or create one to continue."></p>
<div class="sidebar-item-title full-title">
<div class="euiText euiText--extraSmall">
<div class="euiBadge euiBadge--warning"
i18n-id="kbn.management.editIndexPattern.createIndex.warningHeader"
i18n-default-message="Warning"></div>
<p i18n-id="kbn.management.editIndexPattern.createIndex.warningLabel"
i18n-default-message="No default index pattern. You must select or create one to continue."></p>
</div>
</div>
</div>
</li>
</li>

<li
ng-repeat="pattern in indexPatternList | orderBy:['-default','title'] track by pattern.id"
class="sidebar-item"
>
<a
href="{{::pattern.url}}"
class="euiLink euiLink--primary show"
data-test-subj="indexPatternLink"
<li
ng-repeat="pattern in indexPatternList | orderBy:['-default','title'] track by pattern.id"
class="sidebar-item"
>
<div class="{{::pattern.class}}">
<i aria-hidden="true" ng-if="pattern.default" class="fa fa-star"></i>
<span ng-bind="::pattern.title"></span>
</div>
</a>
</li>
</ul>
<a
href="{{::pattern.url}}"
class="euiLink euiLink--primary show"
data-test-subj="indexPatternLink"
>
<div class="{{::pattern.class}}">
<i aria-hidden="true" ng-if="pattern.default" class="fa fa-star"></i>
<span ng-bind="::pattern.title"></span>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>

<div class="col-md-10" ng-transclude></div>
<div class="col-md-10">
<div class="euiPanel euiPanel--paddingLarge">
<div ng-transclude></div>
</div>
</div>
</div>
Loading

0 comments on commit 6a8a653

Please sign in to comment.