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
5 changes: 5 additions & 0 deletions src/ui/public/chrome/directives/active_http_spinner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ul class="nav navbar-nav navbar-right navbar-timepicker" >
<li ng-show="chrome.httpActive.length" class="navbar-text hidden-xs">
<div class="spinner"></div>
</li>
</ul>
8 changes: 7 additions & 1 deletion src/ui/public/chrome/directives/append_nav_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import $ from 'jquery';

import chromeNavControlsRegistry from 'ui/registry/chrome_nav_controls';
import UiModules from 'ui/modules';
import spinnerHtml from './active_http_spinner.html';

const spinner = {
name: 'active http requests',
template: spinnerHtml
};

export default function (chrome, internals) {

Expand All @@ -13,7 +19,7 @@ export default function (chrome, internals) {
const parts = [$element.html()];
const controls = Private(chromeNavControlsRegistry);

for (const control of controls.inOrder) {
for (const control of [spinner, ...controls.inOrder]) {
parts.unshift(
`<!-- nav control ${control.name} -->`,
control.template
Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/chrome/directives/kbn_chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function (chrome, internals) {
onRouteChange();

// and some local values
$scope.httpActive = $http.pendingRequests;
chrome.httpActive = $http.pendingRequests;
$scope.notifList = require('ui/notify')._notifs;
$scope.appSwitcherTemplate = new ConfigTemplate({
switcher: '<app-switcher></app-switcher>'
Expand Down