[ARVADOS] created: 6805fb7e020f99402aa84db45e975b3062f28251

Git user git at public.curoverse.com
Wed Jun 1 19:05:59 EDT 2016


        at  6805fb7e020f99402aa84db45e975b3062f28251 (commit)


commit 6805fb7e020f99402aa84db45e975b3062f28251
Author: radhika <radhika at curoverse.com>
Date:   Wed Jun 1 19:05:37 2016 -0400

    8650: add container_work_unit

diff --git a/apps/workbench/app/models/container.rb b/apps/workbench/app/models/container.rb
index bee82ef..b523132 100644
--- a/apps/workbench/app/models/container.rb
+++ b/apps/workbench/app/models/container.rb
@@ -1,3 +1,5 @@
 class Container < ArvadosBase
-
+  def work_unit(label=nil)
+    ContainerWorkUnit.new(self, label)
+  end
 end
diff --git a/apps/workbench/app/models/container_work_unit.rb b/apps/workbench/app/models/container_work_unit.rb
new file mode 100644
index 0000000..b513489
--- /dev/null
+++ b/apps/workbench/app/models/container_work_unit.rb
@@ -0,0 +1,10 @@
+class ContainerWorkUnit < ProxyWorkUnit
+  def uri
+    uuid = get(:uuid)
+    "/containers/#{uuid}"
+  end
+
+  def title
+    "container"
+  end
+end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list