forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#8355 from spalger/fix/devtools-header-stac…
…king [kbnDevToolsApp] allow extending the top nav
- Loading branch information
Showing
10 changed files
with
72 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/core_plugins/console/public/src/controllers/sense_top_nav_controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import KbnTopNavControllerProvider from 'ui/kbn_top_nav/kbn_top_nav_controller'; | ||
import storage from '../storage'; | ||
|
||
export function SenseTopNavController(Private) { | ||
const KbnTopNavController = Private(KbnTopNavControllerProvider); | ||
|
||
const controller = new KbnTopNavController([ | ||
{ | ||
key: 'welcome', | ||
hideButton: true, | ||
template: `<sense-welcome></sense-welcome>` | ||
}, | ||
{ | ||
key: 'history', | ||
description: 'History', | ||
template: `<sense-history></sense-history>` | ||
}, | ||
{ | ||
key: 'settings', | ||
description: 'Settings', | ||
template: `<sense-settings></sense-settings>` | ||
}, | ||
{ | ||
key: 'help', | ||
description: 'Help', | ||
template: `<sense-help></sense-help>` | ||
}, | ||
]); | ||
|
||
if (storage.get('version_welcome_shown') !== '@@SENSE_REVISION') { | ||
controller.open('welcome') | ||
} | ||
|
||
return controller | ||
} |
1 change: 0 additions & 1 deletion
1
src/core_plugins/console/public/src/directives/sense_navbar.html
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
src/core_plugins/console/public/src/directives/sense_navbar.js
This file was deleted.
Oops, something went wrong.
15 changes: 11 additions & 4 deletions
15
src/core_plugins/kibana/public/dev_tools/directives/dev_tools_app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
import uiModules from 'ui/modules'; | ||
import devTools from 'ui/registry/dev_tools'; | ||
import DevToolsRegistryProvider from 'ui/registry/dev_tools'; | ||
import template from 'plugins/kibana/dev_tools/partials/dev_tools_app.html'; | ||
import 'plugins/kibana/dev_tools/styles/dev_tools_app.less'; | ||
import 'ui/kbn_top_nav'; | ||
|
||
uiModules | ||
.get('apps/dev_tools') | ||
.directive('kbnDevToolsApp', function (Private, $location) { | ||
const devToolsRegistry = Private(DevToolsRegistryProvider); | ||
|
||
return { | ||
restrict: 'E', | ||
replace: true, | ||
template, | ||
transclude: true, | ||
link: function ($scope) { | ||
$scope.devTools = Private(devTools).inOrder; | ||
$scope.currentPath = `#${$location.path()}`; | ||
scope: { | ||
topNavConfig: '=' | ||
}, | ||
bindToController: true, | ||
controllerAs: 'kbnDevToolsApp', | ||
controller() { | ||
this.devTools = devToolsRegistry.inOrder; | ||
this.currentPath = `#${$location.path()}`; | ||
} | ||
}; | ||
}); |
10 changes: 5 additions & 5 deletions
10
src/core_plugins/kibana/public/dev_tools/partials/dev_tools_app.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<div class="dev-tools-app-container app-container"> | ||
<div class="dev-tools__app-container app-container"> | ||
<bread-crumbs class="bread-crumbs--navbar" omit-current-page="true"></bread-crumbs> | ||
<kbn-top-nav name="devtools"> | ||
<kbn-top-nav name="devtools" config="kbnDevToolsApp.topNavConfig"> | ||
<div class="localTabs"> | ||
<a | ||
ng-repeat="item in devTools" | ||
ng-repeat="item in kbnDevToolsApp.devTools" | ||
class="localTab" | ||
ng-class="{'localTab-isSelected': currentPath === item.url}" | ||
ng-class="{'localTab-isSelected': kbnDevToolsApp.currentPath === item.url}" | ||
kbn-href="{{::item.url}}" | ||
> | ||
{{::item.display}} | ||
</a> | ||
</div> | ||
</kbn-top-nav> | ||
<div role="main" class="dev-tools-container" ng-transclude></div> | ||
<div role="main" class="dev-tools__container" ng-transclude></div> | ||
</div> |
5 changes: 3 additions & 2 deletions
5
src/core_plugins/kibana/public/dev_tools/styles/dev_tools_app.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
@import (reference) "~ui/styles/mixins.less"; | ||
@import (reference) "~ui/styles/variables.less"; | ||
|
||
.dev-tools-app-container { | ||
.dev-tools__container { | ||
.flex-parent; | ||
} | ||
|
||
.dev-tools-container { | ||
.dev-tools__app-container { | ||
.flex-parent; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters