incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1152201 [4/4] - in /incubator/deltacloud/trunk/server: ./ lib/deltacloud/helpers/ public/images/ public/javascripts/ public/stylesheets/ public/stylesheets/images/ views/ views/addresses/ views/api/ views/blobs/ views/buckets/ views/driver...
Date Fri, 29 Jul 2011 13:09:33 GMT
Modified: incubator/deltacloud/trunk/server/views/instances/new.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/instances/new.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/instances/new.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/instances/new.html.haml Fri Jul 29 13:09:26 2011
@@ -1,111 +1,80 @@
-%h1 Launch new Instance
+=header "Launch new instance"
+=subheader @image.description
 
-%h3{:class => "description"}= @image.description
-%h2= @image.id
+%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
+  %form{ :action => instances_url, :method => :post, :class => :new_instance }
+    %input{ :name => :image_id, :type => :hidden, :value => @instance.image_id }/
 
-%form{ :action => instances_url, :method => :post, :class => :new_instance }
-  %input{ :name => :image_id, :type => :hidden, :value => @instance.image_id }/
-  %p
-    %label
-      Name:
-    %input{ :name => 'name', :size => 30, :type => :text }/
-  -if driver_has_feature?(:instance_count)
-    %p
-      %label
-        Number of instances:
-      %input{ :type => :text, :value => "1", :name => :instance_count }
-  -if driver_has_feature?(:sandboxing)
-    %p
-      %label
-        Sandbox?:
-      %input{ :type => :checkbox, :value => "1", :name => :sandbox }
-  -if driver_has_feature?(:register_to_load_balancer)
-    %p
-      %label
-        Load balancer to assign:
-      %select{:name => 'load_balancer_id'}
-        %option
-        - @load_balancers.each do |load_balancer|
-          %option{:value => load_balancer.id} #{load_balancer.id}
-  -if driver_has_feature?(:user_iso)
-    %p
-      %label
-        User ISO (Base64):
-      %textarea{:name => :user_iso, :cols => 60, :rows => 10, :placeholder =>
"Copy&Paste a Base64 string here..."}
-  -if driver_has_feature?(:authentication_key)
-    %p
-      %label
-        Instance Keyname:
-      %select{:name => 'keyname'}
-        %option
-        - @keys.each do |key|
-          %option{ :value => key.id } #{key.id}
-  -if driver_has_feature?(:firewalls)
-    %p
-      %label
-        Firewalls:
-        %br
-        %br
-    - @firewalls.each_index do |i|
-      - if @firewalls[i].name == 'default'
-        %input{:type => :checkbox, :value => @firewalls[i].name, :name => "firewalls#{i}",
:checked => :true}/
-      - else
-        %input{:type => :checkbox, :value => @firewalls[i].name, :name => "firewalls#{i}"}/
-      = @firewalls[i].name
-    %br
-    %br
-  - if !@hardware_profiles.empty?
-    %h3 What size machine?
-    - for hwp in @hardware_profiles
-      .radio-group
-        %label{ :for => "hwp_id_#{hwp.name}" }
-          %input{ :type => :radio, :name => 'hwp_id', :value => hwp.name }/
-          = hwp.name
-          %br/
-          %span.radio-group-details
-            - first = true
-            - hwp.properties.select { |prop| prop.fixed? }.each do |prop|
-              - unless first
-                ,
-              - first = false
-              = format_hardware_property prop
-          - hwp.properties.reject { |prop| prop.fixed? }.each do |prop|
-            %span.radio-group-details
-              %label{ :for => "#{prop.param}_#{hwp.name}" }
-                = prop.name
-              - if prop.kind == :enum
-                %select{ :size => 1, :name => prop.param }
-                  - for v in prop.values
-                    %option= v
-                = prop.unit
+    %div{ 'data-role' => :fieldcontain }
+      %label{ :for => :name} Instance name:
+      %input{ :type => :text, :id => :name, :name => :name, :value => '' }
+
+    %div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
+      %h3 Additional parameters
+
+      - if driver_has_feature?(:instance_count)
+        %div{ 'data-role' => :fieldcontain }
+          %label{ :for => :instance_count} # of instances to be launched:
+          %input{ :type => :text, :id => :instance_count, :name => :instance_count,
:value => '1' }
+
+      - if driver_has_feature?(:authentication_key)
+        %div{ 'data-role' => :fieldcontain }
+          %label{ :for => :keyname, :class => 'ui-input-text'} Instance SSH key:
+          %select{:name => 'keyname', :'data-native-menu' => "true" }
+            %option{ :value => ''} None
+            - @keys.each do |key|
+              %option{ :value => key.id } #{key.id}
+
+      - if driver_has_feature?(:register_to_load_balancer)
+        %div{ 'data-role' => :fieldcontain }
+          %label{ :for => :load_balancer_id, :class => 'ui-input-text'} Register to
loadbalancer:
+          %select{:name => 'load_balancer_id', :'data-native-menu' => "true" }
+            %option{ :value => ''} None
+            - @load_balancers.each do |load_balancer|
+              %option{:value => load_balancer.id} #{load_balancer.id}
+
+      - if driver_has_feature?(:firewalls)
+        %div{ 'data-role' => :fieldcontain }
+          %fieldset{ :'data-role' => 'controlgroup'}
+            %legend Register to firewall:
+            - @firewalls.each_index do |i|
+              - if @firewalls[i].name == 'default'
+                %input{:type => :checkbox, :value => @firewalls[i].name, :name =>
"firewalls#{i}", :checked => :true, :id => "firewalls#{i}"}/
+                %label{:for => "firewalls#{i}"} Default
               - else
-                %input{ :name => prop.param, :size => 10, :value => "#{prop.default}"
}
-                = prop.unit
-                (value must be between #{prop.first} #{prop.unit} and #{prop.last} #{prop.unit})
-  - if !@realms.empty?
-    %h3 Where do you want it?
-    - for realm in @realms
-      .radio-group
-        %label{ :for => "realm_id_#{realm.id}" }
-          %input{ :type => :radio, :name => 'realm_id', :value => realm.id }/
-          = realm.id
-          %br/
-          %span.radio-group-details
-            = "#{realm.name}, #{realm.limit}"
-  - if driver_has_feature?(:user_files, :instances)
-    %h2 User-supplied files
-    %table
-      %thead
-        %tr
-          %th
-          %th Path
-          %th Content (must be base64 encoded)
-      %tbody
-        - 1.upto(5) do |i|
-          %tr
-            %td #{i.ordinalize} File:
-            %td
-              %input{ :name => "path#{i}", :size => 20 }
-            %td
-              %input{ :name => "content#{i}", :size => 50 }
-  %input{ :type => :submit, :name => "commit", :value => "create" }/
+                %input{:type => :checkbox, :value => @firewalls[i].name, :name =>
"firewalls#{i}", :id => "firewalls#{i}"}/
+                %label{:for => "firewalls#{i}"}=@firewalls[i].name
+
+    - if !@hardware_profiles.empty?
+      %div{ 'data-role' => :fieldcontain }
+        %h3 Instance profile
+        %fieldset{ :'data-role' => :fieldcontain}
+          - @hardware_profiles.each do |profile|
+            %input{ :type => :radio, :name => 'hwp_id', :value => profile.name,
:id => profile.name, :'data-theme' => 'b'}/
+            %label{ :for => profile.name}=profile.name
+            - profile.properties.reject { |prop| prop.fixed? }.each do |prop|
+              %div{ :'data-role' => :fieldcontain}
+                %label{ :for => "#{prop.param}_#{profile.name}" }=prop.name
+                %span.radio-group-details
+                  - if prop.kind == :enum
+                    %select{ :size => 1, :name => prop.param }
+                      - for v in prop.values
+                        %option= v
+                    = prop.unit
+                  - elsif prop.kind == :range
+                    %input{ :type => :range, :value => prop.first, :min => prop.first,
:max => prop.last, :name => prop.param}
+                  - else
+                    %input{ :name => prop.param, :size => 10, :value => "#{prop.default}"
}
+                    = prop.unit
+
+    - if !@realms.empty?
+      %div{ 'data-role' => :fieldcontain }
+        %h3 Where do you want it?
+        %fieldset{ :'data-role' => :fieldcontain}
+          %legend
+          - @realms.each do |realm|
+            %div{ :'data-role' => :fieldcontain}
+              %label{ :for => realm.id }= "#{realm.name}, #{realm.limit}"
+              %input{ :type => :radio, :name => 'realm_id', :value => realm.id,
:id => realm.id, :'data-theme' => 'b' }/
+
+    %button{ :type => :submit} Create instance

Modified: incubator/deltacloud/trunk/server/views/instances/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/instances/show.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/instances/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/instances/show.html.haml Fri Jul 29 13:09:26 2011
@@ -1,67 +1,55 @@
-%h1
-  = @instance.id
+=header "Instance"
+=subheader @instance.id
 
-%dl
-  %di
-    %dt Image
-    %dd
-      = link_to @instance.image_id, image_url( @instance.image_id )
-  %di
-    %dt Owner
-    %dd
-      = @instance.owner_id
-  %di
-    %dt Name
-    %dd
-      = @instance.name
-  %di
-    %dt Hardware Profile
-    %dd
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    %li{ :'data-role' => 'list-divider'} Name
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@instance.name
+    %li{ :'data-role' => 'list-divider'} Owner
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@instance.owner_id
+    %li{ :'data-role' => 'list-divider'} State
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@instance.state
+    %li{ :'data-role' => 'list-divider'} Image
+    %li
+      %a{ :href => image_url(@instance.image_id), :'data-ajax' => 'false' }=@instance.image_id
+    %li{ :'data-role' => 'list-divider'} Hardware Profile
+    %li
       - prof = @instance.instance_profile
-      = link_to(prof.name, hardware_profile_url(prof.name))
-      = format_instance_profile(prof)
-  %di
-    %dt Realm
-    %dd
-      = @instance.realm_id ? link_to(@instance.realm_id, realm_url(@instance.realm_id)) :
'default'
-  %di
-    %dt State
-    %dd
-      = @instance.state
-  %di
-    %dt Public Addresses
-    %dd
-      = @instance.public_addresses.collect { |address| "<div>#{address}</div>"
}.join
-  %di
-    %dt Private Addresses
-    %dd
-      = @instance.private_addresses.collect { |address| "<div>#{address}</div>"
}.join
-  - if @instance.password
-    %di
-      %dt Username
-      %dd
-        = @instance.username
-    %di
-      %dt Password
-      %dd
-        = @instance.password
-  - if @instance.keyname
-    %di
-      %dt Key
-      %dd
-        = @instance.keyname
-  - if @instance.firewalls
-    %di
-      %dt Firewalls
-      %dd
-        = @instance.firewalls.join(", ")
-  %di
-    %dt
-    %dd
-      -@instance.actions.each do |action|
-        =link_to_action action, self.send(:"#{action}_instance_url", @instance.id), instance_action_method(action)
-    %dt
-    %dd
-      - if @instance.can_create_image?
-        =link_to_action 'Create Image', api_url_for("images/new?instance_id=#{@instance.id}"),
:get
-
+      %a{ :href => hardware_profile_url(prof.name), :'data-ajax' => 'false'}
+        =[prof.name, format_instance_profile(prof)].join(', ')
+    %li{ :'data-role' => 'list-divider'} Realm
+    %li
+      - if @instance.realm_id
+        %a{ :href => realm_url(@instance.realm_id), :'data-ajax' => 'false' }=@instance.realm_id
+      - else
+        default
+    %li{ :'data-role' => 'list-divider'} Public addresses
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@instance.public_addresses.map.join(',')
+    %li{ :'data-role' => 'list-divider'} Private addresses
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@instance.private_addresses.map.join(',')
+    - if @instance.password or @instance.keyname
+      %li{ :'data-role' => 'list-divider'} Authentication
+    - if @instance.password
+      %li{ :'data-role' => 'list-divider'} Username
+      %li=@instance.username
+      %li{ :'data-role' => 'list-divider'} Password
+      %li=@instance.password
+    - if @instance.keyname
+      %li{ :'data-role' => 'list-divider'} SSH key name
+      %li
+        %a{ :href => key_url(@instance.keyname), :'data-ajax' => 'false'}=@instance.keyname
+    - if @instance.firewalls
+      %li{ :'data-role' => 'list-divider'} Firewalls
+      %li=@instance.firewalls.join(", ")
+    %li{ :'data-role' => 'list-divider'} Actions
+    %li
+      %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
+        - @instance.actions.each do |action|
+          =link_to_action action, self.send(:"#{action}_instance_url", @instance.id), instance_action_method(action)
+        - if @instance.can_create_image?
+          =link_to_action 'Create Image', api_url_for("images/new?instance_id=#{@instance.id}"),
:get

Modified: incubator/deltacloud/trunk/server/views/keys/index.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/keys/index.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/keys/index.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/keys/index.html.haml Fri Jul 29 13:09:26 2011
@@ -1,26 +1,15 @@
-%h1 Keys
+=header "Keys" do
+  %a{ :href => api_url_for('keys/new'), :'data-icon' => :plus, :'data-role' => :button,
:class => 'ui-btn-right'} Create new key
 
-%table.display
-  %thead
-    %tr
-      %th ID
-      %th Credentials details
-      %th Actions
-  %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}
     - @elements.each do |key|
-      %tr
-        %td
-          = link_to key.id, key_url( key.id )
-        %td
-          - if key.credential_type.eql?(:key)
-            = key.fingerprint
-          - if key.credential_type.eql?(:password)
-            = "#{key.username} - #{key.password}"
-        %td
-          - if driver.respond_to?(:destroy_key)
-            =link_to_action 'Destroy', destroy_key_url(key.id), :delete
-  %tfoot
-    - if driver.respond_to?(:create_key)
-      %tr
-        %td{:colspan => 3, :style => "text-align:right;"}
-          =link_to 'Create &raquo;', "#{api_url_for('keys/new')}", :class => 'button'
+      %li
+        %a{ :href => key_url(key.id), :'data-ajax' => 'false'}
+          %img{ :class => 'ui-link-thumb', :src => '/images/key.png'}
+          %h3=key.id
+          %p
+            - if key.credential_type.eql?(:key)
+              = key.fingerprint
+            - if key.credential_type.eql?(:password)
+              = "#{key.username} - #{key.password}"

Modified: incubator/deltacloud/trunk/server/views/keys/new.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/keys/new.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/keys/new.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/keys/new.html.haml Fri Jul 29 13:09:26 2011
@@ -1,8 +1,8 @@
-%h1 New key
+=header "Create new SSH key"
 
-%form{ :action => keys_url, :method => :post }
-  %p
-    %label
-      Name:
-    %input{ :name => 'name', :size => 30 }/
-    %input{ :type => :submit, :name => "commit", :value => "create" }/
+%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
+  %form{ :action => keys_url, :method => :post}
+    %div{ 'data-role' => :fieldcontain }
+      %label{ :for => :name} Key name:
+      %input{ :type => :text, :id => :name, :name => :name, :value => '' }
+    %button{ :type => :submit} Create key

Modified: incubator/deltacloud/trunk/server/views/keys/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/keys/show.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/keys/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/keys/show.html.haml Fri Jul 29 13:09:26 2011
@@ -1,22 +1,27 @@
-%h1
-  = @key.id
+=header "Key"
+=subheader @key.id
 
-%dl
-  - if @key.is_key?
-    %di
-      %dt Fingerprint
-      %dd
-        = @key.fingerprint
-      - if @key.pem_rsa_key
-        %dt PEM key
-        %dd
-          %pre
-            = @key.pem_rsa_key
-  - if @key.is_password?
-    %di
-      %dt Username
-      %dd
-        = @key.username
-      %dt Password
-      %dd
-        = @key.password
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    %li{ :'data-role' => 'list-divider'} Identifier
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@key.id
+    - if @key.is_password?
+      %li{ :'data-role' => 'list-divider'} Username
+      %li
+        %p{ :'data-role' => 'fieldcontain'}=@key.username
+      %li{ :'data-role' => 'list-divider'} Password
+      %li
+        %p{ :'data-role' => 'fieldcontain'}=@key.password
+    - else
+      %li{ :'data-role' => 'list-divider'} Fingerprint
+      %li
+        %p{ :'data-role' => 'fieldcontain'}=@key.fingerprint
+      %li{ :'data-role' => 'list-divider'} PEM key
+      %li
+        %p{ :'data-role' => 'fieldcontain'}
+          %pre=@key.pem_rsa_key
+    %li{ :'data-role' => 'list-divider'} Actions
+    %li
+      %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
+        =link_to_action "Destroy", destroy_key_url(@key.id), :delete

Modified: incubator/deltacloud/trunk/server/views/layout.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/layout.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/layout.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/layout.html.haml Fri Jul 29 13:09:26 2011
@@ -1,31 +1,32 @@
-!!!
-!!! XML
-
+!!!5
 %html
   %head
-    = stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
-    /[if lt IE 8]
-      = stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
-    = stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen,
projection'
-    %script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js"
}
+    %title Deltacloud API #{settings.version}
+    = stylesheet_link_tag '/stylesheets/jquery.mobile-1.0b1.min.css'
+    = stylesheet_link_tag '/stylesheets/new.css'
+    %script{:type => "text/javascript", :src => "/javascripts/jquery.min.js" }
     %script{:type => "text/javascript", :src => "/javascripts/application.js" }
+    %script{:type => "text/javascript", :src => "/javascripts/jquery.mobile-1.0b1.min.js"
}
+    :javascript
+      $(document).ready(function() {
+        $(document).bind("mobileinit", function(){
+          $.mobile.ajaxEnabled = false;
+          $.mobile.hashListeningEnabled = false;
+        });
+      })
+
   %body
-    #wrapper
-      #header
-        = link_to image_tag( "/images/logo-wide.png" ), root_url
-      = bread_crumb
-      #content
-        = yield
-      #footer
-        #formats
-          Format:
-          =link_to_format(:xml)
-          |
-          =link_to_format(:json)
-        #driver_info
-          Driver: #{driver_symbol} | Provider: #{Thread::current[:provider] || ENV['API_PROVIDER']}
| API version: #{settings.version}
-        #copyright
-          Copyright 2009-2011
-          %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
-          and individual contributors.
+    %div{ 'data-role' => :page }
+      = yield
+      %div{ 'data-role' => :footer, :'data-theme' => 'a'}
+        %div{ 'data-role' => :navbar}
+          %ul
+            %li
+              %a{ :'data-icon' => 'home', :href => api_url_for(''), :'data-ajax' =>
'false'} Home
+            %li=link_to_format(:xml)
+            %li=link_to_format(:json)
+        %div{ 'data-role' => :header, 'data-theme' => 'a' }
+          #copyright
+            Copyright 2009-2011
+            %a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software
Foundation
+            and individual contributors.

Modified: incubator/deltacloud/trunk/server/views/load_balancers/index.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/load_balancers/index.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/load_balancers/index.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/load_balancers/index.html.haml Fri Jul 29 13:09:26
2011
@@ -1,32 +1,13 @@
-%h1 Load Balancers
+=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
+=subheader "#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}"
 
-%table.display
-  %thead
-    %tr
-      %th ID
-      %th Hostname
-      %th Realm
-      %th Balancer port
-      %th Instances port
-      %th Actions
-  %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}
     - @elements.each do |balancer|
-      %tr
-        %td
-          = link_to balancer.id, load_balancer_url( balancer.id )
-        %td
-          = balancer.public_addresses.first
-        %td
-          =link_to balancer.realms.first.id, realm_url( balancer.realms.first.id )
-        %td
-          - balancer.listeners.each do |listener|
-            ="#{listener.protocol}[#{listener.load_balancer_port}]<br/>"
-        %td
-          - balancer.listeners.each do |listener|
-            ="#{listener.protocol}[#{listener.instance_port}]<br/>"
-        %td
-          =link_to_action 'Destroy', destroy_load_balancer_url(balancer.id), :delete
-  %tfoot
-    %tr
-      %td{:colspan => 6, :style => "text-align:right;"}
-        =link_to 'Create &raquo;', "#{api_url_for('load_balancers/new')}", :class =>
'button'
+      %li
+        %a{ :href => load_balancer_url(balancer.id), :'data-ajax' => 'false'}
+          %img{ :class => 'ui-link-thumb', :src => '/images/balancer.png'}
+          %h3=balancer.id
+          %p=balancer.public_addresses.join(', ')
+          %span{ :class => 'ui-li-count'}=balancer.realms.first.id

Modified: incubator/deltacloud/trunk/server/views/load_balancers/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/load_balancers/show.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/load_balancers/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/load_balancers/show.html.haml Fri Jul 29 13:09:26
2011
@@ -1,37 +1,36 @@
-%h1
-  = @load_balancer.id
+=header "Loadbalancer"
+=subheader @load_balancer.id
 
-%dl
-  %di
-    %dt Public addresses
-    %dd
-      = @load_balancer.public_addresses.join(',')
-    - if @load_balancer.created_at
-      %dt Created at
-      %dd
-        = @load_balancer.created_at
-    %dt Realms
-    %dd
-      = @load_balancer.realms.collect { |r| "#{r.id} - #{r.name}" }.join(',')
-    %dt Listeners
-    %dd
-      - @load_balancer.listeners.each do |listener|
-        ="Load balancer port: #{listener.load_balancer_port}"
-        %br
-        ="Instance port: #{listener.instance_port}"
-        %br
-    - if @load_balancer.instances.class.eql?(Array)
-      %dt Instances
-      - @load_balancer.instances.each do |inst|
-        %dd
-          =inst.id
-          =link_to_action 'Delete', unregister_load_balancer_url(@load_balancer.id, :instance_id
=> inst.id), :post
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    %li{ :'data-role' => 'list-divider'} Created at
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@load_balancer.created_at
+    %li{ :'data-role' => 'list-divider'} Public addresses
+    - @load_balancer.public_addresses.each do |address|
+      %li
+        %p{ :'data-role' => 'fieldcontain'}=address
+    %li{ :'data-role' => 'list-divider'} Realms
+    - @load_balancer.realms.each do |realm|
+      %li
+        %a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
+          %h3=realm.name
+    %li{ :'data-role' => 'list-divider'} Instances
+    - @load_balancer.instances.each do |instance|
+      %li
+        %a{ :href => instance_url(instance.id), :'data-ajax' => 'false'}
+          %h3=instance.name
+    %li{ :'data-role' => 'list-divider'} Actions
+    %li
+      =link_to_action "Destroy", destroy_load_balancer_url(@load_balancer.id), :delete
 
-%form{:action => api_url_for("load_balancers/#{@load_balancer.id}/register"), :method
=> :post}
-  %p
-    %strong Add instances to load balancer
-  %p
-    %label Instance
-    %select{:name => :instance_id, :id => "list_instances"}
-    %input{:type => :submit, :value => "Assign"}
+  =header "Listeners", :back => 'false'
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    - @load_balancer.listeners.each do |listener|
+      %li{ :'data-role' => 'list-divider'} Load balancer port
+      %li
+        %p{ :'data-role' => 'fieldcontain'}=listener.load_balancer_port
+      %li{ :'data-role' => 'list-divider'} Instance port
+      %li
+        %p{ :'data-role' => 'fieldcontain'}=listener.instance_port
 

Modified: incubator/deltacloud/trunk/server/views/realms/index.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/realms/index.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/realms/index.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/realms/index.html.haml Fri Jul 29 13:09:26 2011
@@ -1,26 +1,13 @@
-%h1
-  Realms
+=header "Realms"
+=subheader "#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}"
 
-%table.display
-  %thead
-    %tr
-      %th
-        ID
-      %th
-        Name
-      %th
-        State
-      %th
-        Limit
-  %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}
+    %li{ :'data-role' => 'list-divider'}=driver_symbol
     - @realms.each do |realm|
-      %tr
-        %td
-          = link_to realm.id, realm_url( realm.id )
-        %td
-          = realm.name
-        %td
-          = realm.state
-        %td
-          = realm.limit
-
+      %li
+        %a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
+          %img{ :class => 'ui-link-thumb', :src => '/images/realm.png'}
+          %h3= realm.name
+          %p=[realm.id, realm.limit].join(', ')
+          %span{ :class => 'ui-li-count'}=realm.state

Modified: incubator/deltacloud/trunk/server/views/realms/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/realms/show.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/realms/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/realms/show.html.haml Fri Jul 29 13:09:26 2011
@@ -1,15 +1,17 @@
-%h1
-  = @realm.id
-%dl
-  %di
-    %dt Name
-    %dd
-      = @realm.name
-  %di
-    %dt State
-    %dd
-      = @realm.state
-  %di
-    %dt Limit
-    %dd
-      = @realm.limit
+=header Realm
+=subheader @realm.id
+
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    %li{ :'data-role' => 'list-divider'} Identifier
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@realm.id
+    %li{ :'data-role' => 'list-divider'} Name
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@realm.name
+    %li{ :'data-role' => 'list-divider'} State
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@realm.state
+    %li{ :'data-role' => 'list-divider'} Limit
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@realm.limit

Modified: incubator/deltacloud/trunk/server/views/storage_snapshots/index.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_snapshots/index.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_snapshots/index.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_snapshots/index.html.haml Fri Jul 29 13:09:26
2011
@@ -1,23 +1,13 @@
-%h1 Storage Snapshots
+=header "Storage Snapshots"
 
-%table
-  %thead
-    %tr
-      %th ID
-      %th Volume
-      %th Created
-      %th State
-      %th Actions
-  %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}
+    %li{ :'data-role' => 'list-divider'}=driver_symbol
     - @storage_snapshots.each do |snapshot|
-      %tr
-        %td
-          = link_to snapshot.id, storage_snapshot_url( snapshot.id )
-        %td
-          = link_to snapshot.storage_volume_id, storage_volume_url( snapshot.storage_volume_id
)
-        %td
-          = snapshot.created
-        %td
-          = snapshot.state
-        %td
-          = link_to_action "Delete", destroy_storage_snapshot_url(snapshot.id), :delete
+      %li
+        %a{ :href => storage_snapshot_url(snapshot.id), :'data-ajax' => 'false'}
+          %img{ :class => 'ui-link-thumb', :src => '/images/snapshot.png'}
+          %h3= snapshot.id
+          %p=[snapshot.storage_volume_id, snapshot.created].join(', ')
+          %span{ :class => 'ui-li-count'}=snapshot.state
+

Modified: incubator/deltacloud/trunk/server/views/storage_snapshots/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_snapshots/show.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_snapshots/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_snapshots/show.html.haml Fri Jul 29 13:09:26
2011
@@ -1,14 +1,22 @@
-%h1
-  = @storage_snapshot.id
+=header "Storage snapshot"
+=subheader @storage_snapshot.id
 
-%dl
-  %di
-    %dt Volume
-    %dd
-      = @storage_snapshot.storage_volume_id
-    %dt Created
-    %dd
-      = @storage_snapshot.created
-    %dt State
-    %dd
-      = @storage_snapshot.state
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    %li{ :'data-role' => 'list-divider'} Name
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.id
+    %li{ :'data-role' => 'list-divider'} Storage volume
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.storage_volume_id
+    %li{ :'data-role' => 'list-divider'} Created
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.created
+    %li{ :'data-role' => 'list-divider'} State
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_snapshot.state
+    %li{ :'data-role' => 'list-divider'} Actions
+    %li
+      %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
+        - if driver.respond_to?(:destroy_storage_snapshot)
+          =link_to_action "Delete", destroy_storage_snapshot_url(@storage_snapshot.id), :delete

Modified: incubator/deltacloud/trunk/server/views/storage_volumes/index.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_volumes/index.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_volumes/index.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_volumes/index.html.haml Fri Jul 29 13:09:26
2011
@@ -1,36 +1,13 @@
-%h1 Storage Volumes
+=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
 
-%table.display
-  %thead
-    %tr
-      %th ID
-      %th Created
-      %th Realm
-      %th Capacity
-      %th Status
-      %th Actions
-  %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'a'}
+    %li{ :'data-role' => 'list-divider'}=driver_symbol
     - @storage_volumes.each do |volume|
-      %tr
-        %td
-          = link_to volume.id, storage_volume_url( volume.id )
-        %td
-          = volume.created
-        %td
-          = volume.realm_id
-        %td
-          = "#{volume.capacity} GB"
-        %td
-          = "#{volume.state}"
-        %td
-          - if ["AVAILABLE", "IN-USE"].include?(volume.state)
-            =link_to_action "Snaphot", api_url_for("storage_snapshots/new?volume_id=#{volume.id}"),
:get
-            - unless volume.instance_id
-              =link_to_action "Delete", destroy_storage_volume_url(volume.id), :delete
-              =link_to_action "Attach", api_url_for("storage_volumes/attach?id=#{volume.id}"),
:get
-            - if volume.instance_id
-              =link_to_action "Detach", detach_storage_volume_url(volume.id), :post
-  %tfoot
-    %tr
-      %td{:colspan => 6}
-        %a{ :href => api_url_for("storage_volumes/new")} Create volume
+      %li
+        %a{ :href => storage_volume_url(volume.id), :'data-ajax' => 'false'}
+          %img{ :class => 'ui-link-thumb', :src => '/images/volume.png'}
+          %h3= volume.id
+          %p=[volume.realm_id, volume.capacity].join(', ')
+          %span{ :class => 'ui-li-count'}=volume.state

Modified: incubator/deltacloud/trunk/server/views/storage_volumes/show.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/storage_volumes/show.html.haml?rev=1152201&r1=1152200&r2=1152201&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/storage_volumes/show.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/storage_volumes/show.html.haml Fri Jul 29 13:09:26
2011
@@ -1,28 +1,34 @@
-%h1
-  = @storage_volume.id
+=header "Storage volume"
+=subheader @storage_volume.id
 
-%dl
-  %di
-    %dt Name
-    %dd
-      = @storage_volume.name
-  %di
-    %dt Created
-    %dd
-      = @storage_volume.created
-  %di
-    %dt Capacity
-    %dd
-      = "#{@storage_volume.capacity} GB"
-  %di
-    %dt Realm
-    %dd
-      = @storage_volume.realm_id
-  %di
-    %dt State
-    %dd
-      = @storage_volume.state
-  %di
-    %dt Attached
-    %dd
-      = link_to(@storage_volume.instance_id, instance_url( @storage_volume.instance_id))
+ ' - ' + @storage_volume.device.to_s if @storage_volume.instance_id
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+  %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' =>
'd'}
+    %li{ :'data-role' => 'list-divider'} Name
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_volume.id
+    %li{ :'data-role' => 'list-divider'} Created
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_volume.created
+    %li{ :'data-role' => 'list-divider'} Capacity
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_volume.capacity
+    %li{ :'data-role' => 'list-divider'} Realm
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_volume.realm_id
+    %li{ :'data-role' => 'list-divider'} State
+    %li
+      %p{ :'data-role' => 'fieldcontain'}=@storage_volume.state
+    %li{ :'data-role' => 'list-divider'} Attached to
+    %li
+      %a{ :href => instance_url( @storage_volume.instance_id) + ' - ' + @storage_volume.device.to_s}
+        =@storage_volume.instance_id || 'unknown'
+    %li{ :'data-role' => 'list-divider'} Actions
+    %li
+      %div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
+        - if ["AVAILABLE", "IN-USE"].include?(@storage_volume.state)
+          =link_to_action "Snaphot", api_url_for("storage_snapshots/new?volume_id=#{@storage_volume.id}"),
:get
+          - unless @storage_volume.instance_id
+            =link_to_action "Delete", destroy_storage_volume_url(@storage_volume.id), :delete
+            =link_to_action "Attach", api_url_for("storage_volumes/attach?id=#{@storage_volume.id}"),
:get
+          - if @storage_volume.instance_id
+            =link_to_action "Detach", detach_storage_volume_url(@storage_volume.id), :post



Mime
View raw message