rbbt-rest 1.4.10 → 1.4.11
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/client/step.rb +1 -1
- data/lib/rbbt/rest/common/cache.rb +2 -1
- data/lib/rbbt/rest/common/forms.rb +6 -6
- data/lib/rbbt/rest/common/locate.rb +25 -2
- data/lib/rbbt/rest/common/misc.rb +23 -7
- data/lib/rbbt/rest/common/render.rb +1 -3
- data/lib/rbbt/rest/common/table.rb +52 -3
- data/lib/rbbt/rest/main.rb +21 -5
- data/lib/rbbt/rest/web_tool.rb +1 -0
- data/lib/rbbt/rest/workflow.rb +20 -1
- data/lib/rbbt/rest/workflow/jobs.rb +3 -1
- data/lib/rbbt/rest/workflow/render.rb +17 -3
- data/share/views/compass/_app.sass +17 -0
- data/share/views/compass/app.sass +1 -17
- data/share/views/compass/finder.sass +7 -7
- data/share/views/compass/grid_system.sass +1 -9
- data/share/views/compass/layout.sass +2 -2
- data/share/views/compass/rbbt/table.sass +1 -0
- data/share/views/compass/screen_sizes.sass +16 -0
- data/share/views/compass/top_menu.sass +1 -0
- data/share/views/entity_partials/action_card.haml +2 -2
- data/share/views/entity_partials/entity_card.haml +10 -4
- data/share/views/entity_partials/entity_list_card.haml +7 -2
- data/share/views/entity_partials/entity_map_card.haml +1 -1
- data/share/views/error.haml +16 -12
- data/share/views/form.haml +2 -2
- data/share/views/help.haml +3 -3
- data/share/views/help/UI.haml +156 -163
- data/share/views/help/entity.haml +3 -3
- data/share/views/help/workflow.haml +1 -1
- data/share/views/job_result/job_control.haml +3 -2
- data/share/views/job_result/tsv.haml +17 -12
- data/share/views/layout.haml +18 -43
- data/share/views/layout/coda.haml +40 -0
- data/share/views/layout/footer.haml +0 -0
- data/share/views/layout/top_menu/finder.haml +1 -1
- data/share/views/partials/form.haml +1 -1
- data/share/views/partials/table.haml +1 -1
- data/share/views/public/js/app.js +4 -4
- data/share/views/public/js/defer.js +26 -0
- data/share/views/public/js/helpers.js +8 -1
- data/share/views/public/js/rbbt/actions.js +2 -2
- data/share/views/public/js/rbbt/hide.js +12 -8
- data/share/views/public/js/rbbt/menu.js +2 -1
- data/share/views/public/js/rbbt/modal.js +5 -2
- data/share/views/public/js/rbbt/reveal.js +7 -5
- data/share/views/wait.haml +1 -1
- metadata +7 -3
- data/share/views/public/js/deffer.js +0 -26
@@ -128,7 +128,7 @@
|
|
128
128
|
the report you need to use the Reload button on the top of the page.
|
129
129
|
An exception to this are Actions. These can be opened in separate windows,
|
130
130
|
in which case it works as usual, but are more often opened from the
|
131
|
-
*Action Section* of the report, which will be covered
|
131
|
+
*Action Section* of the report, which will be covered below. The Action
|
132
132
|
Section has its own Reload button.
|
133
133
|
|
134
134
|
To Star button toggles the favourite status of the current Entity or
|
@@ -157,7 +157,7 @@
|
|
157
157
|
|
158
158
|
Reports may have any type of content, however, they are usually based on
|
159
159
|
a common template. It has a title on the top row, a side bar on the left,
|
160
|
-
a description on the right, at the top, and the Actions Section
|
160
|
+
a description on the right, at the top, and the Actions Section below
|
161
161
|
it. Note that, depending on the particular report, the description may
|
162
162
|
be empty or there might not be any actions associated to it.
|
163
163
|
|
@@ -177,7 +177,7 @@
|
|
177
177
|
type of Entity. When Actions are available for a Report, they are displayed
|
178
178
|
in the Actions Section. This section is composed on an horizontal bar
|
179
179
|
with a button for each each action. When a button is clicked the action
|
180
|
-
is displayed
|
180
|
+
is displayed below the bar. If the action takes some time, a 'Loading...'
|
181
181
|
message will appear. The bar includes a button to reload an action that
|
182
182
|
has already been computed. If the action accepts parameters, the user
|
183
183
|
will be required to set them. To set the parameters click on the button
|
@@ -31,7 +31,7 @@
|
|
31
31
|
optional for workflow development and may be missing). Each task has its
|
32
32
|
own page, which contains the input form. Submitting the form takes you to
|
33
33
|
the results page. Form and result pages follow a general template, which
|
34
|
-
we shall review
|
34
|
+
we shall review below.
|
35
35
|
|
36
36
|
Workflow and task pages, like any other page in this system, are subject
|
37
37
|
to being redefined; in this case by the workflow author. This makes it
|
@@ -9,10 +9,11 @@
|
|
9
9
|
%li
|
10
10
|
%a(href="/#{[workflow.to_s, task, jobname] * "/"}?_format=raw") raw
|
11
11
|
|
12
|
-
-
|
12
|
+
- files = job.files - ["html", "html.info"]
|
13
|
+
- if files.any?
|
13
14
|
%dt Files
|
14
15
|
%dd.job_files
|
15
16
|
%ul
|
16
|
-
-
|
17
|
+
- files.sort.each do |file|
|
17
18
|
%li
|
18
19
|
%a(href="/#{[workflow.to_s, task, jobname, "file", file] * "/"}")= file
|
@@ -1,12 +1,17 @@
|
|
1
|
-
-
|
2
|
-
-
|
3
|
-
-
|
4
|
-
-
|
5
|
-
-
|
6
|
-
-
|
7
|
-
|
8
|
-
|
9
|
-
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
- if result.any?
|
2
|
+
- table_id = [workflow.to_s, task, jobname] * "_"
|
3
|
+
- table_class = 'workflow_tsv_result'
|
4
|
+
- begin
|
5
|
+
- page = result.size > 50 ? "1" : nil
|
6
|
+
- rescue
|
7
|
+
- page = "1"
|
8
|
+
|
9
|
+
- rows, total_size = tsv_rows(result, page)
|
10
|
+
- header = result.all_fields
|
11
|
+
|
12
|
+
= workflow_partial('partials/table', workflow, task,
|
13
|
+
locals.merge(:table_id => table_id, :page => page, :table_class => table_class, :rows => rows, :total_size => total_size, :header => result.all_fields, :row_ids => :use, :table_url => jobname ? File.join('/', workflow.to_s, task, jobname) : nil))
|
14
|
+
|
15
|
+
- else
|
16
|
+
|
17
|
+
Empty result
|
data/share/views/layout.haml
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
= serve_css
|
24
24
|
|
25
25
|
|
26
|
-
- record_js '/js/
|
26
|
+
- record_js '/js/defer'
|
27
27
|
|
28
28
|
// Third party frameworks
|
29
29
|
|
@@ -54,52 +54,27 @@
|
|
54
54
|
|
55
55
|
%body
|
56
56
|
|
57
|
-
/{{{ CONTENT
|
58
|
-
/-----------
|
59
|
-
#content
|
60
|
-
- $wait = false
|
61
|
-
= yield
|
62
|
-
|
63
|
-
|
64
57
|
/{{{ TOP MENU
|
65
58
|
/------------
|
66
59
|
#top_menu
|
67
60
|
= partial_render('layout/top_menu')
|
68
61
|
|
69
|
-
|
62
|
+
/{{{ MODAL
|
63
|
+
/---------
|
70
64
|
#modal
|
71
|
-
#coda
|
72
|
-
= serve_js
|
73
|
-
:javascript
|
74
|
-
var production = #{production? ? "true" : "false"};
|
75
|
-
start_defferred()
|
76
|
-
|
77
|
-
- if $wait
|
78
|
-
:javascript
|
79
|
-
var url = window.location.toString();
|
80
|
-
var wait_timeout = 2000;
|
81
|
-
|
82
|
-
function reload(){
|
83
|
-
|
84
|
-
$.ajax({url: add_parameters(url, '_layout=false'), cache:false,
|
85
|
-
success: function(data, stat, req){
|
86
|
-
if (req.status == 202){
|
87
|
-
$('#content').html(data)
|
88
|
-
window.setTimeout(reload, wait_timeout);
|
89
|
-
}else{
|
90
|
-
window.location = url;
|
91
|
-
}
|
92
|
-
},
|
93
|
-
|
94
|
-
error:function(jqXHR, status, thrownError){
|
95
|
-
if (undefined === jqXHR.responseText || jqXHR.responseText == ''){
|
96
|
-
$('#content').html('No response. Server down?')
|
97
|
-
}else{
|
98
|
-
$('#content').html(jqXHR.responseText)
|
99
|
-
}
|
100
|
-
}})
|
101
|
-
}
|
102
|
-
|
103
|
-
window.setTimeout(reload, wait_timeout);
|
104
|
-
|
105
65
|
|
66
|
+
/{{{ CONTENT
|
67
|
+
/-----------
|
68
|
+
#content
|
69
|
+
- @reload_page = false
|
70
|
+
= yield
|
71
|
+
|
72
|
+
/{{{ FOOTER
|
73
|
+
/----------
|
74
|
+
#footer
|
75
|
+
=partial_render('layout/footer')
|
76
|
+
|
77
|
+
/{{{ CODA
|
78
|
+
/--------
|
79
|
+
#coda
|
80
|
+
=partial_render('layout/coda')
|
@@ -0,0 +1,40 @@
|
|
1
|
+
= serve_js
|
2
|
+
:javascript
|
3
|
+
var production = #{production? ? "true" : "false"};
|
4
|
+
$('.offcanvas').click(function(e){
|
5
|
+
if( e.target !== this )
|
6
|
+
return;
|
7
|
+
$(this).toggleClass('show')
|
8
|
+
})
|
9
|
+
|
10
|
+
start_deferred()
|
11
|
+
|
12
|
+
- if @reload_page
|
13
|
+
:javascript
|
14
|
+
var url = window.location.toString();
|
15
|
+
var wait_timeout = 2000;
|
16
|
+
|
17
|
+
function reload(){
|
18
|
+
|
19
|
+
$.ajax({url: add_parameters(url, '_layout=false'), cache:false,
|
20
|
+
success: function(data, stat, req){
|
21
|
+
if (req.status == 202){
|
22
|
+
$('#content').html(data)
|
23
|
+
window.setTimeout(reload, wait_timeout);
|
24
|
+
}else{
|
25
|
+
window.location = url;
|
26
|
+
}
|
27
|
+
},
|
28
|
+
|
29
|
+
error:function(jqXHR, status, thrownError){
|
30
|
+
if (undefined === jqXHR.responseText || jqXHR.responseText == ''){
|
31
|
+
$('#content').html('No response. Server down?')
|
32
|
+
}else{
|
33
|
+
$('#content').html(jqXHR.responseText)
|
34
|
+
}
|
35
|
+
}})
|
36
|
+
}
|
37
|
+
|
38
|
+
window.setTimeout(reload, wait_timeout);
|
39
|
+
|
40
|
+
|
File without changes
|
@@ -31,9 +31,9 @@
|
|
31
31
|
|
32
32
|
|
33
33
|
.input.submit
|
34
|
+
%input(type="submit")
|
34
35
|
- if klass =~ /workflow_task/
|
35
36
|
%input.jobname(type='text' name='jobname' placeholder='optional job name')
|
36
37
|
%select.format(name="_format")
|
37
38
|
- [:html, :json, :raw, :binary].each do |format|
|
38
39
|
%option(value=format)= format.to_s
|
39
|
-
%input(type="submit")
|
@@ -12,15 +12,15 @@ function update_rbbt(){
|
|
12
12
|
//$('table.tablesorter').tablesorter()
|
13
13
|
$('body > #modal').modal()
|
14
14
|
$('.action_controller').action_controller()
|
15
|
-
$('#top_menu
|
15
|
+
$('#top_menu .favourites').favourites('update_list_selects').favourites('update_map_selects')
|
16
16
|
|
17
|
-
|
17
|
+
start_deferred()
|
18
18
|
fit_content()
|
19
19
|
}
|
20
20
|
|
21
21
|
$(function(){
|
22
22
|
|
23
|
-
register_dom_update('#top_menu >
|
23
|
+
register_dom_update('#top_menu > .reload', function(item){
|
24
24
|
item.click(function(){
|
25
25
|
var url = window.location.toString();
|
26
26
|
url = url.replace(/#$/, '');
|
@@ -43,7 +43,7 @@ $(function(){
|
|
43
43
|
})
|
44
44
|
})
|
45
45
|
|
46
|
-
$('#top_menu
|
46
|
+
$('#top_menu .favourites').favourites()
|
47
47
|
|
48
48
|
update_rbbt()
|
49
49
|
})
|
@@ -0,0 +1,26 @@
|
|
1
|
+
var deferred_execution = [];
|
2
|
+
|
3
|
+
function defer(deps, func){
|
4
|
+
if (undefined === func){
|
5
|
+
func = deps;
|
6
|
+
deps = undefined;
|
7
|
+
}
|
8
|
+
if (undefined !== deps){
|
9
|
+
deferred_execution.push([deps, func]);
|
10
|
+
}else{
|
11
|
+
deferred_execution.push(func)
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
function start_deferred(){
|
16
|
+
$(deferred_execution).each(function(pos,func){
|
17
|
+
if (typeof(func) == 'object'){
|
18
|
+
require_js(func[0], func[1]);
|
19
|
+
}else{
|
20
|
+
func.call();
|
21
|
+
}
|
22
|
+
})
|
23
|
+
deferred_execution = [];
|
24
|
+
}
|
25
|
+
|
26
|
+
|
@@ -56,6 +56,7 @@ function parse_parameters(params){
|
|
56
56
|
return ret
|
57
57
|
}
|
58
58
|
|
59
|
+
var required_js = [];
|
59
60
|
function require_js(url, success){
|
60
61
|
if (typeof url == 'object'){
|
61
62
|
if (url.length > 1){
|
@@ -78,7 +79,13 @@ function require_js(url, success){
|
|
78
79
|
}
|
79
80
|
|
80
81
|
url = url.replace('/js/', '/js-find/')
|
81
|
-
|
82
|
+
|
83
|
+
if ($.inArray(url, required_js) >= 0){
|
84
|
+
if (typeof success == 'function'){ success.call() }
|
85
|
+
}else{
|
86
|
+
var _success = function(){ if (typeof success == 'function'){ success.call() }; required_js.push(url); }
|
87
|
+
$.ajax({url: url, cache:cache, dataType:'script', async: async, success: _success} ).fail(function(jqxhr, settings, exception){ console.log('Failed to load ' + url) })
|
88
|
+
}
|
82
89
|
}
|
83
90
|
}
|
84
91
|
|
@@ -36,7 +36,7 @@ $.widget("rbbt.action_controller", {
|
|
36
36
|
},
|
37
37
|
|
38
38
|
_update_jobs: function(){
|
39
|
-
var job_list = $('#top_menu .user
|
39
|
+
var job_list = $('#top_menu .user .jobs')
|
40
40
|
job_list.html("")
|
41
41
|
for(i in this.options.bookmarked){
|
42
42
|
var url = this.options.bookmarked[i];
|
@@ -77,7 +77,7 @@ $.widget("rbbt.action_controller", {
|
|
77
77
|
controller.on('click', '> ul.controls > li.description', function(e){ tool._display_description(this); return false});
|
78
78
|
controller.on('click', '> ul.controls > li.pin', function(e){ tool._toggle_pin(this); return false});
|
79
79
|
controller.on('click', '> ul.controls > li.url', function(e){ tool._toogle_track(this); return false});
|
80
|
-
$('#top_menu
|
80
|
+
$('#top_menu .user ul.jobs').on('click', 'a.remove_element', function(){
|
81
81
|
var link = $(this).next('a')
|
82
82
|
tool._untrack(link.attr('href'))
|
83
83
|
})
|
@@ -8,13 +8,13 @@ $.widget("rbbt.hide_toggle", {
|
|
8
8
|
if (this.options.title === undefined){ this.options.title = element.attr('hide-title') }
|
9
9
|
if (this.options.title === undefined){ this.options.title = "toggle" }
|
10
10
|
|
11
|
-
var button = this.options.button = $('<a>').addClass('hide_toggle').html(this.options.title)
|
11
|
+
var button = this.options.button = $('<a>').addClass('hide_toggle').html(this.options.title).attr('data-title', this.options.title)
|
12
12
|
|
13
13
|
button.click(function(){ tool.toggle(); update_rbbt(); return false })
|
14
14
|
if (this.options.container !== undefined){
|
15
15
|
$(this.options.container).first().append(button)
|
16
16
|
}
|
17
|
-
this.hide()
|
17
|
+
//this.hide()
|
18
18
|
},
|
19
19
|
|
20
20
|
_swap: function(){
|
@@ -29,8 +29,8 @@ $.widget("rbbt.hide_toggle", {
|
|
29
29
|
|
30
30
|
hide: function(){
|
31
31
|
var tool = this;
|
32
|
-
this.element.addClass('hidden').removeClass('shown')
|
33
|
-
this.options.button.addClass('hidden').removeClass('shown')
|
32
|
+
this.element.addClass('hidden').removeClass('shown').removeClass('show')
|
33
|
+
this.options.button.addClass('hidden').removeClass('shown').removeClass('show')
|
34
34
|
|
35
35
|
if (this.options.container === undefined){ this._swap(); }
|
36
36
|
},
|
@@ -41,8 +41,8 @@ $.widget("rbbt.hide_toggle", {
|
|
41
41
|
}else{
|
42
42
|
$(this.options.container).find('.hide_toggle.shown').trigger('click')
|
43
43
|
}
|
44
|
-
this.element.addClass('shown').removeClass('hidden')
|
45
|
-
this.options.button.addClass('shown').removeClass('hidden')
|
44
|
+
this.element.addClass('shown').addClass('show').removeClass('hidden')
|
45
|
+
this.options.button.addClass('shown').addClass('show').removeClass('hidden')
|
46
46
|
},
|
47
47
|
|
48
48
|
toggle: function(){
|
@@ -55,6 +55,10 @@ $.widget("rbbt.hide_toggle", {
|
|
55
55
|
|
56
56
|
})
|
57
57
|
|
58
|
-
$('#top_menu
|
58
|
+
$('#top_menu .hide').hide_toggle({container: '#top_menu .container'})
|
59
59
|
|
60
|
-
$('.sidebar').hide_toggle({container: '#top_menu
|
60
|
+
$('.sidebar').hide_toggle({container: '#top_menu .container', title: 'Side'})
|
61
|
+
|
62
|
+
$('.actions.togglable_hide .action_controller').parents('.togglable_hide').first().hide_toggle({container: '#top_menu .container'})
|
63
|
+
|
64
|
+
register_dom_update('.fixable', function(elem){ elem.hide_toggle({container: '#top_menu .container', title: "Fixed"}) })
|
@@ -1,4 +1,4 @@
|
|
1
|
-
register_dom_update('dl.tabs > dt, dl.rbbt_tabs > dt.next, dl.rbbt_menu > .next, dl.rbbt_vertical_menu > .next, dl.rbbt_accordion > .next', function(title){
|
1
|
+
register_dom_update('dl.dropdown_menu > .next, dl.menu > .next, dl.tabs > dt, dl.rbbt_tabs > dt.next, dl.rbbt_menu > .next, dl.rbbt_vertical_menu > .next, dl.rbbt_accordion > .next', function(title){
|
2
2
|
title.click(function(){
|
3
3
|
var option = $(this)
|
4
4
|
var content = option.next()
|
@@ -17,6 +17,7 @@ register_dom_update('dl.tabs > dt, dl.rbbt_tabs > dt.next, dl.rbbt_menu > .next,
|
|
17
17
|
option.addClass('show');
|
18
18
|
menu.addClass('show')
|
19
19
|
}
|
20
|
+
return false;
|
20
21
|
})
|
21
22
|
})
|
22
23
|
|
@@ -26,7 +26,7 @@ $.widget("rbbt.modal", {
|
|
26
26
|
modal.on('click', 'a.toggle_favourite', function(){
|
27
27
|
var url = $(tool.element).find('> .content').attr('target-href')
|
28
28
|
if (url !== undefined){
|
29
|
-
$('#top_menu
|
29
|
+
$('#top_menu .favourites').favourites('toggle_page', url)
|
30
30
|
}
|
31
31
|
return false
|
32
32
|
})
|
@@ -45,7 +45,7 @@ $.widget("rbbt.modal", {
|
|
45
45
|
|
46
46
|
update_star: function(){
|
47
47
|
var url = this._shown_url()
|
48
|
-
if ($('#top_menu
|
48
|
+
if ($('#top_menu .favourites').favourites('is_favourite', url)){
|
49
49
|
$(this.element).find('a.toggle_favourite').addClass('active');
|
50
50
|
}else{
|
51
51
|
$(this.element).find('a.toggle_favourite').removeClass('active');
|
@@ -58,6 +58,7 @@ $.widget("rbbt.modal", {
|
|
58
58
|
|
59
59
|
modal.find('> .content').html(content)
|
60
60
|
this.element.show()
|
61
|
+
this.element.addClass('show');
|
61
62
|
update_rbbt()
|
62
63
|
},
|
63
64
|
|
@@ -86,12 +87,14 @@ $.widget("rbbt.modal", {
|
|
86
87
|
}
|
87
88
|
|
88
89
|
tool.element.show()
|
90
|
+
this.element.addClass('show');
|
89
91
|
if (undefined !== complete){ complete()}
|
90
92
|
update_rbbt()
|
91
93
|
})
|
92
94
|
},
|
93
95
|
|
94
96
|
close: function(){
|
97
|
+
this.element.removeClass('show');
|
95
98
|
this.element.hide()
|
96
99
|
}
|
97
100
|
})
|
@@ -1,21 +1,23 @@
|
|
1
1
|
$.widget("rbbt.reveal", {
|
2
2
|
options: {
|
3
|
-
modal: $('
|
3
|
+
modal: $('#modal').first()
|
4
4
|
},
|
5
5
|
|
6
6
|
_create: function() {
|
7
7
|
var tool = this;
|
8
|
-
var modal = this.options.modal
|
8
|
+
var modal = this.options.modal;
|
9
|
+
|
9
10
|
tool.element.click(function(){
|
11
|
+
var modal = $('#modal').first();
|
10
12
|
var link = $(this);
|
11
13
|
var source_id = link.attr('attr-reveal_id');
|
12
14
|
var title = link.attr('attr-reveal_title');
|
13
15
|
var content = $('#' + source_id);
|
14
16
|
|
15
|
-
var height = window.innerHeight - $('#top_menu').outerHeight(true)
|
16
|
-
var width = window.innerWidth - 100;
|
17
|
+
var height = window.innerHeight - $('#top_menu').outerHeight(true);
|
17
18
|
modal.css('height',height)
|
18
|
-
|
19
|
+
//var width = window.innerWidth;
|
20
|
+
//modal.css('width', width)
|
19
21
|
|
20
22
|
modal.modal('show', content.html(), title, source_id);
|
21
23
|
return false
|