[ARVADOS] updated: d719c220ffe0b81d29d3db38a4dc0f1416389eda
git at public.curoverse.com
git at public.curoverse.com
Tue Mar 11 15:20:14 EDT 2014
Summary of changes:
.../app/controllers/collections_controller.rb | 2 +-
apps/workbench/app/helpers/provenance_helper.rb | 32 ++++++++++---------
2 files changed, 18 insertions(+), 16 deletions(-)
via d719c220ffe0b81d29d3db38a4dc0f1416389eda (commit)
via c8744fe549cd813f325716c3ff072c78f4b660a3 (commit)
from f820ec186b048fbd2bf6a6f9683e7bbaed52515e (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 d719c220ffe0b81d29d3db38a4dc0f1416389eda
Merge: c8744fe f820ec1
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Mar 11 15:21:41 2014 -0400
Merge branch 'master' of git.clinicalfuture.com:arvados
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
commit c8744fe549cd813f325716c3ff072c78f4b660a3
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Mar 11 15:21:28 2014 -0400
Bugfixes to provenance graph:
* Fixed url generation to use correct protocol (http/https)
* Fixed generic node description
* Fixed direction of provenance graph
diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index 737583a..d46ec03 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -105,7 +105,7 @@ class CollectionsController < ApplicationController
puts request
@prov_svg = ProvenanceHelper::create_provenance_graph(u.provenance, "provenance_svg",
{:request => request,
- :direction => :top_down,
+ :direction => :bottom_up,
:combine_jobs => :script_only}) rescue nil
@used_by_svg = ProvenanceHelper::create_provenance_graph(u.used_by, "used_by_svg",
{:request => request,
diff --git a/apps/workbench/app/helpers/provenance_helper.rb b/apps/workbench/app/helpers/provenance_helper.rb
index c0b2fd3..66754d2 100644
--- a/apps/workbench/app/helpers/provenance_helper.rb
+++ b/apps/workbench/app/helpers/provenance_helper.rb
@@ -26,6 +26,14 @@ module ProvenanceHelper
end
end
+ def url_for u
+ p = { :host => @opts[:request].host,
+ :port => @opts[:request].port,
+ :protocol => @opts[:request].protocol }
+ p.merge! u
+ Rails.application.routes.url_helpers.url_for (p)
+ end
+
def determine_fillcolor(n)
fillcolor = %w(aaaaaa aaffaa aaaaff aaaaaa ffaaaa)[n || 0] || 'aaaaaa'
"style=filled,fillcolor=\"##{fillcolor}\""
@@ -37,11 +45,9 @@ module ProvenanceHelper
rsc = ArvadosBase::resource_class_for_uuid uuid.to_s
if rsc
- href = Rails.application.routes.url_helpers.url_for ({:controller => rsc.to_s.tableize,
- :action => :show,
- :id => uuid.to_s,
- :host => @opts[:request].host,
- :port => @opts[:request].port})
+ href = url_for ({:controller => rsc.to_s.tableize,
+ :action => :show,
+ :id => uuid.to_s })
#"\"#{uuid}\" [label=\"#{rsc}\\n#{uuid}\",href=\"#{href}\"];\n"
if rsc == Collection
@@ -80,8 +86,8 @@ module ProvenanceHelper
end
end
end
- return "\"#{uuid}\" [label=\"#{rsc}\",href=\"#{href}\",#{bgcolor}];\n"
end
+ return "\"#{uuid}\" [label=\"#{rsc}\",href=\"#{href}\",#{bgcolor}];\n"
end
"\"#{uuid}\" [#{bgcolor}];\n"
end
@@ -227,11 +233,9 @@ module ProvenanceHelper
@pdata.each do |k, link|
if link[:head_uuid] == uuid.to_s and link[:link_class] == "provenance"
- href = Rails.application.routes.url_helpers.url_for ({:controller => Link.to_s.tableize,
- :action => :show,
- :id => link[:uuid],
- :host => @opts[:request].host,
- :port => @opts[:request].port})
+ href = url_for ({:controller => Link.to_s.tableize,
+ :action => :show,
+ :id => link[:uuid] })
gr += describe_node(link[:tail_uuid])
gr += edge(link[:head_uuid], link[:tail_uuid], {:label => link[:name], :href => href})
@@ -247,10 +251,8 @@ module ProvenanceHelper
def describe_jobs
gr = ""
@jobs.each do |k, v|
- href = Rails.application.routes.url_helpers.url_for ({:controller => Job.to_s.tableize,
- :action => :index,
- :host => @opts[:request].host,
- :port => @opts[:request].port})
+ href = url_for ({:controller => Job.to_s.tableize,
+ :action => :index })
gr += "\"#{k}\" [href=\"#{href}?"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list