Skip to content

Commit

Permalink
fix(deployments): remove click handler from disabled "scale up" button
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Apr 30, 2018
1 parent 82cd928 commit 53e3e8c
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
</deployments-donut-chart>
<div column class="deployments-donut-scale-controls fade-inline" *ngIf="!isIdled && !mini">
<div>
<a id="scaleUp" (click)="$event.preventDefault(); scaleUp()" [ngClass]="{ disabled: atQuota }" [attr.title]="atQuota ? 'You don\'t have enough resources. Scale down the number of pods on another deployment to make resources available.' : 'Scale up'"
[attr.aria-disabled]="atQuota ? 'true' : undefined" role="button">
<a id="scaleUp" title="Scale up" role="button" (click)="$event.preventDefault(); scaleUp()" *ngIf="!atQuota; else scaleUpDisabled">
<i class="fa fa-chevron-up"></i>
<span class="sr-only">Scale up</span>
</a>
<ng-template #scaleUpDisabled>
<a class="disabled" title="You don't have enough resources. Scale down the number of pods on another deployment to make resources available." aria-disabled="true" role="button">
<i class="fa fa-chevron-up"></i>
<span class="sr-only">Scale up</span>
</a>
</ng-template>
</div>
<div>
<!-- Remove the title when disabled because the not-allowed styled cursor overlaps the tooltip on some browsers. -->
Expand Down

0 comments on commit 53e3e8c

Please sign in to comment.