[ARVADOS] updated: 06d6b29b121b80cb975e5d9d29a9a6f9b3763c47
git at public.curoverse.com
git at public.curoverse.com
Wed Jul 29 13:35:00 EDT 2015
Summary of changes:
apps/workbench/Gemfile.lock | 3 ---
apps/workbench/app/helpers/pipeline_instances_helper.rb | 15 +--------------
.../views/pipeline_instances/_running_component.html.erb | 6 +++---
.../pipeline_instances/_show_components_running.html.erb | 10 +++++-----
4 files changed, 9 insertions(+), 25 deletions(-)
via 06d6b29b121b80cb975e5d9d29a9a6f9b3763c47 (commit)
from fd1c8009f521564eaec4dbb22cead032e3784023 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 06d6b29b121b80cb975e5d9d29a9a6f9b3763c47
Author: radhika <radhika at curoverse.com>
Date: Wed Jul 29 13:33:08 2015 -0400
6602: remove render_runtime_compact; instead use render_runtime with use_words = false and round_to_min.
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index bc7ddaf..20b8d61 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -294,6 +294,3 @@ DEPENDENCIES
therubyracer
uglifier (>= 1.0.3)
wiselinks
-
-BUNDLED WITH
- 1.10.5
diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index 939ddcb..66a7f17 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -289,7 +289,7 @@ module PipelineInstancesHelper
else
s = ""
if days > 0
- s += "#{days}<span class='time-label-divider'>d</span> "
+ s += "#{days}<span class='time-label-divider'>d</span>"
end
if (hours > 0)
@@ -306,19 +306,6 @@ module PipelineInstancesHelper
raw(s)
end
- def render_runtime_compact duration
- if duration >= DAY
- "#{(duration / DAY.to_f).round(2)} days"
- elsif duration >= HOUR
- "#{(duration / HOUR.to_f).round(2)} hours"
- elsif duration >= MINUTE
- "#{(duration / MINUTE.to_f).round(2)} minutes"
- else
- seconds = duration.round(2)
- "#{seconds} second#{'s' if seconds != 1}"
- end
- end
-
def render_unreadable_inputs_present
if current_user and controller.class.name.eql?('PipelineInstancesController') and unreadable_inputs_present?
raw('<div class="alert alert-danger unreadable-inputs-present">' +
diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
index 4b14356..63a2371 100644
--- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
@@ -25,8 +25,8 @@
<% walltime = ((if current_job[:finished_at] then current_job[:finished_at] else Time.now() end) - current_job[:started_at]) %>
<% cputime = (current_job[:runtime_constraints].andand[:min_nodes] || 1) *
((current_job[:finished_at] || Time.now()) - current_job[:started_at]) %>
- <%= render_runtime_compact(walltime) %>
- <% if cputime > 0 %> / <%= render_runtime_compact(cputime) %> (<%= (cputime/walltime).round(1) %>⨯)<% end %>
+ <%= render_runtime(walltime, false) %>
+ <% if cputime > 0 %> / <%= render_runtime(cputime, false) %> (<%= (cputime/walltime).round(1) %>⨯)<% end %>
<% end %>
</div>
<% end %>
@@ -35,7 +35,7 @@
<%# column offset 5 %>
<div class="col-md-6">
<% queuetime = Time.now - Time.parse(current_job[:created_at].to_s) %>
- Queued for <%= render_runtime_compact(queuetime) %>.
+ Queued for <%= render_runtime(queuetime, false) %>.
<% begin %>
<% if current_job[:queue_position] == 0 %>
This job is next in the queue to run.
diff --git a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
index 5213c2a..566e3d7 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components_running.html.erb
@@ -41,9 +41,9 @@
end %>
<%= if walltime > runningtime
- render_runtime_compact(walltime)
+ render_runtime(walltime, false)
else
- render_runtime_compact(runningtime)
+ render_runtime(runningtime, false)
end %><% if @object.finished_at %> at <%= render_localized_date(@object.finished_at) %><% end %>.
<% else %>
This pipeline is <%= if @object.state.start_with? 'Running' then 'active' else @object.state.downcase end %>.
@@ -71,10 +71,10 @@
0
end
}.reduce(:+) || 0 %>
- <%= render_runtime_compact(runningtime) %><% if (walltime - runningtime) > 0 %>
- (<%= render_runtime_compact(walltime - runningtime) %> queued)<% end %><% if cputime == 0 %>.<% else %>
+ <%= render_runtime(runningtime, false) %><% if (walltime - runningtime) > 0 %>
+ (<%= render_runtime(walltime - runningtime, false) %> queued)<% end %><% if cputime == 0 %>.<% else %>
and used
- <%= render_runtime_compact(cputime) %>
+ <%= render_runtime(cputime, false) %>
of node allocation time (<%= (cputime/runningtime).round(1) %>⨯ scaling).
<% end %>
</p>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list