_performance_indicator.erb 1.93 KB
Newer Older
1
<%= performance_indicator.name %>
Eric Johnson's avatar
Eric Johnson committed
2

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 19 20 21 22
<% if performance_indicator.urls %>
  <b>URL(s)</b>
  <ul>
  <% performance_indicator.urls.each do |url| %>
    <li><a href="<%= url %>"><%= url %></a></li>
Kathleen Tam's avatar
Kathleen Tam committed
23
  <% end %>
24
  </ul>
25 26
<% end %>

27
<% if performance_indicator.sisense_data %>
emilie's avatar
emilie committed
28 29 30 31 32 33
  <b>Chart</b>
    <% if performance_indicator.sisense_data.shared_dashboard%>
      (<a href="https://app.periscopedata.com/shared/<%= performance_indicator.sisense_data.shared_dashboard %>">Sisense↗</a>)
    <% elsif performance_indicator.sisense_data.chart && performance_indicator.sisense_data.dashboard%>
      (<a href="https://app.periscopedata.com/app/gitlab/<%= performance_indicator.sisense_data.dashboard %>/?widget=<%= performance_indicator.sisense_data.chart %>">Sisense↗</a>)
    <% end %>
34
  <% if ENV['PERISCOPE_EMBED_API_KEY'] %>
emilie's avatar
emilie committed
35
    <embed width="100%" height="100%" style="min-height:300px;" src="<%= signed_periscope_url(performance_indicator.sisense_data) %>">
36
  <% else %>
emilie's avatar
emilie committed
37
    <p>You must set a <code>PERISCOPE_EMBED_API_KEY</code> environment variable to render this chart.</p>
38
  <% end %>
39 40
<% end %>

41
<b>Status: <%= color_code_health(performance_indicator.health.level) %></b>
42

43
<% performance_indicator.health.reasons.each do |reason| %>
44
<%="  * #{reason}"%>
Eric Johnson's avatar
Eric Johnson committed
45
<% end %>
46

47

48
<% if performance_indicator.instrumentation %>
49 50 51 52
<b>Instrumentation: <%= color_code_instrumentation(performance_indicator.instrumentation.level) %></b>

<% performance_indicator.instrumentation.reasons.each do |reason| %>
<%="  * #{reason}"%>
53
<% end %>
54

55
<% end %>
56