[PATCH 3/4] RM 3145 added logs page

Tzu-Mainn Chen tzumainn at redhat.com
Wed Apr 25 14:43:26 UTC 2012


---
 src/app/views/logs/index.html.haml |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 src/app/views/logs/index.html.haml

diff --git a/src/app/views/logs/index.html.haml b/src/app/views/logs/index.html.haml
new file mode 100644
index 0000000..1823f1c
--- /dev/null
+++ b/src/app/views/logs/index.html.haml
@@ -0,0 +1,31 @@
+= render :partial => 'layouts/admin_nav'
+
+%section.admin-content-section
+  %header
+    %h2#users.users= @title
+
+  .content#tab
+    - content_for :filter_controls do
+      %li
+        = label_tag "source_type", t('filter_table.viewing')
+        = hidden_field_tag :current_path, request.fullpath
+        = select_tag "source_type", options_for_select(@source_type_options, @source_type)
+        = select_tag "pool_select", options_for_select(@pool_options, @pool_select)
+        = select_tag "provider_select", options_for_select(@provider_options, @provider_select)
+        = select_tag "owner_id", options_for_select(@owner_options, @owner_id)
+        = restful_submit_tag t("filter_table.apply_filters"), "index", filter_logs_path, 'POST', :class => 'button', :id => 'apply_logs_filter'
+        %span.label.badge.dark= @events.count
+
+    = filter_table(@header, @events) do |event|
+      - source = event.source
+      - provider_account = source.provider_account
+      %tr{:class => cycle('nostripe','stripe')}
+        %td= event.event_time.strftime("%d-%b-%Y %H:%M:%S")
+        %td= link_to source.name, source
+        %td= source.pool_family.name + "/" + source.pool.name
+        - if provider_account.nil?
+          %td= t('logs.index.not_available')
+        - else
+          %td= provider_account.provider.name + "/" + provider_account.name
+        %td= source.owner.login
+        %td= event.summary
-- 
1.7.6.5




More information about the aeolus-devel mailing list