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-`y9*6@puFj$g&I}WLcJ(rfIR|e!n+OGmfKS7%Q4M9LJfadA(k5w;Ms! zbsf<q2m)DT+xFpb_$D1e)c1W51ZkSmiXLpY+bD|WugSgCo6Y8JA3~@oirsE!S=QTz z*Y)eVKL2WxB=LR!`LM3*^?Lo=`un~Q!!XOTg)@4_aU9R{Xhm@xV~iC=ArBiN^jro( zFf*NhOtWa3rfHh%x_O>|>Zz*gbUKl*=6N2*_|w+EO|;+dClZfDRNu&hvMg0qT~S(w zVYpl_q9}61Ff6vTZF@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)07{@dyI{*Ly2}wjjR5;6} zl)(ywAP|P#iUh$!6ba#>lhFG=OcZp8Bs$b#CDO2BZxQX5;m&QG@gL`#!Iuz1Db=>^ zvMj*XJgqh7JV_Elh_#9{j$;r6|40A;oNe2D-@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; +}