projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 4091-test-infinite-scrolling
[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 ff2eb00e7096957b9e77a5ba08702c0239524169..c59bb89fe851306c80278b4b96ce192c9e064ea7 100644
(file)
--- a/
apps/workbench/app/models/job.rb
+++ b/
apps/workbench/app/models/job.rb
@@
-7,8
+7,8
@@
class Job < ArvadosBase
"#{script} job"
end
"#{script} job"
end
- def
attribute_editable? attr, *arg
s
- false
+ def
editable_attribute
s
+ %w(description)
end
def self.creatable?
end
def self.creatable?
@@
-38,24
+38,11
@@
class Job < ArvadosBase
arvados_api_client.api("jobs/", "queue_size", {"_method"=> "GET"})[:queue_size] rescue 0
end
arvados_api_client.api("jobs/", "queue_size", {"_method"=> "GET"})[:queue_size] rescue 0
end
- def s
tat
e
-
Job::state(self
)
+ def s
elf.queu
e
+
arvados_api_client.unpack_api_response arvados_api_client.api("jobs/", "queue", {"_method"=> "GET"}
)
end
end
- def self.state job
- if not job[:cancelled_at].nil?
- "Canceled"
- elsif not job[:finished_at].nil? or not job[:success].nil?
- if job[:success]
- "Completed"
- else
- "Failed"
- end
- elsif job[:running]
- "Running"
- else
- "Queued"
- end
+ def textile_attributes
+ [ 'description' ]
end
end
-
end
end