Displaying 2 results from an estimated 2 matches for "1a57a14".
Did you mean:
157,14
2009 Jun 29
0
[PATCH server] REVISED Vm state change auditing/accounting
...+++
5 files changed, 204 insertions(+), 1 deletions(-)
create mode 100644 src/app/models/vm_observer.rb
create mode 100644 src/app/models/vm_state_change_event.rb
create mode 100644 src/db/migrate/039_add_vm_state_audit.rb
diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb
index f445219..1a57a14 100644
--- a/src/app/models/vm.rb
+++ b/src/app/models/vm.rb
@@ -41,6 +41,14 @@ class Vm < ActiveRecord::Base
:order => 'time_started DESC',
:dependent => :destroy
+
+ has_many :vm_state_change_events,
+ :order => 'created_at' do
+...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
...ut_int / 86400
+ day_str = ""
+ if days > 0
+ day_label = (days > 1) ? "days" : "day"
+ day_str = "#{days} #{day_label} "
+ end
+ day_str + hours_to_seconds
+ end
end
diff --git a/src/app/models/vm.rb b/src/app/models/vm.rb
index 1a57a14..355ce6d 100644
--- a/src/app/models/vm.rb
+++ b/src/app/models/vm.rb
@@ -421,6 +421,11 @@ class Vm < ActiveRecord::Base
:conditions => ["privileges.name=:priv
and permissions.uid=:user",
{ :user => user, :pri...