rbbt-rest 1.8.94 → 1.8.95
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/entity/helpers.rb +5 -0
- data/lib/rbbt/rest/workflow.rb +1 -0
- data/lib/rbbt/rest/workflow/render.rb +1 -0
- data/share/views/compass/app.sass +1 -1
- data/share/views/partials/dependencies.haml +15 -0
- data/share/views/partials/form.haml +41 -2
- data/share/views/tools/Rpng.haml +3 -2
- data/share/views/wait.haml +12 -0
- 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: 6b9fc8304ee87e46f7d53b1807e0de225632bd9b
|
|
4
|
+
data.tar.gz: e9f65fd208eca9c0c18e1c47c6f5f08c0ffdf8e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b236b0cc741d0f47b0772761f1814578905dff43658545ff1220c04654f458fadef836ec5618b8cd380dd7e82cb2646987546c2cb25cb4cd0082c34c9926520b
|
|
7
|
+
data.tar.gz: 8500666f11d539c3281836e3168be7d5b0d5a9cb0d79e2024b0816902846f9ae4b0cda89a8604c92fc44a1c894d4ce35623005514fb75c7f61246007f431caae
|
|
@@ -53,6 +53,11 @@ module EntityRESTHelpers
|
|
|
53
53
|
input_value = values[input]
|
|
54
54
|
input_default = input_defaults[input]
|
|
55
55
|
input_option = input_options[input]
|
|
56
|
+
input_option ||= {}
|
|
57
|
+
if form_options[:method] != 'POST' && ! input_option.include?(:no_file)
|
|
58
|
+
input_option[:no_file] = true
|
|
59
|
+
input_options[input] = input_option
|
|
60
|
+
end
|
|
56
61
|
end
|
|
57
62
|
|
|
58
63
|
locals = {}
|
data/lib/rbbt/rest/workflow.rb
CHANGED
|
@@ -25,6 +25,21 @@
|
|
|
25
25
|
- eta = Misc.format_seconds(eta)
|
|
26
26
|
- ellapsed = Misc.format_seconds(ellapsed)
|
|
27
27
|
- pgr_str = " - " + pgr[:last_percent].to_s + "%" + " " + eta
|
|
28
|
+
|
|
29
|
+
:deferjs
|
|
30
|
+
var percent = '#{pgr[:last_percent]}';
|
|
31
|
+
var task = '#{dep.task_name}';
|
|
32
|
+
var title = $('head title');
|
|
33
|
+
var current = title.text();
|
|
34
|
+
var newtext;
|
|
35
|
+
var pos = current.indexOf('%');
|
|
36
|
+
if (pos == -1){
|
|
37
|
+
newtext = task + " - " + percent + "% " + current
|
|
38
|
+
}else{
|
|
39
|
+
newtext = task + " - " + percent + "% " + current.slice(pos+1)
|
|
40
|
+
}
|
|
41
|
+
title.text(newtext)
|
|
42
|
+
|
|
28
43
|
- else
|
|
29
44
|
- pgr_str = " - " + pgr[:ticks].to_s
|
|
30
45
|
- status = dep_status.to_s + pgr_str
|
|
@@ -19,16 +19,55 @@
|
|
|
19
19
|
- types = consume_parameter(:input_types, info) || {}
|
|
20
20
|
- defaults = consume_parameter(:input_defaults, info) || {}
|
|
21
21
|
- descriptions = consume_parameter(:input_descriptions, info) || {}
|
|
22
|
+
- use = consume_parameter(:input_use, info) || {}
|
|
22
23
|
- options = consume_parameter(:input_options, info) || {}
|
|
23
24
|
- values = consume_parameter(:values, info) || {}
|
|
24
25
|
|
|
26
|
+
- workflows = use.values.collect{|i| i.keys}.flatten.collect{|v| v.to_s}.uniq
|
|
27
|
+
- if workflows.length > 1 && use && use.any?
|
|
28
|
+
- ws_id = 'workflow_select_' << id
|
|
29
|
+
.ui.very.basic.segment
|
|
30
|
+
.header
|
|
31
|
+
Select workflow inputs to show
|
|
32
|
+
.description
|
|
33
|
+
.ui.buttons.workflow_select(id=ws_id)
|
|
34
|
+
- workflows.each do |wfname|
|
|
35
|
+
.ui.tiny.button.view_workflow.active= wfname
|
|
36
|
+
%hr
|
|
37
|
+
:sass
|
|
38
|
+
form
|
|
39
|
+
.ui.buttons.workflow_select
|
|
40
|
+
margin-bottom: 2em
|
|
41
|
+
:deferjs
|
|
42
|
+
$('##{ws_id}').find('.view_workflow').click(function(){
|
|
43
|
+
var button = $(this);
|
|
44
|
+
var workflow = button.text()
|
|
45
|
+
button.toggleClass('active')
|
|
46
|
+
if (!button.hasClass('active'))
|
|
47
|
+
$('##{id}').find('div.field[attr-use_tags*=' + workflow + ']').hide()
|
|
48
|
+
if (button.hasClass('active'))
|
|
49
|
+
$('##{id}').find('div.field[attr-use_tags*=' + workflow + ']').show()
|
|
50
|
+
})
|
|
51
|
+
|
|
25
52
|
- inputs.each do |input|
|
|
53
|
+
- uses = use.nil? ? nil : use[input]
|
|
54
|
+
- use_tags = []
|
|
55
|
+
- if uses
|
|
56
|
+
- uses.each do |workflow, tasks|
|
|
57
|
+
- tasks.each do |task|
|
|
58
|
+
- use_tags << [workflow, task] * "#"
|
|
26
59
|
- input_id = id.nil? ? nil : id + "__" << input.to_s
|
|
27
60
|
- hide = (options[input] != nil and options[input][:hide])
|
|
28
|
-
%div(class="field #{types[input]} #{input} #{hide ? 'hide' : ''}")
|
|
61
|
+
%div(class="field #{types[input]} #{input} #{hide ? 'hide' : ''}" attr-use_tags='#{use_tags * " "}')
|
|
29
62
|
- input_options = options[input]
|
|
30
63
|
- input_options = input_options.dup unless input_options.nil?
|
|
31
|
-
|
|
64
|
+
- description = descriptions[input]
|
|
65
|
+
- if use[input]
|
|
66
|
+
- description += "\n\nUsed in:\n"
|
|
67
|
+
- uses.each do |workflow, tasks|
|
|
68
|
+
- tasks.each do |task|
|
|
69
|
+
- description << " * " << [workflow.to_s, task] * "#" << "\n"
|
|
70
|
+
!~ form_input(input, types[input], defaults[input], values[input] || locals[input], description, input_id, input_options)
|
|
32
71
|
|
|
33
72
|
|
|
34
73
|
.input.field.submit
|
data/share/views/tools/Rpng.haml
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
- filename = 'R-png_' << rand(10000).to_s unless defined? filename and filename
|
|
2
2
|
- text = filename unless defined? text and text
|
|
3
3
|
|
|
4
|
-
-
|
|
5
|
-
-
|
|
4
|
+
- size = 500 unless defined? size and size
|
|
5
|
+
- width = size unless defined? width and width
|
|
6
|
+
- height = size unless defined? height and height
|
|
6
7
|
- plot = block.call unless (defined? plot and plot) or not defined? block
|
|
7
8
|
|
|
8
9
|
- filename += '.png' unless filename =~ /\.png$/i
|
data/share/views/wait.haml
CHANGED
|
@@ -29,6 +29,18 @@
|
|
|
29
29
|
- eta = ellapsed * (1 - ratio)
|
|
30
30
|
- eta = Misc.format_seconds(eta)
|
|
31
31
|
- ellapsed = Misc.format_seconds(ellapsed)
|
|
32
|
+
:deferjs
|
|
33
|
+
var percent = '#{progress[:last_percent]}';
|
|
34
|
+
var title = $('head title');
|
|
35
|
+
var current = title.text();
|
|
36
|
+
var newtext;
|
|
37
|
+
var pos = current.indexOf('%');
|
|
38
|
+
if (pos == -1){
|
|
39
|
+
newtext = percent + "% " + current
|
|
40
|
+
}else{
|
|
41
|
+
newtext = percent + "% " + current.slice(pos+1)
|
|
42
|
+
}
|
|
43
|
+
title.text(newtext)
|
|
32
44
|
- else
|
|
33
45
|
- ellapsed = '?'
|
|
34
46
|
- eta = '?'
|
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.95
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miguel Vazquez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-05-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|