incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [22/50] [abbrv] Initial Blur Console commit.
Date Fri, 17 May 2013 03:24:49 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/blur_queries/_show.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/blur_queries/_show.html.haml b/src/contrib/blur-console/blur-admin/app/views/blur_queries/_show.html.haml
new file mode 100644
index 0000000..9d2248c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/blur_queries/_show.html.haml
@@ -0,0 +1,118 @@
+- empty_message = 'Not Available'
+
+%table#more-info-table.table.table-striped.table-condensed
+  %tbody
+    - if can? :show, :blur_queries, :query_string
+      %tr
+        %td{:class => "more-info-label"} Query String
+        %td
+          -if @blur_query.query_string
+            =@blur_query.query_string
+          -else
+            =empty_message
+    %tr
+      %td{:class => "more-info-label"} UUID
+      %td
+        -if @blur_query.uuid
+          =@blur_query.uuid
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Status
+      %td
+        -if @blur_query.state
+          = @blur_query.state_str
+        -else
+          = empty_message
+    %tr
+      %td{:class => "more-info-label"} Created At
+      %td
+        -if @blur_query.created_at
+          =@blur_query.created_at.in_time_zone("Eastern Time (US & Canada)")
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Table Name
+      %td
+        -if @blur_query.blur_table.table_name
+          =@blur_query.blur_table.table_name
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Super Query
+      %td
+        -if @blur_query.super_query_on
+          On
+        -elsif @blur_query.super_query_on == false
+          Off
+        -else
+          =empty_message
+          
+    %tr
+      %td{:class => "more-info-label"} Record Only
+      %td
+        -if @blur_query.record_only
+          On
+        -elsif @blur_query.record_only == false
+          Off
+        -else
+          =empty_message
+          
+    %tr
+      %td{:class => "more-info-label"} Facets
+      %td
+        -if @blur_query.facets
+          =@blur_query.facets
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Start
+      %td
+        -if @blur_query.start
+          =@blur_query.start
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Fetch Number
+      %td
+        -if @blur_query.fetch_num
+          =@blur_query.fetch_num
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Pre Filters
+      %td
+        -if @blur_query.pre_filters
+          %span{:title=>@blur_query.pre_filters}
+            =truncate(@blur_query.pre_filters, :length => 50, :ommision => "...")
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Post Filters
+      %td
+        -if @blur_query.post_filters
+          %span{:title=>@blur_query.post_filters}
+            =truncate(@blur_query.post_filters, :length => 50, :ommision => "...")
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Selector Column Families
+      %td
+        -if @blur_query.selector_column_families
+          =@blur_query.selector_column_families
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} Selector columns
+      %td
+        -if @blur_query.selector_columns
+          =@blur_query.selector_columns
+        -else
+          =empty_message
+    %tr
+      %td{:class => "more-info-label"} User ID
+      %td
+        -if @blur_query.userid
+          =@blur_query.userid
+        -else
+          =empty_message

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/blur_queries/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/blur_queries/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/blur_queries/index.html.haml
new file mode 100644
index 0000000..b982f1d
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/blur_queries/index.html.haml
@@ -0,0 +1,30 @@
+- content_for :title, 'Blur Queries'
+
+- content_for :javascript do
+  = javascript_include_tag 'blur_queries'
+
+#blur_queries_wrapper
+  .range_select
+    Queries in the last:
+    %select.time_range
+      =options_for_select({ "1 min" => 1, "5 min" => 5, "10 min" => 10, "30 min" => 30 }, 1)
+    %form.filters
+      Quick Filter Status by:
+      %input.filter_option{:type => "radio", :name => "filter", "data-filter" => "Running"}
+      Running
+      %input.filter_option{:type => "radio", :name => "filter", "data-filter" => "Complete"}
+      Complete
+      %input.filter_option{:type => "radio", :name => "filter", "data-filter" => "", :checked => true}
+      None
+  %table#queries-table.table.table-striped.table-bordered
+    %thead
+      %tr
+        - headers = ['User ID']
+        - headers << 'Query' if can? :index, :blur_queries, :query_string
+        - headers.push 'Table Name', 'Starting Record', 'Time Submitted', 'Status', 'State', 'Actions/Info'
+        - headers.each do |header|
+          %th
+            .header_content
+              %div=header
+              =render :partial => 'shared/icons'
+    %tbody

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/blur_tables/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/blur_tables/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/blur_tables/index.html.haml
new file mode 100644
index 0000000..1db32b7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/blur_tables/index.html.haml
@@ -0,0 +1,15 @@
+- content_for :title, 'Blur Tables'
+- content_for :javascript do
+  =javascript_include_tag 'blur_table/blur_tables'
+
+.blur_table_page
+  %ul#blur_tables.nav-tabs.nav
+    - @clusters.each_with_index do |cluster,i|
+      %li#cluster_tab{:id=>cluster.id, :class =>("active" unless i != 0)}
+        %a{:href=>"#cluster_#{cluster.id}", "data-toggle"=>"tab"}
+          %span.cluster-title= cluster.name
+          %i.icon-exclamation-sign.queries-running-icon{:style=>'display:none', :title=>'Has been queried within last 5 minutes'}
+          %i.icon-lock.safemode-icon{:style=>'display:none', :title=>'In Safe Mode'}
+  #tables-wrapper.tab-content
+    Loading Tables...
+    %img#loading-spinner{:alt => "Loading...", :src=> "/assets/loader.gif"}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/errors/error_404.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/errors/error_404.html.haml b/src/contrib/blur-console/blur-admin/app/views/errors/error_404.html.haml
new file mode 100644
index 0000000..8c4cb10
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/errors/error_404.html.haml
@@ -0,0 +1,5 @@
+%title Blur Console - Error 404
+#error_wrapper
+  %img{:src => image_path('404_file_not_found.png'), :title => 'File Not Found'}
+  %h3 We encountered an error trying to find the page or file you were looking for.
+  %h3 Please make sure you typed in the URL or file name correctly.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/errors/error_422.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/errors/error_422.html.haml b/src/contrib/blur-console/blur-admin/app/views/errors/error_422.html.haml
new file mode 100644
index 0000000..db9548a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/errors/error_422.html.haml
@@ -0,0 +1,4 @@
+%title Blur Console - Error 422
+#error_wrapper
+  %h1 The change you wanted was rejected.
+  %h3 Maybe you tried to change something you didn't have access to.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/errors/error_500.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/errors/error_500.html.haml b/src/contrib/blur-console/blur-admin/app/views/errors/error_500.html.haml
new file mode 100644
index 0000000..7e473e3
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/errors/error_500.html.haml
@@ -0,0 +1,11 @@
+%title Blur Console - Error 500
+#error_wrapper
+  %h2 We're sorry, but there was an error with our server.
+  %h3 Please go back or refresh the page.
+  %img{:src => image_path('server_error.png')}
+  - if (current_user && current_user.is?(:admin) && @error != nil)
+    #error_message
+      = @error.message
+    - @error.backtrace.each do |line|
+      = line
+      %br
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/_expand.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/_expand.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/_expand.html.haml
new file mode 100644
index 0000000..ada44f8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/_expand.html.haml
@@ -0,0 +1,12 @@
+-if @children.blank?
+  .noFiles No Files Found
+-else
+  %ul
+    - @children.each do |child|
+      -if child[:is_dir]
+        %li.osxSelectable.folder{:hdfs_id=>@hdfs_id, :hdfs_path=>@path + child[:name]}
+          =link_to(child[:name], expand_hdfs_path(@hdfs_id, @path + child[:name]), :title=>child[:name])
+      -else
+        %li.osxSelectable.file{:hdfs_id=>@hdfs_id, :hdfs_path=>@path + child[:name]}
+          =link_to(child[:name], file_info_hdfs_path(@hdfs_id, @path + child[:name]), :title=>child[:name])
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/_file_info.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/_file_info.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/_file_info.html.haml
new file mode 100644
index 0000000..680ffe4
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/_file_info.html.haml
@@ -0,0 +1,26 @@
+#file_table
+  %table
+    %tr
+      %td Length
+      %td= number_to_human_size @stat.length, :precision => 4
+    %tr
+      %td Directory
+      %td= @stat.isdir
+    %tr
+      %td Block Reps
+      %td= number_with_delimiter @stat.block_replication, :delimiter => ','
+    %tr
+      %td Block Size
+      %td= number_with_delimiter @stat.blocksize, :delimiter => ','
+    %tr
+      %td Last Modified
+      %td= Time.at(@stat.modification_time/1000.0).strftime("%D %r")
+    %tr
+      %td Owner
+      %td= @stat.owner
+    %tr
+      %td Group
+      %td= @stat.group
+    %tr
+      %td Permission
+      %td= @stat.permission
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/_folder_info.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/_folder_info.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/_folder_info.html.haml
new file mode 100644
index 0000000..89f67ce
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/_folder_info.html.haml
@@ -0,0 +1,31 @@
+.info-modal
+  .search-info-section
+    #file_table
+      %table.table-condensed.table.table-striped
+        %tr
+          %td Directory
+          %td= @stat.isdir
+        %tr
+          %td Files Count
+          %td#file_count Calculating...
+        %tr
+          %td Folders Count
+          %td#folder_count Calculating...
+        %tr
+          %td Files Size
+          %td#file_size Calculating...
+        %tr
+          %td Last Modified
+          %td= Time.at(@stat.modification_time/1000.0).strftime("%D %r")
+        %tr
+          %td Owner
+          %td= @stat.owner
+        %tr
+          %td Group
+          %td= @stat.group
+        %tr
+          %td Permission
+          %td= @stat.permission
+  .search-info-section
+    .radial-graph
+      Loading...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/_info.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/_info.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/_info.html.haml
new file mode 100644
index 0000000..1e70ab3
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/_info.html.haml
@@ -0,0 +1,43 @@
+.info-modal
+  .search-info-section
+    %table#more-info-table.table.table-striped.table-condensed
+      %tbody
+        %tr
+          %td.more-info-label Configured Capacity
+          %td= number_to_human_size @hdfs_stat.config_capacity
+        %tr
+          %td.more-info-label Present Capacity
+          %td= number_to_human_size @hdfs_stat.present_capacity
+        %tr
+          %td.more-info-label Amount Used (With Replication)
+          %td= number_to_human_size @hdfs_stat.dfs_used_real
+        %tr
+          %td.more-info-label Amount Used (Logical)
+          %td= number_to_human_size @hdfs_stat.dfs_used_logical
+        %tr
+          %td.more-info-label Amount Remaining
+          %td= number_to_human_size @hdfs_stat.dfs_remaining
+        %tr
+          %td.more-info-label Percent Used
+          %td= "#{@hdfs_stat.dfs_used_percent}%"
+        %tr
+          %td.more-info-label Under Replicated Blocks
+          %td= @hdfs_stat.under_replicated
+        %tr
+          %td.more-info-label Corrupt Blocks
+          %td= @hdfs_stat.corrupt_blocks
+        %tr
+          %td.more-info-label Missing Blocks
+          %td= @hdfs_stat.missing_blocks
+        %tr
+          %td.more-info-label Total Nodes
+          %td= @hdfs_stat.total_nodes < 0 ? 'Unavailable' : @hdfs_stat.total_nodes
+        %tr
+          %td.more-info-label Dead Nodes
+          %td= @hdfs_stat.dead_nodes < 0 ? 'Unavailable' : @hdfs_stat.dead_nodes
+        %tr
+          %td.more-info-label Live Nodes
+          %td= @hdfs_stat.live_nodes < 0 ? 'Unavailable' : @hdfs_stat.live_nodes
+  .search-info-section
+    .radial-graph
+      Loading...
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload.html.haml
new file mode 100644
index 0000000..44d1757
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload.html.haml
@@ -0,0 +1,7 @@
+-if not defined? @error
+  :javascript
+    parent.window.finishUploading('#{@path}');
+-else
+  :javascript
+    parent.window.uploadFailed('#{@error}');
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload_form.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload_form.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload_form.html.haml
new file mode 100644
index 0000000..2cccf77
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/_upload_form.html.haml
@@ -0,0 +1,10 @@
+#upload-file
+  #status
+  = form_tag upload_hdfs_path, :method => 'post', :multipart => true, :target => 'upload_frame', :id => 'upload-form' do
+    = file_field_tag 'upload', :id => 'file-input'
+    %p File must be less than 25Mb
+    = hidden_field_tag 'hdfs_id', nil, :id => 'hdfs-id-input'
+    = hidden_field_tag 'path', nil, :id => 'fpath-input'
+  %iframe#upload_frame{:name=>'upload_frame',:style=>'display:none'}
+  #upload_file_warning.hidden
+    Warning: File or folder with this name already exists. Uploading this file will replace the current one.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs/index.html.haml
new file mode 100644
index 0000000..8070148
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs/index.html.haml
@@ -0,0 +1,11 @@
+- content_for :title, 'HDFS'
+- content_for :javascript do
+  =javascript_include_tag 'hdfs'
+
+#hdfs_wrapper
+  #hdfs_browser{:hdfs_editor =>current_user.editor.to_s}
+    %ul#top_level
+      - @hdfs.each do |hdfs|
+        %li.osxSelectable.hdfs_instance{:hdfs_id=>hdfs.id, :hdfs_name=>hdfs.name, :hdfs_path=>'/'}
+          =link_to(hdfs.name, expand_hdfs_path(hdfs.id), :title=>hdfs.name)
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_graph.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_graph.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_graph.html.haml
new file mode 100644
index 0000000..f47ce61
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_graph.html.haml
@@ -0,0 +1,41 @@
+.graph_instance{:id => hdfs_instance.id}
+  .graph_title
+    %img.hidden{:class => "loading-spinner",
+      :src => image_path("loader.gif"),
+      :alt => "Loading..."}
+    %h3
+      = "#{hdfs_instance.name} (#{hdfs_instance.host})"
+  .graph_content
+    .graph_data.tabbable.tabs-left
+      %ul.nav.nav-tabs
+        %li.active
+          %a{:href => "#disk_#{hdfs_instance.id}", 'data-toggle' => 'tab', 'data-action' => 'disk'}
+            Capacity/Usage
+        %li
+          %a{:href => "#nodes_#{hdfs_instance.id}", 'data-toggle' => 'tab', 'data-action' => 'nodes'}
+            Live/Dead Nodes
+        %li
+          %a{:href => "#block_#{hdfs_instance.id}", 'data-toggle' => 'tab', 'data-action' => 'block'}
+            Block Status
+      .tab-content
+        %div.tab-pane.active{:id => "disk_#{hdfs_instance.id}"}
+          .graph
+            Loading Graph...
+        %div.tab-pane{:id => "nodes_#{hdfs_instance.id}"}
+          .graph
+            Loading Graph...
+        %div.tab-pane{:id => "block_#{hdfs_instance.id}"}
+          .graph
+            Loading Graph...
+      .graph_info
+        %table.graph-info-table
+          %tbody
+            %tr
+              %td.graph-legend
+              %td
+                .slider-info{:id => hdfs_instance.id}
+                  %input{:class=>"min-date", :type=>"text", :placeholder => 'from'}
+                  to
+                  %input{:class=>"max-date", :type=>"text", :placeholder => 'to'}
+              %td.slider-box
+                .slider{:id => hdfs_instance.id}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_joined_graph.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_joined_graph.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_joined_graph.html.haml
new file mode 100644
index 0000000..cc0e3ca
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/_hdfs_joined_graph.html.haml
@@ -0,0 +1,27 @@
+.joined_instance{:id => 'joinedGraph'}
+  .graph_title
+    %h3
+    %i.icon-remove-sign
+  .graph_content
+    .graph_select
+    .graph_data.tabbable.tabs-left
+      %ul.nav.nav-tabs
+        %li.active
+          %a{:href => '#disk_joined', 'data-toggle' => 'tab', 'data-action' => 'disk'}
+            Capacity/Usage
+        %li
+          %a{:href => '#nodes_joined', 'data-toggle' => 'tab', 'data-action' => 'nodes'}
+            Live/Dead Nodes
+        %li
+          %a{:href => '#block_joined', 'data-toggle' => 'tab', 'data-action' => 'block'}
+            Under Replicated/Corrupt Blocks
+      .tab-content
+        %div.tab-pane.active#disk_joined
+          .graph
+            Loading Graph...
+        %div.tab-pane#nodes_joined
+          .graph
+            Loading Graph...
+        %div.tab-pane#block_joined
+          .graph
+            Loading Graph...  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/index.html.haml
new file mode 100644
index 0000000..2fc9609
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/hdfs_metrics/index.html.haml
@@ -0,0 +1,7 @@
+- content_for :title, 'HDFS Metrics'
+- content_for :javascript do
+  =javascript_include_tag 'hdfs_metrics'
+#metrics_page_wrapper
+  .all_graph
+    -@hdfs_index.each_with_index do |hdfs,i|
+      = render :partial => 'hdfs_graph', :locals => { :hdfs_instance => hdfs }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/layouts/_help_menu.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/layouts/_help_menu.html.haml b/src/contrib/blur-console/blur-admin/app/views/layouts/_help_menu.html.haml
new file mode 100644
index 0000000..0ff651a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/layouts/_help_menu.html.haml
@@ -0,0 +1,202 @@
+= stylesheet_link_tag 'application'
+= javascript_include_tag 'help'
+%title
+  Help | Blur Console
+%html{:style => 'min-width: 0px;'}
+  %body
+    #help-window
+      .help-section
+        %h3.help-label Navigation Help
+        .help-content{:style => 'display: none'}
+          .head
+            The navigation bar has three major functionalities:
+          .body
+            %ol
+              %li It is a means to traverse the application
+              %li
+                It gives the user the ability to change the "zookeeper" context of the application:
+                %ul
+                  %li The context can be switched by using the "Current Zookeeper Instance" selector located at the center of the navigation bar.
+                  %li This selector is a list of all zookeepers that your application is currently tracking.
+                  %li This selector is present on every page that displays zookeeper relevant information.
+                  %li Selecting a new zookeeper will refresh the content of the current page using the new zookeeper.
+              %li
+                It has a link to your "User" page:
+                %ul
+                  %li This is located in the top right, next to the "logout" button.
+      .help-section
+        %h3.help-label Dashboard Help
+        .help-content{ :style =>  @tab != 'dashboard' && 'display: none' }
+          .head
+            The "Dashboard" page is a high level view of the overall health of your system.
+            Each box in the Zookeeper section represents a different zookeeper and displays information on that zookeeper.
+          .body
+            %ol
+              %li
+                The header of each zookeeper box displays the current health of that particular zookeeper.
+                %ul
+                  %li A green check means that the system is healthy.
+                  %li A yellow exclamation means that some of the zookeeper nodes are offline but it is still in quorum.
+                  %li A red question mark means that quorom is not being met.
+                  %li A red 'X' means that the zookeeper instance cannot be reached or is completely offline.
+              %li
+                Each circle represents the population of that particular piece of blur. The green portions are the healthy nodes and the red portions are the offline nodes.
+                %ul
+                  %li The circle's values correlate to the offline and online rows in the center of the widget.
+              %li
+                The "version" row indicates whether or not all of the nodes (shards and controllers respectively) are running the same version of blur.
+              %li Clicking on a Zookeeper box will take the user to the Environment page of that particular blur instance.
+              %li
+                A warning will appear at the bottom of the box if there are any "long running" queries.
+                %ul
+                  %li This warning is a count of the number queries that have been running for more than a minute. Clicking the number will bring up a dialog with the list of long running queries.
+
+          .head
+            Each box in the Hdfs section represents a different hdfs instance and displays information about it.
+          .body
+            %ol
+              %li The header of each hdfs box displays whether or not the system is online.
+              %li The information on the left represents whether or not hdfs blocks are missing or under replicated.
+              %li The node bar shows the relative populations of online and offline nodes. The green representing online and the red representing offline.
+              %li The "dfs usage" bar represents the total amount of the hdfs space that is currently being used.
+      .help-section
+        %h3.help-label Environment Status Help
+        .help-content{ :style =>  @tab != 'zookeepers' && 'display: none' }
+          .head
+            The "Environment Status" page is a zookeeper specific status page.
+          .body
+            %ol
+              %li
+                The widget at the top displays the zookeepers status.
+                %ul
+                  %li Hovering over "online(#)" and "offline(#)", only shown if there are any nodes offline or online respectively, will display a tooltip listing the respective nodes.
+                  %li A green background means that the system is healthy.
+                  %li A yellow background means that some of the zookeeper nodes are offline but it is still in quorum.
+                  %li A red background with the header "Quorom Failure" means that quorom is not being met.
+                  %li A red background with the header "Offline" means that the zookeeper instance cannot be reached or is completely offline.
+              %li The "controllers" table lists each controller with its name, blur version, and status.
+              %li The "shards" column contains a link that, when clicked, displays a popup listing all the child shards and their status.
+              %li The "clusters" table lists each shard with its name, blur version, and status. Click "view shards" for a list of the shards in that cluster and the status of each of them.
+              %li Clicking on the 'x' icon on this page will delete the node from the database, 'forget', this is only displayed if the node is no longer online.
+      .help-section
+        %h3.help-label Blur Tables Help
+        .help-content{ :style =>  @tab != 'blur_tables' && 'display: none' }
+          .head
+            The "Blur Tables" page is a list of all the Blur Tables associated with the current zookeeper. The tabs represent each cluster of shards. The tables are broken into Active, Disabled, Deleted statuses.  Each row contains information describing a Blur Table.
+          .body
+            %ol
+              %li The "Hosts/Shards" column is a link that displays a dialog with a list of all the hosts and shards for that BlurTable when clicked.
+              %li "Row Count" is the number of rows in that particular table.
+              %li "Record Count" is the number of records in that particular table.
+              %li
+                "Info" is a link that displays a list of Column families and their columns.s
+                %ul
+                  %li The location of the table in the HDFS.
+                  %li Each entry also shows the name of its analyzer.
+              %li "Queries/Minute" is a sparkline graph and an average number of queries on the corresponding table over the past 10 minutes.
+          .head
+            Depending on access, various actions will be available per status.
+          .body
+            %ul
+              %li Active tables will have the option to disable the table
+              %li Disabled tables will have the option to activate the table or delete the table.
+      .help-section
+        %h3.help-label Blur Queries Help
+        .help-content{ :style =>  @tab != 'blur_queries' && 'display: none' }
+          .head
+            The "Blur Queries" page is a list of recently executed Blur Queries.
+          .body
+            %ol
+              %li The "Auto Refresh" selector allows the user to choose how often the table information is refreshed.
+              %li The "Queries in the last" selector allows users to limit the queries by the time they were updated.
+              %li The "Quick Filter Status By" selector allows users to quickly show certain queries by their current status.
+              %li When the table is refreshed, queries are automatically added, updated, and deleted.
+              %li Each column in the table is sortable by clicking the header of each column.
+              %li The "Filter Queries" box allows users to search for specific values in the table.
+          .head
+            Underneath the filters section is the queries table.
+          .body
+            %ol
+              %li The "User Id" column shows the ID of the user that submitted that query.
+              %li
+                The "Query" column is the text of the executed query. This is only visible to users with the auditor role.
+                %ul
+                  %li Only the first 50 characters of the query text are displayed on the table. The full text can be seen by hovering your mouse over the query column.
+              %li The "Table Name" column shows the table that the query was executed against.
+              %li The "Starting Record" column shows the starting offset for the executed query.
+              %li The "Time Submitted" column shows the time that the query was submitted.
+              %li The "Status" column shows the percent of shards that have completed the query and whether or not the query is still running or was interrupted.
+              %li The "Actions/Info" column gives users the ability to cancel queries that are still in the running state (editor role only) and display details associated with the query (auditor role only).
+      .help-section
+        %h3.help-label Search Help
+        .help-content{ :style =>  @tab != 'searches' && 'display: none' }
+          .help_list#search_help
+            .head
+              Use the "Search" box to begin building a query. Use the search button to the right to submit.
+            .body
+              %ol
+                %li Basic field searches are in the format column_family.column:value
+                %li NOTE: Not all tables can be '*' queried, to learn more about the allowed tables consult your admin.
+                %li Fields can be grouped with parenthesis. Eg. (employee.name:bob employee.gender:male)
+                %li
+                  Special characters:
+                  %ul
+                    %li '+' - Indicates that the field or grouping must exist in the result set (+employee.name:bob)
+                    %li '-' - Indicates that the field or grouping can NOT exist in the result set (-employee.name:bob)
+                    %li '?' - Wildcard for a single character (employee.birthdate:197001??)
+                    %li '*' - Wildcard for 0 to many characters (employee.name:b*b)
+                    %li '~' - Fuzzy criteria to be followed by a number between 0 and 1 (employee.name:bob~0.7)
+
+          .help_list#advanced_help
+            .head
+              Use the "Advanced" menu to further modify a query.
+            .body
+              %ol
+                %li The "Column Families" selector tree allows users to limit the returned columns.
+                %li The "Search On" option allows you to search across a row or record.
+                %li The "Return" option allows you to choose whether to return the results by row or a record.
+                %li The "Start" option allows you to choose the starting element to display.
+                %li The "Fetch" option allows you to limit the amount of rows that are returned.
+                %li The "Pre-Filter" field allows you to remove records before the "join" operation.
+                %li The "Post-Filter" field allows you to filter rows out after the query.
+
+          .help_list#saved_help
+            .head
+              Use the "Saved" menu to load a previously saved query.
+            .body
+              %ol
+                %li The pencil will load the save into the form.
+                %li The red "x" will delete the saved query.
+                %li 
+                  Use the "Save Options" tab to save the current query.
+                  %ul
+                    %li The "Name" field is used to name your saved searches.
+                    %li You can update an existing saved search by using the same name in the name field and clicking update.
+      .help-section
+        %h3.help-label HDFS help
+        .help-content{ :style =>  @tab != 'hdfs' && 'display: none' }
+          .head
+            The HDFS page presents a simple file viewer of an HDFS file system.  Right clicking on the root node will expose properties about the file system as a whole.  Right clicking on any of the children nodes will allow for various editing actions (cut, paste, delete).
+      .help-section
+        %h3.help-label HDFS Metrics help
+        .help-content{ :style =>  @tab != 'hdfs_metrics' && 'display: none' }
+          .head
+            The HDFS metrics page displays a series of statistics for each of your managed hdfs instances. It allows you to track the history of a few key "metrics". The history range can be controlled by the slider / datepicker combo in the bottom right of each HDFS widget. This allows the user to change the range of the metrics window between 2 weeks ago and real time.
+      .help-section
+        %h3.help-label Admin help
+        .help-content{ :style =>  @tab != 'admin' && 'display: none' }
+          .head
+            The "Admin Page" contains a list of all the current users registered in the system. Users with the admin role may edit the roles and information for users on this page. It is only visible to users with the admin role.
+      .help-section
+        %h3.help-label Users help
+        .help-content{ :style =>  @tab != 'users' && 'display: none' }
+          .head
+            The "Column Preferences" section allows the user to choose what column families they want to display first in the results table when they execute a search on the search page.
+          .body
+            %ol
+              %li
+                "My Saved Column Families" is a list of the user's chosen preferred column families, this list is in sorted order from top to bottom.
+                %ul
+                  %li This list is sortable. To change the order of the column families, simply drag a column family to the desired spot in the list.
+                  %li To add columns to your preferred list, click on a blue column from the list on the right and it will be added to your preferred list.
+                  %li To remove a column from your preferred list,** a user can either drag the column into the trash can from their preferred list or click on the corresponding column on the right.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/layouts/application.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/layouts/application.html.haml b/src/contrib/blur-console/blur-admin/app/views/layouts/application.html.haml
new file mode 100644
index 0000000..d78b0c8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/layouts/application.html.haml
@@ -0,0 +1,84 @@
+!!!5
+%html
+	%head
+		= csrf_meta_tag
+		:javascript
+			var CurrentZookeeper = #{session[:current_zookeeper_id] || 'null'};
+		= javascript_include_tag 'application', 'routes'
+		= yield(:javascript)
+		= stylesheet_link_tag 'application', :media => "all" 
+		- if session[:current_zookeeper_id].blank? && @zookeepers
+			:javascript
+				var Zookeeper = {};
+				Zookeeper.instances = #{@zookeepers.collect{|z| {:id=>z.id, :name=>z.name}}.to_json}
+		%title
+			= yield(:title)
+			| Blur Console
+		%link{:rel => "icon", :type => "image/png", :href => "/assets/favicon.png"}
+	%body
+		#root
+			- if @current_user
+				.navbar
+					%a.brand{:href => '/'}
+						= image_tag('blur_logo.png')
+					.navbar-inner
+						%ul.nav.pull-left
+							- controller = params[:controller]
+							- action = params[:action]
+							%li{:class => controller == 'zookeepers' && action == 'index' && 'active'}
+								= link_to 'Dashboard', root_path
+							%li{:class => controller == 'zookeepers' && action == 'show' && 'active'}
+								= link_to 'Environment Status', stateful_nav_url('environment'), :id => 'env_link'
+							%li{:class => controller == 'blur_tables' && 'active'}
+								= link_to 'Blur Tables', stateful_nav_url('blur_table'), :id => 'tables_link', 'data-url-extension' => '/blur_tables'
+							%li{:class => controller == 'blur_queries' && 'active'}
+								= link_to 'Blur Queries', stateful_nav_url('blur_query'), :id => 'queries_link', 'data-url-extension' => '/blur_queries'
+							- if can? :show, :searches
+								%li{:class => controller == 'searches' && 'active'}
+									= link_to 'Search', stateful_nav_url('search'), :id => 'search_link', 'data-url-extension' => '/searches'
+							%li.dropdown{:class => (controller == 'hdfs' || controller == 'hdfs_metrics') && 'active'}
+								%a.dropdown-toggle{:href=>'#', :data=>{:toggle=>'dropdown'}}
+									HDFS
+									%b.caret
+								%ul.dropdown-menu
+									%li{:class => controller == 'hdfs' && 'active'}
+										= link_to 'HDFS File Browser', hdfs_index_path
+									%li{:class => controller == 'hdfs_metrics' && 'active'}
+										= link_to 'HDFS Metrics', hdfs_metrics_path
+							- if can? :index, :audits
+								%li{:class => controller == 'audits' && action == 'index' && 'active'}
+									= link_to 'Audits', audits_path
+							- if can? :index, :users
+								%li{:class => controller == 'users' && action == 'index' && 'active'}
+									= link_to 'Admin', users_path
+							
+						%ul.nav.pull-right
+							- if @zookeepers && @zookeepers.length > 1
+								%li
+									#zookeeper_select
+										-blank = @current_zookeeper.nil? && session[:current_zookeeper_id].nil?
+										= select('zookeeper', 'id', @zookeepers.collect{|zk| [zk.name, zk.id]}, {:id => 'zookeeper_id', :include_blank => blank, :selected => session[:current_zookeeper_id]})
+								%li.divider-vertical
+							%li{:class => controller == 'users' && action == 'show' && 'active'}
+								= link_to "Account", @current_user
+							- if session[:proof].blank?
+								%li= link_to "Log Out", logout_path
+			#bd.container-fluid
+				= yield
+
+	- if flash
+		#flash
+			- flash.each do |type, message|
+				-if type == :notice
+					.alert.alert-success{:class=>type}= message
+				-elsif type == :error
+					.alert.alert-error{:class=>type}= message
+				-else
+					.alert.alert-info{:class=>type}= message
+	#ft
+		#company-info
+			%p
+				- if !@current_user.nil?
+					%a#page-help{:href => ''} Help
+				| Version 1.4.2
+#help-menu{:style => 'display: none', "data-controller" => params[:controller], "data-action" => params[:action]}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/searches/_saved.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/searches/_saved.html.haml b/src/contrib/blur-console/blur-admin/app/views/searches/_saved.html.haml
new file mode 100644
index 0000000..f54e730
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/searches/_saved.html.haml
@@ -0,0 +1,15 @@
+#searches.partial-section
+	-if @searches.length != 0
+		-@searches.each do |search|
+			.search_element{:id => search.id}
+				.search-name{:title => search.name}
+					=search.name
+				.search-buttons
+					%a.btn#edit_icon{ :title => "Edit Query" }
+						%i.icon-pencil
+					%a.btn#delete_icon{ :title => "Delete Query" }
+						%i.icon-remove
+				.clearfix
+
+	-else
+		%div You do not have any saved searches.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/searches/create.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/searches/create.html.haml b/src/contrib/blur-console/blur-admin/app/views/searches/create.html.haml
new file mode 100644
index 0000000..52b5ae8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/searches/create.html.haml
@@ -0,0 +1,39 @@
+- if @results and not @results.empty?
+  #results_info
+    = "#{@result_count} results found"
+  #results_section
+    %table#result_table.result_table
+      %thead
+        %tr.familysets
+          %th.rowId
+          - @schema.each do |familyName,family|
+            %th{:colspan => family['columns'].count, :children => family['columns'].count, :class => "family_-sep-_#{family['name']}", :id => family['name'] }= family['name']
+        %tr.columnsets
+          %th.rowId rowId
+          - @schema.each do |familyName,family|
+            - family['columns'].each do |column|
+              %th{:class => "column_-sep-_#{family['name']}_-sep-_#{column['name']} family_-sep-_#{family['name']}"}
+                = column['name'].gsub(/([A-Z])/, '&shy;\1').html_safe
+
+      %tbody
+        -current_row_id = ""
+        - @results.each do |result|
+          - max_record_count = result[:max_record_count]
+          - max_record_count.times do |i|
+            %tr.table-bordered{:class => (current_row_id != result[:id]) ? "first" : ""}
+
+              - @schema.each_with_index do |(familyName,column_family), j|
+                - if i == 0 and j == 0
+                  %td{:rowspan => max_record_count, :class => "first", :title => "rowId"}= result[:id]
+                  -current_row_id = result[:id]
+                - record = result[column_family['name']][i] if result[column_family['name']]
+
+                - if record # then insert the record
+                  - column_family['columns'].each do |column|
+                    %td{:class => "#{((j % 2) == 1 ? 'even' : 'odd' )} column_-sep-_#{column_family['name']}_-sep-_#{column['name']} family_-sep-_#{column_family['name']}",
+                        :title => column['name']}
+                      = record[column['name']]
+
+                - else # fill in the remaining space with a big cell
+                  %td{:class => "#{((j % 2) == 1 ? 'even' : 'odd' )} family_-sep-_#{column_family['name']} family_-sep-_#{column_family['name']}_-sep-_empty",
+                      :colspan => column_family['columns'].length}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/searches/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/searches/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/searches/index.html.haml
new file mode 100644
index 0000000..493cd33
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/searches/index.html.haml
@@ -0,0 +1,111 @@
+-content_for :title, 'Search'
+-content_for :javascript do
+  =javascript_include_tag 'search'
+
+%script
+  var searchValidator = {table: "#{@search_filter.value}", query: /:\*$|^\*$/};
+
+#search_page_wrapper
+  #filter_section
+    = form_tag zookeeper_searches_path, :method => 'post', :id=>'search_form', :remote => true do
+      #filters_wrap
+        #standard
+          .search_field
+            = search_field_tag :query_string, params[:query_string], :placeholder => "Enter a Query String", :value => @query
+          = submit_tag "Search", :id => "search_submit", :class => "btn btn-primary"
+          %img.hidden{:id => "loading-spinner",
+              :src => image_path("loader.gif"),
+              :alt => "Loading..."}
+        #blur-table
+          = select_tag :blur_table, grouped_options_for_select(@filter_table_collection, @blur_table ? @blur_table.id : nil)
+        #advanced
+          .header
+            Advanced
+            %img{:class => "arrow_down arrow",
+                :src => image_path("arrow_down.png"),
+                :alt => "Expand For More Options"}
+            %img{:class => "arrow_up arrow",
+                :src => image_path("arrow_up.png"),
+                :alt => "Expand For More Options"}
+          .body.tab
+            .filter.section
+              .filtered-title Column Families
+              #filter_columns
+                .column_family_filter{:name=>"column_data[]"}
+            .section
+              %table
+                %tr.filter
+                  #radio_headers
+                    %td Search On:
+                %tr
+                  %td
+                    #radio_buttons
+                      %table
+                        %tr
+                          %td Row 
+                          %td 
+                            %input#search_row{:class => :radioButton, :name => :search, :type => :radio, :value => '0', :checked => 'checked'}
+                        %tr
+                          %td Record
+                          %td
+                            %input#search_record{:class => :radioButton, :name => :search, :type => :radio, :value => '1'}   
+                %tr.filter
+                  #radio_headers  
+                    %td Return:
+                %tr
+                  %td
+                    #radio_buttons
+                      %table
+                        %tr
+                          %td Row 
+                          %td 
+                            %input#return_row{:class => :radioButton, :name => :return, :type => :radio, :value => '0', :checked => 'checked'}
+                        %tr
+                          %td Record
+                          %td
+                            %input#return_record{:class => :radioButton, :name => :return, :type => :radio, :value => '1', :disabled => true}                     
+                %tr.filter
+                  %th Start:
+                  %td
+                    = number_field_tag :offset, 0, :min => 0
+                %tr.filter
+                  %td Fetch:
+                  %td 
+                    = number_field_tag :result_count, 10, :min => 0
+                %tr
+                  %td Pre-filter String
+                %tr
+                  %td{:colspan => 2}
+                    %input#pre_filter{:class => :filter_text, :type => :text, :value => '', :name => :pre_filter} 
+                %tr
+                  %td Post-filter String
+                %tr
+                  %td{:colspan => 2}
+                    %input#post_filter{:class => :filter_text, :type => :text, :value => '', :name => :post_filter}                                        
+        #saved
+          .header
+            Saved
+            %img{:class => "arrow_down arrow",
+                :src => image_path("arrow_down.png"),
+                :alt => "Expand For More Options"}
+            %img{:class => "arrow_up arrow",
+                :src => image_path("arrow_up.png"),
+                :alt => "Expand For More Options"}
+          .body.tab
+            .saved.section
+              .saved-title
+                Saved Searches
+              = render "saved", :searches => @searches, :blur_table => @blur_table
+            .save_actions.section
+              .saved-title.saved-input
+                Save Current Search
+              .filter#save_name_wrap
+                #save_label= label_tag :save_name, 'Name:'
+                = text_field_tag 'save_name'
+              .filter#buttons
+                %button.btn.primary{:name => "save", :type => "button", :id => 'save_button'}
+                  Save New
+                %button.btn{:name => "update", :type => "button", :id => 'update_button'}
+                  Update
+  #results_wrapper.hidden
+    #results_container
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/shared/_icons.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/shared/_icons.html.haml b/src/contrib/blur-console/blur-admin/app/views/shared/_icons.html.haml
new file mode 100644
index 0000000..c2142b6
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/shared/_icons.html.haml
@@ -0,0 +1,2 @@
+%i.icon-chevron-up
+%i.icon-chevron-down
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/user_sessions/_form.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/user_sessions/_form.html.haml b/src/contrib/blur-console/blur-admin/app/views/user_sessions/_form.html.haml
new file mode 100644
index 0000000..d36528f
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/user_sessions/_form.html.haml
@@ -0,0 +1,13 @@
+= twitter_bootstrap_form_for user_session, :html => {:class => 'well'} do |f|
+  -if user_session.errors.any?
+    #error_explanation
+      %ul
+        - user_session.errors.full_messages.each do |msg|
+          %li= msg
+  %p
+    = f.text_field :username, false, :placeholder => "Username"
+  %p
+    = f.password_field :password, false, :placeholder => "Password"
+  %p
+    = f.submit 'Log In', :class => "btn btn-primary"
+    = link_to 'Register', new_user_path

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/user_sessions/new.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/user_sessions/new.html.haml b/src/contrib/blur-console/blur-admin/app/views/user_sessions/new.html.haml
new file mode 100644
index 0000000..b00a403
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/user_sessions/new.html.haml
@@ -0,0 +1,4 @@
+- content_for :title, 'Log In'
+#login_wrapper
+	= link_to image_tag('blur_logo.png'), root_path
+	= render 'form', :user_session => @user_session
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/users/_form.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/users/_form.html.haml b/src/contrib/blur-console/blur-admin/app/views/users/_form.html.haml
new file mode 100644
index 0000000..b2cd362
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/users/_form.html.haml
@@ -0,0 +1,34 @@
+= twitter_bootstrap_form_for user do |f|
+	-if user.errors.any?
+		#error_explanation
+			%h4= "#{pluralize(user.errors.count, 'error')} prohibited new user from being saved"
+			%ul
+				- user.errors.full_messages.each do |msg|
+					%li= msg
+	%label= "Account Information"
+	- fields = {:username					=> :text_field,
+			:name											=> :text_field,
+			:email										=> :email_field,
+			:password									=> :password_field,
+			:password_confirmation 		=> :password_field}
+	- fields.each_pair do |field_name, field_type|
+		- if (!user.new_record? and can? :update, user, field_name)	or ( user.new_record? and can? :create, user, field_name)
+			= f.send field_type, field_name, false, :placeholder => field_name.to_s.humanize
+		- elsif user[field_name]
+			%strong= "#{field_name}: "
+			= user[field_name]
+	- if (current_user && current_user.is?(:admin))
+		= f.toggles 'Roles' do
+			- User::ROLES.each do |role|
+				%li
+					- if role == "admin" && current_user == user
+						= check_box_tag "user[roles][]", role, user.is?(role), :id => 'user_role_' + role, :style => 'display:none'
+					- else
+						= check_box_tag "user[roles][]", role, user.is?(role), :id => 'user_role_' + role
+					%span
+						= role.to_s.humanize
+	- if current_user
+		= f.submit 'Save', :class => 'btn btn-primary'
+	- else
+		= f.submit 'Register', :class => 'btn btn-primary'
+	= link_to 'Cancel', cancel_path, :class => 'btn'

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/users/edit.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/users/edit.html.haml b/src/contrib/blur-console/blur-admin/app/views/users/edit.html.haml
new file mode 100644
index 0000000..b238170
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/users/edit.html.haml
@@ -0,0 +1,5 @@
+- content_for :title, 'Edit User'
+
+#edit_user_wrapper
+  %h2 Edit User
+  = render 'form', :user => @user, :cancel_path => users_path

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/users/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/users/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/users/index.html.haml
new file mode 100644
index 0000000..302f466
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/users/index.html.haml
@@ -0,0 +1,33 @@
+- content_for :title, 'Users'
+- content_for :javascript do
+	=javascript_include_tag 'admin'
+
+#admin_wrapper
+	%h2 Users
+	#users_table_wrapper
+		%table.table.table-bordered.table-striped{:id => 'users_table'}
+			%tr
+				%th Username
+				%th Name
+				%th Email
+				%th Roles
+				%th Actions
+			- for user in @users
+				%tr
+					%td= user.username
+					%td= user.name
+					%td= user.email
+					%td= user.roles.to_a.join ', '
+					%td
+						=link_to raw('<i class="icon-pencil"></i> Edit'), edit_user_path(user), :class => 'btn'
+						- if current_user != user
+							= link_to raw('<i class="icon-trash icon-white"></i> Delete'), user, :confirm => 'Are you sure?', :method => :delete, :class => 'btn btn-danger'
+	%p= link_to raw('<i class="icon-user"></i> New User'), new_user_path, :class => 'btn'
+
+	%h2.filter-header Star Query Table Filter
+	%p.clarification (Whitelist Regex for allowing '*' queries)
+	= form_tag("/admin_settings/#{@search_filter.id}.html", :method => "put", :remote => true, :class => 'table-filter') do
+		= hidden_field_tag(:setting, 'regex_filter')
+		.control-group
+			= text_field_tag(:value, @search_filter.value)
+			= submit_tag("Save", :class => 'btn')

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/users/new.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/users/new.html.haml b/src/contrib/blur-console/blur-admin/app/views/users/new.html.haml
new file mode 100644
index 0000000..7e8fdf8
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/users/new.html.haml
@@ -0,0 +1,12 @@
+- content_for :title, 'New User'
+
+- if current_user
+	#new_user_wrapper
+		%h2 New User
+		= render 'form', :user => @user, :cancel_path => users_path
+- else
+	#login_wrapper
+		= link_to image_tag('blur_logo.png'), root_path
+		#new_user_wrapper.well
+			%h2 Register
+			= render 'form', :user => @user, :cancel_path => login_path

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/users/show.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/users/show.html.haml b/src/contrib/blur-console/blur-admin/app/views/users/show.html.haml
new file mode 100644
index 0000000..b738c15
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/users/show.html.haml
@@ -0,0 +1,78 @@
+- content_for :title, 'User'
+- content_for :javascript do
+  =javascript_include_tag 'users'
+
+#show_user_wrapper{'data-user-id' => @user.id}
+  .info-contain.row
+    - if can? :update, @column_preference
+      - col_prefs = @column_preference.value || []
+      #pref-col-info.span5
+        #pref-row.row
+          #pref-title.hidden-spinner
+            %img{:class => "loading-spinner",
+              :src => image_path("loader.gif"),
+              :alt => "Loading..."}
+            %h3 Search Result Column Preferences
+          #pref-bin.span3
+
+            #pref-col
+              .section-label{:id => @user.id} My Saved Column Families
+              %ul#my-cols.sort
+                -if col_prefs.size() == 0
+                  #no-saved None Currently Saved
+                -else
+                  #no-saved{:style => "display:none;"} None Currently Saved
+                  -col_prefs.each do |pref|
+                    .sel-fam{:id => "value_#{pref}"}
+                      =pref
+            #pref-trash
+              %ul#actual-trash.sort
+                #trash Drag a column here to remove it from your preferences
+            #pref-key
+              %h4 Search Prefence Key:
+              Saved Column:
+              #orange_color
+              %br
+              Unsaved Column:
+              #blue_color
+          #opt-col.span2
+            .section-label All Column Families
+            -@choices.each do |option|
+              -if col_prefs.include? option
+                .my-select.fam{:id => "value_#{option}"}
+                  =option
+              -elsif !option.blank?
+                .fam{:id => "value_#{option}"}
+                  =option
+    #zookeeper-pref.span6
+      %h3 Zookeeper Preferences
+      - options = ["Default", "Choose Zookeeper", " Use Last Zookeeper"]
+      %select#zookeeper_pref
+        - options.each_with_index do |option, index|
+          %option{ :value => index, :selected => (:selected if @zookeeper_preference.name == index.to_s) }
+            = option
+      =select_tag :zookeeper_num,  options_from_collection_for_select(@zookeepers, "id", "name", @zookeeper_preference.value)
+      %p
+        This preference will only be used when the current user does not have a zookeeper in the current session.
+      %p
+      =submit_tag "Save", :confirm => "Are you sure?", :id => "zookeeper_submit", :class => "btn btn-primary"
+
+    #user-info.span4
+      %p
+        %strong Username:
+        = @user.username
+      %p
+        %strong Name:
+        = @user.name
+      %p
+        %strong Email:
+        = @user.email
+      %p
+        %strong Roles:
+        = @user.roles.to_a.join ', '
+      %p
+        - if can? :edit, @user
+          = link_to "Edit", edit_user_path(@user)
+        - if can? :index, :users
+          |
+          = link_to "View All Users", users_path

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/zookeepers/_hdfs_stat.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/zookeepers/_hdfs_stat.html.haml b/src/contrib/blur-console/blur-admin/app/views/zookeepers/_hdfs_stat.html.haml
new file mode 100644
index 0000000..5e1fd43
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/zookeepers/_hdfs_stat.html.haml
@@ -0,0 +1,41 @@
+.hdfs_info
+  %table.hdfs_table{:id => "#{hdfs.id}"}
+    %thead
+      %tr
+        %th.hdfs-title{ :colspan => 2}
+          .hdfs-name
+            = hdfs.name + " - "
+            %span.hdfs-host
+              =hdfs.host
+
+    %tbody
+      %tr
+        %th Blocks
+        %th Nodes
+      %tr
+        %td.center
+          .blocks-corr.label.status.center
+            %span.number 0
+            Corrupt Blocks
+        %td.center
+          .progress.progress-up-down
+            .bar.up.nodes-live{:style=>'width:100%'}
+              %span.number 0
+              Online/Offline
+            .down.nodes-dead
+              %span.number
+      %tr
+        %td.center
+          .blocks-miss.label.status.center
+            %span.number 0
+            Missing Blocks
+        %td.center &nbsp;
+      %tr
+        %td.center
+          .nodes-under.label.status.center
+            %span.number 0
+            Under Replicated Blocks
+        %td.center &nbsp;
+      %tr
+        %td{ :colspan => 2 }
+          .warning

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/zookeepers/_zookeeper.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/zookeepers/_zookeeper.html.haml b/src/contrib/blur-console/blur-admin/app/views/zookeepers/_zookeeper.html.haml
new file mode 100644
index 0000000..19747a7
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/zookeepers/_zookeeper.html.haml
@@ -0,0 +1,48 @@
+.zookeeper_info
+  %table.zookeeper_table{:id => "#{zookeeper.id}"}
+    %thead
+      %tr
+        %th.zookeeper-title{ :colspan => 3 }
+          .zookeeper-name
+            = zookeeper.name
+          .zookeeper-status
+            = case zookeeper.zookeeper_status; when 0 then "Offline"; when 1 then "Online"; else "Not Available"; end
+
+    %tbody
+      %tr
+        %td.index
+        %th.cont
+          Controllers
+        %th.shard
+          Shards
+      %tr
+        %th.index
+          Blur Version
+        %td.cont
+          .bv-cont
+            .controllers-bv.label.status
+              No Controllers Available
+        %td.shard
+          .bv-shard
+            .shards-bv.label.status
+              No Shards Available
+      %tr
+        %th.index
+          Status
+        %td.cont
+          .progress.progress-up-down.stat-cont
+            .bar.up.controllers-online{:style=>'width:100%'}
+              %span.number 0
+              Online/Offline
+            .down.controllers-offline
+              %span.number
+        %td.shard
+          .progress.progress-up-down.stat-shard
+            .bar.up.shards-online{:style=>'width:100%'}
+              %span.number 0
+              Online/Offline
+            .down.shards-offline
+              %span.number
+      %tr
+        %td{ :colspan => 3 }
+          .warning

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/zookeepers/index.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/zookeepers/index.html.haml b/src/contrib/blur-console/blur-admin/app/views/zookeepers/index.html.haml
new file mode 100644
index 0000000..5292f4b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/zookeepers/index.html.haml
@@ -0,0 +1,15 @@
+- content_for :title, 'Blur Status'
+- content_for :javascript do
+  = javascript_include_tag 'dashboard/dashboard'
+
+.dashboard_wrapper
+  #zookeepers_wrapper
+    %h2 Blur Instances
+    #zookeepers
+    .clearfix
+
+  #hdfs_dash_wrapper
+    %h2 HDFS
+    #hdfses 
+    .clearfix
+

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/app/views/zookeepers/show.html.haml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/app/views/zookeepers/show.html.haml b/src/contrib/blur-console/blur-admin/app/views/zookeepers/show.html.haml
new file mode 100644
index 0000000..929ac23
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/app/views/zookeepers/show.html.haml
@@ -0,0 +1,33 @@
+- content_for :title, 'Environment Status'
+- content_for :javascript do
+  = javascript_include_tag 'environment/environment'
+
+#zookeeper_wrapper
+  #zookeeper
+  #blur.row
+    #controllers.span6
+      .subHeaders
+        Controllers
+      .controller_table
+        %table.table.table-bordered
+          %thead
+            %th Name
+            %th Blur Version
+            %th
+          %tbody
+            %tr.no_children
+              %td{:colspan => 3} No Controllers!
+    #clusters.span6
+      .subHeaders
+        Clusters
+      .clusters_table
+        %table.table.table-bordered
+          %thead
+            %th Name
+            %th Blur Version
+            %th Safe Mode
+            %th Shards
+            %th
+          %tbody
+            %tr.no_children
+              %td{:colspan => 5} No Clusters!
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config.ru
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config.ru b/src/contrib/blur-console/blur-admin/config.ru
new file mode 100644
index 0000000..f9b1711
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment',  __FILE__)
+run BlurAdmin::Application

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/application.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/application.rb b/src/contrib/blur-console/blur-admin/config/application.rb
new file mode 100644
index 0000000..9fbe6b4
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/application.rb
@@ -0,0 +1,27 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+if defined?(Bundler)
+  Bundler.require(*Rails.groups(:assets => %w(development test)))
+end
+
+module BlurAdmin
+  class Application < Rails::Application
+    config.encoding = "utf-8"
+
+    # Configure sensitive parameters which will be filtered from the log file.
+    config.filter_parameters += [:password, :query_string]
+
+    # Enable the asset pipeline
+    config.assets.enabled = true
+
+    # Version of your assets, change this if you want to expire all your assets
+    config.assets.version = '1.0'
+    
+    # Custom directories with classes and modules you want to be autoloadable.
+    config.autoload_paths += %W(#{config.root}/lib/thrift)
+
+    config.exceptions_app = self.routes
+  end
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/boot.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/boot.rb b/src/contrib/blur-console/blur-admin/config/boot.rb
new file mode 100644
index 0000000..4489e58
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/boot.rb
@@ -0,0 +1,6 @@
+require 'rubygems'
+
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/compass.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/compass.rb b/src/contrib/blur-console/blur-admin/config/compass.rb
new file mode 100644
index 0000000..b10b5c2
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/compass.rb
@@ -0,0 +1,6 @@
+# This configuration file works with both the Compass command line tool and within Rails.
+# Require any additional compass plugins here.
+project_type = :rails
+# Set this to the root of your project when deployed:
+http_path = "/"
+sass_dir = "app/stylesheets"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/database.yml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/database.yml b/src/contrib/blur-console/blur-admin/config/database.yml
new file mode 100644
index 0000000..ef9471a
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/database.yml
@@ -0,0 +1,49 @@
+<% if ENV['BAMBOO'] == 'true' %>
+
+development:
+  adapter: mysql2
+  encoding: utf8
+  database: blurtools_development
+  host: nic-mysqldev01
+  pool: 5
+  username: blurtools_bamboo
+  password: blurtools_bamboo
+
+test:
+  adapter: mysql2
+  encoding: utf8
+  database: blurtools_test
+  host: nic-mysqldev01
+  pool: 5
+  username: blurtools_bamboo
+  password: blurtools_bamboo
+
+<% else %>
+
+development:
+  adapter: mysql2
+  encoding: utf8
+  database: blurtools_development
+  host: localhost
+  pool: 5
+  username: root
+  password: 
+
+test:
+  adapter: mysql2
+  encoding: utf8
+  database: blurtools-test
+  host: localhost
+  pool: 5
+  username: root
+  password:
+
+production:
+  adapter: mysql2
+  encoding: utf8
+  database: blurtools
+  host: localhost
+  pool: 5
+  username: root
+  password: 
+<% end %>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/environment.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/environment.rb b/src/contrib/blur-console/blur-admin/config/environment.rb
new file mode 100644
index 0000000..1068f6b
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/environment.rb
@@ -0,0 +1,13 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+BlurAdmin::Application.initialize!
+
+#generate the routes file
+#JsRoutes.generate!
+
+#setup authlogic
+BlurAdmin::Application.configure do
+  config.gem "authlogic"
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/environments/development.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/environments/development.rb b/src/contrib/blur-console/blur-admin/config/environments/development.rb
new file mode 100644
index 0000000..d424417
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/environments/development.rb
@@ -0,0 +1,39 @@
+BlurAdmin::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # In the development environment your application's code is reloaded on
+  # every request. This slows down response time but is perfect for development
+  # since you don't have to restart the web server when you make code changes.
+  config.cache_classes = false
+
+  # Log error messages when you accidentally call methods on nil.
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Don't care if the mailer can't send
+  config.action_mailer.raise_delivery_errors = false
+
+  # Print deprecation notices to the Rails logger
+  config.active_support.deprecation = :log
+
+  # Only use best-standards-support built into browsers
+  config.action_dispatch.best_standards_support = :builtin
+
+  # Raise exception on mass assignment protection for Active Record models
+  config.active_record.mass_assignment_sanitizer = :strict
+
+  # Log the query plan for queries taking more than this (works
+  # with SQLite, MySQL, and PostgreSQL)
+  config.active_record.auto_explain_threshold_in_seconds = 0.5
+
+  # Do not compress assets
+  config.assets.compress = false
+
+  # Expands the lines which load the assets
+  config.assets.debug = true
+
+  
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/environments/production.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/environments/production.rb b/src/contrib/blur-console/blur-admin/config/environments/production.rb
new file mode 100644
index 0000000..bc5d83d
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/environments/production.rb
@@ -0,0 +1,49 @@
+BlurAdmin::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # Code is not reloaded between requests
+  config.cache_classes = true
+
+  # Full error reports are disabled and caching is turned on
+  config.consider_all_requests_local       = false
+  config.action_controller.perform_caching = true
+
+  # Disable Rails's static asset server (Apache or nginx will already do this)
+  config.serve_static_assets = false
+
+  # Compress JavaScripts and CSS
+  config.assets.compress = true
+
+  # Don't fallback to assets pipeline if a precompiled asset is missed
+  config.assets.compile = false
+
+  # Generate digests for assets URLs
+  config.assets.digest = true
+  
+  config.assets.precompile += Dir.foreach('app/assets/javascripts/').select{|file| (file =~ /.js/) }
+  config.assets.precompile += ['blur_table/blur_tables.js', 'dashboard/dashboard.js', 'environment/environment.js']
+  
+  #.reject{|file| (file =~ /.*\.coffee/).nil? && (file =~ /routes.js/).nil?}.collect{|file| file.gsub /.coffee/, ''}
+  
+  config.action_dispatch.x_sendfile_header = "X-Sendfile"
+  
+  class LogFormatter < Logger::Formatter
+    def call(severity,time,progname,msg)
+      "#{severity} #tok1-block-tok #{msg}\n"
+    end
+  end
+  config.logger = Logger.new("#{::Rails.root.to_s}/log/#{ENV['RAILS_ENV']}.log", 10,26_214_400)
+  config.logger.formatter = LogFormatter.new
+  config.logger.level = Logger::WARN
+
+  config.i18n.fallbacks = true
+
+  # Send deprecation notices to registered listeners
+  config.active_support.deprecation = :notify
+
+  # Log the query plan for queries taking more than this (works
+  # with SQLite, MySQL, and PostgreSQL)
+  config.active_record.auto_explain_threshold_in_seconds = 2
+
+  config.action_dispatch.rack_cache = {:metastore => "rails:/", :entitystore => "rails:/", :verbose => false}
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/environments/test.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/environments/test.rb b/src/contrib/blur-console/blur-admin/config/environments/test.rb
new file mode 100644
index 0000000..e0e9194
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/environments/test.rb
@@ -0,0 +1,37 @@
+BlurAdmin::Application.configure do
+  # Settings specified here will take precedence over those in config/application.rb
+
+  # The test environment is used exclusively to run your application's
+  # test suite. You never need to work with it otherwise. Remember that
+  # your test database is "scratch space" for the test suite and is wiped
+  # and recreated between test runs. Don't rely on the data there!
+  config.cache_classes = true
+
+  # Configure static asset server for tests with Cache-Control for performance
+  config.serve_static_assets = true
+  config.static_cache_control = "public, max-age=3600"
+
+  # Log error messages when you accidentally call methods on nil
+  config.whiny_nils = true
+
+  # Show full error reports and disable caching
+  config.consider_all_requests_local       = true
+  config.action_controller.perform_caching = false
+
+  # Raise exceptions instead of rendering exception templates
+  config.action_dispatch.show_exceptions = false
+
+  # Disable request forgery protection in test environment
+  config.action_controller.allow_forgery_protection    = false
+
+  # Tell Action Mailer not to deliver emails to the real world.
+  # The :test delivery method accumulates sent emails in the
+  # ActionMailer::Base.deliveries array.
+  config.action_mailer.delivery_method = :test
+
+  # Raise exception on mass assignment protection for Active Record models
+  config.active_record.mass_assignment_sanitizer = :strict
+
+  # Print deprecation notices to the stderr
+  config.active_support.deprecation = :stderr
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/asset_precompile_prefix_fix.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/asset_precompile_prefix_fix.rb b/src/contrib/blur-console/blur-admin/config/initializers/asset_precompile_prefix_fix.rb
new file mode 100644
index 0000000..b8b645d
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/asset_precompile_prefix_fix.rb
@@ -0,0 +1,37 @@
+# ./config/initializers/asset_precompile_prefix_fix.rb
+#
+# So we can deploy at a SubURI, and precompile assets to respect that with:
+#    RAILS_RELATIVE_URL_ROOT=/foo rake assets:precompile
+#
+# See: http://stackoverflow.com/questions/7293918/broken-precompiled-assets-in-rails-3-1-when-deploying-to-a-sub-uri
+#
+# Confirmed working in Rails 3.1.3
+# Future versions of Rails may make this monkey patch unneccesary. (or break
+# it without making it unneccesary)
+#
+#
+# We are monkey patching source originally (in 3.1.3) at:
+# https://github.com/rails/rails/blob/master/actionpack/lib/sprockets/helpers/rails_helper.rb#L54
+
+module Sprockets
+  module Helpers
+    module RailsHelper
+
+      included do |klass|
+        klass.alias_method_chain :asset_path, :prefix
+      end
+      
+      def asset_path_with_prefix(*args)
+        path = asset_path_without_prefix(*args)
+        
+        if !asset_paths.send(:has_request?)
+          path = ENV['RAILS_RELATIVE_URL_ROOT'] + path if ENV['RAILS_RELATIVE_URL_ROOT']
+        end
+        
+        return path
+      end
+       
+                
+    end 
+  end
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/backtrace_silencers.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/backtrace_silencers.rb b/src/contrib/blur-console/blur-admin/config/initializers/backtrace_silencers.rb
new file mode 100644
index 0000000..59385cd
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/inflections.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/inflections.rb b/src/contrib/blur-console/blur-admin/config/initializers/inflections.rb
new file mode 100644
index 0000000..dc38422
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/inflections.rb
@@ -0,0 +1,4 @@
+ActiveSupport::Inflector.inflections do |inflection|
+  inflection.irregular "is", "are"
+  inflection.uncountable "hdfs"
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/mime_types.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/mime_types.rb b/src/contrib/blur-console/blur-admin/config/initializers/mime_types.rb
new file mode 100644
index 0000000..72aca7e
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/overrides.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/overrides.rb b/src/contrib/blur-console/blur-admin/config/initializers/overrides.rb
new file mode 100644
index 0000000..a4712df
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/overrides.rb
@@ -0,0 +1,10 @@
+module Rack
+  module Utils
+    def escape(s)
+      CGI.escape(s.to_s)
+    end
+    def unescape(s)
+      CGI.unescape(s)
+    end
+  end
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/quiet_assets.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/quiet_assets.rb b/src/contrib/blur-console/blur-admin/config/initializers/quiet_assets.rb
new file mode 100644
index 0000000..a7a2f01
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/quiet_assets.rb
@@ -0,0 +1,11 @@
+Rails.application.assets.logger = Logger.new('/dev/null')
+Rails::Rack::Logger.class_eval do
+  def call_with_quiet_assets(env)
+    previous_level = Rails.logger.level
+    Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0
+    call_without_quiet_assets(env).tap do
+      Rails.logger.level = previous_level
+    end
+  end
+  alias_method_chain :call, :quiet_assets
+end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/secret_token.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/secret_token.rb b/src/contrib/blur-console/blur-admin/config/initializers/secret_token.rb
new file mode 100644
index 0000000..ee59639
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/secret_token.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+BlurAdmin::Application.config.secret_token = '538e2d950ec5888e4edf191ba28ebb070927afbad9b98a316afc7ec040300990b8499d4824902814c46c09ed9749d4fe195fe62e503dc4d3972244db2c14864f'

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/session_store.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/session_store.rb b/src/contrib/blur-console/blur-admin/config/initializers/session_store.rb
new file mode 100644
index 0000000..5230500
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/session_store.rb
@@ -0,0 +1,8 @@
+# Be sure to restart your server when you modify this file.
+
+BlurAdmin::Application.config.session_store :cookie_store, key: '_blur-admin_session'
+
+# Use the database for sessions instead of the cookie-based default,
+# which shouldn't be used to store highly confidential information
+# (create the session table with "rails generate session_migration")
+# BlurAdmin::Application.config.session_store :active_record_store

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/initializers/wrap_parameters.rb
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/initializers/wrap_parameters.rb b/src/contrib/blur-console/blur-admin/config/initializers/wrap_parameters.rb
new file mode 100644
index 0000000..999df20
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+  wrap_parameters format: [:json]
+end
+
+# Disable root element in JSON by default.
+ActiveSupport.on_load(:active_record) do
+  self.include_root_in_json = false
+end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5b86c7e/src/contrib/blur-console/blur-admin/config/locales/en.yml
----------------------------------------------------------------------
diff --git a/src/contrib/blur-console/blur-admin/config/locales/en.yml b/src/contrib/blur-console/blur-admin/config/locales/en.yml
new file mode 100644
index 0000000..179c14c
--- /dev/null
+++ b/src/contrib/blur-console/blur-admin/config/locales/en.yml
@@ -0,0 +1,5 @@
+# Sample localization file for English. Add more files in this directory for other locales.
+# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
+
+en:
+  hello: "Hello world"


Mime
View raw message