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

Display Lifecycle State on Service details screen #5736

Merged
merged 1 commit into from
Jun 24, 2019
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
6 changes: 5 additions & 1 deletion app/helpers/service_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def textual_group_vm_totals
end

def textual_group_lifecycle
TextualGroup.new(_("Lifecycle"), %i[retirement_date retirement_state owner group created])
TextualGroup.new(_("Lifecycle"), %i[lifecycle_state retirement_date retirement_state owner group created])
end

def textual_group_relationships
Expand Down Expand Up @@ -142,6 +142,10 @@ def textual_retirement_state
{:label => _("Retirement State"), :value => @record.retirement_state.to_s.capitalize}
end

def textual_lifecycle_state
{:label => _("State"), :value => @record.lifecycle_state ? @record.lifecycle_state.humanize.capitalize : _("None")}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, sorry, just noticed this is missing i18n..

Was that intentional? If not, I guess we should have a..

{
  Service::STATE_ERROR_PROVISIONING => _("Error in provisioning"),
  Service::STATE_PROVISIONED => _("Provisioned"),
  Service::STATE_PROVISIONING => _("Provisioning"),
}

hash somewhere...

end

def textual_catalog_item
st = @record.service_template
s = {:label => _("Parent Catalog Item"), :icon => "pficon pficon-template", :value => (st.nil? ? _("None") : st.name)}
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/service_helper/textual_summary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
aggregate_all_vm_memory_on_disk
), "vm_totals"

include_examples "textual_group", "Lifecycle", %i(retirement_date retirement_state owner group created)
include_examples "textual_group", "Lifecycle", %i(lifecycle_state retirement_date retirement_state owner group created)

include_examples "textual_group", "Relationships", %i(catalog_item parent_service orchestration_stack job custom_button_events)

Expand Down