mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
Add disabled state + tooltip on dev tools tabs (#16844)
This commit is contained in:
parent
a2cc5fa276
commit
0c7b75e9f7
2 changed files with 13 additions and 1 deletions
|
@ -22,6 +22,12 @@ uiModules
|
|||
controller() {
|
||||
this.devTools = devToolsRegistry.inOrder;
|
||||
this.currentPath = `#${$location.path()}`;
|
||||
|
||||
this.onClick = (item, $event) => {
|
||||
if (item.disabled) {
|
||||
$event.preventDefault();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -15,8 +15,14 @@
|
|||
aria-selected="{{kbnDevToolsApp.currentPath === item.url}}"
|
||||
ng-repeat="item in kbnDevToolsApp.devTools"
|
||||
class="euiTab"
|
||||
ng-class="{'euiTab-isSelected': kbnDevToolsApp.currentPath === item.url}"
|
||||
ng-class="{'euiTab-isSelected': kbnDevToolsApp.currentPath === item.url, 'euiTab-isDisabled': item.disabled}"
|
||||
ng-disabled="item.disabled"
|
||||
kbn-href="{{::item.url}}"
|
||||
ng-click="kbnDevToolsApp.onClick(item, $event)"
|
||||
tooltip="{{ item.tooltipContent }}"
|
||||
tooltip-placement="bottom"
|
||||
tooltip-popup-delay="0"
|
||||
tooltip-append-to-body="1"
|
||||
>
|
||||
{{::item.display}}
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue