From: Martyn Taylor <[email protected]>

Adds placeholders, currently no functionality since we do not have the 
deployment model in place
---
 .../resources/deployments_controller.rb            |   31 +++++++++++++++++++-
 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     |   20 +++++++++++++
 .../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      |    5 +++
 11 files changed, 82 insertions(+), 2 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/_list.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..7d5d9be 100644
--- a/src/app/controllers/resources/deployments_controller.rb
+++ b/src/app/controllers/resources/deployments_controller.rb
@@ -1,6 +1,35 @@
 class Resources::DeploymentsController < ApplicationController
   before_filter :require_user
+  before_filter :load_deployments, :only => [:index, :show]
 
   def index
   end
-end
+
+  def show
+    @tab_captions = ['Properties', 'Instances', 'Provider Services', 'Required 
Services', 'History', 'Permissions']
+    @details_tab = params[:details_tab].blank? ? 'properties' : 
params[:details_tab]
+    respond_to do |format|
+      format.js do
+        if @url_params.delete :details_pane
+          render :partial => 'layouts/details_pane' and return
+        end
+        render :partial => @details_tab and return
+      end
+      format.html { render :action => 'show'}
+    end
+    @url_params = params.clone
+  end
+
+  private
+  def load_deployments
+    @url_params = params
+    @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 4eb16e6..a2ba8e3 100644
--- a/src/app/stylesheets/newui.scss
+++ b/src/app/stylesheets/newui.scss
@@ -1353,6 +1353,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
new file mode 100644
index 0000000..6c3dee8
--- /dev/null
+++ b/src/app/views/resources/deployments/_list.haml
@@ -0,0 +1,20 @@
+- form_tag do |f|
+  #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:&nbsp;
+      = link_to "All", @url_params.merge(:select => 'all')
+      %span> ,&nbsp;
+      = 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..a5a777d
--- /dev/null
+++ b/src/app/views/resources/deployments/show.haml
@@ -0,0 +1,5 @@
+- content_for :list do
+  = render :partial => 'list'
+
+- content_for :details do
+  = render :partial => 'layouts/details_pane'
\ No newline at end of file
-- 
1.7.2.3

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

Reply via email to