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
8 changes: 1 addition & 7 deletions src/ui/public/chrome/__tests__/kbn_loading_indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('kbnLoadingIndicator', function () {
$rootScope.chrome = {
httpActive: (hasActiveConnections ? [1] : [])
};
const $el = $('<div kbn-loading-indicator><div id="other-content"></div></div>');
const $el = $('<kbn-loading-indicator></kbn-loading-indicator>');
$rootScope.$apply();
$compile($el)($rootScope);
return $el;
Expand All @@ -38,10 +38,4 @@ describe('kbnLoadingIndicator', function () {
const $el = compile(true);
expect($el.find('.spinner.ng-hide')).to.have.length(0);
});

it('doesn\'t modify the contents of what the elment already has', function () {
const $el = compile();
expect($el.find('#other-content')).to.have.length(1);
});

});
3 changes: 2 additions & 1 deletion src/ui/public/chrome/chrome.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
</div>
<!-- /Full navbar -->
</nav>
<div class="application" ng-class="'tab-' + chrome.getFirstPathSegment() + ' ' + chrome.getApplicationClasses()" ng-view kbn-loading-indicator></div>
<kbn-loading-indicator></kbn-loading-indicator>
<div class="application" ng-class="'tab-' + chrome.getFirstPathSegment() + ' ' + chrome.getApplicationClasses()" ng-view></div>
</div>
</div>
</div>
8 changes: 2 additions & 6 deletions src/ui/public/chrome/directives/kbn_loading_indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ UiModules
.get('ui/kibana')
.directive('kbnLoadingIndicator', function ($compile) {
return {
restrict: 'AC',
link: function (scope, $el) {
const $loadingEl = angular.element(spinnerTemplate);
$el.append($loadingEl);
$compile($loadingEl)(scope);
}
restrict: 'E',
template: spinnerTemplate,
};
});