incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962084 - in /incubator/deltacloud/trunk/framework: app/controllers/ app/helpers/ app/views/instances/ config/ public/stylesheets/ public/stylesheets/sass/
Date Thu, 08 Jul 2010 23:21:51 GMT
Author: lutter
Date: Thu Jul  8 23:21:51 2010
New Revision: 962084

URL: http://svn.apache.org/viewvc?rev=962084&view=rev
Log:
Move breadcrumb CSS into .sass instead of generated .css

Added:
    incubator/deltacloud/trunk/framework/app/views/instances/states.html.erb
Modified:
    incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb
    incubator/deltacloud/trunk/framework/app/helpers/driver_helper.rb
    incubator/deltacloud/trunk/framework/config/routes.rb
    incubator/deltacloud/trunk/framework/public/stylesheets/application.css
    incubator/deltacloud/trunk/framework/public/stylesheets/sass/application.sass

Modified: incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb?rev=962084&r1=962083&r2=962084&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb (original)
+++ incubator/deltacloud/trunk/framework/app/controllers/instances_controller.rb Thu Jul 
8 23:21:51 2010
@@ -5,6 +5,10 @@ class InstancesController < ApplicationC
 
   around_filter :catch_auth
 
+  def states
+    @states = driver.states( credentials )
+  end
+
   def index
     build_filter( :id )
     @instances = driver.instances( credentials, @filter )

Modified: incubator/deltacloud/trunk/framework/app/helpers/driver_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/app/helpers/driver_helper.rb?rev=962084&r1=962083&r2=962084&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/app/helpers/driver_helper.rb (original)
+++ incubator/deltacloud/trunk/framework/app/helpers/driver_helper.rb Thu Jul  8 23:21:51
2010
@@ -1,4 +1,6 @@
 
+require 'deltacloud/base_driver'
+
 module DriverHelper
 
   def driver

Added: incubator/deltacloud/trunk/framework/app/views/instances/states.html.erb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/app/views/instances/states.html.erb?rev=962084&view=auto
==============================================================================
--- incubator/deltacloud/trunk/framework/app/views/instances/states.html.erb (added)
+++ incubator/deltacloud/trunk/framework/app/views/instances/states.html.erb Thu Jul  8 23:21:51
2010
@@ -0,0 +1,46 @@
+
+<h1>States</h1>
+
+<table class="states">
+  <tr>
+    <th>
+      Origin
+    </th>
+    <th>
+      Action
+    </th>
+    <th>
+      Destination
+    </th>
+  </tr>
+  <% @states.each do |state| %>
+    <% origin      = state.first %>
+    <% transitions = state.last %>
+    <tr>
+      <td rowspan="<%= transitions.empty? ? 2 : transitions.size + 1 %>" class="origin">
+        <%= origin %>
+      </td>
+    </tr>
+    <% if ( transitions.empty? ) %>
+      <tr> 
+        <td>
+          --
+        </td>
+        <td>
+          --
+        </td>
+      </tr> 
+    <% else %>
+      <% transitions.each do |destination, action| %>
+        <tr>
+          <td>
+            <%= action %>
+          </td>
+          <td>
+            <%= destination %>
+          </td>
+        </tr>
+      <% end %>
+    <% end %>
+  <% end %>
+</table>

Modified: incubator/deltacloud/trunk/framework/config/routes.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/config/routes.rb?rev=962084&r1=962083&r2=962084&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/config/routes.rb (original)
+++ incubator/deltacloud/trunk/framework/config/routes.rb Thu Jul  8 23:21:51 2010
@@ -10,6 +10,9 @@ ActionController::Routing::Routes.draw d
   map.resources :realms, :path_prefix=>'api'
   map.resources :images, :path_prefix=>'api'
   map.resources :instances, :path_prefix=>'api',
+    :collection=>{
+      :states=>:get,
+    },
     :member=>{
       :destroy=>:post,
       :stop=>:post,

Modified: incubator/deltacloud/trunk/framework/public/stylesheets/application.css
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/public/stylesheets/application.css?rev=962084&r1=962083&r2=962084&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/public/stylesheets/application.css (original)
+++ incubator/deltacloud/trunk/framework/public/stylesheets/application.css Thu Jul  8 23:21:51
2010
@@ -40,6 +40,11 @@ body {
   list-style-type: square;
   margin-left: 1em; }
 
+ul.breadcrumb li {
+  display: inline; }
+  ul.breadcrumb li.subsequent:before {
+    content: " >> "; }
+
 table {
   width: 100%; }
   table th, table td {
@@ -51,6 +56,11 @@ table {
   table td {
     background-color: #eeeeee; }
 
+table.states tr {
+  border-bottom: 1px solid #bbbbbb; }
+table.states th, table.states td {
+  vertical-align: top; }
+
 .radio-group {
   font-size: 90%;
   margin-bottom: 1em;
@@ -69,10 +79,3 @@ input[type='radio'] {
   margin-top: 1ex;
   margin-left: 1ex;
   margin-bottom: 1ex; }
-
-ul.breadcrumb li {
-  display:inline;
-}
-ul.breadcrumb li.subsequent:before {
-  content: " >> "
-}

Modified: incubator/deltacloud/trunk/framework/public/stylesheets/sass/application.sass
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/framework/public/stylesheets/sass/application.sass?rev=962084&r1=962083&r2=962084&view=diff
==============================================================================
--- incubator/deltacloud/trunk/framework/public/stylesheets/sass/application.sass (original)
+++ incubator/deltacloud/trunk/framework/public/stylesheets/sass/application.sass Thu Jul
 8 23:21:51 2010
@@ -49,6 +49,13 @@ body
       :margin-left 1em
 
 
+ul.breadcrumb 
+  li 
+    :display inline
+
+    &.subsequent:before 
+      content: " >> "
+
 table
   :width 100%
   th, td
@@ -60,6 +67,11 @@ table
   td
     :background-color = !td_bg
 
+table.states
+  tr
+    :border-bottom = 1px solid !th_bg - #111
+  th, td
+    :vertical-align top
 
 .radio-group
   :font-size 90%



Mime
View raw message