This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from djsauble2/radiator_view
Radiator View (Status Board)
- Loading branch information
Showing
13 changed files
with
9,725 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class RadiatorController < InheritedResources::Base | ||
def index | ||
render :partial => "shared/node_summary", :layout => "radiator" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
!!! | ||
%html | ||
%head | ||
- page_title = yield(:page_title) | ||
%title= [ page_title, 'Puppet Node Manager'].compact.join(' - ') | ||
%meta{"http-equiv" => "refresh", :content => "60"} | ||
= stylesheet_link_tag 'reset', 'mixins', 'radiator' | ||
= javascript_include_tag 'jquery-1.7.2', 'radiator' | ||
- add_body_class "#{controller.controller_name}_controller" | ||
- add_body_class "#{controller.controller_name}_#{controller.action_name}_action" | ||
- add_body_class "#{controller.controller_name}_form_action" if %w[new create edit update].include?(controller.action_name) | ||
- add_body_class "no-sidebar" unless @body_classes.include?('with-sidebar') | ||
%body{:class => @body_classes} | ||
= yield |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
%table.node_summary | ||
- Node.possible_derived_statuses.push( 'unreported', 'all' ).each do |status| | ||
- if( status == 'all' ) | ||
- status = 'total' | ||
- node_count = Node.unhidden.count | ||
- nodes_path = {:controller => "nodes", :action => "index"} | ||
- action_status = 'index' | ||
- percent = '0' | ||
- else | ||
- node_count = Node.send(status).unhidden.count | ||
- nodes_path = eval("#{status}_nodes_path") | ||
- action_status = status | ||
- percent = percentage(node_count, Node.unhidden.count).to_i | ||
|
||
%tr{:class => "#{status} #{active_if(controller_name == 'nodes' && action_name == action_status && parent.nil?)}"} | ||
%td.count_column | ||
%span.count= node_count | ||
%td | ||
%div | ||
%p.label | ||
%span | ||
= status.capitalize | ||
%p.percent{:style => "width: #{percent}%"} | ||
%span | ||
= status.capitalize | ||
|
||
- if Node.hidden.count > 0 | ||
%table.secondary | ||
%tr{:class => active_if(controller_name == 'nodes' && action_name == 'hidden' && parent.nil?)} | ||
%td.count | ||
= link_to h(Node.hidden.count), hidden_nodes_path | ||
%td.label | ||
= link_to "Hidden", hidden_nodes_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.