rbbt-rest 1.8.16 → 1.8.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/rest/main.rb +4 -0
- data/lib/rbbt/rest/workflow.rb +2 -0
- data/lib/rbbt/rest/workflow/jobs.rb +2 -0
- data/lib/rbbt/rest/workflow/stream_task.rb +5 -5
- data/share/views/compass/app.sass +4 -1
- data/share/views/form.haml +1 -1
- data/share/views/partials/form.haml +3 -2
- data/share/views/public/robots.txt +5 -0
- data/share/views/tools/nvd3/scatter.haml +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d7939b36f5199993fc0868411b191b6e2bb7ff8
|
4
|
+
data.tar.gz: a62f033b721ccfaae48b8335510342c02bb0c9fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a7f8fa74695df8ae48dcfd05ceb1d98964546b3c98d6f2620d7714df613d05c7c0e4840a273377cc5d2fba652af2f4a61a6d8fe41af55064b81eb734494c6e
|
7
|
+
data.tar.gz: 57bd18efbbfe63ec02fe0cfefce0eac2dbd6731a14294b8e11cdf8d439f550c7e963c1826fe7fb7fbc9eb920c969accb6c563ef3f0fcde161b9480ad4f35617c
|
data/lib/rbbt/rest/main.rb
CHANGED
@@ -132,6 +132,10 @@ module Sinatra
|
|
132
132
|
|
133
133
|
add_sass_load_path Rbbt.views.compass.find
|
134
134
|
|
135
|
+
get '/robots.txt' do
|
136
|
+
send_file locate_file('public/robots.txt')
|
137
|
+
end
|
138
|
+
|
135
139
|
get '/files/:filename' do
|
136
140
|
cache_control :public, :max_age => 360000 if production?
|
137
141
|
file = settings.file_dir[params[:filename]].find
|
data/lib/rbbt/rest/workflow.rb
CHANGED
@@ -110,6 +110,8 @@ module Sinatra
|
|
110
110
|
raise Workflow::TaskNotFoundException.new workflow, task unless workflow.tasks.include? task.to_sym
|
111
111
|
|
112
112
|
task_parameters = consume_task_parameters(workflow, task, params)
|
113
|
+
|
114
|
+
task_parameters[:jobname] = jobname
|
113
115
|
|
114
116
|
if complete_input_set(workflow, task, task_parameters) or format != :html
|
115
117
|
issue_job(workflow, task, jobname, task_parameters)
|
@@ -174,6 +174,8 @@ module WorkflowRESTHelpers
|
|
174
174
|
inputs = prepare_job_inputs(workflow, task, params)
|
175
175
|
job = workflow.job(task, jobname, inputs)
|
176
176
|
|
177
|
+
job.clean if job.aborted?
|
178
|
+
|
177
179
|
clean_job(workflow, job) and clean = true if update.to_s == "clean"
|
178
180
|
recursive_clean_job(workflow, job) and clean = true if update.to_s == "recursive_clean"
|
179
181
|
|
@@ -249,23 +249,23 @@ class StreamWorkflowTask
|
|
249
249
|
out_stream = TSV.get_stream job
|
250
250
|
|
251
251
|
begin
|
252
|
-
Log.
|
252
|
+
Log.high "Write response #{Misc.fingerprint tcp_io} "
|
253
253
|
tcp_io.write "HTTP/1.1 200\r\n"
|
254
254
|
tcp_io.write "Connection: close\r\n"
|
255
255
|
tcp_io.write "RBBT-STREAMING-JOB-URL: #{ job_url }\r\n"
|
256
256
|
tcp_io.write "\r\n"
|
257
|
-
Log.
|
257
|
+
Log.high "Comsuming response #{Misc.fingerprint tcp_io}"
|
258
258
|
Misc.consume_stream(out_stream, false, tcp_io)
|
259
|
-
Log.
|
259
|
+
Log.high "Comsumed response #{Misc.fingerprint tcp_io}"
|
260
260
|
rescue Exception
|
261
261
|
Log.exception $!
|
262
262
|
end if out_stream
|
263
263
|
|
264
264
|
tcp_io.close unless tcp_io.closed?
|
265
|
-
Log.
|
265
|
+
Log.high "Closed io #{tcp_io}"
|
266
266
|
|
267
267
|
[-1, {}, []]
|
268
|
-
rescue
|
268
|
+
rescue Exception
|
269
269
|
Log.exception $!
|
270
270
|
tcp_io.write "HTTP/1.1 515\r\n"
|
271
271
|
tcp_io.write "Connection: close\r\n"
|
data/share/views/form.haml
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
.form.action_parameters.ui.segment
|
18
18
|
= partial_render('partials/form', :id => id, :action => action, :method => 'post',
|
19
|
-
:enctype => "multipart/form-data", :info => task_info, :klass => 'workflow_task')
|
19
|
+
:enctype => "multipart/form-data", :info => task_info, :klass => 'workflow_task', :locals => locals)
|
20
20
|
|
21
21
|
- if workflow.libdir.examples[task.to_s].exists?
|
22
22
|
.examples
|
@@ -4,6 +4,7 @@
|
|
4
4
|
- method = 'post' unless defined? method
|
5
5
|
- enctype = 'multipart/form-data' unless defined? enctype
|
6
6
|
- info = {} unless defined? info
|
7
|
+
- locals = {} unless defined? locals
|
7
8
|
|
8
9
|
- klass = "#{klass} custom"
|
9
10
|
|
@@ -27,13 +28,13 @@
|
|
27
28
|
%div(class="field #{types[input]} #{input} #{hide ? 'hide' : ''}")
|
28
29
|
- input_options = options[input]
|
29
30
|
- input_options = input_options.dup unless input_options.nil?
|
30
|
-
!~ form_input(input, types[input], defaults[input], values[input], descriptions[input], input_id, input_options)
|
31
|
+
!~ form_input(input, types[input], defaults[input], values[input] || locals[input], descriptions[input], input_id, input_options)
|
31
32
|
|
32
33
|
|
33
34
|
.input.field.submit
|
34
35
|
%input.ui.submit.button(type="submit")
|
35
36
|
- if klass =~ /workflow_task/
|
36
|
-
%input.jobname(type='text' name='jobname' placeholder='optional job name')
|
37
|
+
%input.jobname(type='text' name='jobname' placeholder='optional job name' value="#{locals[:jobname]}")
|
37
38
|
%select.format(name="_format")
|
38
39
|
- [:html, :json, :raw, :binary].each do |format|
|
39
40
|
%option(value=format)= format.to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -1844,6 +1844,7 @@ files:
|
|
1844
1844
|
- share/views/public/plugins/springy/springyui.js
|
1845
1845
|
- share/views/public/plugins/svg-pan-zoom/js/svg-pan-zoom.js
|
1846
1846
|
- share/views/public/plugins/underscore/js/underscore.js
|
1847
|
+
- share/views/public/robots.txt
|
1847
1848
|
- share/views/tasks.haml
|
1848
1849
|
- share/views/tools/nvd3.haml
|
1849
1850
|
- share/views/tools/nvd3/chart.haml
|