Skip to content

Commit

Permalink
webadmin: Disable New on Networks tab for Blank
Browse files Browse the repository at this point in the history
As the Blank template is not associated with any DC/Cluster,
it's not possible to assign any network vNIC profile to it.
Therefore, the New button should be disabled.

Bug-Url: https://bugzilla.redhat.com/2100444
  • Loading branch information
ljelinkova authored and ahadas committed Jul 19, 2022
1 parent 39c83f2 commit 8cdd092
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected void onSelectedItemChanged() {
}

private void updateActionAvailability() {
getNewCommand().setIsExecutionAllowed(getEntity() != null);
getNewCommand().setIsExecutionAllowed(getEntity() != null && !getEntity().isBlank());
getEditCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() == 1
&& getSelectedItem() != null);
getRemoveCommand().setIsExecutionAllowed(getSelectedItems() != null && getSelectedItems().size() > 0);
Expand Down

0 comments on commit 8cdd092

Please sign in to comment.