mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[dashboard] fix "edit" button on empty dashboard (#11031)
This commit is contained in:
parent
546804f40c
commit
06da1becec
2 changed files with 3 additions and 1 deletions
|
@ -66,7 +66,7 @@
|
|||
|
||||
<div ng-show="getShouldShowViewHelp()" class="text-center start-screen">
|
||||
<h2>This dashboard is empty. Let's fill it up!</h2>
|
||||
<p>Click the <a class="btn btn-xs navbtn-inverse" ng-click="kbnTopNav.open('edit');" aria-label="Edit">Edit</a> button in the menu bar above to start working on your new dashboard.
|
||||
<p>Click the <a class="btn btn-xs navbtn-inverse" ng-click="kbnTopNav.click('edit');" aria-label="Edit">Edit</a> button in the menu bar above to start working on your new dashboard.
|
||||
</div>
|
||||
|
||||
<dashboard-grid
|
||||
|
|
|
@ -58,6 +58,8 @@ export default function ($compile) {
|
|||
open(key) { this.setCurrent(key); }
|
||||
close(key) { (!key || this.isCurrent(key)) && this.setCurrent(null); }
|
||||
toggle(key) { this.setCurrent(this.isCurrent(key) ? null : key); }
|
||||
click(key) { this.handleClick(this.getItem(key)); }
|
||||
getItem(key) { return this.menuItems.find(i => i.key === key); }
|
||||
handleClick(menuItem) {
|
||||
if (menuItem.disableButton()) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue