Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management tabs react to new management section properties #10829

Merged
merged 1 commit into from
Mar 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/core_plugins/kibana/public/management/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
</span>
<a
ng-if="sectionName"
ng-repeat="item in section.items.inOrder"
ng-repeat="item in section.visibleItems"
class="kuiLocalTab"
ng-class="{ 'kuiLocalTab-isSelected': item.active, 'kuiLocalTab-disabled': !item.url }"
kbn-href="{{::item.url}}"
ng-class="{ 'kuiLocalTab-isSelected': item.active, 'kuiLocalTab-disabled': item.disabled || !item.url }"
kbn-href="{{::item.disabled ? '' : item.url}}"
Copy link
Contributor

@w33ble w33ble Mar 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't actually disable the link, and clicking on it will cause a page refresh. Wouldn't it be better to add a condition to ng-if so that it doesn't show up at all? Or maybe replace it with a <span> when it's disabled?

Nevermind, this works correctly as-is.

Copy link
Contributor Author

@BigFunger BigFunger Mar 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. A missing class is causing the style issue. @cjcenizal is creating a PR to address this. I think the problem is we just never had a use case for a disabled tab in the localTab until now, so it went unnoticed.

data-test-subj="{{::item.name}}"
tooltip="{{::item.tooltip}}"
tooltip-placement="bottom"
Expand Down