From: Martyn Taylor <[email protected]>
Adds placeholders, currently no functionality since we do not have the
deployment model in place
---
.../resources/deployments_controller.rb | 28 +++++++++++++-
src/app/stylesheets/newui.scss | 16 ++++++++
src/app/views/resources/deployments/_history.haml | 1 +
.../views/resources/deployments/_instances.haml | 2 +
src/app/views/resources/deployments/_list.haml | 41 +++++++++----------
.../views/resources/deployments/_permissions.haml | 2 +
.../views/resources/deployments/_properties.haml | 2 +
.../resources/deployments/_provider_services.haml | 1 +
.../resources/deployments/_required_services.haml | 1 +
src/app/views/resources/deployments/index.haml | 3 +-
src/app/views/resources/deployments/show.haml | 4 ++
11 files changed, 77 insertions(+), 24 deletions(-)
create mode 100644 src/app/views/resources/deployments/_history.haml
create mode 100644 src/app/views/resources/deployments/_instances.haml
create mode 100644 src/app/views/resources/deployments/_permissions.haml
create mode 100644 src/app/views/resources/deployments/_properties.haml
create mode 100644 src/app/views/resources/deployments/_provider_services.haml
create mode 100644 src/app/views/resources/deployments/_required_services.haml
create mode 100644 src/app/views/resources/deployments/show.haml
diff --git a/src/app/controllers/resources/deployments_controller.rb
b/src/app/controllers/resources/deployments_controller.rb
index fecdfae..11a35d4 100644
--- a/src/app/controllers/resources/deployments_controller.rb
+++ b/src/app/controllers/resources/deployments_controller.rb
@@ -1,6 +1,32 @@
class Resources::DeploymentsController < ApplicationController
before_filter :require_user
+ before_filter :load_deployments, :only => [:index, :show]
def index
end
-end
+
+ def show
+ if params[:details_tab].blank?
+ @details_tab = 'properties'
+ else
+ @details_tab = params[:details_tab]
+ end
+ if params[:ajax] == 'true'
+ render :partial => @details_tab
+ return
+ end
+ @url_params = params.clone
+ end
+
+ private
+ def load_deployments
+ @header = [
+ { :name => "Deployment name", :sort_attr => :name },
+ { :name => "Deployable", :sortable => false },
+ { :name => "Deployment Owner", :sort_attr => "owner.last_name"},
+ { :name => "Running Since", :sort_attr => :running_since },
+ { :name => "Heath Metric", :sort_attr => :health },
+ { :name => "Pool", :sort_attr => "pool.name" }
+ ]
+ end
+end
\ No newline at end of file
diff --git a/src/app/stylesheets/newui.scss b/src/app/stylesheets/newui.scss
index 933165d..35abcec 100644
--- a/src/app/stylesheets/newui.scss
+++ b/src/app/stylesheets/newui.scss
@@ -1349,6 +1349,22 @@ $content-left: 180px;
}
}
+#object-actions {
+ position: relative;
+ float: left;
+ width: 100%;
+}
+
+#search-actions {
+ position: relative;
+ float: right;
+}
+
+#selections {
+ position: relative;
+ float: left;
+}
+
#details-view {
border: 1px solid;
position: absolute;
diff --git a/src/app/views/resources/deployments/_history.haml
b/src/app/views/resources/deployments/_history.haml
new file mode 100644
index 0000000..9f4a57e
--- /dev/null
+++ b/src/app/views/resources/deployments/_history.haml
@@ -0,0 +1 @@
+%h3 List of deployment events
diff --git a/src/app/views/resources/deployments/_instances.haml
b/src/app/views/resources/deployments/_instances.haml
new file mode 100644
index 0000000..2ac1792
--- /dev/null
+++ b/src/app/views/resources/deployments/_instances.haml
@@ -0,0 +1,2 @@
+%h3 List Instances for Deployment
+%h3 "Expand" button shifts list view to show the Instance list
diff --git a/src/app/views/resources/deployments/_list.haml
b/src/app/views/resources/deployments/_list.haml
index 6d1e4db..6c3dee8 100644
--- a/src/app/views/resources/deployments/_list.haml
+++ b/src/app/views/resources/deployments/_list.haml
@@ -1,23 +1,20 @@
- form_tag do |f|
- = restful_submit_tag "New Pool", "new", new_resources_pool_path, 'GET'
- = restful_submit_tag "Edit", "edit", edit_resources_pool_path(@pools.first),
'GET'
- %p
- Select:
- = link_to "All", @url_params.merge(:select => 'all')
- %span> ,
- = link_to "None", @url_params.merge(:select => 'none')
- %table
- = sortable_table_header @header
- - @pools.each do |pool|
- %tr
- %td
- - selected = @url_params[:select] == 'all'
- = check_box(:pool, "selected[#{pool.id}]", :checked => selected)
- = link_to pool.name, resources_pool_path(pool)
- %td
- =((pool.quota.maximum_running_instances ||
0)/100)*pool.quota.total_instances
- ='%'
- %td
- =pool.quota.total_instances
- %td
- =pool.zone.name
+ #object-actions
+ = restful_submit_tag "Start", "start", resources_deployments_path, "PUT"
+ = restful_submit_tag "Stop", "stop", resources_deployments_path, "PUT"
+ = restful_submit_tag "Delete", "delete", resources_deployments_path,
"DELETE"
+
+ #search-actions
+ = restful_submit_tag "Save Search", "save_search",
resources_deployments_path, "PUT"
+ = restful_submit_tag "Save Selection", "save_selection",
resources_deployments_path, "PUT"
+ = restful_submit_tag "Export to File", "export",
resources_deployments_path, "PUT"
+
+ #selections
+ %p
+ Select:
+ = link_to "All", @url_params.merge(:select => 'all')
+ %span> ,
+ = link_to "None", @url_params.merge(:select => 'none')
+
+%table
+ = sortable_table_header @header
\ No newline at end of file
diff --git a/src/app/views/resources/deployments/_permissions.haml
b/src/app/views/resources/deployments/_permissions.haml
new file mode 100644
index 0000000..dd88c8e
--- /dev/null
+++ b/src/app/views/resources/deployments/_permissions.haml
@@ -0,0 +1,2 @@
+%h3 Users and roles they are in for this Deployment
+%h3 Manage permissions on tehi deployment (if you have permissions to do so)
diff --git a/src/app/views/resources/deployments/_properties.haml
b/src/app/views/resources/deployments/_properties.haml
new file mode 100644
index 0000000..5d2c584
--- /dev/null
+++ b/src/app/views/resources/deployments/_properties.haml
@@ -0,0 +1,2 @@
+%h3 Owner Details
+%h3 CDL
diff --git a/src/app/views/resources/deployments/_provider_services.haml
b/src/app/views/resources/deployments/_provider_services.haml
new file mode 100644
index 0000000..435f470
--- /dev/null
+++ b/src/app/views/resources/deployments/_provider_services.haml
@@ -0,0 +1 @@
+%h3 List of services required by deployment
diff --git a/src/app/views/resources/deployments/_required_services.haml
b/src/app/views/resources/deployments/_required_services.haml
new file mode 100644
index 0000000..30e7601
--- /dev/null
+++ b/src/app/views/resources/deployments/_required_services.haml
@@ -0,0 +1 @@
+%h3 List of services required by deployment
diff --git a/src/app/views/resources/deployments/index.haml
b/src/app/views/resources/deployments/index.haml
index fdc537d..d051c94 100644
--- a/src/app/views/resources/deployments/index.haml
+++ b/src/app/views/resources/deployments/index.haml
@@ -1 +1,2 @@
-resources/deployments/index.haml
+- content_for :list do
+ = render :partial => 'list'
\ No newline at end of file
diff --git a/src/app/views/resources/deployments/show.haml
b/src/app/views/resources/deployments/show.haml
new file mode 100644
index 0000000..894decb
--- /dev/null
+++ b/src/app/views/resources/deployments/show.haml
@@ -0,0 +1,4 @@
+- content_for :list do
+ = render :partial => 'list'
+
+= render :partial => 'layouts/details_pane', :locals => { :tabs =>
['Properties', 'Instances', 'Provider Services', 'Required Services',
'History', 'Permissions'] }
--
1.7.2.3
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel