---
src/app/controllers/application_controller.rb | 2 +-
src/app/controllers/catalog_entries_controller.rb | 2 +-
src/app/controllers/catalogs_controller.rb | 2 +-
src/app/controllers/deployments_controller.rb | 6 ++--
src/app/controllers/pools_controller.rb | 20 +++++-----
src/app/controllers/users_controller.rb | 6 ++--
src/app/helpers/hardware_profiles_helper.rb | 8 ++--
src/app/helpers/instances_helper.rb | 11 ++++++
src/app/helpers/realms_helper.rb | 2 +-
src/app/views/catalog_entries/_list.html.haml | 2 +-
src/app/views/catalogs/_list.html.haml | 2 +-
src/app/views/catalogs/show.html.haml | 2 +-
src/app/views/deployments/_list.html.haml | 35 +++++++-----------
src/app/views/hardware_profiles/_list.html.haml | 6 ++--
src/app/views/instances/_list.html.haml | 10 +++---
src/app/views/permissions/_permissions.html.haml | 2 +-
src/app/views/pools/_list.html.haml | 40 ++++++++------------
src/app/views/realms/_list.html.haml | 2 +-
src/app/views/users/_list.html.haml | 6 ++--
19 files changed, 80 insertions(+), 86 deletions(-)
diff --git a/src/app/controllers/application_controller.rb
b/src/app/controllers/application_controller.rb
index 3dbbb05..184f10b 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -252,7 +252,7 @@ class ApplicationController < ActionController::Base
def set_permissions_header
@permission_list_header = [
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
{ :name => t("user"), :sort_attr => :last_name },
{ :name => t("role"), :sort_attr => :role},
{ :name => t("privileges")},
diff --git a/src/app/controllers/catalog_entries_controller.rb
b/src/app/controllers/catalog_entries_controller.rb
index f68b9d5..e3a434d 100644
--- a/src/app/controllers/catalog_entries_controller.rb
+++ b/src/app/controllers/catalog_entries_controller.rb
@@ -120,7 +120,7 @@ class CatalogEntriesController < ApplicationController
def set_header
@header = [
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
{ :name => t("catalog_entries.index.name"), :sort_attr => :name },
{ :name => t("catalogs.index.catalog_name"), :sortable => false },
{ :name => t("catalog_entries.index.url"), :sortable => :url }
diff --git a/src/app/controllers/catalogs_controller.rb
b/src/app/controllers/catalogs_controller.rb
index 80fda58..acb9721 100644
--- a/src/app/controllers/catalogs_controller.rb
+++ b/src/app/controllers/catalogs_controller.rb
@@ -103,7 +103,7 @@ class CatalogsController < ApplicationController
def set_header
@header = [
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
{ :name => t("catalogs.index.name"), :sort_attr => :name },
{ :name => t('pools.index.pool_name'), :sortable => false }
]
diff --git a/src/app/controllers/deployments_controller.rb
b/src/app/controllers/deployments_controller.rb
index 4b10b6f..88c04ea 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -289,12 +289,12 @@ class DeploymentsController < ApplicationController
:order => (sort_column(Deployment) +' '+ sort_direction)
)
@deployments_header = [
- { :name => '', :sortable => false },
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
+ { :name => '', :class => 'alert', :sortable => false },
{ :name => t("deployments.deployment_name"), :sortable => false },
{ :name => t("pools.index.deployed_on"), :sortable => false },
{ :name => t("deployables.index.base_deployable"), :sortable =>
false },
- { :name => t("instances.instances"), :sortable => false },
+ { :name => t("instances.instances"), :class => 'center',
:sortable => false },
{ :name => t("pools.index.pool"), :sortable => false },
{ :name => t("pools.index.owner"), :sortable => false },
{ :name => t("providers.provider"), :sortable => false }
diff --git a/src/app/controllers/pools_controller.rb
b/src/app/controllers/pools_controller.rb
index 6636bbf..c23ed80 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -255,25 +255,25 @@ class PoolsController < ApplicationController
def set_params_and_header
@header = [
- { :name => '', :sortable => false },
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
+ { :name => '', :class => 'alert', :sortable => false },
{ :name => t("pools.index.pool_name"), :sort_attr => :name },
- { :name => t("deployments.deployments"), :sortable => false },
- { :name => t("instances.instances"), :sortable => false },
- { :name => t("pools.index.pending"), :sortable => false },
- { :name => t("pools.index.failed"), :sortable => false },
- { :name => t("pools.index.quota_used"), :sortable => false },
+ { :name => t("deployments.deployments"), :class =>
'center', :sortable => false },
+ { :name => t("instances.instances"), :class => 'center',
:sortable => false },
+ { :name => t("pools.index.pending"), :class => 'center',
:sortable => false },
+ { :name => t("pools.index.failed"), :class => 'center',
:sortable => false },
+ { :name => t("pools.index.quota_used"), :class => 'center',
:sortable => false },
{ :name => t("pools.index.pool_family"), :sortable => false },
]
@deployments_header = [
- { :name => '', :sortable => false },
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
+ { :name => '', :class => 'alert', :sortable => false },
{ :name => t("deployments.deployment_name"), :sortable => false },
{ :name => t("pools.index.deployed_on"), :sortable => false },
{ :name => t("deployables.index.base_deployable"), :sortable =>
false },
{ :name => t("deployables.index.state"), :sortable => false },
- { :name => t("instances.instances"), :sortable => false },
+ { :name => t("instances.instances"), :class => 'center',
:sortable => false },
{ :name => t("pools.index.pool"), :sortable => false },
{ :name => t("pools.index.owner"), :sortable => false },
{ :name => t("providers.provider"), :sortable => false }
diff --git a/src/app/controllers/users_controller.rb
b/src/app/controllers/users_controller.rb
index 4c64715..965fba5 100644
--- a/src/app/controllers/users_controller.rb
+++ b/src/app/controllers/users_controller.rb
@@ -149,12 +149,12 @@ class UsersController < ApplicationController
def load_headers
@header = [
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
{ :name => t('users.index.user_id'), :sortable => false },
{ :name => t('users.index.last_name'), :sortable => false },
{ :name => t('users.index.first_name'), :sortable => false },
- { :name => t('users.index.quota_used'), :sortable => false },
- { :name => t('users.index.quota_instances'), :sortable => false },
+ { :name => t('users.index.quota_used'), :class => 'center',
:sortable => false },
+ { :name => t('users.index.quota_instances'), :class =>
'center', :sortable => false },
{ :name => t('users.index.email'), :sortable => false },
]
end
diff --git a/src/app/helpers/hardware_profiles_helper.rb
b/src/app/helpers/hardware_profiles_helper.rb
index 5ac51a1..64f0dd0 100644
--- a/src/app/helpers/hardware_profiles_helper.rb
+++ b/src/app/helpers/hardware_profiles_helper.rb
@@ -1,12 +1,12 @@
module HardwareProfilesHelper
def hardware_profiles_header
[
- { :name => '', :sortable => false },
+ { :name => '', :class => 'checkbox', :sortable => false
},
{ :name => t("hardware_profiles.index.hardware_profile_name"),
:sort_attr => :name },
{ :name => t("hardware_profiles.index.architecture"), :sort_attr =>
:architecture },
- { :name => t("hardware_profiles.index.memory"), :sort_attr =>
:memory},
- { :name => t("hardware_profiles.index.storage"), :sort_attr =>
:storage },
- { :name => t("hardware_profiles.index.virtual_cpu"), :sort_attr =>
:cpu}
+ { :name => t("hardware_profiles.index.memory"), :class =>
'center', :sort_attr => :memory},
+ { :name => t("hardware_profiles.index.storage"), :class =>
'center', :sort_attr => :storage },
+ { :name => t("hardware_profiles.index.virtual_cpu"), :class =>
'center', :sort_attr => :cpu}
]
end
end
diff --git a/src/app/helpers/instances_helper.rb b/src/app/helpers/instances_helper.rb
index 5b12584..600f9cf 100644
--- a/src/app/helpers/instances_helper.rb
+++ b/src/app/helpers/instances_helper.rb
@@ -20,4 +20,15 @@
# Likewise, all the methods added will be available for all controllers.
module InstancesHelper
+ def instances_header
+ [
+ {:name =>'', :class => 'checkbox', :sortable => false },
+ {:name => '', :class => 'alert', :sortable => false },
+ {:name => 'Name', :sortable => false },
+ {:name => 'Public Address', :sortable => false },
+ {:name => 'State', :sortable => false },
+ {:name => 'Provider', :sortable => false },
+ {:name => 'Owner', :sortable => false }
+ ]
+ end
end
diff --git a/src/app/helpers/realms_helper.rb b/src/app/helpers/realms_helper.rb
index 4e9e846..121a9c5 100644
--- a/src/app/helpers/realms_helper.rb
+++ b/src/app/helpers/realms_helper.rb
@@ -1,7 +1,7 @@
module RealmsHelper
def realms_header
[
- {:name => '', :sortable => false},
+ {:name => '', :class => 'checkbox', :sortable => false},
{:name => t("realms.index.realm_name"), :sort_attr => :name}
]
end
diff --git a/src/app/views/catalog_entries/_list.html.haml
b/src/app/views/catalog_entries/_list.html.haml
index 811014b..0ff0a8d 100644
--- a/src/app/views/catalog_entries/_list.html.haml
+++ b/src/app/views/catalog_entries/_list.html.haml
@@ -9,7 +9,7 @@
= filter_table(@header, @catalog_entries) do |catalog_entry|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "catalog_entries_selected[]", catalog_entry.id,
selected, :id => "catalog_entry_checkbox_#{catalog_entry.id}"
%td
diff --git a/src/app/views/catalogs/_list.html.haml
b/src/app/views/catalogs/_list.html.haml
index 9b0555d..1b9dcbb 100644
--- a/src/app/views/catalogs/_list.html.haml
+++ b/src/app/views/catalogs/_list.html.haml
@@ -10,7 +10,7 @@
= filter_table(@header, @catalogs) do |catalog|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "catalogs_selected[]", catalog.id, selected, :id
=> "catalog_checkbox_#{catalog.id}"
%td
diff --git a/src/app/views/catalogs/show.html.haml
b/src/app/views/catalogs/show.html.haml
index c754187..28dd0cf 100644
--- a/src/app/views/catalogs/show.html.haml
+++ b/src/app/views/catalogs/show.html.haml
@@ -25,7 +25,7 @@
= filter_table(@header, @catalog.catalog_entries) do |catalog_entry|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "catalog_entries_selected[]", catalog_entry.id,
selected, :id => "catalog_entry_checkbox_#{catalog_entry.id}"
%td
diff --git a/src/app/views/deployments/_list.html.haml
b/src/app/views/deployments/_list.html.haml
index 8a0504c..c63ba1b 100644
--- a/src/app/views/deployments/_list.html.haml
+++ b/src/app/views/deployments/_list.html.haml
@@ -8,27 +8,18 @@
= filter_table(@deployments_header, @deployments) do |deployment|
%tr{ :class => cycle('nostripe', 'stripe') }
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "deployments_selected[]", deployment.id, selected, :id
=> "deployment_checkbox_#{deployment.id}"
- %td
- -#there will be icons (belongs to mockups)
- %td
- = link_to(deployment.name, deployment)
- %td
- = deployment.created_at
- %td
- = deployment.deployable_xml.name
- %td
- = deployment.deployment_state
- %td
- = deployment.instances.count
- %td
- = link_to deployment.pool.name, pool_path(deployment.pool)
- %td
- = owner_name(deployment)
- %td
- = link_to(deployment.provider.provider_type.name, deployment.provider) if
deployment.provider
+ %td{:class => 'alert'}= #there will be icons (belongs to mockups)
+ %td= link_to(deployment.name, deployment)
+ %td= deployment.created_at
+ %td= deployment.deployable_xml.name
+ %td= deployment.deployment_state
+ %td{:class => 'center'}= deployment.instances.count
+ %td= link_to deployment.pool.name, pool_path(deployment.pool)
+ %td= owner_name(deployment)
+ %td= link_to(deployment.provider.provider_type.name, deployment.provider) if
deployment.provider
:javascript
Conductor.setupPrettyFilterURL(
'#{url_for(:action => :show, :details_tab => 'deployments', :view
=> 'filter' )}',
@@ -38,14 +29,14 @@
%script#deploymentTemplate{ :type => 'text/x-jquery-tmpl' }
:plain
<tr>
- <td><input type="checkbox"
id="deployment_checkbox_${id}"
+ <td class="checkbox"><input type="checkbox"
id="deployment_checkbox_${id}"
name="deployments_selected[]"
value="${id}"></td>
- <td />
+ <td class="alert"/>
<td><a
href="#{deployment_path('replace_id').sub('replace_id',
'${id}')}">${name}</a></td>
<td>${created_at}</td>
<td>${deployable_xml_name}</td>
<td>${deployment_state}</td>
- <td>${instances_count}</td>
+ <td class="center">${instances_count}</td>
<td><a
href="#{pool_path('replace_id').sub('replace_id',
'${pool.id}')}">${pool.name}</a></td>
<td>${owner}</td>
{{if provider}}
diff --git a/src/app/views/hardware_profiles/_list.html.haml
b/src/app/views/hardware_profiles/_list.html.haml
index 013cb8b..a9c29e0 100644
--- a/src/app/views/hardware_profiles/_list.html.haml
+++ b/src/app/views/hardware_profiles/_list.html.haml
@@ -10,6 +10,6 @@
= check_box_tag "hardware_profile_selected[]", hwp.id, selected, :id
=> "hardware_profile_checkbox_#{hwp.id}"
%td= link_to hwp.name, hardware_profile_path(hwp)
%td= hwp.architecture.to_s
- %td= hwp.memory.to_s
- %td= hwp.storage.to_s
- %td= hwp.cpu.to_s
+ %td{:class => 'center'}= hwp.memory.to_s
+ %td{:class => 'center'}= hwp.storage.to_s
+ %td{:class => 'center'}= hwp.cpu.to_s
diff --git a/src/app/views/instances/_list.html.haml
b/src/app/views/instances/_list.html.haml
index 70de8e6..cd6b060 100644
--- a/src/app/views/instances/_list.html.haml
+++ b/src/app/views/instances/_list.html.haml
@@ -11,12 +11,12 @@
Showing all instances:
= link_to "hide stopped", params.merge('hide_stopped' =>
'true')
-= filter_table([{:name =>''}, {:name => ''}, {:name =>
'Name'}, {:name => 'Public Address'}, {:name => 'State'},
{:name => 'Provider'}, {:name => 'Owner'}], @instances) do
|instance|
+= filter_table(instances_header, @instances) do |instance|
%tr{ :class => cycle('nostripe', 'stripe') }
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "instance_selected[]", instance.id, selected, :id =>
"instance_checkbox_#{instance.id}"
- %td
+ %td{:class => 'alert'}
%td= link_to instance.name, instance_path(instance)
%td= instance.public_addresses
%td= instance.state
@@ -31,9 +31,9 @@
%script#instanceTemplate{ :type => 'text/x-jquery-tmpl' }
:plain
<tr>
- <td><input type="checkbox"
id="instance_checkbox_${id}"
+ <td class="checkbox"><input type="checkbox"
id="instance_checkbox_${id}"
name="instance_selected[]"
value="${id}"></td>
- <td />
+ <td class="alert" />
<td><a
href="#{instance_path('replace_id').sub('replace_id',
'${id}')}">${name}</a></td>
<td>${public_addresses}</td>
<td>${state}</td>
diff --git a/src/app/views/permissions/_permissions.html.haml
b/src/app/views/permissions/_permissions.html.haml
index 5e9b445..b59178a 100644
--- a/src/app/views/permissions/_permissions.html.haml
+++ b/src/app/views/permissions/_permissions.html.haml
@@ -10,7 +10,7 @@
= filter_table(@permission_list_header, @permission_object.permissions) do |permission|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
- if check_privilege(Privilege::PERM_SET)
- selected = params[:select] == 'all'
= check_box_tag "permission_selected[]", permission.id, selected, :id
=> "permission_checkbox_#{permission.id}"
diff --git a/src/app/views/pools/_list.html.haml b/src/app/views/pools/_list.html.haml
index d7bf205..2f55c88 100644
--- a/src/app/views/pools/_list.html.haml
+++ b/src/app/views/pools/_list.html.haml
@@ -6,36 +6,28 @@
= select_tag("more_actions",nil, :disabled => true)
= filter_table(@header, @pools) do |pool|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
%input{:name => "pools_selected[]", :type => "checkbox",
:value => pool.id, :id => "pool_checkbox_#{pool.id}" }
- %td
- -#there will be icons (belongs to mockups)
- %td
- = link_to(pool.name, pool)
- %td
- = pool.deployments.count
- %td
- = pool.statistics[:total_instances]
- %td
- = pool.statistics[:instances_pending]
- %td
- = pool.statistics[:instances_failed]
- %td
- = pool.statistics[:quota_percent]
- %td
- = link_to(pool.pool_family.name, pool.pool_family)
+ %td{:class => 'alert'}= #there will be icons (belongs to mockups)
+ %td= link_to(pool.name, pool)
+ %td{:class => 'center'}= pool.deployments.count
+ %td{:class => 'center'}= pool.statistics[:total_instances]
+ %td{:class => 'center'}= pool.statistics[:instances_pending]
+ %td{:class => 'center'}= pool.statistics[:instances_failed]
+ %td{:class => 'center'}= pool.statistics[:quota_percent]
+ %td= link_to(pool.pool_family.name, pool.pool_family)
%script#poolTemplate{ :type => 'text/x-jquery-tmpl' }
:plain
<tr>
- <td><input type="checkbox" id="pool_checkbox_${id}"
+ <td class="checkbox"><input type="checkbox"
id="pool_checkbox_${id}"
name="pools_selected[]"
value="${id}"></td>
- <td />
+ <td class="alert" />
<td><a
href="#{pool_path('replace_id').sub('replace_id',
'${id}')}">${name}</a></td>
- <td>${deployments_count}</td>
- <td>${statistics.total_instances}</td>
- <td>${statistics.instances_pending}</td>
- <td>${statistics.instances_failed}</td>
- <td>${statistics.quota_percent}</td>
+ <td class="center">${deployments_count}</td>
+ <td class="center">${statistics.total_instances}</td>
+ <td class="center">${statistics.instances_pending}</td>
+ <td class="center">${statistics.instances_failed}</td>
+ <td class="center">${statistics.quota_percent}</td>
<td><a
href="#{pool_family_path('replace_id').sub('replace_id',
'${pool_family.id}')}">${pool_family.name}</a></td>
</tr>
diff --git a/src/app/views/realms/_list.html.haml b/src/app/views/realms/_list.html.haml
index d0b2c17..e2bd42c 100644
--- a/src/app/views/realms/_list.html.haml
+++ b/src/app/views/realms/_list.html.haml
@@ -5,7 +5,7 @@
= filter_table(realms_header, @realms) do |realm|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "realm_selected[]", realm.id, selected, :id =>
"realm_checkbox_#{realm.id}"
%td= link_to realm.name, realm_path(realm)
diff --git a/src/app/views/users/_list.html.haml b/src/app/views/users/_list.html.haml
index ee66170..fd97a4f 100644
--- a/src/app/views/users/_list.html.haml
+++ b/src/app/views/users/_list.html.haml
@@ -10,12 +10,12 @@
= filter_table(@header, @users) do |user|
%tr{:class => cycle('nostripe','stripe')}
- %td
+ %td{:class => 'checkbox'}
- selected = params[:select] == 'all'
= check_box_tag "user_selected[]", user.id, selected, :id =>
"user_checkbox_#{user.id}"
%td= link_to user.login, user_path(user)
%td= user.last_name
%td= user.first_name
- %td= number_to_percentage user.quota.percentage_used, :precision => 0
- %td= user.quota.maximum_running_instances or "Unlimited"
+ %td{:class => 'center'}= number_to_percentage
user.quota.percentage_used, :precision => 0
+ %td{:class => 'center'}= user.quota.maximum_running_instances or
"Unlimited"
%td= user.email
--
1.7.6