system-metrics 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,27 +1,31 @@
1
1
  <% set_title "System Metrics Administration" -%>
2
2
  <% set_page_title "Administration" -%>
3
- <div id="menu-bar">
4
- <%= form_tag "/system/metrics/all", :method => :delete do -%>
5
- <%= submit_tag 'Delete All' %>
6
- <% end -%>
7
- <h2>Metrics</h2>
8
- </div>
3
+ <% if @categories.all.size > 0 -%>
4
+ <div id="menu-bar">
5
+ <%= form_tag "#{metrics_path}/all", :method => :delete do -%>
6
+ <%= submit_tag 'Delete All' %>
7
+ <% end -%>
8
+ <h2>Metrics</h2>
9
+ </div>
9
10
 
10
- <table>
11
- <thead>
12
- <tr><th>Category</th><th>Count</th><th>Action</th></tr>
13
- <thead>
14
- <tbody>
15
- <% for category in @categories -%>
16
- <tr>
17
- <td><%= category.category.titleize %></td>
18
- <td><%= category.count %></td>
19
- <td>
20
- <%= form_tag "/system/metrics/#{category.category}", :method => :delete do %>
21
- <%= submit_tag 'Delete Category' %>
22
- <% end -%>
23
- </td>
24
- </tr>
25
- <% end -%>
26
- </tbody>
27
- </table>
11
+ <table>
12
+ <thead>
13
+ <tr><th>Category</th><th>Count</th><th>Action</th></tr>
14
+ <thead>
15
+ <tbody>
16
+ <% for category in @categories -%>
17
+ <tr>
18
+ <td><%= category.category.titleize %></td>
19
+ <td><%= category.count %></td>
20
+ <td>
21
+ <%= form_tag metric_path(category.category), :method => :delete do %>
22
+ <%= submit_tag 'Delete Category' %>
23
+ <% end -%>
24
+ </td>
25
+ </tr>
26
+ <% end -%>
27
+ </tbody>
28
+ </table>
29
+ <% else -%>
30
+ <p>No metrics found</p>
31
+ <% end -%>
@@ -3,4 +3,7 @@
3
3
  <% @category_metrics.each do |category, metrics| -%>
4
4
  <%= render :partial => "portlet", :locals => {:category => category, :metrics => metrics} %>
5
5
  <% end -%>
6
+ <% if @category_metrics.empty? -%>
7
+ <p>No metrics found</p>
8
+ <% end -%>
6
9
  <div class="clear"></div>
@@ -1,3 +1,3 @@
1
1
  module SystemMetrics
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: system-metrics
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeff Kunkle