Skip to content

Commit

Permalink
Make the context size display editable
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Nov 23, 2016
1 parent b2db703 commit c3d7459
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/core_plugins/kibana/public/context/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@

<div data-transclude-slot="primaryRight" class="localMenu">
<div class="localMenuItem" ng-click="contextApp.actions.increaseSize()">
<div class="localMenuItem__icon fa fa-plus"></div>
<div class="fa fa-plus"></div>
</div>
<div class="localMenuIten">
{{ contextApp.size }} surrounding entries
<div class="localMenuItem">
<input
class="localMenuItem__input--inPlace"
ng-change="contextApp.actions.setSize(contextApp.size)"
ng-model-options="{updateOn: 'change'}"
ng-model="contextApp.size"
type="number"
/>
<div>surrounding entries</div>
</div>
<div class="localMenuItem" ng-click="contextApp.actions.decreaseSize()">
<div class="localMenuItem__icon fa fa-minus"></div>
<div class="a fa-minus"></div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/ui/public/local_navigation/local_navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import angular from 'angular';
import uiModules from 'ui/modules';

import 'ui/multi_transclude';
import './local_navigation.less';
import localNavigationTemplate from './local_navigation.html';


Expand Down
27 changes: 27 additions & 0 deletions src/ui/public/local_navigation/local_navigation.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@import "~ui/styles/variables.less";

// This should be moved to the kibana ui framework code as soon as it has been
// integrated into the kibana repo. See elastic/kibana#8867 for the status.
.localMenuItem__input--inPlace {
appearance: textfield;
background: transparent;
border: 0;
border-bottom: 1px dashed;
display: block;
margin-right: 5px;
outline: none;
padding-left: 0;
padding-right: 0;
text-align: center;
width: 2em;

&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
appearance: none;
margin: 0;
}

&:focus {
background-color: @kibanaGray6;
}
}

0 comments on commit c3d7459

Please sign in to comment.