---
 src/app/controllers/dashboard_controller.rb |    3 +
 src/app/views/dashboard/summary.haml        |   93 ++++++++++++++++++---------
 src/public/stylesheets/components.css       |   76 +++++++++++++++++++++-
 3 files changed, 139 insertions(+), 33 deletions(-)

diff --git a/src/app/controllers/dashboard_controller.rb 
b/src/app/controllers/dashboard_controller.rb
index 5061284..820a7e0 100644
--- a/src/app/controllers/dashboard_controller.rb
+++ b/src/app/controllers/dashboard_controller.rb
@@ -32,7 +32,10 @@ class DashboardController < ApplicationController
   end
 
   def index
+    # FIXME filter to just those that the user has access to
     @providers = Provider.find(:all)
+    @cloud_accounts = CloudAccount.find(:all)
+    @pools = Pool.find(:all)
 
     # FIXME remove general role based permission check, replace w/
     # more granular / per-permission-object permission checks on the
diff --git a/src/app/views/dashboard/summary.haml 
b/src/app/views/dashboard/summary.haml
index f3d6ab6..f879045 100644
--- a/src/app/views/dashboard/summary.haml
+++ b/src/app/views/dashboard/summary.haml
@@ -26,41 +26,72 @@
       %input{ :id => "hide_getting_started", :type => "checkbox" }
         Thanks, don't show this again
 
-#actions_dashboard_section
-  %h2
-    Actions
-  - if @is_admin
-    %a{:href => url_for(:controller => "cloud_accounts", :action => "new")}
-      Add a Provider Account
-    %a{:href => url_for(:controller => "provider", :action => "new")}
-      Add a Provider
-    %a{:href => url_for(:controller => "", :action => "")}
-      Create a Template
-    %a{:href => url_for(:controller => "users", :action => "new")}
-      Create a User
-  - else
-    %a{:href => url_for(:controller => "", :action => "")}
-      Launch Instances
-    %a{:href => url_for(:controller => "", :action => "")}
-      Enter a help ticket
+.dashboard_column
+  #actions_dashboard_section
+    %h2
+      Actions
+    - if @is_admin
+      %a{:href => url_for(:controller => "cloud_accounts", :action => "new")}
+        Add a Provider Account
+      %a{:href => url_for(:controller => "provider", :action => "new")}
+        Add a Provider
+      %a{:href => url_for(:controller => "", :action => "")}
+        Create a Template
+      %a{:href => url_for(:controller => "users", :action => "new")}
+        Create a User
+    - else
+      %a{:href => url_for(:controller => "", :action => "")}
+        Launch Instances
+      %a{:href => url_for(:controller => "", :action => "")}
+        Enter a help ticket
+
+  #service_quality_dashboard_section
+    - if @is_admin
+      %h2
+        Provider Service Quality
+      .dashboard_section_summary
+        <img src="images/dashboard_summary_next.png" /><img 
src="images/dashboard_summary_prev.png" />
+        %p
+          Average time to submit tasks to provider, 24 hours
+        <div style="clear: both;" />
+      - @providers.each do |provider|
+        .provider_service_quality_graph
+          <!-- FIXME include graph -->
+        .provider_service_quality_graph_summary
+          = provider.name
+          <!-- FIXME 'good/poor/average service... -->
+      <div style="clear: both;" />
+    - else
+      %h2
+        Service Quality
 
-#service_quality_dashboard_section
-  - if @is_admin
+.dashboard_column
+  #quota_usage_dashboard_section
     %h2
-      Provider Service Quality
+      Quota Usage
     .dashboard_section_summary
-      Average time to submit tasks to provider, 24 hours
-      <img src="images/dashboard_summary_prev.png" /><img 
src="images/dashboard_summary_next.png" />
-    - @providers.each do |provider|
-      .provider_service_quality_graph
+      Instance utilization by account
+    - @cloud_accounts.each do |account|
+      .account_quota_usage_graph_summary
+        = "Account " + account.username
+      .account_quota_usage_history_graph
         <!-- FIXME include graph -->
-      .provider_service_quality_graph_summary
-        = provider.name
-        <!-- FIXME 'good/poor/average service... -->
-    <div style="clear: both;" />
-  - else
-    %h2
-      Service Quality
+      .account_quota_usage_current_graph
+        <!-- FIXME include graph -->
+      <div style="clear: both;" />
+    .dashboard_section_summary
+      <img src="images/dashboard_summary_next.png" /><img 
src="images/dashboard_summary_prev.png" />
+      %p
+        Quota usage by pool
+      <div style="clear: both;" />
+    - @pools.each do |pool|
+      .pool_quota_usage_summary
+        = pool.name
+      .pool_quota_usage_limit
+        <!-- FIXME 'quota limit met'... -->
+      .pool_quota_usage_instances
+        <!-- FIXME 'running instances'... -->
+      <div style="clear: both;" />
 
 :javascript
   $("#hide_getting_started").click(function(){
diff --git a/src/public/stylesheets/components.css 
b/src/public/stylesheets/components.css
index b61fbc9..ff4c428 100644
--- a/src/public/stylesheets/components.css
+++ b/src/public/stylesheets/components.css
@@ -72,20 +72,32 @@ ul.nav li.selected {
 }
 
 /* dashboard style */
+.dashboard_column{
+  float: left;
+  width: 47%;
+}
+
 .dashboard_section_summary {
   background: #F2F2F2;
   font-size: 0.8em;
   font-weight: bolder;
-  margin: 0 15px 10px 0;
+  margin: 10px 15px 10px 0;
   padding: 5px 0px 5px 5px;
 }
 
+.dashboard_section_summary p {
+  display: inline;
+  float: left;
+  margin: 3px 0 3px 0;
+}
+
 .dashboard_section_summary img:first-child {
-  padding-left: 40px;
+  padding-right: 5px;
 }
 
 .dashboard_section_summary img {
   vertical-align: middle;
+  float: right;
 }
 
 #getting_started_dashboard_section {
@@ -175,3 +187,63 @@ ul.nav li.selected {
   height: 15px;
   padding: 20px 0 24px 0;
 }
+
+#quota_usage_dashboard_section {
+  width: 390px;
+  border: 1px solid black;
+  padding: 5px 0 5px 15px;
+  margin: 10px 0px 10px 5px;
+  -moz-border-radius: 5px;
+  -webkit-border-radius: 5px;
+}
+
+.account_quota_usage_graph_summary {
+  font-size: 0.8em;
+  padding-left: 15px;
+  display: inline;
+  float: left;
+}
+
+.account_quota_usage_history_graph {
+  display: inline;
+  float: left;
+  margin-left: 10px;
+  border: 1px solid black;
+  width:  120px;
+  height: 20px;
+}
+
+.account_quota_usage_current_graph {
+  display: inline;
+  float: left;
+  margin-left: 10px;
+  border: 1px solid black;
+  width:  140px;
+  height: 20px;
+}
+
+.pool_quota_usage_summary {
+  display: inline;
+  float: left;
+  padding-left: 15px;
+  width: 15%;
+}
+
+.pool_quota_usage_limit {
+  display: inline;
+  float: left;
+  width: 33%;
+  height: 25px;
+  border: 1px solid black;
+  margin-left: 17px;
+}
+
+.pool_quota_usage_instances {
+  display: inline;
+  float: left;
+  width: 33%;
+  height: 25px;
+  border: 1px solid black;
+  margin-left: 17px;
+  margin-bottom: 15px;
+}
-- 
1.6.2.5

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to