rbbt-rest 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rbbt/rest/workflow.rb +1 -1
- data/share/views/layout/coda.haml +2 -0
- data/share/views/public/js/_ajax_replace.js +15 -1
- data/share/views/public/js/rbbt/actions.js +2 -2
- data/share/views/wait.haml +23 -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: 8db963775de32c02478cd10401cee25e3b055839
|
4
|
+
data.tar.gz: e4216c00bc0da8690857b8ed7df7624dbdd54117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f665d500e52385938b2e444e36c4d0b8c00dc46265aa9dd543921dab6c075f950673ddf6cfdbbd268c093a408e0e0e3cffb922d50537a88e9ea0e2b07fe9cb7
|
7
|
+
data.tar.gz: 6e3eb710ef63297a148e7d1143fc1187eabf8e5bd6328d425973cb30cdb943fdf2e41a6296f840c4c5d1ee2d1ee0ed535ae9b40f6949fa63f9d2e72dfcc65733
|
data/lib/rbbt/rest/workflow.rb
CHANGED
@@ -43,7 +43,7 @@ module Sinatra
|
|
43
43
|
get "/#{workflow.to_s}" do
|
44
44
|
case format
|
45
45
|
when :html
|
46
|
-
workflow_render('tasks', workflow)
|
46
|
+
workflow_render('tasks', workflow, nil, @clean_params)
|
47
47
|
when :json
|
48
48
|
content_type "application/json"
|
49
49
|
{:exec => workflow.exec_exports, :synchronous => workflow.synchronous_exports, :asynchronous => workflow.asynchronous_exports}.to_json
|
@@ -21,6 +21,7 @@
|
|
21
21
|
success: function(data, stat, req){
|
22
22
|
if (req.status == 202){
|
23
23
|
$('#content').html(data)
|
24
|
+
update_rbbt()
|
24
25
|
window.setTimeout(reload, wait_timeout);
|
25
26
|
}else{
|
26
27
|
window.location = main_url;
|
@@ -33,6 +34,7 @@
|
|
33
34
|
}else{
|
34
35
|
$('#content').html(jqXHR.responseText)
|
35
36
|
}
|
37
|
+
update_rbbt()
|
36
38
|
}})
|
37
39
|
}
|
38
40
|
|
@@ -124,7 +124,21 @@ function replace_object(object, href, embedd, complete){
|
|
124
124
|
href = remove_parameter(href, '_update');
|
125
125
|
href = remove_parameter(href, '_');
|
126
126
|
var reload_seconds = reload_time(object);
|
127
|
-
|
127
|
+
var progress = $(data).find('.progress')
|
128
|
+
var percent = undefined
|
129
|
+
var counts = undefined
|
130
|
+
|
131
|
+
if (progress.length > 0)
|
132
|
+
if (progress.is('.percent'))
|
133
|
+
percent = progress.attr('data-value')
|
134
|
+
else
|
135
|
+
counts = progress.attr('data-value')
|
136
|
+
|
137
|
+
|
138
|
+
if (percent !== undefined){
|
139
|
+
bar = $('.ui.progress.teal.indicator').attr('data-value', percent).attr('data-total', 100)
|
140
|
+
object.prepend(bar)
|
141
|
+
}
|
128
142
|
if (reload_seconds == "STOP"){
|
129
143
|
var a =$('<a href="#">').html("insist").click(function(){
|
130
144
|
replace_object(object, href, embedd, complete)
|
@@ -100,9 +100,9 @@ $.widget("rbbt.action_controller", {
|
|
100
100
|
var message = response.find('.step_messages li:first').html()
|
101
101
|
|
102
102
|
if (undefined === message){
|
103
|
-
action_div.html("<span class='loading'>Loading [" + stat + "] ...</span>");
|
103
|
+
action_div.html("<span class='loading ui message'>Loading [" + stat + "] ...</span>");
|
104
104
|
}else{
|
105
|
-
action_div.html("<span class='loading'>Loading [" + stat + ": " + message + "] ...</span>");
|
105
|
+
action_div.html("<span class='loading ui message'>Loading [" + stat + ": " + message + "] ...</span>");
|
106
106
|
};
|
107
107
|
}
|
108
108
|
}else{
|
data/share/views/wait.haml
CHANGED
@@ -5,9 +5,31 @@
|
|
5
5
|
|
6
6
|
%span.status= job.status
|
7
7
|
|
8
|
-
|
8
|
+
|
9
|
+
- if job.file(:progress).exists?
|
10
|
+
- progress = job.file(:progress).yaml
|
11
|
+
- if progress[:last_percent]
|
12
|
+
.ui.teal.step.percent.progress.indicating(data-value="#{progress[:last_percent]}" data-total=100)
|
13
|
+
.bar
|
14
|
+
.progress
|
15
|
+
.label= progress[:desc]
|
16
|
+
:deferjs
|
17
|
+
$('.step.progress').progress()
|
18
|
+
- else
|
19
|
+
- ticks = progress[:ticks]
|
20
|
+
- max_ticks = ticks * 1.2
|
21
|
+
.ui.teal.step.progress(data-value=ticks data-total=max_ticks)
|
22
|
+
.bar
|
23
|
+
.progress
|
24
|
+
.label= progress[:desc]
|
25
|
+
:deferjs
|
26
|
+
$('.step.progress').progress({label: 'ratio',text:{ratio: '{value}'}})
|
27
|
+
- else
|
28
|
+
%hr
|
9
29
|
|
10
30
|
%ul.step_messages.clean_list
|
11
31
|
- job.messages.reverse.each do |line|
|
12
32
|
- next if line.nil? or line.strip.empty?
|
13
33
|
%li= line
|
34
|
+
|
35
|
+
|
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.1
|
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-02-
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|