Skip to content

Commit 449aeb2

Browse files
authored
Merge pull request #114 from dlumbrer/menu-top-6.1.4
Redirect to URL when the Contact entry is clicked
2 parents f98e554 + 7d81618 commit 449aeb2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/ui/public/kbn_top_nav/kbn_top_nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<ul class="list-unstyled">
3939
<li ng-repeat="subitem in currentPanelsons[i]" class="ng-scope">
4040
<a ng-mouseover="showDescription(subitem)" ng-mouseleave="hideDescription()" class="kuiLink submenuitem"
41-
tabindex="0" role="button" ng-click="redirectToPanel(subitem.panel_id)">{{subitem.name}}</a>
41+
tabindex="0" role="button" ng-click="redirectToPanel(subitem.name, subitem.panel_id)">{{subitem.name}}</a>
4242
</li>
4343
</ul>
4444
</div>

src/ui/public/kibiter/menu/render_kibiter_menu.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function renderKibiterMenu($scope) {
55

66
$scope.showInfo = (item) => {
77
if (item.type === "entry") {
8-
$scope.redirectToPanel(item.panel_id)
8+
$scope.redirectToPanel(item.name, item.panel_id)
99
} else if (item.type === "menu") {
1010
if ($scope.parentDashboard === item) {
1111
closeSubmenu($scope)
@@ -25,9 +25,13 @@ export function renderKibiterMenu($scope) {
2525
$scope.showDescriptionDiv = false;
2626
}
2727

28-
$scope.redirectToPanel = (panel_id) => {
28+
$scope.redirectToPanel = (name, panel_id) => {
2929
$scope.showKibiterMenu = false;
30-
window.location.replace(window.location.href.split("app/")[0] + "app/kibana#/dashboard/" + panel_id)
30+
if (name === "Contact") {
31+
window.location.replace(panel_id)
32+
} else {
33+
window.location.replace(window.location.href.split("app/")[0] + "app/kibana#/dashboard/" + panel_id)
34+
}
3135
}
3236

3337
const showSubmenu = ($scope, item) => {

0 commit comments

Comments
 (0)