Skip to content

Commit

Permalink
[kbnLoading] Made the directive so we dont have to repeat, with some
Browse files Browse the repository at this point in the history
cleanup
  • Loading branch information
panda01 committed Mar 14, 2016
1 parent f3653a1 commit 40f91ba
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/plugins/kibana/public/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
ng-click="configTemplate.toggle('options');">
<span>Options</span>
</button>
<kbn-loading-indicator></kbn-loading-indicator>
<kbn-global-timepicker></kbn-global-timepicker>
</div>
</navbar>
Expand Down
1 change: 0 additions & 1 deletion src/plugins/kibana/public/discover/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
ng-click="configTemplate.toggle('share');">
<span>Share</span>
</button>
<kbn-loading-indicator></kbn-loading-indicator>
<kbn-global-timepicker></kbn-global-timepicker>
</div>
</navbar>
Expand Down
1 change: 0 additions & 1 deletion src/plugins/kibana/public/visualize/editor/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
aria-label="Refresh">
<span>Refresh</span>
</button>
<kbn-loading-indicator></kbn-loading-indicator>
<kbn-global-timepicker></kbn-global-timepicker>
</div>
</navbar>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/chrome/chrome.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</div>
<!-- /Full navbar -->
</nav>
<div class="application" ng-class="'tab-' + chrome.getActiveTabId('-none-') + ' ' + chrome.getApplicationClasses()" ng-view></div>
<div class="application" ng-class="'tab-' + chrome.getActiveTabId('-none-') + ' ' + chrome.getApplicationClasses()" ng-view kbn-loading-indicator></div>
</div>
</div>
</div>
1 change: 0 additions & 1 deletion src/ui/public/chrome/directives/active_http_spinner.html

This file was deleted.

2 changes: 1 addition & 1 deletion src/ui/public/chrome/directives/append_nav_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function (chrome, internals) {
const parts = [$element.html()];
const controls = Private(chromeNavControlsRegistry);

for (const control of [...controls.inOrder]) {
for (const control of controls.inOrder) {
parts.unshift(
`<!-- nav control ${control.name} -->`,
control.template
Expand Down
10 changes: 7 additions & 3 deletions src/ui/public/chrome/directives/kbn_loading_indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ const spinnerTemplate = '<div class="spinner" ng-show="chrome.httpActive.length"

UiModules
.get('ui/kibana')
.directive('kbnLoadingIndicator', function() {
.directive('kbnLoadingIndicator', function($rootScope, $compile) {
return {
restrict: 'E',
template: spinnerTemplate
restrict: 'AC',
link: function(scope, $el) {
const $loadingEl = angular.element(spinnerTemplate);
$el.append($loadingEl);
$compile($loadingEl)(scope);
}
}
});
1 change: 1 addition & 0 deletions src/ui/public/styles/spinner.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
right: 0;
height: 2px;
position: absolute;
z-index: 10;
visibility: visible;
display: block;
animation: move 2s linear infinite;
Expand Down

0 comments on commit 40f91ba

Please sign in to comment.