Skip to content

Commit

Permalink
Merge pull request #46 from AweSim-OSC/node_graphs
Browse files Browse the repository at this point in the history
Replace memory graphs with node status reports
  • Loading branch information
ericfranz committed Jun 29, 2017
2 parents f801e70 + a5cb956 commit 09488a7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Upcoming

* Replace memory graphs with moab node usage graphs

# v1.3.1

* Fix bug in `bin/setup` that crashes when `OOD_PORTAL` is set but not
Expand Down
14 changes: 14 additions & 0 deletions app/models/ganglia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ def report_packet
self.report('packet_report')
end

# Set the report type to moab nodes report
#
# @return [Ganglia] self
def report_moab_nodes
self.report('moab_nodes_report')
end

# Set the report type to moab jobs report
#
# @return [Ganglia] self
def report_moab_jobs
self.report('moab_jobs_report')
end

# Set the report type to 'small' as defined by ganglia server
#
# @return [Ganglia] self
Expand Down
21 changes: 10 additions & 11 deletions app/views/clusters/_system_large.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@
<div class="row">&nbsp;</div>
<div class="row">
<div class="col-sm-3 col-xs-6">

<div class="panel panel-default panel-clickable" onclick="<%= "$('#large-image#{@count}').replaceWith('"+
(image_tag @ganglia.report_load.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>" >
<div class="panel-heading"><h4 class="panel-title">Load</h4></div>
(image_tag @ganglia.report_moab_nodes.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>" >
<div class="panel-heading"><h4 class="panel-title">Nodes</h4></div>
<div class="panel-body">
<%= image_tag @ganglia.small.report_load.png, class: "img-responsive center-block updateable", :onclick=>"$('#large-image#{@count}').replaceWith('"+
<%= image_tag @ganglia.small.report_moab_nodes.png, class: "img-responsive center-block updateable", :onclick=>"$('#large-image#{@count}').replaceWith('"+
(image_tag @ganglia.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="panel panel-default panel-clickable" onclick="<%= "$('#large-image#{@count}').replaceWith('"+
(image_tag @ganglia.report_cpu.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>" >
<div class="panel-heading"><h4 class="panel-title">CPU</h4></div>
(image_tag @ganglia.report_moab_jobs.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>" >
<div class="panel-heading"><h4 class="panel-title">Jobs</h4></div>
<div class="panel-body">
<%= image_tag @ganglia.small.png, class: "img-responsive center-block updateable" %>
<%= image_tag @ganglia.small.report_moab_jobs.png, class: "img-responsive center-block updateable" %>
</div>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="panel panel-default panel-clickable" onclick="<%= "$('#large-image#{@count}').replaceWith('"+
(image_tag @ganglia.report_mem.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>" >
<div class="panel-heading"><h4 class="panel-title">Memory</h4></div>
(image_tag @ganglia.report_load.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>" >
<div class="panel-heading"><h4 class="panel-title">Load</h4></div>
<div class="panel-body">
<%= image_tag @ganglia.small.report_mem.png, class: "img-responsive center-block updateable", :onclick=>"$('#large-image#{@count}').replaceWith('"+
<%= image_tag @ganglia.small.report_load.png, class: "img-responsive center-block updateable", :onclick=>"$('#large-image#{@count}').replaceWith('"+
(image_tag @ganglia.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}")+"');" %>
</div>
</div>
Expand All @@ -46,7 +45,7 @@
<div class="col-sm-12">
<div class=" panel panel-default">
<div class="panel-body" id="large-status">
<%= image_tag @ganglia.report_load.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}" %>
<%= image_tag @ganglia.report_moab_nodes.size(800,250).png, class: "img-responsive center-block updateable", id: "large-image#{@count}" %>
</div>
</div>
</div>
Expand Down

0 comments on commit 09488a7

Please sign in to comment.