rbbt-rest 1.8.45 → 1.8.46
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/common/render.rb +28 -3
- data/lib/rbbt/rest/entity/entity_card.rb +11 -0
- data/lib/rbbt/rest/entity/entity_list_card.rb +9 -0
- data/lib/rbbt/rest/entity/locate.rb +33 -383
- data/lib/rbbt/rest/helpers.rb +12 -0
- data/share/views/compass/app.sass +60 -0
- data/share/views/compass/card_templates.sass +1 -0
- data/share/views/compass/documentation.sass +11 -0
- data/share/views/compass/layout.sass +3 -1
- data/share/views/compass/tab_menu.sass +12 -4
- data/share/views/documented_section.haml +10 -0
- data/share/views/entity_partials/action_card.haml +42 -37
- data/share/views/entity_partials/action_controller.haml +1 -1
- data/share/views/entity_partials/entity_card.haml +75 -56
- data/share/views/entity_partials/entity_list_card.haml +109 -1
- data/share/views/entity_partials/entity_map_card.haml +2 -1
- data/share/views/layout.haml +0 -1
- data/share/views/layout/header.haml +1 -1
- data/share/views/partials/tabs.haml +0 -2
- data/share/views/public/js/app.js +18 -1
- data/share/views/public/js/helpers/_ajax_replace.js +5 -1
- data/share/views/public/js/rbbt.documentation.js +25 -0
- data/share/views/public/js/rbbt.modal.js +5 -3
- data/share/views/tools/nvd3.haml +1 -1
- data/share/views/tools/nvd3/chart.haml +6 -1
- data/share/views/tools/nvd3/histogram.haml +1 -1
- metadata +5 -2
@@ -26,7 +26,8 @@
|
|
26
26
|
|
27
27
|
= reveal "QQ-plot", nil, :class => 'ui small button plot' do
|
28
28
|
- pvalue = map.values.flatten.collect{|v| v.nil? or (String === v and v.empty?) ? nil : v.to_f}.compact.flatten
|
29
|
-
|
29
|
+
-# pvalue = pvalue[0..100].collect{|p| p == 0 ? 0.000000000000000000001 : p }
|
30
|
+
- pvalue = pvalue.collect{|p| p == 0 ? 0.000000000000000000001 : p }
|
30
31
|
= resource map_id + '.qqplot.png', nil, :image do |file|
|
31
32
|
= fragment do
|
32
33
|
- FileUtils.mkdir_p File.dirname(file) unless File.exists? File.dirname(file)
|
data/share/views/layout.haml
CHANGED
@@ -63,7 +63,7 @@
|
|
63
63
|
- %w(dom_update fragment actions table list map reveal).each do |file|
|
64
64
|
- record_js "/js-find/rbbt/#{ file }"
|
65
65
|
|
66
|
-
- %w(rbbt rbbt.basic rbbt.exception rbbt.job rbbt.page rbbt.entity.basic rbbt.entity rbbt.entity_list rbbt.entity_map rbbt.views rbbt.favourites rbbt.modal).each do |file|
|
66
|
+
- %w(rbbt rbbt.basic rbbt.exception rbbt.job rbbt.page rbbt.entity.basic rbbt.entity rbbt.entity_list rbbt.entity_map rbbt.views rbbt.documentation rbbt.favourites rbbt.modal).each do |file|
|
67
67
|
- record_js "/js-find/#{ file }"
|
68
68
|
|
69
69
|
- %w(rbbt.knowledge_base).each do |file|
|
@@ -1,9 +1,7 @@
|
|
1
1
|
|
2
2
|
- id = "tab_menu_" + rand(1000).to_s unless defined? id and not id.nil?
|
3
|
-
- iii active
|
4
3
|
- active = false unless defined? active and not active.nil?
|
5
4
|
- active = headers.first if TrueClass === active
|
6
|
-
- iii active
|
7
5
|
.ui.top.attached.tabular.stackable.menu(id=id)
|
8
6
|
- headers.each do |header|
|
9
7
|
- code = codes[header] || Misc.digest(header)
|
@@ -44,10 +44,11 @@ $(function(){
|
|
44
44
|
var trigger = $(this)
|
45
45
|
var next = trigger.next()
|
46
46
|
|
47
|
+
var active = trigger.hasClass('active')
|
47
48
|
next.siblings().removeClass('show').removeClass('active')
|
48
49
|
|
50
|
+
if (! active) trigger.addClass('active')
|
49
51
|
next.toggleClass('show')
|
50
|
-
trigger.toggleClass('active')
|
51
52
|
})
|
52
53
|
})
|
53
54
|
|
@@ -76,6 +77,22 @@ $(function(){
|
|
76
77
|
|
77
78
|
if (undefined !== rbbt.favourites && user != 'none') rbbt.favourites.update()
|
78
79
|
|
80
|
+
register_dom_update('.entity_card .card_sidebar_open', function(link){
|
81
|
+
var link = $($(link)[0])
|
82
|
+
link.click(function(){
|
83
|
+
$(this).parents('.entity_card').first().find('.card_sidebar').toggleClass('hidden')
|
84
|
+
return false
|
85
|
+
})
|
86
|
+
})
|
87
|
+
|
88
|
+
register_dom_update('.entity_list_card .card_sidebar_open', function(link){
|
89
|
+
var link = $($(link)[0])
|
90
|
+
link.click(function(){
|
91
|
+
$(this).parents('.entity_list_card').first().find('.card_sidebar').toggleClass('hidden')
|
92
|
+
return false
|
93
|
+
})
|
94
|
+
})
|
95
|
+
|
79
96
|
update_rbbt()
|
80
97
|
})
|
81
98
|
|
@@ -116,7 +116,11 @@ function replace_object(object, href, embedd, complete){
|
|
116
116
|
if (req.responseText.match('error_message') != null){
|
117
117
|
error_message = $(req.responseText).find('.error_message').html()
|
118
118
|
}else{
|
119
|
-
|
119
|
+
if (req.responseText.match('summary') != null){
|
120
|
+
error_message = $(req.responseText).find('#summary').text()
|
121
|
+
}else{
|
122
|
+
error_message = req.responseText.split("\n")[0]
|
123
|
+
}
|
120
124
|
}
|
121
125
|
|
122
126
|
error_span = escape
|
@@ -0,0 +1,25 @@
|
|
1
|
+
register_dom_update('.documented.segment > .help.label', function(item){
|
2
|
+
item.click(function(){
|
3
|
+
var segment = $(this).parent('.documented.segment')
|
4
|
+
var documentation = segment.find(' > .hidden.documentation')
|
5
|
+
var header = documentation.find('> h1')
|
6
|
+
|
7
|
+
var documentation_html
|
8
|
+
var documentation_title
|
9
|
+
|
10
|
+
if (header.length > 0){
|
11
|
+
console.log('header')
|
12
|
+
documentation_dup = documentation.clone()
|
13
|
+
documentation_title = documentation_dup.find(' > h1').first().html()
|
14
|
+
documentation_dup.find(' > h1').first().remove()
|
15
|
+
documentation_html = documentation_dup.html()
|
16
|
+
}else{
|
17
|
+
documentation_html = documentation.html()
|
18
|
+
documentation_title = 'Documentation'
|
19
|
+
}
|
20
|
+
console.log(documentation_html)
|
21
|
+
var doc_div = $('<div>').addClass('documentation').append(documentation_html)
|
22
|
+
console.log(doc_div)
|
23
|
+
rbbt.modal.controller.show(doc_div[0].outerHTML, documentation_title)
|
24
|
+
})
|
25
|
+
})
|
@@ -31,7 +31,6 @@ ModalComponent = function(element){
|
|
31
31
|
$(this.vm.element).addClass('active')
|
32
32
|
ctrl.vm.url = undefined
|
33
33
|
m.redraw()
|
34
|
-
update_rbbt()
|
35
34
|
}
|
36
35
|
|
37
36
|
ctrl.error = function(content, title){
|
@@ -39,7 +38,6 @@ ModalComponent = function(element){
|
|
39
38
|
$(this.vm.element).addClass('active')
|
40
39
|
$(this.vm.element).addClass('error')
|
41
40
|
m.redraw()
|
42
|
-
update_rbbt()
|
43
41
|
}
|
44
42
|
|
45
43
|
ctrl.show_url = function(url, title){
|
@@ -95,7 +93,11 @@ ModalComponent = function(element){
|
|
95
93
|
}else{
|
96
94
|
header = [title, close_button];
|
97
95
|
}
|
98
|
-
|
96
|
+
|
97
|
+
var modal_content = [
|
98
|
+
m('.header', header),
|
99
|
+
m('.content', {config: function(e1,isInit,ctx){ update_dom() }}, content)
|
100
|
+
];
|
99
101
|
return modal_content;
|
100
102
|
}else{
|
101
103
|
return "";
|
data/share/views/tools/nvd3.haml
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
- float = float ? "float" : nil
|
9
9
|
|
10
|
-
.figure(id=id style="height:#{ height };width:#{ width }" class="#{float}")
|
10
|
+
.figure(id="#{"figure-"+id}" style="height:#{ height };width:#{ width }" class="#{float}")
|
11
11
|
- if title
|
12
12
|
%span.title= title
|
13
13
|
= partial_render("tools/nvd3/#{plot}", locals.merge({:id => id.sub('figure', plot.to_s), :resolution => width.to_i * 0.8}) )
|
@@ -1,6 +1,8 @@
|
|
1
1
|
- resolution = 1
|
2
2
|
- data_id = "data-" << id
|
3
3
|
- Open.write(@step.file(data_id), plot_data.to_json)
|
4
|
+
- x_label = nil unless defined? x_label
|
5
|
+
- y_label = nil unless defined? y_label
|
4
6
|
|
5
7
|
- url = @step.instance_variable_get(:@url_path)
|
6
8
|
%svg(id=id)
|
@@ -16,6 +18,9 @@
|
|
16
18
|
graph.tooltip.enabled(true)
|
17
19
|
EOF
|
18
20
|
|
21
|
+
setup += "\ngraph.xAxis.axisLabel('#{x_label}')" if x_label
|
22
|
+
setup += "\ngraph.yAxis.axisLabel('#{y_label}')" if y_label
|
23
|
+
|
19
24
|
:javascript
|
20
25
|
|
21
26
|
|
@@ -28,7 +33,7 @@
|
|
28
33
|
var resolution = #{resolution}
|
29
34
|
var svg = $(selector)
|
30
35
|
var figure = svg.parent('.figure')
|
31
|
-
var W = figure.innerWidth()
|
36
|
+
var W = figure.innerWidth()
|
32
37
|
var H = figure.innerHeight()
|
33
38
|
|
34
39
|
nv.addGraph({
|
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.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -201,10 +201,12 @@ files:
|
|
201
201
|
- share/views/association/Default.haml
|
202
202
|
- share/views/compass/app.sass
|
203
203
|
- share/views/compass/card_templates.sass
|
204
|
+
- share/views/compass/documentation.sass
|
204
205
|
- share/views/compass/layout.sass
|
205
206
|
- share/views/compass/misc.sass
|
206
207
|
- share/views/compass/screen_sizes.sass
|
207
208
|
- share/views/compass/tab_menu.sass
|
209
|
+
- share/views/documented_section.haml
|
208
210
|
- share/views/entity/Default.haml
|
209
211
|
- share/views/entity_list/Default.haml
|
210
212
|
- share/views/entity_list/Default/edit.haml
|
@@ -304,6 +306,7 @@ files:
|
|
304
306
|
- share/views/public/js/helpers/defer.js
|
305
307
|
- share/views/public/js/helpers/helpers.js
|
306
308
|
- share/views/public/js/rbbt.basic.js
|
309
|
+
- share/views/public/js/rbbt.documentation.js
|
307
310
|
- share/views/public/js/rbbt.entity.basic.js
|
308
311
|
- share/views/public/js/rbbt.entity.js
|
309
312
|
- share/views/public/js/rbbt.entity_list.js
|