diff options
| author | Matthew Hicks <mhicks@mhicks-host.usersys.redhat.com> | 2008-06-21 14:18:16 -0400 |
|---|---|---|
| committer | Matthew Hicks <mhicks@mhicks-host.usersys.redhat.com> | 2008-06-21 14:18:16 -0400 |
| commit | f680c3185f798215d4c381038fca9a62ffd76d8e (patch) | |
| tree | 74b67a25978c47d212b0d774141d9c806cc1c2b3 /cloudmasterd | |
| parent | 1bdfd2c9c90f08d8bfdd9aaebe8b558a09e08917 (diff) | |
Adding wiring for deleting vms
Diffstat (limited to 'cloudmasterd')
| -rw-r--r-- | cloudmasterd/lib/cloudmasterd.rb | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/cloudmasterd/lib/cloudmasterd.rb b/cloudmasterd/lib/cloudmasterd.rb index fb761f0..1c95d45 100644 --- a/cloudmasterd/lib/cloudmasterd.rb +++ b/cloudmasterd/lib/cloudmasterd.rb @@ -134,6 +134,11 @@ module Cloudmasterd::Controllers Machine.create :name => machine_fqdn, :email => email, :cloud => @host render :_koan end + + def destroy(id) + puts "Destroying image #{id}" + redirect R(Cloud) + end end class Cloud < REST 'cloud' @@ -173,9 +178,17 @@ module Cloudmasterd::Views @machines.keys.each do |email| div do h1 email - ul do - @machines[email].each do |machine| - li "#{machine.name}: #{machine.cloud}" + @machines[email].each do |machine| + table do + tr do + td machine.name + td machine.cloud + td do + form(:method => :delete, :action => R(Cloudmasterd::Controllers::Koan, "#{machine.name}.html")) do + input :type => :submit, :value => 'Destroy' + end + end + end end end end |
