rbbt-rest 1.6.2 → 1.6.3

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/rest/common/misc.rb +10 -0
  3. data/lib/rbbt/rest/workflow/jobs.rb +8 -7
  4. data/share/views/compass/app.sass +278 -3
  5. data/share/views/compass/base/color.sass +66 -0
  6. data/share/views/compass/blocks.sass +0 -0
  7. data/share/views/compass/mixins/_blocks.sass +76 -80
  8. data/share/views/compass/mixins/_compass.sass +0 -0
  9. data/share/views/compass/mixins/_hide.sass +76 -1
  10. data/share/views/compass/table.sass +142 -0
  11. data/share/views/compass/variables/colors.sass +7 -0
  12. data/share/views/compass/variables/sizes.sass +5 -0
  13. data/share/views/entity_partials/action_card.haml +5 -5
  14. data/share/views/entity_partials/action_controller.haml +31 -33
  15. data/share/views/entity_partials/entity_card.haml +28 -27
  16. data/share/views/entity_partials/entity_list_card.haml +30 -42
  17. data/share/views/entity_partials/entity_map_card.haml +35 -43
  18. data/share/views/entity_partials/list_container.haml +6 -6
  19. data/share/views/layout.haml +53 -59
  20. data/share/views/layout/coda.haml +1 -0
  21. data/share/views/layout/doctype.haml +8 -0
  22. data/share/views/layout/footer.haml +36 -10
  23. data/share/views/layout/header.haml +47 -0
  24. data/share/views/layout/top_menu.haml +27 -13
  25. data/share/views/partials/form.haml +4 -4
  26. data/share/views/partials/table.haml +2 -1
  27. data/share/views/partials/table/column.haml +8 -9
  28. data/share/views/partials/table/files.haml +2 -2
  29. data/share/views/partials/table/filters.haml +16 -16
  30. data/share/views/partials/table/page.haml +9 -15
  31. data/share/views/public/js/ng-favourites.js +13 -0
  32. data/share/views/public/js/rbbt.aesthetics.js +51 -0
  33. data/share/views/public/js/rbbt.entity.js +62 -0
  34. data/share/views/public/js/rbbt.entity_list.js +54 -0
  35. data/share/views/public/js/rbbt.entity_map.js +52 -0
  36. data/share/views/public/js/rbbt.favourites.js +286 -0
  37. data/share/views/public/js/rbbt.favourites.js.old +195 -0
  38. data/share/views/public/js/rbbt.js +40 -0
  39. data/share/views/public/js/rbbt.knowledge_base.js +24 -0
  40. data/share/views/public/js/rbbt.page.js +32 -0
  41. data/share/views/public/js/rbbt/actions.js +15 -14
  42. data/share/views/public/js/rbbt/table.js +6 -4
  43. data/share/views/tools/cytoscape.haml +310 -0
  44. data/share/views/tools/protein_tool.haml +383 -0
  45. data/share/views/tools/protein_tool/controls.haml +315 -0
  46. metadata +23 -2
@@ -1 +1,76 @@
1
- @import "base/hide"
1
+ @import "compass/css3/animation"
2
+ @import "compass/css3/opacity"
3
+ @import "compass/css3/box-shadow"
4
+
5
+ $jiffy: 0.28s
6
+
7
+ +keyframes(scroll-up)
8
+ 100%
9
+ max-height: 200px
10
+ margin-top: -400px
11
+ overflow: hidden
12
+ z-index: -1
13
+ +box-shadow(rgba(0,0,0,0))
14
+ 50%
15
+ max-height: 300px
16
+ margin-top: -100px
17
+ overflow: hidden
18
+ z-index: -1
19
+ +box-shadow(rgba(0,0,0,0))
20
+ 0%
21
+ max-height: 500px
22
+ overflow: hidden
23
+ z-index: -1
24
+ +box-shadow(rgba(0,0,0,0))
25
+
26
+ +keyframes(scroll-down)
27
+ 0%
28
+ max-height: 200px
29
+ margin-top: -400px
30
+ overflow: hidden
31
+ z-index: -1
32
+ +box-shadow(rgba(0,0,0,0))
33
+ 100%
34
+ max-height: 500px
35
+ overflow: hidden
36
+ z-index: -1
37
+ +box-shadow(rgba(0,0,0,0))
38
+
39
+ +keyframes(grow-down)
40
+ 0%
41
+ max-height: 0px
42
+ padding-top: 0px
43
+ padding-bottom: 0px
44
+ +opacity(0.2)
45
+
46
+ 100%
47
+ max-height: 500px
48
+
49
+ +keyframes(shrink-up)
50
+ 100%
51
+ border: none
52
+ max-height: 0px
53
+ padding-top: 0px
54
+ padding-bottom: 0px
55
+ overflow: hidden
56
+ +opacity(0.1)
57
+ 0%
58
+ border: none
59
+ max-height: 500px
60
+ overflow: hidden
61
+
62
+ =shifting-up
63
+ &:not(.show)
64
+ +animation(scroll-up $jiffy forwards)
65
+ overflow: hidden
66
+ &.show
67
+ +animation(scroll-down $jiffy*2)
68
+
69
+ =shrinking-up
70
+ &:not(.show)
71
+ +animation(shrink-up $jiffy forwards)
72
+ overflow: hidden
73
+ &.show
74
+ +animation(grow-down $jiffy*2)
75
+ overflow: hidden
76
+
@@ -0,0 +1,142 @@
1
+ @import "layout/reveal"
2
+ @import "susy"
3
+
4
+ table
5
+ min-width: 30%
6
+
7
+ caption
8
+ text-align: left
9
+
10
+ border-collapse: collapse
11
+
12
+ tbody, thead, tfoot
13
+ & > tr:nth-child(2n)
14
+ & > tr
15
+ & > td, & > th
16
+ margin: 0
17
+ text-align: left
18
+
19
+ td, th
20
+ vertical-align: center
21
+ a
22
+ white-space: nowrap
23
+
24
+ &.wide
25
+ td
26
+ max-width: 200px
27
+ overflow: hidden
28
+ text-overflow: ellipsis
29
+
30
+ tfoot
31
+ ul.table_actions li
32
+ ul.table_pagination, ul.table_actions
33
+ display: flex
34
+ li > .button, li.button, li
35
+ min-width: 3em
36
+ text-align: center
37
+ float: left
38
+ margin-right: 1em
39
+ li.num.active, li.num.active > *
40
+ text-decoration: underline
41
+
42
+ ul.table_actions
43
+ @media print
44
+ &
45
+ display: none
46
+
47
+ &.sorted > thead > tr > th
48
+ position: relative
49
+ &, &:hover
50
+ &.headerSortDown
51
+
52
+
53
+ &.headerSortUp:after, &.headerSortDown:after
54
+ content: " "
55
+ float: right
56
+ right: 0
57
+
58
+ &.headerSortDown:after
59
+ margin-top: 5px
60
+
61
+ &.headerSortUp:after
62
+ margin-bottom: 5px
63
+
64
+ ////=table_column_selector
65
+ li
66
+ @include grid-row()
67
+
68
+ span
69
+ @include ellipsis_text()
70
+ @include grid-column(8)
71
+ a
72
+ @include grid-column(2, $last-column:false)
73
+
74
+ =responsive_table()
75
+ caption
76
+ display: block
77
+ display: block
78
+ position: relative
79
+ width: 100%
80
+ border-collapse: collapse
81
+ border-spacing: 0
82
+ & > thead, & > tbody
83
+ & > tr
84
+ & > th, & > td
85
+ margin: 0
86
+ vertical-align: top
87
+ height: 3em
88
+
89
+ & > th
90
+ display: block
91
+ text-align: right
92
+
93
+ & > td
94
+ display: block
95
+ text-align: left
96
+
97
+ & > thead
98
+ display: block
99
+ float: left
100
+ max-width: 40%
101
+ white-space: nowrap
102
+ overflow: auto
103
+ overflow-y: hidden
104
+ & > tr
105
+ display: block
106
+ & > th
107
+ text-align: left
108
+
109
+ & > tfoot
110
+ width: 100%
111
+ & > tr > th
112
+ padding: 0
113
+
114
+ & > tbody
115
+ display: block
116
+ width: auto
117
+ position: relative
118
+ overflow-x: auto
119
+ white-space: nowrap
120
+ & > tr
121
+ display: inline-block
122
+ vertical-align: top
123
+
124
+ /* sort out borders */
125
+
126
+ & > thead, & > tbody, & > tfoot
127
+ & > tr > th, & > tr > td
128
+ border-left: 0
129
+ border-right: 0
130
+ border-bottom: 0
131
+
132
+
133
+
134
+ table > tbody:empty
135
+ &:before
136
+ content: "Empty table"
137
+ width: 100%
138
+ padding: $tile
139
+ text-align: center
140
+ display: inline-block
141
+ ~ tfoot
142
+ display: none
@@ -0,0 +1,7 @@
1
+ $color-one: #E6E2AF
2
+ $color-two: tint($color-one, 20)
3
+ $color-accent: #046380
4
+
5
+ $color-link: #046380
6
+
7
+ $subtle-border: rgba(0,0,0,0.12)
@@ -0,0 +1,5 @@
1
+ $tile: 8px
2
+ $gap: 4px
3
+
4
+ $touch-tile: 2 * $tile
5
+ $touch-size: 3 * $touch-tile
@@ -1,8 +1,6 @@
1
- .action_card
2
- .title
1
+ .action_card.ui.very.basic.segment
2
+ .title.ui.header
3
3
  .name
4
- = Misc.humanize page_action if page_action
5
- .long_name
6
4
  - case page_type
7
5
  - when 'entity_action'
8
6
  = @entity.respond_to?(:name) ? @entity.name || @entity : @entity
@@ -10,9 +8,11 @@
10
8
  = Misc.humanize page_entity_list
11
9
  - when 'entity_map_action'
12
10
  = Misc.humanize page_entity_map
11
+ .long_name
12
+ = Misc.humanize page_action if page_action
13
13
 
14
14
  - if card.description
15
- .action_description
15
+ .action_description.ui.basic.segment
16
16
  - case card.description
17
17
  - when String
18
18
  = card.description
@@ -1,46 +1,44 @@
1
1
  - entity = controller.entity
2
2
  - if controller.actions.any?
3
- .action_controller
4
- %ul.controls
5
-
6
- %li.reload.ui.icon.button
7
- %a.reload_action(href="#" title="Refresh action")
8
- %i.general.fi-reload
9
-
10
- %li.description.ui.icon.button
11
- %a(href="#" title="View description")
12
- %i.general.fi-book
13
-
14
- %li.parameters.ui.icon.button
15
- %a(href="#" title="Configure parameters")
16
- %i.general.fi-widget
17
-
18
- %li.pin.ui.icon.button
19
- %a(href="#" title="Make this configuration default")
20
- %i.general.fi-paperclip
21
-
22
- %li.url.ui.icon.button
23
- %a(href="#" title="Bookmark action")
24
- %i.general.fi-bookmark
25
-
26
-
27
- %ul.actions
28
- - last_resource = nil
29
- - controller.actions.each do |action, text, resource, params|
30
- %li.ui.button(class="#{last_resource and last_resource != resource ? "new_resource" : ""}" attr-resource="#{resource}")
3
+ .card_actions.ui.segment
4
+ .action_controller
5
+ .ui.buttons.controls
6
+ %a.item.reload.ui.icon.disabled.button(href="#" title="Refresh action")
7
+ %i.icon.repeat
8
+
9
+ -#%a.item.description.ui.icon.disabled.button(href="#" title="View description")
10
+ %i.icon.book
11
+
12
+ -#%a.item.parameters.ui.icon.disabled.button(href="#" title="Configure parameters")
13
+ %i.icon.setting
14
+
15
+
16
+ -#%a.item.pin.ui.icon.disabled.button(href="#" title="Make this configuration default")
17
+ %i.icon.pin
18
+
19
+
20
+ -#%a.item.url.ui.icon.disabled.button(href="#" title="Bookmark action")
21
+ %i.icon.bookmark
22
+
23
+ .ui.buttons.action_menu
24
+ - last_resource = nil
25
+ - controller.actions.each do |action, text, resource, params|
26
+ //.ui.item.button(class="#{last_resource and last_resource != resource ? "new_resource" : ""}" attr-resource="#{resource}")
31
27
  - case
32
28
  - when AnnotatedArray === entity
33
29
  - id = params.delete :id if Hash === params
34
30
  - id = controller.id if id.nil?
35
- = entity.list_action_link action, text, id, params.merge(:reuse => true)
31
+ = entity.list_action_link action, text, id, params.merge(:reuse => true, :class => 'ui item button')
36
32
  - when TSV === entity
37
33
  - id = params.delete :id if Hash === params
38
34
  - id = controller.id if id.nil?
39
35
  - type = page_entity_type
40
36
  - column = page_entity_map_column
41
- %a.entity_map_action(href="#{Entity::REST.entity_map_action_url id, type, column, action}")= text
37
+ %a.entity_map_action.ui.item.button(href="#{Entity::REST.entity_map_action_url id, type, column, action}")= text
42
38
  - else
43
- = entity.action_link action, text, params
44
- - last_resource = resource
39
+ = entity.action_link action, text, params.merge(:class => 'ui item button')
40
+ - last_resource = resource
41
+
42
+ .progress.ui.message
45
43
 
46
- .action_loader
44
+ .action_loader.ui.very.basic.segment<
@@ -1,8 +1,9 @@
1
1
  - entity = card.entity
2
2
  - entity_id = "entity__" + entity.id
3
- .entity_card(id=entity_id)
3
+ - default = entity.respond_to?(:default)? entity.default || entity.to_s : entity.to_s
4
+ .entity_card.ui.very.basic.segment(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}")
4
5
  /-- title --
5
- .title
6
+ .ui.header.title
6
7
  .name
7
8
  - case card.name
8
9
  - when nil
@@ -21,16 +22,17 @@
21
22
  - when Proc
22
23
  = fragment :long_name, &card.long_name
23
24
 
24
- .card
25
+ .content
25
26
  - info = entity.info.dup
26
27
  - info.delete :annotated_array
27
28
  - info.delete :annotation_types
28
29
  - if info.any? or card.meta
29
30
  /-- sidebar --
30
- .sidebar.offcanvas
31
+ .info.ui.compact.segment
31
32
  .meta
32
- .entity_info
33
- = hash2dl(info)
33
+ - if info.any?
34
+ .entity_info
35
+ = hash2dl(info)
34
36
 
35
37
  - case card.meta
36
38
  - when nil
@@ -39,34 +41,33 @@
39
41
  - when Proc
40
42
  = fragment :meta, &card.meta
41
43
  - if card.list_container
42
- .entity_lists
43
- = list_container_render(card.list_container)
44
+ = list_container_render(card.list_container)
44
45
 
45
46
 
46
47
 
47
48
  /-- content --
48
- .content<
49
- - case card.description
50
- - when nil
51
- - if entity.respond_to?(:description) and entity.description
52
- /-- description --
53
- .description
54
- %p= entity.description
55
- - when String
56
- /-- description --
57
- .description
58
- :documentation
59
- #{card.description}
60
- - when Proc
49
+ - case card.description
50
+ - when nil
51
+ - if entity.respond_to?(:description) and entity.description
61
52
  /-- description --
53
+ .description.ui.compact.basic.segment<
54
+ %p= entity.description
55
+ - when String
56
+ /-- description --
57
+ .description.ui.compact.basic.segment<
58
+ :documentation
59
+ #{card.description}
60
+ - when Proc
61
+ /-- description --
62
+ .description.ui.compact.basic.segment<
62
63
  = fragment :description, &card.description
63
64
 
64
- - if defined? block and block
65
- /-- content block --
65
+ - if defined? block and block
66
+ /-- content block --
67
+ .description.ui.compact.basic.segment<
66
68
  = capture_haml &block
67
69
 
68
- - if card.action_controller
69
- /-- actions --
70
- .actions.togglable_hide(hide-title='Actions')<
71
- = action_controller_render(card.action_controller)
70
+ - if card.action_controller
71
+ /-- actions --
72
+ = action_controller_render(card.action_controller)
72
73
 
@@ -1,41 +1,32 @@
1
1
  - list = card.list
2
2
  - list_id = card.list_id
3
- .entity_list_card(id="#{ list_id.gsub(/\s/,'_') }_card")
3
+ .entity_list_card.ui.very.basic.segment(id="#{ list_id.gsub(/\s/,'_') }_card" data-list=list_id data-list-type="#{list.base_type}")
4
4
 
5
5
  /-- title --
6
- .title
6
+ .title.ui.header
7
7
  .name
8
8
  = list.base_type
9
9
  List
10
10
  .long_name
11
11
  = Misc.humanize list_id
12
12
 
13
- .card
13
+ .content
14
14
 
15
15
  /-- sidebar --
16
- .sidebar.offcanvas
16
+ .ui.segment.info
17
17
  .meta
18
- .list_management
18
+ .list_management.ui.buttons
19
+ %a.compare_list.ui.button(href="#" data-reveal-id='modal1') Compare
20
+ %a.list_list.ui.button(href="#{request.path_info + "?_format=list"}") List
19
21
 
20
- %ul
22
+ - if list.respond_to? :name
23
+ %a.name_list.ui.button(href="#{request.path_info + "?_format=name"}") Name
21
24
 
22
- %li
23
- %a.compare_list(href="#" data-reveal-id='modal1') Compare
24
- %li
25
- %a.list_list(href="#{request.path_info + "?_format=list"}") List
25
+ - if list.respond_to? :ensembl
26
+ %a.ensembl_list.ui.button(href="#{request.path_info + "?_format=ensembl"}") Ensembl
26
27
 
27
- - if list.respond_to? :name
28
- %li
29
- %a.name_list(href="#{request.path_info + "?_format=name"}") Name
30
-
31
- - if list.respond_to? :ensembl
32
- %li
33
- %a.ensembl_list(href="#{request.path_info + "?_format=ensembl"}") Ensembl
34
-
35
- %li
36
- %a.download_list(href="#{request.path_info + "?_format=raw"}") Raw
37
- %li
38
- %a.edit_list(href="#") Edit
28
+ %a.download_list.ui.button(href="#{request.path_info + "?_format=raw"}") Raw
29
+ %a.edit_list.ui.button(href="#") Edit
39
30
 
40
31
  .entity_info
41
32
  - info = list.info.dup
@@ -52,7 +43,7 @@
52
43
  .entities
53
44
  %p #{list.length} entities
54
45
  - if (defined? force and force) or list.length < 500
55
- %ul.entity_list
46
+ %ul.entity_list.clean_list
56
47
  - list = list.sort_by{|g| g.name || "Z" << g} if list.respond_to? :name
57
48
  - list.link.each do |link|
58
49
  %li= link
@@ -61,7 +52,7 @@
61
52
  = reveal "Too many entities to list (#{list.length})" do
62
53
  = fragment do
63
54
  - list = list.sort_by{|g| g.name || "Z" << g} if list.respond_to? :name
64
- %ul.entity_list
55
+ %ul.entity_list.clean_list
65
56
  - list.link.each do |link|
66
57
  %li= link
67
58
 
@@ -71,22 +62,19 @@
71
62
 
72
63
 
73
64
 
74
- /-- content --
75
- .content
76
- /-- description --
77
- .description<
78
- - case card.description
79
- - when nil
80
- - if list.length == list.uniq.length
81
- %p== #{ list.length } elements
82
- - else
83
- %p== #{ list.length } elements (#{list.uniq.length} unique)
84
- - when String
85
- %p= card.description
86
- - when Proc
87
- = capture_haml &card.description
65
+ /-- description --
66
+ .description.ui.basic.segment<
67
+ - case card.description
68
+ - when nil
69
+ - if list.length == list.uniq.length
70
+ %p== #{ list.length } elements
71
+ - else
72
+ %p== #{ list.length } elements (#{list.uniq.length} unique)
73
+ - when String
74
+ %p= card.description
75
+ - when Proc
76
+ = capture_haml &card.description
88
77
 
89
- - if card.action_controller
90
- /-- actions --
91
- .actions.togglable_hide(hide-title="Actions")<
92
- = action_controller_render(card.action_controller)
78
+ - if card.action_controller
79
+ /-- actions --
80
+ = action_controller_render(card.action_controller)