_performance_indicator.erb 2.1 KB
Newer Older
Eric Johnson's avatar
Eric Johnson committed
1 2
<h3 id="<%= performance_indicator.name.parameterize %>"><%= performance_indicator.name %></h3>

3 4 5 6 7

<% if performance_indicator.parent %>
   <p>This is a subset of an existing KPI. Please see <a href="<%=performance_indicator.parent=%>">the definition for the parent KPI.</a></p>
<% end %>

8
<p><%= performance_indicator.definition %></p>
Eric Johnson's avatar
Eric Johnson committed
9

Eric Johnson's avatar
Eric Johnson committed
10 11 12 13
<% if performance_indicator.target %>
  <p><b>Target:</b> <%= performance_indicator.target %></p>
<% end %>

emilie's avatar
emilie committed
14
<% if performance_indicator.public == false %>
emilie's avatar
emilie committed
15
  <p><b>This KPI cannot be public.</b> </p>
emilie's avatar
emilie committed
16 17
<% end %>

18
<% if performance_indicator.sisense_url %>
Kathleen Tam's avatar
Kathleen Tam committed
19 20 21
  <b>Sisense URL</b><% performance_indicator.sisense_url.each do |url| %>
    <a href="<%= url %>">Sisense↗</a>
  <% end %>
22 23
<% end %>

24
<% if performance_indicator.periscope_data %>
25
  <b>Chart</b><% if performance_indicator.periscope_data.shared_dashboard%>(<a href="https://app.periscopedata.com/shared/<%= performance_indicator.periscope_data.shared_dashboard %>">Periscope↗</a>)<% elsif performance_indicator.periscope_data.chart && performance_indicator.periscope_data.dashboard%> (<a href="https://app.periscopedata.com/app/gitlab/<%= performance_indicator.periscope_data.dashboard %>/?widget=<%= performance_indicator.periscope_data.chart %>">Periscope↗</a>)<% end %>
26
  <% if ENV['PERISCOPE_EMBED_API_KEY'] %>
27
  <embed width="100%" height="100%" style="min-height:300px;" src="<%= signed_periscope_url(performance_indicator.sisense_data) %>">
28 29
  <% else %>
  <p>You must set a <code>PERISCOPE_EMBED_API_KEY</code> environment variable to render this chart.</p>
30
  <% end %>
31 32
<% end %>

33 34 35 36 37 38 39 40 41
<% if performance_indicator.urls %>
  <b>URL(s)</b>
  <ul>
  <% performance_indicator.urls.each do |url| %>
    <li><a href="<%= url %>"><%= url %></a></li>
  <% end %>
  </ul>
<% end %>

Eric Johnson's avatar
Eric Johnson committed
42 43
<b>Health: <%= color_code_health(performance_indicator.health.level) %></b>
<ul>
44 45
<% performance_indicator.health.reasons.each do |reason| %>
  <li><%= reason %></li>
Eric Johnson's avatar
Eric Johnson committed
46 47
<% end %>
</ul>
48

49 50 51 52 53
<b>Maturity: <%= color_code_maturity(pi_maturity_level(performance_indicator)) %></b>
<ul>
<% pi_maturity_reasons(performance_indicator).each do |reason| %>
  <li><%= reason %></li>
<% end %>
emilie's avatar
emilie committed
54
</ul>