Skip to content

Commit

Permalink
Merge pull request elastic#7595 from cjcenizal/chore/remove-deprecate…
Browse files Browse the repository at this point in the history
…d-tabs-nav

Remove deprecated nav UI and chrome tabs API.

Former-commit-id: b258ddc
  • Loading branch information
cjcenizal authored Jul 18, 2016
2 parents 8cdc4ec + c3a515d commit 4b949e8
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 631 deletions.
4 changes: 0 additions & 4 deletions src/core_plugins/console/public/tests/tests.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require('ace');

require('ui/chrome')
.setTabs([{
id: '',
title: 'Sense Tests'
}])
.setRootTemplate(require('./index.html'))
.setRootController(function () {
window.QUnit = require('qunit-1.10.0');
Expand Down
5 changes: 0 additions & 5 deletions src/core_plugins/kibana/public/kibana.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ routes
});

chrome
.setTabDefaults({
resetWhenActive: true,
lastUrlStore: window.sessionStorage,
activeIndicatorColor: '#656a76'
})
.setRootController('kibana', function ($scope, courier, config) {
// wait for the application to finish loading
$scope.$on('application.load', function () {
Expand Down
254 changes: 0 additions & 254 deletions src/ui/public/chrome/__tests__/tab.js

This file was deleted.

73 changes: 0 additions & 73 deletions src/ui/public/chrome/__tests__/tab_collection.js

This file was deleted.

8 changes: 1 addition & 7 deletions src/ui/public/chrome/api/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,13 @@ export default function (chrome, internals) {
const { appId, globalState: newGlobalState } = decodeKibanaUrl(url);

for (const link of internals.nav) {
const matchingTab = find(internals.tabs, { rootUrl: link.url });

link.active = startsWith(url, link.url);
if (link.active) {
setLastUrl(link, url);
continue;
}

if (matchingTab) {
setLastUrl(link, matchingTab.getLastUrl());
} else {
refreshLastUrl(link);
}
refreshLastUrl(link);

if (newGlobalState) {
injectNewGlobalState(link, appId, newGlobalState);
Expand Down
Loading

0 comments on commit 4b949e8

Please sign in to comment.