X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2d5ef50536851f8d190675a3bd74ee7567713ee0..b9c5339d113c63ffc3d8a7c6bf1019616bb3f89a:/apps/workbench/app/models/container_request.rb diff --git a/apps/workbench/app/models/container_request.rb b/apps/workbench/app/models/container_request.rb index 765300b192..be97a6cfb5 100644 --- a/apps/workbench/app/models/container_request.rb +++ b/apps/workbench/app/models/container_request.rb @@ -1,5 +1,45 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class ContainerRequest < ArvadosBase - def work_unit(label=nil) - ContainerWorkUnit.new(self, label) + def self.creatable? + false end + + def textile_attributes + [ 'description' ] + end + + def self.goes_in_projects? + true + end + + def self.copies_to_projects? + false + end + + def work_unit(label=nil, child_objects=nil) + ContainerWorkUnit.new(self, label, self.uuid, child_objects=child_objects) + end + + def editable_attributes + super + ["reuse_steps"] + end + + def reuse_steps + command.each do |arg| + if arg == "--enable-reuse" + return true + end + end + false + end + + def self.attribute_info + self.columns + @attribute_info[:reuse_steps] = {:type => "boolean"} + @attribute_info + end + end