rbbt-rest 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/rest/common/render.rb +1 -0
- data/lib/rbbt/rest/main.rb +0 -1
- data/share/views/compass/app.sass +2 -3
- data/share/views/partials/table/filters.haml +1 -0
- data/share/views/public/js/app.js +1 -1
- data/share/views/public/js/rbbt.aesthetics.js +5 -5
- data/share/views/public/js/rbbt.basic.js +20 -11
- data/share/views/public/js/rbbt.entity.js +2 -1
- data/share/views/public/js/rbbt.exception.js +1 -1
- data/share/views/public/js/rbbt.favourites.js +1 -1
- data/share/views/public/js/rbbt.plots.js +7 -7
- 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: 59c0ed2d456a49f6418d29a6264603d9975f739d
|
4
|
+
data.tar.gz: 3886dd197d5d6b6ea33f471c3edca6397fc682ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58719858ad8424352f9ba49bded0b74e8d466e1d382aba478366e02e646a2fd807e43b2617ac5a4f3d8c4518c0f96841242d82a2d11b45b9d18bc424fe7b058b
|
7
|
+
data.tar.gz: 40ba3da4b639c982216228cf61f5286543ceb7d5aa335617154ccc3a9b3b6be145b67f5fcace57971cf866a51c9ecd6d3653082f4f7e9a018a21bebfb4fb539a
|
data/lib/rbbt/rest/main.rb
CHANGED
@@ -21,4 +21,5 @@
|
|
21
21
|
- *Numeric comparison*: lower of grater than (e.g. `< 0.1` or `>= 2`)
|
22
22
|
- *Names*: for entities with names, such as genes or pathways; regular expression accepted (e.g. `:name: SF3B1` or `:name: /CDK\d/`)
|
23
23
|
- *Length*: for lists (e.g. `:length: > 2`)
|
24
|
+
- *Negation*: Any of the rules above can be negated by prepending the `!` character (e.g. `!:name:/^IG/`)
|
24
25
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
function fit_content(){
|
2
2
|
var height = window.innerHeight - $('footer').outerHeight(true);
|
3
3
|
var top_offset = $('#content').get()[0].offsetTop
|
4
|
-
$('#content').css('min-height', height - top_offset)
|
4
|
+
$('#content').css('min-height', height - top_offset - 48)
|
5
5
|
$('#top_menu dl.rbbt_menu').css('max-height', height - 100)
|
6
6
|
}
|
7
7
|
|
@@ -49,22 +49,22 @@ aes_module.get_list_aesthetics = function(list, rules) {
|
|
49
49
|
promise = list.property(rule.property, args)
|
50
50
|
|
51
51
|
if (undefined === extract){
|
52
|
-
promises.push(promise.then(result[aes]))
|
52
|
+
promises.push(promise.then(result[aes], rbbt.exception.report))
|
53
53
|
}else{
|
54
|
-
promises.push(promise.then(function(v){return v.map(extract)}).then(result[aes]))
|
54
|
+
promises.push(promise.then(function(v){return v.map(extract)}).then(result[aes], rbbt.exception.report))
|
55
55
|
}
|
56
56
|
}
|
57
57
|
|
58
58
|
if (rule.workflow){
|
59
59
|
promise = rbbt.job(rule.workflow, rule.task, args,true)
|
60
60
|
if (undefined === extract){
|
61
|
-
promises.push(promise.then(result[aes]))
|
61
|
+
promises.push(promise.then(result[aes], rbbt.exception.report))
|
62
62
|
}else{
|
63
63
|
promises.push(m.sync([list.get(), promise]).then(function(res){
|
64
64
|
list_info = res[0]
|
65
65
|
data = res[1]
|
66
66
|
return list_info.entities.map(function(e){ return extract.call(null, data, e) })
|
67
|
-
}).then(result[aes]))
|
67
|
+
}).then(result[aes], rbbt.exception.report))
|
68
68
|
}
|
69
69
|
}
|
70
70
|
|
@@ -108,7 +108,7 @@ aes_module.get_list_aesthetics = function(list, rules) {
|
|
108
108
|
mapped_result[aes] = rbbt.aesthetics.map_aesthetic(values(), mapper)
|
109
109
|
})
|
110
110
|
return mapped_result
|
111
|
-
}).then(function(){ deferred.resolve(mapped_result) })
|
111
|
+
}).then(function(){ deferred.resolve(mapped_result) }, rbbt.exception.report)
|
112
112
|
|
113
113
|
return deferred.promise
|
114
114
|
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
rbbt.mlog = function(data){
|
3
2
|
console.log(data)
|
4
3
|
}
|
@@ -12,19 +11,29 @@ rbbt.ajax = function(params){
|
|
12
11
|
}
|
13
12
|
|
14
13
|
rbbt.post = function(url, data, params){
|
15
|
-
var
|
14
|
+
var request_params
|
15
|
+
if (typeof url === 'object'){
|
16
|
+
request_params = url
|
17
|
+
if (data) request_params.data = data
|
18
|
+
}else{
|
19
|
+
|
20
|
+
if (undefined === params) params = {}
|
21
|
+
if (undefined === params.url) params.url = url
|
16
22
|
|
17
|
-
|
18
|
-
|
19
|
-
if (undefined === params.url) params.url = url
|
20
|
-
if (undefined === params.serialize) params.serialize = function(formData) {return formData}
|
23
|
+
request_params = {url: url, method: "POST", data: data, serialize: function(formData){return formData} }
|
24
|
+
}
|
21
25
|
|
26
|
+
if (undefined === request_params.method) request_params.method = 'POST'
|
27
|
+
if (undefined === request_params.serialize) request_params.serialize = function(formData) {return formData}
|
22
28
|
|
23
|
-
|
24
|
-
formData
|
25
|
-
|
29
|
+
if (request_params.data){
|
30
|
+
var formData = new FormData()
|
31
|
+
forHash(request_params.data, function(key,value){
|
32
|
+
formData.append(key, value)
|
33
|
+
})
|
34
|
+
request_params.data = formData
|
35
|
+
}
|
26
36
|
|
27
|
-
var request_params = {url: url, method: "POST", data: formData, serialize: function(formData){return formData} }
|
28
37
|
return rbbt.ajax(request_params)
|
29
38
|
}
|
30
39
|
|
@@ -50,7 +59,7 @@ rbbt.insist_request = function(params, deferred, timeout, missing){
|
|
50
59
|
if (params.data !== undefined && params.data['_update'] !== undefined) params.data['_update'] = undefined
|
51
60
|
setTimeout(function(){ m.redraw(); rbbt.insist_request(params, deferred,timeout*2.5) }, timeout)
|
52
61
|
}else{
|
53
|
-
deferred.reject(new Error(xhr.statusText))
|
62
|
+
deferred.reject(new Error("Status " + xhr.status + " in '" + params.url + "': " + xhr.statusText))
|
54
63
|
}
|
55
64
|
}
|
56
65
|
)
|
@@ -8,11 +8,12 @@ var Entity = function(data){
|
|
8
8
|
|
9
9
|
this.type = data.type
|
10
10
|
this.format = data.format
|
11
|
+
|
11
12
|
if (undefined === data.info)
|
12
13
|
this.info = {}
|
13
14
|
else
|
14
15
|
this.info = data.info
|
15
|
-
|
16
|
+
|
16
17
|
if (this.format === undefined && this.info !== undefined) this.format = this.info['format']
|
17
18
|
|
18
19
|
this.full_type = function(){
|
@@ -39,7 +39,7 @@ fav_module.toggleFavourite_entity = function(){
|
|
39
39
|
var entity = rbbt.page.entity();
|
40
40
|
|
41
41
|
if (fav_module.isFavourite_entity(entity)){
|
42
|
-
rbbt.post({url: '/remove_favourite_entity/' + entity.type + '/' + clean_element(entity.code)}).then(fav_module.update)
|
42
|
+
rbbt.post({url: '/remove_favourite_entity/' + entity.type + '/' + clean_element(entity.code), data: entity.info}).then(fav_module.update)
|
43
43
|
}else{
|
44
44
|
rbbt.post({url: '/add_favourite_entity/' + entity.type + '/' + clean_element(entity.code), data: entity.info}).then(fav_module.update)
|
45
45
|
}
|
@@ -130,16 +130,16 @@ rbbt.plots.association_network = function(nodes, associations){
|
|
130
130
|
indices[entity.id] = i
|
131
131
|
}
|
132
132
|
|
133
|
-
var
|
133
|
+
var links = []
|
134
134
|
forHash(associations, function(key,value){
|
135
135
|
var source = value[0]
|
136
136
|
var target = value[1]
|
137
137
|
var source_index = indices[source]
|
138
138
|
var target_index = indices[target]
|
139
|
-
|
139
|
+
links.push({source: source_index, target: target_index, id: key})
|
140
140
|
})
|
141
141
|
|
142
|
-
return
|
142
|
+
return links
|
143
143
|
}
|
144
144
|
|
145
145
|
//{{{ BASIC RULES
|
@@ -183,7 +183,7 @@ rbbt.plots.svg_wrapper = function(objs){
|
|
183
183
|
}
|
184
184
|
}
|
185
185
|
|
186
|
-
rbbt.plots.
|
186
|
+
rbbt.plots.card_obj = function(aes){
|
187
187
|
var class_names = ""
|
188
188
|
var style = jQuery.extend({}, aes);
|
189
189
|
|
@@ -211,7 +211,7 @@ rbbt.plots.tile_obj = function(aes){
|
|
211
211
|
rbbt.plots.svg_obj = function(aes){
|
212
212
|
aes.width = '300px'
|
213
213
|
aes.height = '200px'
|
214
|
-
var tile = rbbt.plots.
|
214
|
+
var tile = rbbt.plots.card_obj(aes)
|
215
215
|
|
216
216
|
var location = {x: aes.x, y: aes.y}
|
217
217
|
if (undefined === location.x) location.x = Math.random() * 1000
|
@@ -262,7 +262,7 @@ rbbt.plots.d3js_graph = function(graph, object){
|
|
262
262
|
var node = svg.selectAll(".node").data(graph.nodes).enter()
|
263
263
|
.append("foreignObject").attr("class", "node")
|
264
264
|
.attr('width',xsize)
|
265
|
-
.attr('height',ysize).html(function(d){ return mrender(rbbt.plots.
|
265
|
+
.attr('height',ysize).html(function(d){ return mrender(rbbt.plots.card_obj(d)) })
|
266
266
|
.call(force.drag)
|
267
267
|
|
268
268
|
|
@@ -336,7 +336,7 @@ rbbt.plots.d3js_group_graph = function(graph, object){
|
|
336
336
|
var node = svg.selectAll(".node").data(graph.nodes).enter()
|
337
337
|
.append("foreignObject").attr("class", "node")
|
338
338
|
.attr('width',xsize)
|
339
|
-
.attr('height',ysize).html(function(d){ return mrender(rbbt.plots.
|
339
|
+
.attr('height',ysize).html(function(d){ return mrender(rbbt.plots.card_obj(d)) })
|
340
340
|
.call(force.drag)
|
341
341
|
|
342
342
|
|
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.7.
|
4
|
+
version: 1.7.2
|
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-
|
11
|
+
date: 2015-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|