most of the styling is done, all that remains is:
    - including the actual graphs
    - including the 'poor/good service' widget
    - wiring up the arrow buttons to whatever their corresponding
      actions are (clarification needed)
---
 src/app/controllers/dashboard_controller.rb  |    4 ++
 src/app/views/dashboard/summary.haml         |   20 ++++++++++++-
 src/public/images/dashboard_summary_next.png |  Bin 0 -> 412 bytes
 src/public/images/dashboard_summary_prev.png |  Bin 0 -> 375 bytes
 src/public/stylesheets/components.css        |   41 +++++++++++++++++++++++++-
 5 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 src/public/images/dashboard_summary_next.png
 create mode 100644 src/public/images/dashboard_summary_prev.png

diff --git a/src/app/controllers/dashboard_controller.rb 
b/src/app/controllers/dashboard_controller.rb
index ef89d95..3a9a6ed 100644
--- a/src/app/controllers/dashboard_controller.rb
+++ b/src/app/controllers/dashboard_controller.rb
@@ -32,6 +32,10 @@ class DashboardController < ApplicationController
   end
 
   def index
+    @providers = Provider.find(:all)
+
+    @is_admin = @current_user.permissions.collect { |p| p.role }.
+                              find { |r| r.name == "Administrator" }
     @hide_getting_started = 
cookies["#...@current_user.login}_hide_getting_started"]
     @current_users_pool = Pool.find(:first, :conditions => ['name = ?', 
@current_user.login])
     render :action => :summary
diff --git a/src/app/views/dashboard/summary.haml 
b/src/app/views/dashboard/summary.haml
index 4eeb58b..f3d6ab6 100644
--- a/src/app/views/dashboard/summary.haml
+++ b/src/app/views/dashboard/summary.haml
@@ -29,7 +29,7 @@
 #actions_dashboard_section
   %h2
     Actions
-  - if @current_user.permissions.collect { |p| p.role }.find { |r| r.name == 
"Administrator" }
+  - if @is_admin
     %a{:href => url_for(:controller => "cloud_accounts", :action => "new")}
       Add a Provider Account
     %a{:href => url_for(:controller => "provider", :action => "new")}
@@ -44,6 +44,24 @@
     %a{:href => url_for(:controller => "", :action => "")}
       Enter a help ticket
 
+#service_quality_dashboard_section
+  - if @is_admin
+    %h2
+      Provider Service Quality
+    .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
+        <!-- FIXME include graph -->
+      .provider_service_quality_graph_summary
+        = provider.name
+        <!-- FIXME 'good/poor/average service... -->
+    <div style="clear: both;" />
+  - else
+    %h2
+      Service Quality
+
 :javascript
   $("#hide_getting_started").click(function(){
     $('#getting_started_dashboard_section').hide();
diff --git a/src/public/images/dashboard_summary_next.png 
b/src/public/images/dashboard_summary_next.png
new file mode 100644
index 
0000000000000000000000000000000000000000..ae8b24a3fb0754caeabee6fc3ee2d0ee09d99570
GIT binary patch
literal 412
zcmV;N0b~A&P)<h;3K|Lk000e1NJLTq000;O000yS0ssI27}sjl00001b5ch_0Itp)
z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV1sM)0F!F(b!2kdOE=fc|R5;6}
zl)J5iFcgMOpx_}vB;*D}MacrtBf$V+0v13_kPS%B1i_voRZ2im(5H#Sqsjwui!`}W
zf)o68$2$7-`y...@pufj$g&I}WLcJ(rfIR|e!n+OGmfKS7%Q4M9LJfadA(k5w;Ms!
zbsf<q2m)DT+xFpb_$D1e)c1W51ZkSmiXLpY+bD|wugsgco6y8j...@oirse!s=qtz
z*Y)eVKL2WxB=LR!`LM3*^?Lo=`un~Q!!XOTg)@4_au9r{...@xv~ic=arbin^jro(
zFf*NhOtWa3rfHh%x_O>|>Zz*gbUKl*=6N2*_|w+EO|;+dClZfDRNu&hvMg0qT~S(w
zvypl_q9}61ff6v...@esa%p+`rymtvb2g42n#c1p0pqjmo6kwb(fBq10000<MNUMn
GLSTZh>#cwQ

literal 0
HcmV?d00001

diff --git a/src/public/images/dashboard_summary_prev.png 
b/src/public/images/dashboard_summary_prev.png
new file mode 100644
index 
0000000000000000000000000000000000000000..34ab07092795ddba41e3935920f7779f7dc50965
GIT binary patch
literal 375
zcmV--0f_#IP)<h;3K|Lk000e1NJLTq000*N000yS0ssI2>D)0{00001b5ch_0Itp)
z=>Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RV1sM)0...@dyi{*ly2}wjjr5;6}
zl)(ywAP|P#iUh$!6ba#>lhFG=OcZp8Bs$b#CDO2BZxQX5;m&q...@gl`#!iuz1db=>^
zvMj*XJgqh7JV_Elh_#9{j$;r6|40A;one...@i{xhtqjg7eyhzg;q0zP197C<+`qB
zx>td|@9VmLI-{RmaL$Ke*iV|Kab0(J!!V4Z=uTyx=c=ksAWkmE`0g$9Jm-1-1jOBp
zAcS!o+w9B9Pm+W&cBEiQ7h{}d*^v&V6d|-Hd~fORNka%3WBa5KLf=Fm?XKr}X_`_>
zEjv0IAp~P=#N-+49En_Z1R)%T;h!%G0Pqq*bX}*EisSf6*-I4w!2A7{QfjU3R6at9
VdNubHEt&uT002ovPDHLkV1hsVmc0M~

literal 0
HcmV?d00001

diff --git a/src/public/stylesheets/components.css 
b/src/public/stylesheets/components.css
index 5b25cd4..b61fbc9 100644
--- a/src/public/stylesheets/components.css
+++ b/src/public/stylesheets/components.css
@@ -72,6 +72,22 @@ ul.nav li.selected {
 }
 
 /* dashboard style */
+.dashboard_section_summary {
+  background: #F2F2F2;
+  font-size: 0.8em;
+  font-weight: bolder;
+  margin: 0 15px 10px 0;
+  padding: 5px 0px 5px 5px;
+}
+
+.dashboard_section_summary img:first-child {
+  padding-left: 40px;
+}
+
+.dashboard_section_summary img {
+  vertical-align: middle;
+}
+
 #getting_started_dashboard_section {
   background: #F2F2F2;
   width: 850px;
@@ -118,7 +134,6 @@ ul.nav li.selected {
   width: 390px;
   height: 100px;
   border: 1px solid black;
-  background: #F2F2F2;
   padding: 5px 0 5px 15px;
   margin: 10px 0px 10px 5px;
   -moz-border-radius: 5px;
@@ -136,3 +151,27 @@ ul.nav li.selected {
   color: blue;
   text-decoration: underline;
 }
+
+#service_quality_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;
+}
+
+.provider_service_quality_graph {
+  width: 100px;
+  height: 50px;
+  border: 1px solid black;
+  float: left;
+  margin: 0px 5px 0px 5px;
+}
+
+.provider_service_quality_graph_summary {
+  float: left;
+  width: 60px;
+  height: 15px;
+  padding: 20px 0 24px 0;
+}
-- 
1.6.2.5

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

Reply via email to