search for: resourcescontroller

Displaying 10 results from an estimated 10 matches for "resourcescontroller".

Did you mean: resources_controller
2006 Mar 09
1
Rails File Upload w/ Ajax Update?
...access to the request.response data (in the way I can with link_to_remote)? The :finish JavaScript is being executed but because there is no request object, the table doesn''t update. Any ideas on how to get around this issue? As a base, I''ve started with Typo''s Admin::ResourcesController and modified it as such: # controller def upload begin case request.method when :post file = params[:upload][:filename] @up = Resource.create(:filename => file.original_filename, :mime => file.content_type.chomp,...
2009 May 22
1
[PATCH server] fixed smart pool 'save' regression.
...] : + params[:parent_id] end end diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index efd3cb6..9d1074a 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -66,12 +66,6 @@ class ResourcesController < PoolController super(:full_items => @pool.vms, :find_opts => {}, :include_pool => :true) end - def additional_create_params - {:parent_id => (params[:hardware_pool] ? - params[:hardware_pool][:parent_id] : - params[:parent_id])} -...
2005 Oct 17
0
acts_as_taggable and per-user tags
...join_class_name => ''TagResource'' ------------------------------------------------------------------------------------------------- class TagResource belongs_to :user end ------------------------------------------------------------------------------------------------- class ResourcesController < ApplicationController before_filter :login_required def create user = @session[:user] @resource = Resource.new(params[:resource]) @resource.user = user @resource.tag "document", :attributes => {:user_id => user.id} return render :action => ''...
2006 Jun 08
1
Permissions on uploaded files, TinyFile
Hi, im getting a little trouble with this, im using TinyFile as the example to upload files http://wiki.rubyonrails.com/rails/pages/TinyFile/versions/20 All goes well but the files uploaded are saved with permissions 600 (linux) and in the case of images arent showed on the browser(but uploaded and stored in the server without problems) i have to manually ftp to the uploaded files folder and
2009 Sep 16
2
[Fwd: Re: [PATCH node-image] keep NIC and HBA firmwares]
Forwarding to the list for Jay or Scott to have a look. Ignazio, do you see any more details (traceback or something) in the rails log? -------------- next part -------------- An embedded message was scrubbed... From: ignazio.cassano at provincia.torino.it Subject: Re: [Ovirt-devel] [PATCH node-image] keep NIC and HBA firmwares Date: Wed, 16 Sep 2009 16:48:47 +0200 Size: 4031 URL:
2009 May 20
1
[PATCH server] don't add nil key to failures hash for PartialSuccessError handling.
...end end unless failures.empty? diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index 6990df7..efd3cb6 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -80,10 +80,9 @@ class ResourcesController < PoolController begin svc_destroy(pool_id) successes << @pool - rescue PermissionError => perm_error - failures[@pool] = perm_error.message + # PermissionError expected rescue Exception => ex - failures[@pool] = ex.message +...
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
...ist.insert(3, [:host, :hostname]) end diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index 9d1074a..87f07f5 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -63,7 +63,9 @@ class ResourcesController < PoolController def vms_json svc_show(params[:id]) - super(:full_items => @pool.vms, :find_opts => {}, :include_pool => :true) + super(:full_items => @pool.vms, + :find_opts => {:select => Vm.calc_uptime}, + :include_pool => :true) end...
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
...ist.insert(3, [:host, :hostname]) end diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index 9d1074a..87f07f5 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -63,7 +63,9 @@ class ResourcesController < PoolController def vms_json svc_show(params[:id]) - super(:full_items => @pool.vms, :find_opts => {}, :include_pool => :true) + super(:full_items => @pool.vms, + :find_opts => {:select => Vm.calc_uptime}, + :include_pool => :true) end...
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
...ist.insert(3, [:host, :hostname]) end diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index 9d1074a..87f07f5 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -63,7 +63,9 @@ class ResourcesController < PoolController def vms_json svc_show(params[:id]) - super(:full_items => @pool.vms, :find_opts => {}, :include_pool => :true) + super(:full_items => @pool.vms, + :find_opts => {:select => Vm.calc_uptime}, + :include_pool => :true) end...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
...st.insert(3, [:host, :hostname]) end diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb index 9d1074a..7188db8 100644 --- a/src/app/controllers/resources_controller.rb +++ b/src/app/controllers/resources_controller.rb @@ -63,7 +63,12 @@ class ResourcesController < PoolController def vms_json svc_show(params[:id]) - super(:full_items => @pool.vms, :find_opts => {}, :include_pool => :true) + super(:full_items => @pool.vms, :find_opts => {:select => "*, case + when state='running' then + (cast...