Permalink
Browse files

Renames 'All' with 'Total' and exposes it in CSS

  • Loading branch information...
1 parent 9f29984 commit 505306cf20cbdfd6a9bdfebc66989fcc76bc5db8 @djsauble2 djsauble2 committed Apr 2, 2012
@@ -1,14 +1,16 @@
%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
+ - 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
@@ -12,59 +12,44 @@ body.radiator_controller {
width: 2em; }
body.radiator_controller table.node_summary tr:last-child td {
border-bottom: none; }
- body.radiator_controller table.node_summary tr:last-child td:last-child p {
- display: none; }
body.radiator_controller table.node_summary tr.unresponsive .percent {
background-color: #888888;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.unresponsive .label {
- color: #888888; }
+ body.radiator_controller table.node_summary tr.unresponsive .label,
body.radiator_controller table.node_summary tr.unresponsive .count {
color: #888888; }
body.radiator_controller table.node_summary tr.failed .percent {
background-color: #cc2211;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.failed .label {
- color: #cc2211; }
- body.radiator_controller table.node_summary tr.failed .count {
+ body.radiator_controller table.node_summary tr.failed .label, body.radiator_controller table.node_summary tr.failed .count {
color: #cc2211; }
body.radiator_controller table.node_summary tr.pending .percent {
background-color: #ee7722;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.pending .label {
- color: #ee7722; }
- body.radiator_controller table.node_summary tr.pending .count {
+ body.radiator_controller table.node_summary tr.pending .label, body.radiator_controller table.node_summary tr.pending .count {
color: #ee7722; }
body.radiator_controller table.node_summary tr.changed .percent {
background-color: #006699;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.changed .label {
- color: #006699; }
- body.radiator_controller table.node_summary tr.changed .count {
+ body.radiator_controller table.node_summary tr.changed .label, body.radiator_controller table.node_summary tr.changed .count {
color: #006699; }
body.radiator_controller table.node_summary tr.unchanged .percent {
background-color: #009933;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.unchanged .label {
- color: #009933; }
- body.radiator_controller table.node_summary tr.unchanged .count {
+ body.radiator_controller table.node_summary tr.unchanged .label, body.radiator_controller table.node_summary tr.unchanged .count {
color: #009933; }
body.radiator_controller table.node_summary tr.unreported .percent {
background-color: #aaaaaa;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.unreported .label {
- color: #aaaaaa; }
- body.radiator_controller table.node_summary tr.unreported .count {
+ body.radiator_controller table.node_summary tr.unreported .label, body.radiator_controller table.node_summary tr.unreported .count {
color: #aaaaaa; }
body.radiator_controller table.node_summary tr.all {
color: #fff;
background-color: #000; }
body.radiator_controller table.node_summary tr.all .percent {
background-color: white;
border-radius: 0 3px 3px 0; }
- body.radiator_controller table.node_summary tr.all .label {
- color: white; }
- body.radiator_controller table.node_summary tr.all .count {
+ body.radiator_controller table.node_summary tr.all .label, body.radiator_controller table.node_summary tr.all .count {
color: white; }
body.radiator_controller table.node_summary tr.all .percent {
display: none; }
@@ -75,9 +60,6 @@ body.radiator_controller {
font-weight: 100;
position: relative;
border-bottom: 1px solid #333; }
- body.radiator_controller table.node_summary tr td .label,
- body.radiator_controller table.node_summary tr td .percent {
- display: table-cell; }
body.radiator_controller table.node_summary tr td .percent {
color: #000;
overflow: hidden;
@@ -3,9 +3,7 @@
background-color : $color;
border-radius: 0 3px 3px 0;
}
- .label {
- color : $color;
- }
+ .label,
.count {
color : $color;
}
@@ -29,7 +27,7 @@ body.radiator_controller {
}
td:last-child {
p {
- display: none;
+ //display: none;
}
}
}
@@ -56,10 +54,6 @@ body.radiator_controller {
font-weight : 100;
position : relative;
border-bottom : 1px solid #333;
- .label,
- .percent {
- display : table-cell;
- }
.percent {
color : #000;
overflow : hidden;

0 comments on commit 505306c

Please sign in to comment.