Displaying 4 results from an estimated 4 matches for "input_int".
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
...0178ad0..0c6562e 100644
--- a/src/app/helpers/application_helper.rb
+++ b/src/app/helpers/application_helper.rb
@@ -171,4 +171,18 @@ module ApplicationHelper
def flash_path(source)
compute_public_path(source, 'swfs', 'swf')
end
+
+ def number_to_duration(input_num)
+ input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label =...
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
...0178ad0..0c6562e 100644
--- a/src/app/helpers/application_helper.rb
+++ b/src/app/helpers/application_helper.rb
@@ -171,4 +171,18 @@ module ApplicationHelper
def flash_path(source)
compute_public_path(source, 'swfs', 'swf')
end
+
+ def number_to_duration(input_num)
+ input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label =...
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
...0178ad0..0c6562e 100644
--- a/src/app/helpers/application_helper.rb
+++ b/src/app/helpers/application_helper.rb
@@ -171,4 +171,18 @@ module ApplicationHelper
def flash_path(source)
compute_public_path(source, 'swfs', 'swf')
end
+
+ def number_to_duration(input_num)
+ input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label =...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
...0178ad0..0c6562e 100644
--- a/src/app/helpers/application_helper.rb
+++ b/src/app/helpers/application_helper.rb
@@ -171,4 +171,18 @@ module ApplicationHelper
def flash_path(source)
compute_public_path(source, 'swfs', 'swf')
end
+
+ def number_to_duration(input_num)
+ input_int = input_num.to_i
+ hours_to_seconds = [input_int/3600 % 24,
+ input_int/60 % 60,
+ input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':')
+ days = input_int / 86400
+ day_str = ""
+ if days > 0
+ day_label =...