rbbt-rest 1.6.18 → 1.6.19
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/workflow/jobs.rb +3 -9
- data/share/views/compass/app.sass +5 -0
- data/share/views/public/js/helpers.js +4 -2
- data/share/views/public/js/rbbt.exception.js +5 -0
- data/share/views/public/js/rbbt.job.js +33 -0
- data/share/views/public/js/rbbt.modal.js +1 -0
- data/share/views/public/js/rbbt/table.js +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d08766d3d4b92f104d088d234b6e14b3520dd03
|
4
|
+
data.tar.gz: 3423b44e0e90dbab4c4b08123b29572197694a45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eafefedf6cfaced11c2d9de90f12d85d49a0135317d19374883b544adb8249bb82e19dfb661062ef06113f90e50928fb811b00d81d01cb782bc4819cdf4c165a
|
7
|
+
data.tar.gz: db75b68e8318690ac638c0f58f16ae690f10bb5504e0750db667591f4051314ffec3b8a45725da5f24948c33aae09d9169d2a3dc23c9494753be4a5f6f8ebf68
|
@@ -40,9 +40,10 @@ module WorkflowRESTHelpers
|
|
40
40
|
|
41
41
|
def execution_type(workflow, task)
|
42
42
|
export = type_of_export(workflow, task)
|
43
|
-
return :sync if export == :exec and format == :html
|
44
|
-
return export if export == :exec or cache_type.nil?
|
45
43
|
return cache_type if cache_type
|
44
|
+
return :sync if export == :exec and format == :html
|
45
|
+
return export if export == :exec
|
46
|
+
return :sync
|
46
47
|
end
|
47
48
|
|
48
49
|
def prepare_job_inputs(workflow, task, params)
|
@@ -51,13 +52,6 @@ module WorkflowRESTHelpers
|
|
51
52
|
|
52
53
|
task_inputs = {}
|
53
54
|
inputs.each do |input|
|
54
|
-
#value = consume_parameter(input, params)
|
55
|
-
#param_file = consume_parameter(input.to_s + '__param_file', params)
|
56
|
-
#next if value.nil? and param_file.nil?
|
57
|
-
#type = input_types[input]
|
58
|
-
|
59
|
-
#fixed_value = fix_input(type, value, param_file)
|
60
|
-
#task_inputs[input] = fixed_value
|
61
55
|
task_inputs[input] = prepare_input(params, input, input_types[input])
|
62
56
|
end
|
63
57
|
|
@@ -143,8 +143,10 @@ function forHash(obj, fn, thisObj){
|
|
143
143
|
return fn.call(thisObj, key, obj[key], obj);
|
144
144
|
}
|
145
145
|
for (key in obj) {
|
146
|
-
if (
|
147
|
-
|
146
|
+
if (obj.hasOwnProperty(key)) {
|
147
|
+
if (exec(fn, obj, key, thisObj) === false) {
|
148
|
+
break;
|
149
|
+
}
|
148
150
|
}
|
149
151
|
}
|
150
152
|
return forHash;
|
@@ -5,6 +5,7 @@ rbbt.exception.null = function(variable, text){
|
|
5
5
|
}
|
6
6
|
|
7
7
|
rbbt.exception.report = function(err){
|
8
|
+
console.log("Error: " + err)
|
8
9
|
rbbt.modal.controller().error(err, "Application Error")
|
9
10
|
}
|
10
11
|
|
@@ -19,3 +20,7 @@ rbbt.try = function(func){
|
|
19
20
|
return f
|
20
21
|
}
|
21
22
|
|
23
|
+
rbbt.do_try = function(func){
|
24
|
+
rbbt.try(func)()
|
25
|
+
}
|
26
|
+
|
@@ -9,6 +9,38 @@ rbbt.Job = function(workflow, task, inputs){
|
|
9
9
|
this.result = m.prop()
|
10
10
|
this.info = m.prop()
|
11
11
|
|
12
|
+
this.exec = function(json){
|
13
|
+
var deferred = m.deferred()
|
14
|
+
|
15
|
+
var url = '/' + workflow + '/' + task
|
16
|
+
|
17
|
+
var data = new FormData()
|
18
|
+
data.append("_cache_type", 'exec')
|
19
|
+
|
20
|
+
if (json)
|
21
|
+
data.append("_format", 'json')
|
22
|
+
else
|
23
|
+
data.append("_format", 'raw')
|
24
|
+
|
25
|
+
for (i in inputs){
|
26
|
+
data.append(i, inputs[i])
|
27
|
+
}
|
28
|
+
|
29
|
+
var params = {
|
30
|
+
url: url,
|
31
|
+
method: 'POST',
|
32
|
+
serialize: function(data) {return data},
|
33
|
+
data: data,
|
34
|
+
deserialize: function(value) {return value},
|
35
|
+
}
|
36
|
+
|
37
|
+
if (json)
|
38
|
+
params.deserialize = function(data){return JSON.parse(data)}
|
39
|
+
|
40
|
+
|
41
|
+
return rbbt.insist_request(params, deferred).then(this.result)
|
42
|
+
}.bind(this)
|
43
|
+
|
12
44
|
this.issue = function(){
|
13
45
|
var deferred = m.deferred()
|
14
46
|
|
@@ -21,6 +53,7 @@ rbbt.Job = function(workflow, task, inputs){
|
|
21
53
|
|
22
54
|
var data = new FormData()
|
23
55
|
data.append("_format", 'jobname')
|
56
|
+
data.append("_cache_type", 'async')
|
24
57
|
for (i in inputs){
|
25
58
|
data.append(i, inputs[i])
|
26
59
|
}
|
@@ -59,7 +59,6 @@ $.widget("rbbt.table", {
|
|
59
59
|
$.scrollTo(table.find('tfoot'), {axis : 'y', offset: {top: - window.innerHeight + 100 }});
|
60
60
|
}else{ complete() }
|
61
61
|
if (tool.options.ellipsis !== undefined && ! $(table).hasClass('no_js')){
|
62
|
-
console.log($(table).hasClass('no_js'))
|
63
62
|
tool._fix_long_table_cells(5);
|
64
63
|
}
|
65
64
|
});
|
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.6.
|
4
|
+
version: 1.6.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|