rbbt-rest 1.8.136 → 1.8.142
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/cache.rb +4 -1
- data/lib/rbbt/rest/common/misc.rb +6 -1
- data/lib/rbbt/rest/common/render.rb +3 -2
- data/lib/rbbt/rest/common/table.rb +1 -1
- data/lib/rbbt/rest/entity/rest.rb +8 -2
- data/share/views/compass/card_templates.sass +14 -0
- data/share/views/compass/layout.sass +2 -0
- data/share/views/compass/misc.sass +15 -0
- data/share/views/entity_partials/action_controller.haml +1 -1
- data/share/views/entity_partials/entity_card.haml +19 -3
- data/share/views/entity_partials/entity_list_card.haml +9 -0
- data/share/views/entity_partials/entity_map_card.haml +5 -5
- data/share/views/job_result/array.haml +4 -1
- data/share/views/layout/footer.haml +2 -15
- data/share/views/partials/footers/bsc.haml +3 -3
- data/share/views/partials/tabs.haml +15 -12
- data/share/views/public/js/app.js +13 -0
- data/share/views/public/js/helpers/helpers.js +2 -2
- data/share/views/public/js/rbbt.basic.js +2 -2
- data/share/views/public/js/rbbt.plots/rbbt.plots.graph.adapters.js +33 -11
- data/share/views/public/js/rbbt.plots/rbbt.plots.graph.js +20 -2
- data/share/views/public/js/rbbt/actions.js +21 -12
- data/share/views/public/plugins/cytoscapejs/cytoscape.js +1 -0
- data/share/views/public/plugins/cytoscapejs/cytoscape.min.js +22 -56
- data/share/views/public/plugins/cytoscapejs/cytoscape.umd.js +32290 -0
- data/share/views/public/plugins/js-cookie/js/js.cookie.js +83 -65
- data/share/views/tools/nvd3.haml +3 -2
- data/share/views/tools/nvd3/chart.haml +7 -2
- metadata +3 -4
- data/share/views/public/plugins/cytoscapejs/cytoscape.js +0 -24578
- data/share/views/public/plugins/cytoscapejs/cytoscape.js.map +0 -1
- data/share/views/public/plugins/cytoscapejs/cytoscape.min.js.map +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41d4cc31577331447eb862dab40cfa0579535cebe63f5a8a18fa15faf0e52903
|
|
4
|
+
data.tar.gz: 9df9b6195d6c3c7cb67f3d36055013c1024c197584a59a25321804d58b8b1575
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90c5a597c253cf60af21c149c0671973a3b1c0d1012b592f300f87e7fb84dedae70989ef632740dcb9f0cca5dfa8198c44268012393e6c7ecf9aa1b71122e4e0
|
|
7
|
+
data.tar.gz: f4019b6940791f2a2b54a7a70aad1ec7c1eb27c135f516362fd6289b7ff7785ae2c236321d6f403dc6017275aae36c03ed12a23bfecbb29d0f04abb3dec763a3
|
|
@@ -153,6 +153,7 @@ module RbbtRESTHelpers
|
|
|
153
153
|
header "Location", Entity::REST.entity_list_url(list_id, type)
|
|
154
154
|
url = Entity::REST.entity_list_url(list_id, type)
|
|
155
155
|
url = url + '?_layout=false' unless @layout
|
|
156
|
+
url = URI.encode(url)
|
|
156
157
|
redirect to(url)
|
|
157
158
|
when "map"
|
|
158
159
|
raw_tsv, tsv_options = load_tsv(fragment_file)
|
|
@@ -174,6 +175,7 @@ module RbbtRESTHelpers
|
|
|
174
175
|
Entity::Map.save_map(type.to_s, column, map_id, tsv, user)
|
|
175
176
|
url = Entity::REST.entity_map_url(map_id, type, column)
|
|
176
177
|
url = url + '?_layout=false' unless @layout
|
|
178
|
+
url = URI.encode(url)
|
|
177
179
|
redirect to(url)
|
|
178
180
|
when "excel"
|
|
179
181
|
require 'rbbt/tsv/excel'
|
|
@@ -223,7 +225,8 @@ data = NULL
|
|
|
223
225
|
|
|
224
226
|
if mime.nil?
|
|
225
227
|
txt = Open.read(fragment_file)
|
|
226
|
-
|
|
228
|
+
|
|
229
|
+
if txt =~ /<([^> ]+)[^>]*>.*?<\/\1>/m
|
|
227
230
|
mime = "text/html"
|
|
228
231
|
else
|
|
229
232
|
begin
|
|
@@ -59,8 +59,13 @@ module RbbtRESTHelpers
|
|
|
59
59
|
@ajax = request.xhr?
|
|
60
60
|
@ajax_url = headers["AJAX-URL"]
|
|
61
61
|
|
|
62
|
-
@fullpath = request.fullpath
|
|
63
62
|
@uri = request.env["REQUEST_URI"]
|
|
63
|
+
@path = request.env["PATH_INFO"]
|
|
64
|
+
@query = request.env["QUERY_STRING"]
|
|
65
|
+
|
|
66
|
+
#@fullpath = request.fullpath
|
|
67
|
+
@fullpath = (@query && ! @query.empty?) ? @path + "?" + @query : @path
|
|
68
|
+
@fullpath = remove_GET_param(@fullpath, ["_update", "_"])
|
|
64
69
|
|
|
65
70
|
@layout = consume_parameter(:_layout)
|
|
66
71
|
|
|
@@ -166,9 +166,10 @@ module RbbtRESTHelpers
|
|
|
166
166
|
}
|
|
167
167
|
Open.write(pid_file, pid.to_s)
|
|
168
168
|
|
|
169
|
-
url = @
|
|
169
|
+
url = @fullpath
|
|
170
170
|
url = remove_GET_param(url, "_update")
|
|
171
171
|
url = remove_GET_param(url, "_")
|
|
172
|
+
|
|
172
173
|
fragment_url = add_GET_param(url, "_fragment", fragment_code)
|
|
173
174
|
if link.nil?
|
|
174
175
|
html_tag('a', "", :href => fragment_url, :class => 'fragment', "data-text" => text)
|
|
@@ -226,7 +227,7 @@ module RbbtRESTHelpers
|
|
|
226
227
|
filename = Misc.sanitize_filename(Misc.name2basename(filename))
|
|
227
228
|
|
|
228
229
|
if @step
|
|
229
|
-
url = add_GET_param(remove_GET_param(@
|
|
230
|
+
url = add_GET_param(remove_GET_param(@fullpath, ["_update", "_"]), "_fragment", "html_resources/#{ filename }")
|
|
230
231
|
f = @step.file(:html_resources)[filename].find
|
|
231
232
|
else
|
|
232
233
|
url = "/files/#{ filename }"
|
|
@@ -402,7 +402,7 @@ module RbbtRESTHelpers
|
|
|
402
402
|
if @step
|
|
403
403
|
table_file = @step.file(table_code) if @step
|
|
404
404
|
|
|
405
|
-
url = add_GET_param(@
|
|
405
|
+
url = add_GET_param(@fullpath, "_fragment", File.basename(table_file))
|
|
406
406
|
url = remove_GET_param(url, "_update")
|
|
407
407
|
url = remove_GET_param(url, "_layout")
|
|
408
408
|
url = remove_GET_param(url, "_")
|
|
@@ -14,11 +14,11 @@ module Entity
|
|
|
14
14
|
#{{{ MISC
|
|
15
15
|
|
|
16
16
|
def self.clean_element(elem)
|
|
17
|
-
elem.gsub('/', '-..-').gsub("|", '-...-').gsub('%', 'o-o').gsub('[','(.-(').gsub(']',').-)')
|
|
17
|
+
elem.gsub('&', '--AND--').gsub('/', '-..-').gsub("|", '-...-').gsub('%', 'o-o').gsub('[','(.-(').gsub(']',').-)')
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def self.restore_element(elem)
|
|
21
|
-
CGI.unescape(CGI.unescape(elem.gsub('-..-', '/').gsub('-...-', '|').gsub('o-o', '%').gsub('(.-(','[').gsub(').-)',']')))
|
|
21
|
+
CGI.unescape(CGI.unescape(elem.gsub('--AND--', '&').gsub('-..-', '/').gsub('-...-', '|').gsub('o-o', '%').gsub('(.-(','[').gsub(').-)',']')))
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def self.setup(mod)
|
|
@@ -146,6 +146,12 @@ module Entity
|
|
|
146
146
|
rescue
|
|
147
147
|
text = self
|
|
148
148
|
end
|
|
149
|
+
|
|
150
|
+
begin
|
|
151
|
+
attributes[:title] ||= self.respond_to?(:title)? self.title || self : self
|
|
152
|
+
rescue
|
|
153
|
+
end
|
|
154
|
+
|
|
149
155
|
attributes[:title] = text if attributes[:title].nil?
|
|
150
156
|
|
|
151
157
|
Misc.html_tag('a', text, attributes)
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
.action_controller
|
|
3
|
+
display:flex !important
|
|
4
|
+
& > .action_progress
|
|
5
|
+
flex-width: 100%
|
|
6
|
+
& > .ui.buttons > .button
|
|
7
|
+
flex-height: 3em
|
|
8
|
+
& > .ui.buttons.controls > .button
|
|
9
|
+
max-height: 3em
|
|
10
|
+
|
|
2
11
|
.action_parameters, .filter_controls
|
|
3
12
|
form
|
|
4
13
|
&:after
|
|
@@ -41,3 +50,8 @@
|
|
|
41
50
|
width: 7em !important
|
|
42
51
|
|
|
43
52
|
|
|
53
|
+
.card_sidebar, .card_sidebar > *, .card_sidebar > * > *
|
|
54
|
+
text-overflow: ellipsis
|
|
55
|
+
overflow-x: auto
|
|
56
|
+
max-width: 100%
|
|
57
|
+
|
|
@@ -278,3 +278,18 @@ ul.tasks
|
|
|
278
278
|
|
|
279
279
|
.table > .table_url
|
|
280
280
|
display: none
|
|
281
|
+
|
|
282
|
+
dl.flex_dl
|
|
283
|
+
display: flex
|
|
284
|
+
flex-flow: row wrap
|
|
285
|
+
& > dt
|
|
286
|
+
flex-basis: 20%
|
|
287
|
+
text-align: right
|
|
288
|
+
padding-right: 2em
|
|
289
|
+
max-width: 20%
|
|
290
|
+
text-overflow: ellipsis
|
|
291
|
+
& > dd
|
|
292
|
+
flex-basis: 80%
|
|
293
|
+
flex-grow: 1
|
|
294
|
+
margin: 0
|
|
295
|
+
|
|
@@ -2,21 +2,31 @@
|
|
|
2
2
|
- entity_id = "entity__" + entity.id
|
|
3
3
|
- default = entity.respond_to?(:default)? entity.default || entity.to_s : entity.to_s
|
|
4
4
|
|
|
5
|
+
:sass
|
|
6
|
+
.card_sidebar, .card_sidebar > *, .card_sidebar > * > *
|
|
7
|
+
text-overflow: ellipsis
|
|
8
|
+
overflow-x: auto
|
|
9
|
+
max-width: 100%
|
|
5
10
|
|
|
6
11
|
.entity_card.ui.grid(data-entity=entity data-entity-id=default data-entity-type="#{entity.base_type}" data-entity-format="#{entity.respond_to?(:format) ? entity.format : ""}" data-entity-info="#{entity.info.to_json}")
|
|
7
12
|
/-- card_sidebar --
|
|
8
|
-
.ui.four.wide.column.vertical.card_sidebar.menu
|
|
13
|
+
.ui.four.wide.column.vertical.card_sidebar.menu.hidden
|
|
14
|
+
- empty = true
|
|
9
15
|
- if card.sections.any?
|
|
16
|
+
- empty = false
|
|
10
17
|
%h3 Sections
|
|
11
18
|
- card.sections.each do |name,section|
|
|
12
19
|
%a.item(href="##{Misc.snake_case(name)}")= Misc.humanize(name)
|
|
13
|
-
|
|
20
|
+
- if card.action_controller
|
|
21
|
+
%a.item(href="#entity_actions") Entity actions
|
|
14
22
|
|
|
15
23
|
- info = card.entity.info
|
|
24
|
+
- info.delete :annotation_types
|
|
16
25
|
- if info.any? or card.meta or card.list_container
|
|
17
|
-
|
|
26
|
+
- empty = false
|
|
18
27
|
.meta
|
|
19
28
|
- if info.any?
|
|
29
|
+
%h3 Meta data
|
|
20
30
|
.entity_info
|
|
21
31
|
= hash2dl(info)
|
|
22
32
|
|
|
@@ -28,10 +38,16 @@
|
|
|
28
38
|
= fragment :meta, &card.meta
|
|
29
39
|
|
|
30
40
|
- if card.list_container
|
|
41
|
+
- empty = false
|
|
31
42
|
%h3 Related lists
|
|
32
43
|
.list_container
|
|
33
44
|
= list_container_render(card.list_container)
|
|
34
45
|
|
|
46
|
+
- if ! empty
|
|
47
|
+
.show_opened
|
|
48
|
+
- else
|
|
49
|
+
.delete_empty
|
|
50
|
+
|
|
35
51
|
|
|
36
52
|
.ui.twelve.wide.column.content
|
|
37
53
|
.ui.header.basic.segment
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
.entity_list_card.ui.grid(id="#{ list_id.gsub(/\s/,'_') }_card" data-list=list_id data-list-type="#{list.base_type}")
|
|
5
5
|
.ui.four.wide.column.vertical.card_sidebar.menu.hidden
|
|
6
|
+
- empty = true
|
|
6
7
|
- if card.sections.any?
|
|
8
|
+
- empty = false
|
|
7
9
|
%h3 Sections
|
|
8
10
|
- card.sections.each do |name,section|
|
|
9
11
|
%a.item(href="##{Misc.snake_case(name)}")= Misc.humanize(name)
|
|
@@ -22,7 +24,10 @@
|
|
|
22
24
|
%a.edit_list.ui.button(href="#") Edit
|
|
23
25
|
|
|
24
26
|
- info = card.list.info
|
|
27
|
+
- info.delete :annotation_types
|
|
28
|
+
- info.delete :annotated_array
|
|
25
29
|
- if info.any? or card.meta or card.list_container
|
|
30
|
+
- empty = false
|
|
26
31
|
/-- sidebar --
|
|
27
32
|
%h3 Meta data
|
|
28
33
|
.meta
|
|
@@ -55,10 +60,14 @@
|
|
|
55
60
|
%li= link
|
|
56
61
|
|
|
57
62
|
- if card.list_container
|
|
63
|
+
- empty = false
|
|
58
64
|
%h3 Related lists
|
|
59
65
|
.list_container
|
|
60
66
|
= list_container_render(card.list_container)
|
|
61
67
|
|
|
68
|
+
- if ! empty
|
|
69
|
+
.show_opened
|
|
70
|
+
|
|
62
71
|
.ui.twelve.wide.column.content
|
|
63
72
|
.ui.header.basic.segment
|
|
64
73
|
.content
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
%input(type='submit')
|
|
22
22
|
|
|
23
23
|
- if (%w(pvalue p.value p-value pvalues p.values p-values qvalue q.value q-value qvalues q.values q-values) & map.fields.first.downcase.split(/\s+/)).any? and map.fields.first.downcase !~ /score$/
|
|
24
|
-
- url = add_GET_param(@
|
|
24
|
+
- url = add_GET_param(@fullpath, '_format', 'pvalue_score')
|
|
25
25
|
%a.ui.small.button(href=url) Pvalue score
|
|
26
26
|
|
|
27
27
|
= reveal "QQ-plot", nil, :class => 'ui small button plot' do
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
|
|
57
57
|
- if Gene == Entity.formats[map.key_field]
|
|
58
58
|
- if map.key_field != "Ensembl Gene ID"
|
|
59
|
-
- url = add_GET_param(@
|
|
59
|
+
- url = add_GET_param(@fullpath, '_format', 'ensembl')
|
|
60
60
|
%a.ensembl.ui.small.button(href=url) Ensembl
|
|
61
61
|
- if map.key_field != "Associated Gene Name"
|
|
62
|
-
- url = add_GET_param(@
|
|
62
|
+
- url = add_GET_param(@fullpath, '_format', 'name')
|
|
63
63
|
%a.name.ui.small.button(href=url) Name
|
|
64
64
|
- if "Rank" == map.fields.first
|
|
65
|
-
- url = add_GET_param(@
|
|
65
|
+
- url = add_GET_param(@fullpath, '_format', 'invert_ranks')
|
|
66
66
|
%a.invert_ranks.ui.small.button(href=url) Invert ranks
|
|
67
67
|
- else
|
|
68
|
-
- url = add_GET_param(@
|
|
68
|
+
- url = add_GET_param(@fullpath, '_format', 'ranks')
|
|
69
69
|
%a.ranks.ui.small.button(href=url) Ranks
|
|
70
70
|
- if NumericValue == Entity.formats[map.fields.first] or (map.entity_templates[map.fields.first] and map.entity_templates[map.fields.first].annotation_types.include? NumericValue)
|
|
71
71
|
- $page_entity_base_type = page_entity_base_type
|
|
@@ -37,24 +37,11 @@
|
|
|
37
37
|
a
|
|
38
38
|
width: 100%
|
|
39
39
|
|
|
40
|
-
.ui.segment.stackable.bottom.attached.grid.
|
|
40
|
+
.ui.segment.stackable.bottom.attached.grid.two.column
|
|
41
41
|
.ui.column
|
|
42
42
|
= partial_render('partials/footers/bsc')
|
|
43
|
+
-#
|
|
43
44
|
.ui.column
|
|
44
45
|
= partial_render('partials/footers/ntnu')
|
|
45
46
|
.ui.column
|
|
46
47
|
= partial_render('partials/footers/cnio')
|
|
47
|
-
-#.ui.segment
|
|
48
|
-
.image
|
|
49
|
-
%a(href="http://www.cnio.es/")
|
|
50
|
-
%img(src="/file/cnio.png" height='115px' width='241px')
|
|
51
|
-
.content
|
|
52
|
-
.ui.header
|
|
53
|
-
CNIO. Centro Nacional de Investigaciones Oncologicas (Spanish National Cancer Research Center)
|
|
54
|
-
.description
|
|
55
|
-
%span.group Structural Computational Biology Group
|
|
56
|
-
%br/
|
|
57
|
-
%span.address C/ Melchor Fernandez Almagro, 3, E-28029 Madrid
|
|
58
|
-
.meta.contact
|
|
59
|
-
%span.who miguel.vazquez
|
|
60
|
-
%span.where cnio.es
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
%a(href="http://www.bsc.es/")
|
|
3
3
|
%img(src="/file/bsc.svg")
|
|
4
4
|
.content
|
|
5
|
-
|
|
5
|
+
-#.ui.header
|
|
6
6
|
:sass
|
|
7
7
|
span.bsc
|
|
8
8
|
font-weight: bold
|
|
9
9
|
span.cns
|
|
10
10
|
font-style: italic
|
|
11
11
|
font-weight: normal
|
|
12
|
-
|
|
12
|
+
-#
|
|
13
13
|
%span.bsc Barcelona Supercomputing Center
|
|
14
14
|
%span.cns Centro Nacional de Supercomputación
|
|
15
15
|
|
|
16
16
|
.description
|
|
17
|
-
%span.group Genome Informatics Unit
|
|
17
|
+
%span.group Genome Informatics Unit. Life sciences Department.
|
|
18
18
|
%span.address Nexus II Building. C/ Jordi Girona, 29. 08034 Barcelona (Spain)
|
|
19
19
|
|
|
20
20
|
.meta.contact
|
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
- id = "tab_menu_" + rand(1000).to_s unless defined? id and not id.nil?
|
|
3
3
|
- active = false unless defined? active and not active.nil?
|
|
4
4
|
- active = headers.first if TrueClass === active
|
|
5
|
-
.
|
|
5
|
+
.tabs(id=id)
|
|
6
|
+
.ui.top.attached.tabular.stackable.menu
|
|
7
|
+
- headers.each do |header|
|
|
8
|
+
- code = codes[header] ||= Misc.digest([header, id]*"-")
|
|
9
|
+
- tab_active = (active and active == header) ? 'active' : ''
|
|
10
|
+
.ui.item(data-tab=code class=tab_active)= header
|
|
11
|
+
|
|
6
12
|
- headers.each do |header|
|
|
7
|
-
- code = codes[header]
|
|
13
|
+
- code = codes[header]
|
|
14
|
+
- next if content[header].nil?
|
|
8
15
|
- tab_active = (active and active == header) ? 'active' : ''
|
|
9
|
-
.ui.
|
|
10
|
-
|
|
11
|
-
- headers.each do |header|
|
|
12
|
-
- code = codes[header]
|
|
13
|
-
- next if content[header].nil?
|
|
14
|
-
- tab_active = (active and active == header) ? 'active' : ''
|
|
15
|
-
.ui.tab.bottom.attached.segment.content(data-tab=code class=tab_active)
|
|
16
|
-
= content[header]
|
|
16
|
+
.ui.tab.bottom.attached.segment.content(data-tab=code class=tab_active)
|
|
17
|
+
= content[header]
|
|
17
18
|
|
|
18
19
|
:deferjs
|
|
19
|
-
|
|
20
|
+
//$("##{id} > .item[data-tab]").tab()
|
|
21
|
+
|
|
22
|
+
$("##{id} > .menu > .item[data-tab]").tab({"context": "##{id}"})
|
|
20
23
|
|
|
21
|
-
$('##{id} > .item[data-tab=close]').click(function(item){
|
|
24
|
+
$('##{id} > .menu > .item[data-tab=close]').click(function(item){
|
|
22
25
|
var tool = $(this).parents('.cytoscape_tool').first()
|
|
23
26
|
tool.find('.tab.active, .item.active').removeClass('active')
|
|
24
27
|
return false
|
|
@@ -39,6 +39,19 @@ if (typeof user === 'undefined') user = 'none'
|
|
|
39
39
|
|
|
40
40
|
$(function(){
|
|
41
41
|
|
|
42
|
+
register_dom_update('.card_sidebar > .show_opened', function(elem){
|
|
43
|
+
elem.parent('.card_sidebar').removeClass('hidden')
|
|
44
|
+
elem.remove()
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
register_dom_update('.card_sidebar > .delete_empty', function(elem){
|
|
48
|
+
console.log('delete')
|
|
49
|
+
elem.parent('.card_sidebar').siblings('.content').find('.controls > .card_sidebar_open').remove()
|
|
50
|
+
elem.parent('.card_sidebar').remove()
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
42
55
|
register_dom_update('.reload_workflow', function(elem){
|
|
43
56
|
elem.click(function(){
|
|
44
57
|
console.log('WR')
|
|
@@ -48,11 +48,11 @@ function remove_parameter(url, parameter){
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
function clean_element(elem){
|
|
51
|
-
return elem.replace(/\//g, '-..-').replace(/%/g,'o-o').replace(/\[/g,'(.-(').replace(/\]/g,').-)')
|
|
51
|
+
return elem.replace('&','--AND--').replace(/\//g, '-..-').replace(/%/g,'o-o').replace(/\[/g,'(.-(').replace(/\]/g,').-)')
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function restore_element(elem){
|
|
55
|
-
return unescape(elem.replace(/-\.\.-/g, '/').replace(/o-o/g,'%')).replace(/\(\.-\(/g,'[').replace(/\)\.-\)/g,']');
|
|
55
|
+
return unescape(elem.replace('--AND--','&').replace(/-\.\.-/g, '/').replace(/o-o/g,'%')).replace(/\(\.-\(/g,'[').replace(/\)\.-\)/g,']');
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
function parse_parameters(params){
|
|
@@ -160,7 +160,7 @@ rbbt.post = function(url, data, params){
|
|
|
160
160
|
// Cookies
|
|
161
161
|
|
|
162
162
|
rbbt.set_cookie = function(name,value){
|
|
163
|
-
Cookies.set(name, value)
|
|
163
|
+
Cookies.set(name, value, { sameSite: 'strict'})
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
rbbt.get_cookie = function(name){
|
|
@@ -171,7 +171,7 @@ rbbt.get_cookie = function(name){
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
rbbt.remove_cookie = function(name){
|
|
174
|
-
Cookies.remove(name)
|
|
174
|
+
Cookies.remove(name, { sameSite: 'strict'})
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
// LocalStorage
|
|
@@ -66,6 +66,7 @@ rbbt.plots.graph.build_cytoscapejs = function(graph_model){
|
|
|
66
66
|
forArray(model.edges, function(edge){
|
|
67
67
|
var clean = clean_hash(edge)
|
|
68
68
|
if (undefined === clean.id) clean.id = clean.code
|
|
69
|
+
clean.id = clean.code + "@" + clean.database
|
|
69
70
|
edges.push({data: clean})
|
|
70
71
|
})
|
|
71
72
|
|
|
@@ -100,6 +101,10 @@ rbbt.plots.graph.view_cytoscapejs = function(graph_model, elem, style, layout, e
|
|
|
100
101
|
style: { 'shape': 'data(shape)' }
|
|
101
102
|
},
|
|
102
103
|
|
|
104
|
+
{
|
|
105
|
+
selector: 'edge',
|
|
106
|
+
style: { 'curve-style': 'bezier'}
|
|
107
|
+
},
|
|
103
108
|
{
|
|
104
109
|
selector: 'edge[color]',
|
|
105
110
|
style: { 'line-color': 'data(color)',
|
|
@@ -113,18 +118,35 @@ rbbt.plots.graph.view_cytoscapejs = function(graph_model, elem, style, layout, e
|
|
|
113
118
|
selector: 'edge[width]',
|
|
114
119
|
style: { 'width': 'data(width)'}
|
|
115
120
|
},
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
121
|
+
//{
|
|
122
|
+
// selector: 'edge[target-arrow-shape]',
|
|
123
|
+
// style: { 'target-arrow-shape': 'data(target-arrow-shape)'}
|
|
124
|
+
//},
|
|
125
|
+
//{
|
|
126
|
+
// selector: 'edge[target-arrow-color]',
|
|
127
|
+
// style: { 'target-arrow-color': 'data(target-arrow-color)'}
|
|
128
|
+
//}
|
|
124
129
|
|
|
125
130
|
]
|
|
126
131
|
|
|
127
|
-
var default_layout = {
|
|
132
|
+
var default_layout = {
|
|
133
|
+
name: 'cose',
|
|
134
|
+
idealEdgeLength: 100,
|
|
135
|
+
nodeOverlap: 20,
|
|
136
|
+
refresh: 20,
|
|
137
|
+
fit: true,
|
|
138
|
+
padding: 30,
|
|
139
|
+
randomize: false,
|
|
140
|
+
componentSpacing: 100,
|
|
141
|
+
nodeRepulsion: 400000,
|
|
142
|
+
edgeElasticity: 100,
|
|
143
|
+
nestingFactor: 5,
|
|
144
|
+
gravity: 80,
|
|
145
|
+
numIter: 1000,
|
|
146
|
+
initialTemp: 200,
|
|
147
|
+
coolingFactor: 0.95,
|
|
148
|
+
minTemp: 1.0
|
|
149
|
+
}
|
|
128
150
|
|
|
129
151
|
if (undefined === style) style = default_style
|
|
130
152
|
if (undefined === layout) layout = default_layout
|
|
@@ -139,6 +161,7 @@ rbbt.plots.graph.view_cytoscapejs = function(graph_model, elem, style, layout, e
|
|
|
139
161
|
container: elem,
|
|
140
162
|
elements: cy_model.elements,
|
|
141
163
|
style: style,
|
|
164
|
+
layout: layout,
|
|
142
165
|
}
|
|
143
166
|
|
|
144
167
|
if (undefined !== extra) forHash(extra, function(k,v){ cy_params[k,v] })
|
|
@@ -147,7 +170,7 @@ rbbt.plots.graph.view_cytoscapejs = function(graph_model, elem, style, layout, e
|
|
|
147
170
|
|
|
148
171
|
cy.layout(layout)
|
|
149
172
|
|
|
150
|
-
cy.one('
|
|
173
|
+
cy.one('layoutstop', function(){
|
|
151
174
|
deferred.resolve(this)
|
|
152
175
|
})
|
|
153
176
|
})
|
|
@@ -238,7 +261,6 @@ rbbt.plots.graph.update_cytoscape = function(graph_model, elem){
|
|
|
238
261
|
|
|
239
262
|
rbbt.plots.graph.view_d3js_graph = function(graph_model, elem, node_obj){
|
|
240
263
|
rbbt.plots.graph.update(graph_model).then(function(updated_model){
|
|
241
|
-
console.log(updated_model)
|
|
242
264
|
var dataset = rbbt.plots.graph.build_d3(updated_model)
|
|
243
265
|
|
|
244
266
|
if (undefined === node_obj){
|