Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix instance reconfigure button visibility
The 'Reconfigure this Instance' toolbar button should only be visible if the model supports the operation. https://bugzilla.redhat.com/show_bug.cgi?id=1331052
- Loading branch information
Showing
7 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
app/helpers/application_helper/button/instance_reconfigure.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class ApplicationHelper::Button::InstanceReconfigure < ApplicationHelper::Button::Basic | ||
def calculate_properties | ||
super | ||
self[:title] = @record.is_available_now_error_message(:resize) if disabled? | ||
end | ||
|
||
def disabled? | ||
!@record.is_available?(:resize) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
app/models/manageiq/providers/openstack/cloud_manager/vm/resize.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters