Skip to content

Commit

Permalink
fixed indicator.yml templating for plans and moved global total insta…
Browse files Browse the repository at this point in the history
…nces as the first dashboard

[#166239993]

Co-authored-by: Gabriele Cipriano <[email protected]>
  • Loading branch information
FelisiaM and gabrielecipriano committed Jun 27, 2019
1 parent 70baccc commit 7487488
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jobs/broker/templates/indicators.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def render_plan_indicators
if all_plans_indicators.empty?
""
else
"- #{all_plans_indicators.to_yaml}"
"#{all_plans_indicators.to_yaml.gsub("---\n", "")}"
end
end

Expand Down Expand Up @@ -106,4 +106,4 @@ layout:
sections:
- title: Service Instance Quotas
description: Indicators monitoring service instance quota
indicators: <%= all_plans_indicators.map { |indicator| indicator['name']} << "global_total_instances" %>
indicators: <%= ["global_total_instances"] | all_plans_indicators.map { |indicator| indicator['name']} %>
1 change: 1 addition & 0 deletions spec/indicators_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@

sections = rendered_template['layout']['sections']
expect(sections).to include a_hash_including('indicators' => include('global_total_instances', 'dedicated_vm_total_instances', 'dedicated_high_mem_vm_total_instances',))
expect(sections).to include a_hash_including('indicators' => start_with('global_total_instances'))
end
end

Expand Down

0 comments on commit 7487488

Please sign in to comment.