Skip to content

Commit 712d12f

Browse files
committed
add annotations on summary pages with labels and fix miq_custom_attributes
1 parent 7183db6 commit 712d12f

7 files changed

+11
-7
lines changed

app/controllers/container_group_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def show_list
1616
def textual_group_list
1717
[
1818
%i[properties container_labels container_node_selectors volumes],
19-
%i[relationships conditions smart_management]
19+
%i[relationships conditions smart_management annotations]
2020
]
2121
end
2222
helper_method :textual_group_list

app/controllers/container_node_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def show_list
1515
def textual_group_list
1616
[
1717
%i[properties container_labels compliance miq_custom_attributes],
18-
%i[relationships conditions smart_management]
18+
%i[relationships conditions smart_management annotations]
1919
]
2020
end
2121
helper_method :textual_group_list

app/controllers/container_replicator_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def download_summary_pdf
2626
private
2727

2828
def textual_group_list
29-
[%i[properties container_labels container_selectors compliance], %i[relationships smart_management]]
29+
[%i[properties container_labels container_selectors compliance], %i[relationships smart_management annotations]]
3030
end
3131
helper_method :textual_group_list
3232

app/controllers/container_route_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def download_summary_pdf
2020
private
2121

2222
def textual_group_list
23-
[%i[properties container_labels], %i[relationships smart_management]]
23+
[%i[properties container_labels annotations], %i[relationships smart_management]]
2424
end
2525
helper_method :textual_group_list
2626

app/controllers/container_service_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def download_summary_pdf
2525
private
2626

2727
def textual_group_list
28-
[%i[properties port_configs container_labels container_selectors], %i[relationships smart_management]]
28+
[%i[properties port_configs container_labels container_selectors], %i[relationships smart_management annotations]]
2929
end
3030
helper_method :textual_group_list
3131

app/controllers/container_template_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def download_summary_pdf
2020
private
2121

2222
def textual_group_list
23-
[%i[properties parameters objects], %i[relationships container_labels smart_management]]
23+
[%i[properties parameters objects], %i[relationships container_labels smart_management annotations]]
2424
end
2525
helper_method :textual_group_list
2626

app/helpers/container_summary_helper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,16 @@ def textual_group_container_labels
7373
TextualGroup.new(_("Labels"), textual_key_value_group(@record.labels.to_a))
7474
end
7575

76+
def textual_group_annotations
77+
TextualGroup.new(_("Annotations"), textual_key_value_group(@record.annotations))
78+
end
79+
7680
def textual_group_miq_custom_attributes
7781
TextualGroup.new(_("Custom Attributes"), textual_miq_custom_attributes)
7882
end
7983

8084
def textual_miq_custom_attributes
81-
attrs = @record.custom_attributes
85+
attrs = @record.miq_custom_attributes
8286
return nil if attrs.blank?
8387
attrs.sort_by(&:name).collect { |a| {:label => a.name.tr("_", " "), :value => a.value} }
8488
end

0 commit comments

Comments
 (0)