rbbt-rest 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 019b238df0884dac2b1bd0c4c97588d9c0ddf295
4
- data.tar.gz: dbb37b58e7d10dc8a2fd82e4636eb006427733fe
3
+ metadata.gz: 8db963775de32c02478cd10401cee25e3b055839
4
+ data.tar.gz: e4216c00bc0da8690857b8ed7df7624dbdd54117
5
5
  SHA512:
6
- metadata.gz: 3645c2891ebaf8ccbfd1afd8a938b3b2e1a186fe3f6115b53cd62d978337293da74524065d9d25624e96207b5adecea1f70f90d1bac2bda4a157f2c9b2d91b8e
7
- data.tar.gz: 5eb156ff821ac00db1b6ddd0949ff4e7f9e85e2161e97b1a52cf408ad4f27baab472b463b972a2775764ba7da67b58d77c81651e58b4fa9db0c9776d7ad08a8d
6
+ metadata.gz: 0f665d500e52385938b2e444e36c4d0b8c00dc46265aa9dd543921dab6c075f950673ddf6cfdbbd268c093a408e0e0e3cffb922d50537a88e9ea0e2b07fe9cb7
7
+ data.tar.gz: 6e3eb710ef63297a148e7d1143fc1187eabf8e5bd6328d425973cb30cdb943fdf2e41a6296f840c4c5d1ee2d1ee0ed535ae9b40f6949fa63f9d2e72dfcc65733
@@ -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{
@@ -5,9 +5,31 @@
5
5
 
6
6
  %span.status= job.status
7
7
 
8
- %hr
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.0
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-12 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake