deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dko...@apache.org
Subject [3/3] git commit: UI: don't expose actions that the driver does not support for network related resources
Date Fri, 24 May 2013 10:56:52 GMT
UI: don't expose actions that the driver does not support
for network related resources


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f32bd74d
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f32bd74d
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f32bd74d

Branch: refs/heads/master
Commit: f32bd74dc22ed2214d8293dde0ed4b8190f0cf29
Parents: 3ebea1c
Author: Dies Koper <diesk@fast.au.fujitsu.com>
Authored: Thu May 23 15:49:26 2013 +1000
Committer: Dies Koper <diesk@fast.au.fujitsu.com>
Committed: Fri May 24 20:50:53 2013 +1000

----------------------------------------------------------------------
 server/views/network_interfaces/index.html.haml |    3 ++-
 server/views/network_interfaces/show.html.haml  |    3 ++-
 server/views/networks/index.html.haml           |    3 ++-
 server/views/networks/show.html.haml            |    3 ++-
 server/views/subnets/index.html.haml            |    3 ++-
 server/views/subnets/show.html.haml             |    3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f32bd74d/server/views/network_interfaces/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/network_interfaces/index.html.haml b/server/views/network_interfaces/index.html.haml
index d0bfed7..acd97d0 100644
--- a/server/views/network_interfaces/index.html.haml
+++ b/server/views/network_interfaces/index.html.haml
@@ -1,5 +1,6 @@
 =header "Network Interfaces" do
-  %a{ :href => url_for('network_interfaces/new'), :'data-icon' => :plus, :'data-role'
=> :button, :class => 'ui-btn-right'} Create new Network Interface
+  - if driver.respond_to?(:create_network_interface)
+    %a{ :href => url_for('network_interfaces/new'), :'data-icon' => :plus, :'data-role'
=> :button, :class => 'ui-btn-right'} Create new Network Interface
 
 %div{ :'data-role' => :content, :'data-theme' => 'c'}
   %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f32bd74d/server/views/network_interfaces/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/network_interfaces/show.html.haml b/server/views/network_interfaces/show.html.haml
index 877dd0f..7b021c0 100644
--- a/server/views/network_interfaces/show.html.haml
+++ b/server/views/network_interfaces/show.html.haml
@@ -26,4 +26,5 @@
     %li{ :'data-role' => 'list-divider'} Actions
     %li
       %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
-        =link_to_action "Destroy", destroy_network_interface_url(network_interface.id), :delete
+        - if driver.respond_to?(:destroy_network_interface)
+          =link_to_action "Destroy", destroy_network_interface_url(network_interface.id),
:delete

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f32bd74d/server/views/networks/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/networks/index.html.haml b/server/views/networks/index.html.haml
index 5eba1d5..1e6e838 100644
--- a/server/views/networks/index.html.haml
+++ b/server/views/networks/index.html.haml
@@ -1,5 +1,6 @@
 =header "Networks" do
-  %a{ :href => url_for('networks/new'), :'data-icon' => :plus, :'data-role' => :button,
:class => 'ui-btn-right'} Create new network
+  - if driver.respond_to?(:create_network)
+    %a{ :href => url_for('networks/new'), :'data-icon' => :plus, :'data-role' =>
:button, :class => 'ui-btn-right'} Create new network
 
 %div{ :'data-role' => :content, :'data-theme' => 'c'}
   %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f32bd74d/server/views/networks/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/networks/show.html.haml b/server/views/networks/show.html.haml
index 89a636e..f5507b2 100644
--- a/server/views/networks/show.html.haml
+++ b/server/views/networks/show.html.haml
@@ -22,4 +22,5 @@
     %li{ :'data-role' => 'list-divider'} Actions
     %li
       %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
-        =link_to_action "Destroy", destroy_network_url(@network.id), :delete
+        - if driver.respond_to?(:destroy_network)
+          =link_to_action "Destroy", destroy_network_url(@network.id), :delete

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f32bd74d/server/views/subnets/index.html.haml
----------------------------------------------------------------------
diff --git a/server/views/subnets/index.html.haml b/server/views/subnets/index.html.haml
index 5442c17..eb285be 100644
--- a/server/views/subnets/index.html.haml
+++ b/server/views/subnets/index.html.haml
@@ -1,5 +1,6 @@
 =header "Subnets" do
-  %a{ :href => url_for('subnets/new'), :'data-icon' => :plus, :'data-role' => :button,
:class => 'ui-btn-right'} Create new subnet
+  - if driver.respond_to?(:create_subnet)
+    %a{ :href => url_for('subnets/new'), :'data-icon' => :plus, :'data-role' =>
:button, :class => 'ui-btn-right'} Create new subnet
 
 %div{ :'data-role' => :content, :'data-theme' => 'c'}
   %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f32bd74d/server/views/subnets/show.html.haml
----------------------------------------------------------------------
diff --git a/server/views/subnets/show.html.haml b/server/views/subnets/show.html.haml
index dcb33c9..9d65d96 100644
--- a/server/views/subnets/show.html.haml
+++ b/server/views/subnets/show.html.haml
@@ -21,4 +21,5 @@
     %li{ :'data-role' => 'list-divider'} Actions
     %li
       %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
-        =link_to_action "Destroy", destroy_subnet_url(@subnet.id), :delete
+        - if driver.respond_to?(:destroy_subnet)
+          =link_to_action "Destroy", destroy_subnet_url(@subnet.id), :delete


Mime
View raw message