Return-Path: X-Original-To: apmail-deltacloud-commits-archive@www.apache.org Delivered-To: apmail-deltacloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 86F07DCC8 for ; Thu, 13 Sep 2012 10:15:41 +0000 (UTC) Received: (qmail 62949 invoked by uid 500); 13 Sep 2012 10:15:40 -0000 Delivered-To: apmail-deltacloud-commits-archive@deltacloud.apache.org Received: (qmail 62916 invoked by uid 500); 13 Sep 2012 10:15:40 -0000 Mailing-List: contact commits-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list commits@deltacloud.apache.org Received: (qmail 62857 invoked by uid 99); 13 Sep 2012 10:15:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 10:15:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8418736290; Thu, 13 Sep 2012 10:15:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mfojtik@apache.org To: commits@deltacloud.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/3] git commit: Core: Replaced api_url_for with url_for Message-Id: <20120913101538.8418736290@tyr.zones.apache.org> Date: Thu, 13 Sep 2012 10:15:38 +0000 (UTC) Updated Branches: refs/heads/master 01cde96b7 -> c358ea7dc Core: Replaced api_url_for with url_for * The api_url_for does not add any extra value to original 'url_for' helper. Mixing there two helper in views cause confusion. Signed-off-by: Michal fojtik Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/c358ea7d Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/c358ea7d Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/c358ea7d Branch: refs/heads/master Commit: c358ea7dc2cc0c6143fd49d1e9981bb8e864f12a Parents: 1e913ee Author: Michal Fojtik Authored: Fri Aug 31 14:45:58 2012 +0200 Committer: Michal fojtik Committed: Thu Sep 13 12:15:58 2012 +0200 ---------------------------------------------------------------------- server/views/api/show.html.haml | 2 +- server/views/buckets/index.html.haml | 2 +- server/views/cimi/cloudEntryPoint/index.xml.haml | 2 +- server/views/cimi/collection/index.html.haml | 6 +++--- server/views/cimi/collection/response.xml.haml | 2 +- server/views/cimi/error.html.haml | 2 +- server/views/cimi/layout.html.haml | 2 +- .../cimi/machine_configurations/show.html.haml | 2 +- .../cimi/machine_configurations/show.xml.haml | 2 +- server/views/cimi/machine_images/show.html.haml | 2 +- server/views/cimi/machine_images/show.xml.haml | 2 +- server/views/cimi/machines/show.html.haml | 2 +- server/views/cimi/machines/show.xml.haml | 2 +- server/views/cimi/volumes/show.html.haml | 2 +- server/views/cimi/volumes/show.xml.haml | 2 +- server/views/docs/collection.html.haml | 2 +- server/views/docs/collection.xml.haml | 4 ++-- server/views/docs/index.html.haml | 2 +- server/views/docs/index.xml.haml | 2 +- server/views/docs/operation.xml.haml | 2 +- server/views/error.html.haml | 2 +- server/views/firewalls/index.html.haml | 2 +- server/views/firewalls/show.html.haml | 2 +- server/views/images/show.html.haml | 4 ++-- server/views/instance_states/show.html.haml | 2 +- server/views/instances/run_command.html.haml | 2 +- server/views/instances/show.html.haml | 4 ++-- server/views/keys/index.html.haml | 2 +- server/views/layout.html.haml | 2 +- server/views/load_balancers/index.html.haml | 2 +- server/views/load_balancers/show.html.haml | 6 +++--- server/views/storage_snapshots/show.html.haml | 2 +- server/views/storage_volumes/attach.html.haml | 2 +- server/views/storage_volumes/index.html.haml | 2 +- server/views/storage_volumes/show.html.haml | 8 ++++---- 35 files changed, 45 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/api/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/api/show.html.haml b/server/views/api/show.html.haml index d315ebb..541c388 100644 --- a/server/views/api/show.html.haml +++ b/server/views/api/show.html.haml @@ -5,7 +5,7 @@ %ul{ :'data-role' => :listview, :'data-inset' => 'true'} - supported_collections do |c| %li - %a{ :href => api_url_for(c.collection_name), :'data-icon' => "arrow-r"}=c.collection_name.to_s.gsub('_', ' ').titlecase + %a{ :href => url_for(c.collection_name), :'data-icon' => "arrow-r"}=c.collection_name.to_s.gsub('_', ' ').titlecase - unless Deltacloud::Drivers.driver_config.nil? http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/buckets/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/buckets/index.html.haml b/server/views/buckets/index.html.haml index 1510dbb..48dc699 100644 --- a/server/views/buckets/index.html.haml +++ b/server/views/buckets/index.html.haml @@ -1,5 +1,5 @@ =header "Buckets" do - %a{ :href => api_url_for('buckets/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new bucket + %a{ :href => url_for('buckets/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new bucket %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/c358ea7d/server/views/cimi/cloudEntryPoint/index.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/cloudEntryPoint/index.xml.haml b/server/views/cimi/cloudEntryPoint/index.xml.haml index 784b931..cce651b 100644 --- a/server/views/cimi/cloudEntryPoint/index.xml.haml +++ b/server/views/cimi/cloudEntryPoint/index.xml.haml @@ -1,6 +1,6 @@ !!!XML %CloudEntryPoint{ :xmlns => CMWG_NAMESPACE } - %uri= api_url_for("/cloudEntryPoint") + %uri= url_for("/cloudEntryPoint") %name cloud entry point %description cloud entry point %created= Time.new.getutc.to_s http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/collection/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/collection/index.html.haml b/server/views/cimi/collection/index.html.haml index 0860f5f..76ea9ba 100644 --- a/server/views/cimi/collection/index.html.haml +++ b/server/views/cimi/collection/index.html.haml @@ -2,7 +2,7 @@ - new_name = new_name.gsub(/[A-Z]/, ' \0') %h1 #{new_name.capitalize} -%form{ :action => api_url_for("/collection/" + @dmtfitem["uri"]) } +%form{ :action => url_for("/collection/" + @dmtfitem["uri"]) } %input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/ %input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/ %p @@ -28,7 +28,7 @@ - iter += 1 %br %label - = operation["rel"].capitalize + ": " + api_url_for(operation["href"]) + = operation["rel"].capitalize + ": " + url_for(operation["href"]) %input{ :name => "operation_"+iter.to_s, :oper_type => operation["rel"], :type => :hidden, :value => operation["href"] } %br %p @@ -42,4 +42,4 @@ - @dmtf_col_items.map do |template| %tr %td - %a{ :href => template["href"] }= template["name"] \ No newline at end of file + %a{ :href => template["href"] }= template["name"] http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/collection/response.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/collection/response.xml.haml b/server/views/cimi/collection/response.xml.haml index ad892d7..0b8eb7a 100644 --- a/server/views/cimi/collection/response.xml.haml +++ b/server/views/cimi/collection/response.xml.haml @@ -1,3 +1,3 @@ !!!XML %ReturnCode{ :xmlns => CMWG_NAMESPACE } - %Status= "Success" \ No newline at end of file + %Status= "Success" http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/error.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/error.html.haml b/server/views/cimi/error.html.haml index 5a9bb59..942393c 100644 --- a/server/views/cimi/error.html.haml +++ b/server/views/cimi/error.html.haml @@ -28,4 +28,4 @@ #copyright Copyright 2009-2011 %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation - and individual contributors. \ No newline at end of file + and individual contributors. http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/layout.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/layout.html.haml b/server/views/cimi/layout.html.haml index 2673453..7c3b754 100644 --- a/server/views/cimi/layout.html.haml +++ b/server/views/cimi/layout.html.haml @@ -29,4 +29,4 @@ #copyright Copyright 2009-2011 %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation - and individual contributors. \ No newline at end of file + and individual contributors. http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/machine_configurations/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/machine_configurations/show.html.haml b/server/views/cimi/machine_configurations/show.html.haml index 38dc867..c59242e 100644 --- a/server/views/cimi/machine_configurations/show.html.haml +++ b/server/views/cimi/machine_configurations/show.html.haml @@ -156,4 +156,4 @@ }) cellRightBut.appendChild(er); - } \ No newline at end of file + } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/machine_configurations/show.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/machine_configurations/show.xml.haml b/server/views/cimi/machine_configurations/show.xml.haml index c337fe1..dbcfe78 100644 --- a/server/views/cimi/machine_configurations/show.xml.haml +++ b/server/views/cimi/machine_configurations/show.xml.haml @@ -24,4 +24,4 @@ %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"] } %guestInterface= disk["guestInterface"] %operation{ :rel => "edit", :href => machine_configurations_url + "/" + @dmtfitem["uri"] } - %operation{ :rel => "delete", :href => machine_configurations_url + "/" + @dmtfitem["uri"] } \ No newline at end of file + %operation{ :rel => "delete", :href => machine_configurations_url + "/" + @dmtfitem["uri"] } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/machine_images/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/machine_images/show.html.haml b/server/views/cimi/machine_images/show.html.haml index 1c3a28e..202291e 100644 --- a/server/views/cimi/machine_images/show.html.haml +++ b/server/views/cimi/machine_images/show.html.haml @@ -76,4 +76,4 @@ xmlData += ""; return xmlData; - } \ No newline at end of file + } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/machine_images/show.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/machine_images/show.xml.haml b/server/views/cimi/machine_images/show.xml.haml index a00713c..3d55ebf 100644 --- a/server/views/cimi/machine_images/show.xml.haml +++ b/server/views/cimi/machine_images/show.xml.haml @@ -14,4 +14,4 @@ %property{ :name => key}=value["content"] %imageLocation{ :href => @dmtfitem["imageLocation"]} %operation{ :rel => "edit", :href => machine_images_url + "/" + @dmtfitem["uri"] } - %operation{ :rel => "delete", :href => machine_images_url + "/" + @dmtfitem["uri"] } \ No newline at end of file + %operation{ :rel => "delete", :href => machine_images_url + "/" + @dmtfitem["uri"] } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/machines/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/machines/show.html.haml b/server/views/cimi/machines/show.html.haml index c29ddff..569caeb 100644 --- a/server/views/cimi/machines/show.html.haml +++ b/server/views/cimi/machines/show.html.haml @@ -174,4 +174,4 @@ cellRightBut.appendChild(er); - } \ No newline at end of file + } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/machines/show.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/machines/show.xml.haml b/server/views/cimi/machines/show.xml.haml index c699b19..653b51f 100644 --- a/server/views/cimi/machines/show.xml.haml +++ b/server/views/cimi/machines/show.xml.haml @@ -25,4 +25,4 @@ %capacity{ :quantity => disk["capacity"]["quantity"], :units => disk["capacity"]["units"] } %guestInterface= disk["guestInterface"] %operation{ :rel => "edit", :href => machines_url + "/" + @dmtfitem["uri"] } - %operation{ :rel => "delete", :href => machines_url + "/" + @dmtfitem["uri"] } \ No newline at end of file + %operation{ :rel => "delete", :href => machines_url + "/" + @dmtfitem["uri"] } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/volumes/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/volumes/show.html.haml b/server/views/cimi/volumes/show.html.haml index 0e7b20b..c91c540 100644 --- a/server/views/cimi/volumes/show.html.haml +++ b/server/views/cimi/volumes/show.html.haml @@ -65,4 +65,4 @@ xmlData += ""; return xmlData; - } \ No newline at end of file + } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/cimi/volumes/show.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/cimi/volumes/show.xml.haml b/server/views/cimi/volumes/show.xml.haml index 30ef2c2..32f48af 100644 --- a/server/views/cimi/volumes/show.xml.haml +++ b/server/views/cimi/volumes/show.xml.haml @@ -14,4 +14,4 @@ %property{ :name => key}=value["content"] %capacity{ :quantity => @dmtfitem["capacity"]["quantity"], :units => @dmtfitem["capacity"]["units"]} %operation{ :rel => "edit", :href => volumes_url + "/" + @dmtfitem["uri"] } - %operation{ :rel => "delete", :href => volumes_url + "/" + @dmtfitem["uri"] } \ No newline at end of file + %operation{ :rel => "delete", :href => volumes_url + "/" + @dmtfitem["uri"] } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/docs/collection.html.haml ---------------------------------------------------------------------- diff --git a/server/views/docs/collection.html.haml b/server/views/docs/collection.html.haml index 537f52c..7485b60 100644 --- a/server/views/docs/collection.html.haml +++ b/server/views/docs/collection.html.haml @@ -13,7 +13,7 @@ %h3 Operations: - @operations.keys.sort_by { |k| k.to_s }.each do |operation| %li{ :'data-role' => 'list-divider'} - %a{:href => api_url_for("docs/#{@collection.name.to_s}/#{operation}"), :'data-ajax' => 'false'} #{operation} + %a{:href => url_for("docs/#{@collection.name.to_s}/#{operation}"), :'data-ajax' => 'false'} #{operation} %li %br %p=@operations[operation].description http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/docs/collection.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/docs/collection.xml.haml b/server/views/docs/collection.xml.haml index 8525f45..4359901 100644 --- a/server/views/docs/collection.xml.haml +++ b/server/views/docs/collection.xml.haml @@ -1,9 +1,9 @@ %docs{:status => "unsupported"} - %collection{:url => api_url_for("docs/#{@collection.name}"), :name => "#{@collection.name}"} + %collection{:url => url_for("docs/#{@collection.name}"), :name => "#{@collection.name}"} %description #{@collection.description} %operations - @operations.keys.sort_by { |k| k.to_s }.each do |operation| - %operation{:url => api_url_for("#{@collection.name.to_s}"), :name => "#{operation}", :href => api_url_for("#{@operations[operation].path}"), :method => "#{@operations[operation].method}"} + %operation{:url => url_for("#{@collection.name.to_s}"), :name => "#{operation}", :href => url_for("#{@operations[operation].path}"), :method => "#{@operations[operation].method}"} %description #{@operations[operation].description} - @operations[operation].each_param do |param| %parameter{:name => "#{param.name}", :type => "#{param.type}"} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/docs/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/docs/index.html.haml b/server/views/docs/index.html.haml index c3912bd..742e03f 100644 --- a/server/views/docs/index.html.haml +++ b/server/views/docs/index.html.haml @@ -5,7 +5,7 @@ %ul{ :'data-role' => :listview, :'data-inset' => 'true'} - collections.keys.sort_by { |k| k.to_s }.each do |collection| %li - %a{:href => api_url_for("docs/#{collection}"), :'data-ajax' => 'false'} + %a{:href => url_for("docs/#{collection}"), :'data-ajax' => 'false'} %h3=collection.to_s.capitalize.tr('_', ' ') %p=collections[collection].description http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/docs/index.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/docs/index.xml.haml b/server/views/docs/index.xml.haml index c953c33..18c9f7b 100644 --- a/server/views/docs/index.xml.haml +++ b/server/views/docs/index.xml.haml @@ -1,5 +1,5 @@ %docs{:status => "unsupported"} - collections.keys.sort_by { |k| k.to_s }.each do |collection| - %collection{:url => api_url_for("docs/#{collection}")} + %collection{:url => url_for("docs/#{collection}")} %name #{collection} %description #{collections[collection].description} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/docs/operation.xml.haml ---------------------------------------------------------------------- diff --git a/server/views/docs/operation.xml.haml b/server/views/docs/operation.xml.haml index fcc9c59..3faa5e5 100644 --- a/server/views/docs/operation.xml.haml +++ b/server/views/docs/operation.xml.haml @@ -1,5 +1,5 @@ %docs{:status => "unsupported"} - %operation{:url => api_url_for("docs/#{@collection.name.to_s}"), :name => "#{@operation.name.to_s}", :href => url_for("#{@operation.path}"), :method => "#{@operation.method}"} + %operation{:url => url_for("docs/#{@collection.name.to_s}"), :name => "#{@operation.name.to_s}", :href => url_for("#{@operation.path}"), :method => "#{@operation.method}"} %description #{@operation.description} - @operation.each_param do |param| %parameter{:name => "#{param.name}", :type => "#{param.type}"} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/error.html.haml ---------------------------------------------------------------------- diff --git a/server/views/error.html.haml b/server/views/error.html.haml index 92897e1..220a44a 100644 --- a/server/views/error.html.haml +++ b/server/views/error.html.haml @@ -26,7 +26,7 @@ %div{ 'data-role' => :navbar} %ul %li - %a{ :'data-icon' => 'home', :href => api_url_for(''), :'data-ajax' => 'false'} Home + %a{ :'data-icon' => 'home', :href => url_for(''), :'data-ajax' => 'false'} Home %li=link_to_format(:xml) %li=link_to_format(:json) %div{ 'data-role' => :header, 'data-theme' => 'a' } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/firewalls/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/firewalls/index.html.haml b/server/views/firewalls/index.html.haml index 403f21f..f497b59 100644 --- a/server/views/firewalls/index.html.haml +++ b/server/views/firewalls/index.html.haml @@ -1,5 +1,5 @@ =header "Firewalls" do - %a{ :href => api_url_for('firewalls/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new firewall + %a{ :href => url_for('firewalls/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new firewall =subheader "#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}" %div{ :'data-role' => :content, :'data-theme' => 'c'} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/firewalls/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/firewalls/show.html.haml b/server/views/firewalls/show.html.haml index 0fdea19..c2fd5d0 100644 --- a/server/views/firewalls/show.html.haml +++ b/server/views/firewalls/show.html.haml @@ -18,7 +18,7 @@ =link_to_action "Destroy", destroy_firewall_url(@firewall.id), :delete =header "Rules", :back => 'false' do - %a{ :href => api_url_for("firewalls/#{@firewall.id}/new_rule"), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right', :'data-ajax' => 'false'} Add new rule + %a{ :href => url_for("firewalls/#{@firewall.id}/new_rule"), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right', :'data-ajax' => 'false'} Add new rule %div{ :'data-role' => :content, :'data-theme' => 'c'} - @firewall.rules.each do |rule| http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/images/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/images/show.html.haml b/server/views/images/show.html.haml index c166e87..6030a47 100644 --- a/server/views/images/show.html.haml +++ b/server/views/images/show.html.haml @@ -25,9 +25,9 @@ %li %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" } - @image.hardware_profiles.each do |hwp| - %a{ :href => api_url_for("hardware_profiles/#{hwp.name}"), :'data-role' => "button", :'data-ajax' => 'false'} #{hwp.name} + %a{ :href => url_for("hardware_profiles/#{hwp.name}"), :'data-role' => "button", :'data-ajax' => 'false'} #{hwp.name} %li{ :'data-role' => 'list-divider'} Actions %li %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" } - %a{ :href => api_url_for("instances/new?image_id=#{@image.id}"), :'data-role' => "button", :'data-ajax' => 'false'} Launch + %a{ :href => url_for("instances/new?image_id=#{@image.id}"), :'data-role' => "button", :'data-ajax' => 'false'} Launch = link_to_action 'Destroy', destroy_image_url(@image.id), :delete http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/instance_states/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/instance_states/show.html.haml b/server/views/instance_states/show.html.haml index 252f249..2a94801 100644 --- a/server/views/instance_states/show.html.haml +++ b/server/views/instance_states/show.html.haml @@ -2,7 +2,7 @@ =subheader "#{driver_symbol}@#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}" %div{ :'data-role' => :content, :'data-theme' => 'd', :class => 'middle-dialog'} - %img{ :src => api_url_for('instance_states?format=png') } + %img{ :src => url_for('instance_states?format=png') } %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-theme' => 'a'} - @machine.states.each do |state| http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/instances/run_command.html.haml ---------------------------------------------------------------------- diff --git a/server/views/instances/run_command.html.haml b/server/views/instances/run_command.html.haml index 73a267a..75c7534 100644 --- a/server/views/instances/run_command.html.haml +++ b/server/views/instances/run_command.html.haml @@ -2,7 +2,7 @@ =subheader "#{@instance.id}" %div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'} - %form{ :action => api_url_for('/instances/%s/run' % @instance.id), :method => :post } + %form{ :action => url_for('/instances/%s/run' % @instance.id), :method => :post } %p %label{ :for => :cmd } Desired command: %input{ :name => :cmd, :value => "", :type => :text} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/instances/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/instances/show.html.haml b/server/views/instances/show.html.haml index 9910de4..cc0b92b 100644 --- a/server/views/instances/show.html.haml +++ b/server/views/instances/show.html.haml @@ -59,6 +59,6 @@ - @instance.actions.each do |action| =link_to_action action, self.send(:"#{action}_instance_url", @instance.id), instance_action_method(action) - if @instance.state=="RUNNING" and driver.respond_to?(:run_on_instance) - =link_to_action 'run command', api_url_for('instances/%s/run' % @instance.id), :get + =link_to_action 'run command', url_for('instances/%s/run' % @instance.id), :get - if @instance.can_create_image? - =link_to_action 'Create Image', api_url_for("images/new?instance_id=#{@instance.id}"), :get + =link_to_action 'Create Image', url_for("images/new?instance_id=#{@instance.id}"), :get http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/keys/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/keys/index.html.haml b/server/views/keys/index.html.haml index c7a9f36..248aca7 100644 --- a/server/views/keys/index.html.haml +++ b/server/views/keys/index.html.haml @@ -1,5 +1,5 @@ =header "Keys" do - %a{ :href => api_url_for('keys/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new key + %a{ :href => url_for('keys/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new key %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/c358ea7d/server/views/layout.html.haml ---------------------------------------------------------------------- diff --git a/server/views/layout.html.haml b/server/views/layout.html.haml index 4806d59..4db3b7f 100644 --- a/server/views/layout.html.haml +++ b/server/views/layout.html.haml @@ -18,7 +18,7 @@ %div{ 'data-role' => :navbar} %ul %li - %a{ :'data-icon' => 'home', :href => "#{api_url_for('').chomp("/")}", :'data-ajax' => 'false'} Home + %a{ :'data-icon' => 'home', :href => "#{url_for('').chomp("/")}", :'data-ajax' => 'false'} Home %li=link_to_format(:xml) %li=link_to_format(:json) %div{ 'data-role' => :header, 'data-theme' => 'a' } http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/load_balancers/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/load_balancers/index.html.haml b/server/views/load_balancers/index.html.haml index 8b730a1..789cd57 100644 --- a/server/views/load_balancers/index.html.haml +++ b/server/views/load_balancers/index.html.haml @@ -1,5 +1,5 @@ =header "Load balancers" do - %a{ :href => api_url_for('load_balancers/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new load balancer + %a{ :href => url_for('load_balancers/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new load balancer =subheader "#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}" %div{ :'data-role' => :content, :'data-theme' => 'c'} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/load_balancers/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/load_balancers/show.html.haml b/server/views/load_balancers/show.html.haml index cab8961..a1c754d 100644 --- a/server/views/load_balancers/show.html.haml +++ b/server/views/load_balancers/show.html.haml @@ -20,16 +20,16 @@ %li %a{ :href => instance_url(instance[:id]), :'data-ajax' => 'false'} %h3=instance[:name] - =link_to_action "UnRegister", api_url_for("load_balancers/#{@load_balancer.id}/unregister?instance_id=#{instance[:id]}"), :post + =link_to_action "UnRegister", url_for("load_balancers/#{@load_balancer.id}/unregister?instance_id=#{instance[:id]}"), :post %li{ :'data-role' => 'list-divider'} UnRegistered Instances - @unregistered_instances.each do |instance| %li %a{:href => instance_url(instance[:id]), :'data-ajax' => 'false'} %h3=instance[:name] - =link_to_action "Register", api_url_for("load_balancers/#{@load_balancer.id}/register?instance_id=#{instance[:id]}"), :post + =link_to_action "Register", url_for("load_balancers/#{@load_balancer.id}/register?instance_id=#{instance[:id]}"), :post %li{ :'data-role' => 'list-divider'} Actions %li - =link_to_action "Destroy", api_url_for("load_balancers/#{@load_balancer.id}"), :delete + =link_to_action "Destroy", url_for("load_balancers/#{@load_balancer.id}"), :delete =header "Listeners", :back => 'false' %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'} http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/storage_snapshots/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/storage_snapshots/show.html.haml b/server/views/storage_snapshots/show.html.haml index bc76e3c..069e452 100644 --- a/server/views/storage_snapshots/show.html.haml +++ b/server/views/storage_snapshots/show.html.haml @@ -19,4 +19,4 @@ %li %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" } - if driver.respond_to?(:destroy_storage_snapshot) - =link_to_action "Delete", api_url_for("storage_snapshots/#{@storage_snapshot.id}"), :delete + =link_to_action "Delete", url_for("storage_snapshots/#{@storage_snapshot.id}"), :delete http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/storage_volumes/attach.html.haml ---------------------------------------------------------------------- diff --git a/server/views/storage_volumes/attach.html.haml b/server/views/storage_volumes/attach.html.haml index 8c20753..073cc2a 100644 --- a/server/views/storage_volumes/attach.html.haml +++ b/server/views/storage_volumes/attach.html.haml @@ -1,6 +1,6 @@ %h1 Attach storage volume -%form{ :action => api_url_for("storage_volumes/#{params[:id]}/attach"), :method => :post } +%form{ :action => url_for("storage_volumes/#{params[:id]}/attach"), :method => :post } %p %label Instance ID: http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c358ea7d/server/views/storage_volumes/index.html.haml ---------------------------------------------------------------------- diff --git a/server/views/storage_volumes/index.html.haml b/server/views/storage_volumes/index.html.haml index ba44b65..2cc8794 100644 --- a/server/views/storage_volumes/index.html.haml +++ b/server/views/storage_volumes/index.html.haml @@ -1,5 +1,5 @@ =header "Storage volumes" do - %a{ :href => api_url_for('storage_volumes/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new volume + %a{ :href => url_for('storage_volumes/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new volume %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/c358ea7d/server/views/storage_volumes/show.html.haml ---------------------------------------------------------------------- diff --git a/server/views/storage_volumes/show.html.haml b/server/views/storage_volumes/show.html.haml index 9a9da37..eddf5a9 100644 --- a/server/views/storage_volumes/show.html.haml +++ b/server/views/storage_volumes/show.html.haml @@ -35,9 +35,9 @@ %li %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" } - if ["AVAILABLE", "IN-USE"].include?(@storage_volume.state) - =link_to_action "Snapshot", api_url_for("storage_snapshots/new?volume_id=#{@storage_volume.id}"), :get + =link_to_action "Snapshot", url_for("storage_snapshots/new?volume_id=#{@storage_volume.id}"), :get - unless @storage_volume.instance_id - =link_to_action "Delete", api_url_for("storage_volumes/#{@storage_volume.id}"), :delete - =link_to_action "Attach", api_url_for("storage_volumes/#{@storage_volume.id}/attach_instance"), :get + =link_to_action "Delete", url_for("storage_volumes/#{@storage_volume.id}"), :delete + =link_to_action "Attach", url_for("storage_volumes/#{@storage_volume.id}/attach_instance"), :get - if @storage_volume.instance_id - =link_to_action "Detach", api_url_for("storage_volumes/#{@storage_volume.id}/detach"), :post + =link_to_action "Detach", url_for("storage_volumes/#{@storage_volume.id}/detach"), :post