rbbt-rest 1.8.31 → 1.8.32

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 789edcb774536a07b918951440c7150312a58313
4
- data.tar.gz: 5c39a7b0157d6e5c825125bbad3c578039925cb1
3
+ metadata.gz: dc8e0ad6d95947ae667ea5612d2e43426356d7fc
4
+ data.tar.gz: c3fb0452be95c7c364c0c7f4613599d109f41280
5
5
  SHA512:
6
- metadata.gz: 87c1c2465deb8abf238270933df0b25f30225e497d64b2a693c2f7e42a4eb3ae20e894ef1dc6caf79a16847d1f6dd51dd04d51c43d3481dc9f2803f589802b4b
7
- data.tar.gz: 17ec51cb37b07363bd5a76d79c45ec22cebe6ab5e1115b983f9ae35a9d83029abbf696e2136a6b453f6bd2cb5378746b8b5c6e14438e7a804d16a3634e125c0a
6
+ metadata.gz: 7a39687837b66dd779aecb8d13f6e4f668141196b4eb1fac2b34474c5231244232943c2198caf31ec66ac21a49b2c4921a50ef9e12a16f85de41e4c202dc9ee2
7
+ data.tar.gz: d9722b304c146f4a9f16eb8f1779601d55b65d8a3cf018441e016e08b4b67f53895ec354ab6e502868e5d3fc9a7df1fde1f8f794572ae49998f83c46d2bcaab3
@@ -185,7 +185,7 @@ module Entity
185
185
  reuse = options.delete("reuse") if reuse.nil?
186
186
  reuse = true if reuse.nil?
187
187
 
188
- Entity::List.save_list(entity_type.to_s, id, self) unless reuse and File.exists?(Entity::List.list_file(entity_type.to_s, id, self))
188
+ Entity::List.save_list(entity_type.to_s, id, self) unless reuse and File.exists?(Entity::List.list_file(entity_type.to_s, id))
189
189
 
190
190
  klasses = self.klasses
191
191
  klasses << 'entity_list'
@@ -227,7 +227,7 @@ module WorkflowRESTHelpers
227
227
  end
228
228
 
229
229
  begin
230
- job.fork unless job.started?
230
+ job.fork(true) unless job.started?
231
231
 
232
232
  job_url = to(File.join("/", workflow.to_s, task, job.name))
233
233
  job_url += "?_format=#{@format}" if @format
@@ -44,7 +44,7 @@
44
44
  var link = $(this);
45
45
  var name = $(link).attr('name');
46
46
  var inputs = example_inputs[name];
47
- form[0].reset()
47
+ //form[0].reset()
48
48
 
49
49
  for (var input in inputs){
50
50
  var value = inputs[input]
@@ -113,6 +113,7 @@ rbbt.plots.graph.view_cytoscapejs = function(graph_model, elem, style, layout, e
113
113
  rbbt.plots.graph.update(graph_model).then(function(updated_model){
114
114
  var cy_model = rbbt.plots.graph.build_cytoscapejs(updated_model)
115
115
 
116
+ console.log(cy_model)
116
117
  require_js(['/plugins/cytoscapejs/cytoscape.js'], function(){
117
118
  var cy_params = {
118
119
  container: elem,
@@ -214,6 +215,7 @@ rbbt.plots.graph.view_d3js_graph = function(graph_model, elem, node_obj){
214
215
 
215
216
  })
216
217
  }
218
+
217
219
  rbbt.plots.graph.view_mithril = function(graph_model, elem, container_obj, produce_obj){
218
220
  rbbt.plots.graph.update(graph_model).then(function(updated_model){
219
221
  var obj = $(elem)[0]
@@ -76,3 +76,58 @@ rbbt.plots.graph.parents = function(db, source, type){
76
76
  return rbbt.plots.graph.prepare_associations(db, associations, info)
77
77
  })
78
78
  }
79
+
80
+ rbbt.plots.graph.filter_associations = function(associations,func){
81
+ var good = [];
82
+ var good_codes = [];
83
+ var codes = associations.codes
84
+ var source = associations.source
85
+ var target = associations.target
86
+ var length = codes.length
87
+ var info = associations.info
88
+ var aes = associations.aes
89
+
90
+ var fields = Object.keys(info)
91
+ var aes_fields = Object.keys(aes)
92
+
93
+ aes_fields = remove_from_array(aes_fields, 'database')
94
+ fields = remove_from_array(fields, 'database')
95
+ fields = remove_from_array(fields, 'undirected')
96
+
97
+ for (i = 0; i < length; i++){
98
+ var a_info = {};
99
+ for (f in fields){
100
+ var field = fields[f];
101
+ a_info[field] = info[field][i];
102
+ }
103
+
104
+ if (func(a_info)){
105
+ good.push(i);
106
+ good_codes.push(codes[i]);
107
+ }
108
+ }
109
+
110
+ var good_info = {}
111
+ for (f in fields){
112
+ var field = fields[f];
113
+ good_info[field] = []
114
+ for (p = 0; p < good.length; p++){
115
+ var i = good[p];
116
+ good_info[field].push(info[field][i])
117
+ }
118
+ }
119
+ var good_aes = {}
120
+ for (f in aes_fields){
121
+ var field = aes_fields[f];
122
+ good_aes[field] = []
123
+ for (p = 0; p < good.length; p++){
124
+ var i = good[p];
125
+ good_aes[field].push(aes[field][i])
126
+ }
127
+ }
128
+
129
+ associations.codes = good_codes
130
+ associations.info = good_info
131
+ associations.aes = good_aes
132
+ return associations
133
+ }
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.31
4
+ version: 1.8.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-04 00:00:00.000000000 Z
11
+ date: 2016-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -1804,7 +1804,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1804
1804
  version: '0'
1805
1805
  requirements: []
1806
1806
  rubyforge_project:
1807
- rubygems_version: 2.4.6
1807
+ rubygems_version: 2.6.6
1808
1808
  signing_key:
1809
1809
  specification_version: 4
1810
1810
  summary: Rbbt Web and REST interfaces