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

Add enabled and public fields to flavor text summary and show list #3475

Merged
merged 1 commit into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion app/helpers/flavor_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def textual_group_properties
TextualGroup.new(
_("Properties"),
%i(
cpus cpu_cores memory supports_32_bit supports_64_bit supports_hvm supports_paravirtual
cpus cpu_cores memory enabled publicly_available supports_32_bit supports_64_bit supports_hvm supports_paravirtual
block_storage_based_only cloud_subnet_required
)
)
Expand All @@ -35,6 +35,14 @@ def textual_cpu_cores
{:label => _("CPU Cores"), :value => @record.cpu_cores}
end

def textual_enabled
{:label => _("Enabled"), :value => @record.enabled}
end

def textual_publicly_available
{:label => _("Public"), :value => @record.publicly_available}
end

def textual_supports_32_bit
return nil if @record.supports_32_bit.nil?
{:label => _("32 Bit Architecture"), :value => @record.supports_32_bit?}
Expand Down
4 changes: 4 additions & 0 deletions product/views/Flavor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ col_order:
- cpus
- cpu_cores
- memory
- enabled
- publicly_available
- supports_32_bit
- supports_64_bit
- supports_hvm
Expand All @@ -69,6 +71,8 @@ headers:
- CPUs
- CPU Cores
- Memory
- Enabled
- Publicly Available
- 32 Bit Architecture
- 64 Bit Architecture
- HVM (Hardware Virtual Machine)
Expand Down