_performance_indicator.erb 3.65 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

10 11
<% if performance_indicator.product_analytics_type %>
  <p><b>SaaS/SM:</b> <%= performance_indicator.product_analytics_type %></p>
Jerome Ng's avatar
Jerome Ng committed
12 13
<% end %>

Eric Johnson's avatar
Eric Johnson committed
14 15 16
<% if performance_indicator.target %>
  <p><b>Target:</b> <%= performance_indicator.target %></p>
<% end %>
Jerome Ng's avatar
Jerome Ng committed
17 18 19 20

<% if performance_indicator.is_primary %>
  <p><b>Is Primary PI:</b> <%= performance_indicator.is_primary %></p>
<% end %>
Eric Johnson's avatar
Eric Johnson committed
21

emilie's avatar
emilie committed
22
<% if performance_indicator.public == false %>
emilie's avatar
emilie committed
23
  <p><b>This KPI cannot be public.</b> </p>
emilie's avatar
emilie committed
24 25
<% end %>

26 27 28 29 30
<% 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
31
  <% end %>
32
  </ul>
33 34
<% end %>

35
<% if performance_indicator.sisense_data %>
emilie's avatar
emilie committed
36 37
  <b>Chart</b>
    <% if performance_indicator.sisense_data.shared_dashboard%>
38
      (<a href="https://app.periscopedata.com/shared/<%= performance_indicator.sisense_data.shared_dashboard %>" target="_blank">Sisense↗</a>)
emilie's avatar
emilie committed
39
    <% elsif performance_indicator.sisense_data.chart && performance_indicator.sisense_data.dashboard%>
40
      (<a href="https://app.periscopedata.com/app/gitlab/<%= performance_indicator.sisense_data.dashboard %>/?widget=<%= performance_indicator.sisense_data.chart %>" target="_blank">Sisense↗</a>)
emilie's avatar
emilie committed
41
    <% end %>
42
  <% if ENV['PERISCOPE_EMBED_API_KEY'] %>
emilie's avatar
emilie committed
43
    <embed width="100%" height="100%" style="min-height:300px;" src="<%= signed_periscope_url(performance_indicator.sisense_data) %>">
44
  <% else %>
emilie's avatar
emilie committed
45
    <p>You must set a <code>PERISCOPE_EMBED_API_KEY</code> environment variable to render this chart.</p>
46
  <% end %>
47 48
<% end %>

Jerome Ng's avatar
Jerome Ng committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
<% if performance_indicator.sisense_data_secondary %>
  <b>Secondary Chart</b>
    <% if performance_indicator.sisense_data_secondary.shared_dashboard%>
      (<a href="https://app.periscopedata.com/shared/<%= performance_indicator.sisense_data_secondary.shared_dashboard %>">Sisense↗</a>)
    <% elsif performance_indicator.sisense_data_secondary.chart && performance_indicator.sisense_data_secondary.dashboard%>
      (<a href="https://app.periscopedata.com/app/gitlab/<%= performance_indicator.sisense_data_secondary.dashboard %>/?widget=<%= performance_indicator.sisense_data_secondary.chart %>">Sisense↗</a>)
    <% end %>
  <% if ENV['PERISCOPE_EMBED_API_KEY'] %>
    <embed width="100%" height="100%" style="min-height:300px;" src="<%= signed_periscope_url(performance_indicator.sisense_data_secondary) %>">
  <% else %>
    <p>You must set a <code>PERISCOPE_EMBED_API_KEY</code> environment variable to render this chart.</p>
  <% end %>
<% end %>

<b>Health: <%= color_code_health(performance_indicator.health.level) %></b>
64

65
<% performance_indicator.health.reasons.each do |reason| %>
66
<%="  * #{reason}"%>
Eric Johnson's avatar
Eric Johnson committed
67
<% end %>
68

69

70
<% if performance_indicator.implementation %>
71 72 73 74 75 76 77
  <b>Implementation Status:</b> <%= performance_indicator.implementation.status %>
  
  <% if performance_indicator.implementation.reasons %>
    <% performance_indicator.implementation.reasons.each do |reason| %>
      <%="  * #{reason}"%>
    <% end %>
  <% end %>
David DeSanto's avatar
David DeSanto committed
78
<% end %>
79

80
<% if performance_indicator.lessons %>
David DeSanto's avatar
David DeSanto committed
81
<b>Lessons Learned (<%= Date::MONTHNAMES[Date.today.prev_month.month] %>):</b>
82

83
<% performance_indicator.lessons.learned.each do |reason| %>
84 85
<%="  * #{reason}"%>
<% end %>
David DeSanto's avatar
David DeSanto committed
86
<% end %>
87 88


89
<% if performance_indicator.monthly_focus %>
David DeSanto's avatar
David DeSanto committed
90
<b>Focus This Month (<%= Date::MONTHNAMES[Date.today.month] %>):</b>
91

92
<% performance_indicator.monthly_focus.goals.each do |reason| %>
93
<%="  * #{reason}"%>
David DeSanto's avatar
David DeSanto committed
94 95
<% end %>
<% end %>