projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4291: Workbench Collection sharing buttons are actual buttons.
[arvados.git]
/
apps
/
workbench
/
app
/
models
/
job.rb
diff --git
a/apps/workbench/app/models/job.rb
b/apps/workbench/app/models/job.rb
index 9e9c0967871ba4e6408a79c1855b87460f156694..c59bb89fe851306c80278b4b96ce192c9e064ea7 100644
(file)
--- a/
apps/workbench/app/models/job.rb
+++ b/
apps/workbench/app/models/job.rb
@@
-7,12
+7,8
@@
class Job < ArvadosBase
"#{script} job"
end
"#{script} job"
end
- def attribute_editable? attr, *args
- if attr.to_sym == :description
- super && attr.to_sym == :description
- else
- false
- end
+ def editable_attributes
+ %w(description)
end
def self.creatable?
end
def self.creatable?
@@
-38,6
+34,14
@@
class Job < ArvadosBase
arvados_api_client.api "jobs/#{self.uuid}/", "cancel", {}
end
arvados_api_client.api "jobs/#{self.uuid}/", "cancel", {}
end
+ def self.queue_size
+ arvados_api_client.api("jobs/", "queue_size", {"_method"=> "GET"})[:queue_size] rescue 0
+ end
+
+ def self.queue
+ arvados_api_client.unpack_api_response arvados_api_client.api("jobs/", "queue", {"_method"=> "GET"})
+ end
+
def textile_attributes
[ 'description' ]
end
def textile_attributes
[ 'description' ]
end