[PATCH/foreman 1/1] fixes #1703 - Add Ok Hosts as Bookmark

Signed-off-by: Corey Osman <corey@logicminds.biz>

··· --- .../20120623002052_add_ok_hosts_book_mark.rb | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) create mode 100644 db/migrate/20120623002052_add_ok_hosts_book_mark.rb

diff --git a/db/migrate/20120623002052_add_ok_hosts_book_mark.rb b/db/migrate/20120623002052_add_ok_hosts_book_mark.rb
new file mode 100644
index 0000000…2eb6972
— /dev/null
+++ b/db/migrate/20120623002052_add_ok_hosts_book_mark.rb
@@ -0,0 +1,8 @@
+class AddOkHostsBookMark < ActiveRecord::Migration

  • def self.up
  • Bookmark.find_or_create_by_name_and_query_and_controller :name => "ok hosts", :query => 'last_report > "35 minutes ago" and status.enabled = true and status.applied = 0 and status.failed = 0 and status.pending = 0', :controller=> "hosts", :public => true
    
  • end
  • def self.down
  • end
    +end

    1.7.1