forked from sodabrew/puppet-dashboard
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bug #4332] Fixed node categories, failing nodes from being displayed…
… forever, many performance problems. * Fixed failing nodes from being displayed forever. * Fixed some performance problems by eliminating and optimizing queries. * Added "currently successful", "currently failing", "ever successful", and "ever failed" categories; and removed "successful" and "failed" categories. * Added colors to sidebar to indicate errors. * Improved sidebar efficiency and eliminated redundant code. * Removed unnecessary numbers next to sidebar section titles for groups and classes.
- Loading branch information
Showing
8 changed files
with
108 additions
and
53 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
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
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
- form_tag request.url, :class => 'search', :method => :get do | ||
- form_tag url_for(:action => action_name), :class => 'search', :method => :get do | ||
= text_field_tag 'q', params[:q] | ||
= hidden_field_tag 'current', params[:current] | ||
= hidden_field_tag 'successful', params[:successful] | ||
%button Search |
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
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,19 @@ | ||
-# Render a sidebar section for a +type+ (e.g. NodeGroup or NodeClass). | ||
- table = type.name.tableize | ||
- label = type.name.sub(/Node/, '') | ||
- ivar = instance_variable_get "@#{table.singularize}" | ||
- path_for_index = "#{table}_path" | ||
- path_for_new = "new_#{table.singularize}_path" | ||
- path_for_show = "#{table.singularize}_path" | ||
|
||
.group | ||
%h3{:class => active_if(controller_name == table && action_name == "index")}= link_to(label, send(path_for_index)) | ||
- entries = type.with_nodes_count | ||
%ul | ||
- for entry in entries | ||
%li{:class => active_if(controller_name == table && ivar && ivar == entry)} | ||
= link_to entry.name, send(path_for_show, entry) | ||
%span.count= entry.nodes_count | ||
.footer.actionbar | ||
= link_to "Add #{label}", send(path_for_new), :class => 'button' |