diff --git a/src/ui/public/chrome/directives/active_http_spinner.html b/src/ui/public/chrome/directives/active_http_spinner.html new file mode 100644 index 0000000000000..d7c9b64fbe3c6 --- /dev/null +++ b/src/ui/public/chrome/directives/active_http_spinner.html @@ -0,0 +1,5 @@ +
diff --git a/src/ui/public/chrome/directives/append_nav_controls.js b/src/ui/public/chrome/directives/append_nav_controls.js index 1433ec0654428..d37b9c6fe0a74 100644 --- a/src/ui/public/chrome/directives/append_nav_controls.js +++ b/src/ui/public/chrome/directives/append_nav_controls.js @@ -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) { @@ -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( ``, control.template diff --git a/src/ui/public/chrome/directives/kbn_chrome.js b/src/ui/public/chrome/directives/kbn_chrome.js index d6e9ddeed4a43..e06b373a3c15b 100644 --- a/src/ui/public/chrome/directives/kbn_chrome.js +++ b/src/ui/public/chrome/directives/kbn_chrome.js @@ -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: '