From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/pools/_header.haml | 13 +++++++++++++
src/app/views/pools/_scoreboard.haml | 30 ++++++++++++++++++++++++++++++
src/app/views/pools/_statistics.haml | 21 ---------------------
src/app/views/pools/show.haml | 3 ++-
4 files changed, 45 insertions(+), 22 deletions(-)
create mode 100644 src/app/views/pools/_header.haml
create mode 100644 src/app/views/pools/_scoreboard.haml
delete mode 100644 src/app/views/pools/_statistics.haml
diff --git a/src/app/views/pools/_header.haml b/src/app/views/pools/_header.haml
new file mode 100644
index 0000000..2ea3cac
--- /dev/null
+++ b/src/app/views/pools/_header.haml
@@ -0,0 +1,13 @@
+%header.page-header
+ %h1.pools
+ = @pool.name
+ Pool
+ -# Insert appropriate controls here, or ommit %ul.controls
+ #obj_actions.button-container
+ = link_to 'New Deployment', launch_new_deployments_path, :class =>
'button primary', :id => 'new_deployment_button'
+ .button-group
+ = link_to 'Edit', edit_pool_path(@pool), :class => 'button
pill', :id => 'edit_pool_button'
+ - form_tag do
+ = hidden_field(@pool, :id)
+ = restful_submit_tag('Delete', 'destroy', pool_url(@pool),
'DELETE', :class => "button pill danger")
+ .corner
diff --git a/src/app/views/pools/_scoreboard.haml b/src/app/views/pools/_scoreboard.haml
new file mode 100644
index 0000000..dd49389
--- /dev/null
+++ b/src/app/views/pools/_scoreboard.haml
@@ -0,0 +1,30 @@
+#scoreboard
+ %dl.statistics
+ %ul.groups
+ %li
+ %dt Cloud Providers
+ %dd.count.provider= @statistics[:cloud_providers]
+ %li
+ %dt Deployments
+ %dd.count.deployment= @statistics[:deployments]
+ %li
+ %dt Instances
+ %dd.count.instance= @statistics[:instances_deployed]
+ %dd.count.instance.pending= @statistics[:instances_pending]
+ %dd.count.instance.failure= @statistics[:instances_failed]
+ %li
+ %ul.subgroup
+ %li
+ %dt Alerts
+ %dd.count.alert 0
+ %li
+ %dt Updates
+ %dd.count.update 0
+ %li
+ %dt Quota Used
+ %dd.percentage.quota 0%
+ %dd.fraction.instance
+ %span.part 0
+ %span.divider.label.small.caps of
+ %span.total 0
+-# TODO: Implement alerts, updates, and quota overview
diff --git a/src/app/views/pools/_statistics.haml b/src/app/views/pools/_statistics.haml
deleted file mode 100644
index 1d37026..0000000
--- a/src/app/views/pools/_statistics.haml
+++ /dev/null
@@ -1,21 +0,0 @@
-%h1
- = @pool.name
- Pool
-
-= link_to 'New Deployment', launch_new_deployments_path, :class =>
'button', :id => 'new_deployment_button'
-= link_to 'Edit', edit_pool_path(@pool), :class => 'button', :id =>
'edit_pool_button'
-- form_tag do
- = hidden_field(@pool, :id)
- = restful_submit_tag('Delete', 'destroy', pool_url(@pool),
'DELETE')
-
-%div.statistics
- Cloud Providers
- = @statistics[:cloud_providers]
-%div.statistics
- Deployments
- = @statistics[:deployments]
-%div.instances
- = @statistics[:instances_deployed]
- = @statistics[:instances_pending]
- = @statistics[:instances_failed]
--# TODO: Implement alerts, updates, and quota overview
diff --git a/src/app/views/pools/show.haml b/src/app/views/pools/show.haml
index c411511..e32277f 100644
--- a/src/app/views/pools/show.haml
+++ b/src/app/views/pools/show.haml
@@ -1,4 +1,5 @@
-= render :partial => 'statistics'
+= render :partial => 'header'
+= render :partial => 'scoreboard'
-# TODO - Alerts aren't implemented just yet
-#= render :partial => 'alerts'
--
1.7.4.2