rbbt-rest 1.8.76 → 1.8.77

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6876aeaa338af02a3200b7aa840fcb088f39a2e
4
- data.tar.gz: daf4ef23af0f3062a811930e889e12598b4c215d
3
+ metadata.gz: f1de6fcf8b994e77b6a88ce299f4e017e04df807
4
+ data.tar.gz: ed627370f0aa5a4470b241537e6a484e068787cd
5
5
  SHA512:
6
- metadata.gz: 2d67fb7ebae9300c5ee035fe03e2b493d3351228027077e9d06ed83804756a3bf78b781a3840642d3a83e50293bcfe2b271947e92c5b2f7fcbaf184bd18ef7ac
7
- data.tar.gz: 3a4d6c113b12952e6c9b5afa86e5dd62f6572c52f78efbdfc7d4e43365fc8f470281accc9a36afb485b767bf13953ec42219e314704b2a51d259ef497924fca3
6
+ metadata.gz: 19d7a35ede5f54282b6032c882c52ee082118d918b7ef5b9413a5695056a7925aedc46e8be285b76690c75cd9e58012d5541d6f9dfa3c34e65671720c95b4718
7
+ data.tar.gz: ec57136fc071436a09ee66becf750eafbc2768d2782b3cf76cdefb88aaed32079801528055686d4260b06ed1a881c5310df8568b4ddc02cdda3797adc81e93ec
@@ -237,7 +237,7 @@ module Sinatra
237
237
 
238
238
  case format
239
239
  when :html
240
- workflow_render('job_files', workflow, task, :info => job.info)
240
+ workflow_render('job_files', workflow, task, :info => job.info, :job => job)
241
241
  when :json
242
242
  content_type "application/json"
243
243
  job.files.to_json
@@ -31,6 +31,7 @@ module WorkflowRESTHelpers
31
31
  other_params = params.dup
32
32
  other_params.delete_if{|k,v| k[0] == "_"}
33
33
  other_params.delete :result
34
+ other_params[:template_file] = template_file
34
35
  cache_file = html_dir[server_key + "_" << Misc.obj2digest(other_params)]
35
36
  cache_type = false if params[:cache] == FalseClass
36
37
  render(template_file, locals, layout_file, [task,workflow,job.name] * "-", :cache_type => cache_type, :cache_file => cache_file)
@@ -129,6 +129,9 @@ dl > dd
129
129
  margin-left: 1em
130
130
 
131
131
 
132
+ ul.dependencies
133
+ padding-left: 1em
134
+
132
135
  .dependencies, .job_info
133
136
  .status
134
137
  color: gold
@@ -153,3 +156,5 @@ dl > dd
153
156
  max-height: 800px
154
157
  overflow: auto
155
158
 
159
+ .job_control
160
+ margin-bottom: 2em
@@ -14,6 +14,9 @@
14
14
 
15
15
  - info_url = request.env["REQUEST_URI"].sub(/\?.*/,'') + '/info'
16
16
  %a.ui.blue.button.reload(href=info_url) Info
17
+ - if job.files.any?
18
+ - files_url = request.env["REQUEST_URI"].sub(/\?.*/,'') + '/files'
19
+ %a.ui.blue.button.reload(href=files_url) Info
17
20
 
18
21
  - backtrace = job.info[:backtrace]
19
22
  - if backtrace and backtrace.any?
@@ -0,0 +1,24 @@
1
+
2
+ - files = job.files
3
+ - task = job.task_name
4
+ - workflow = job.workflow
5
+ - jobname = job.name
6
+ - files.reject!{|f| File.basename(File.dirname(f)) == ".html"}
7
+
8
+ - if files.any?
9
+ - files_by_dir = {}
10
+ - files.each do |file|
11
+ - dir = File.dirname(file)
12
+ - files_by_dir[dir] ||= []
13
+ - files_by_dir[dir] << file
14
+
15
+ - (files_by_dir["."] || []).sort.each do |file|
16
+ %a.small.ui.button(href="/#{[workflow.to_s, task, jobname, "file", file] * "/"}")= file
17
+ - (files_by_dir.keys - ["."]).each do |dir|
18
+ %dl
19
+ %dt.ui.header #{dir}/
20
+ %dd
21
+ .ui.buttons
22
+ - files_by_dir[dir].each do |file|
23
+ %a.small.ui.button(href="/#{[workflow.to_s, task, jobname, "file", file] * "/"}")= File.basename(file)
24
+
@@ -1,11 +1,11 @@
1
- %dl
2
- %dt.ui.header Job control
3
- %dd.job_control
4
- .ui.buttons
5
- %a.ui.small.button(href="/#{[workflow.to_s, task, jobname] * "/"}?_update=clean") clean job
6
- %a.ui.small.button(href="/#{[workflow.to_s, task, jobname, "info"] * "/"}") job info
7
- %a.ui.small.button(href="/#{[workflow.to_s, task, jobname] * "/"}?_format=raw") get raw result file
1
+ .ui.buttons.job_control
2
+ %a.ui.small.basic.red.button(href="/#{[workflow.to_s, task, jobname] * "/"}?_update=clean") clean job
3
+ %a.ui.small.basic.blue.button(href="/#{[workflow.to_s, task, jobname, "info"] * "/"}") job info
4
+ - if job.files.any?
5
+ %a.ui.small.basic.blue.button(href="/#{[workflow.to_s, task, jobname, "files"] * "/"}") job files
6
+ %a.ui.small.basic.blue.button(href="/#{[workflow.to_s, task, jobname] * "/"}?_format=raw") get raw result file
8
7
 
8
+ -#
9
9
  - files = job.files
10
10
  - files.reject!{|f| File.basename(File.dirname(f)) == ".html"}
11
11
 
@@ -12,7 +12,19 @@
12
12
  - if dep.file(:progress).exists?
13
13
  - pgr = dep.file(:progress).yaml
14
14
  - if pgr[:last_percent]
15
- - pgr_str = " - " + pgr[:last_percent].to_s + "%"
15
+ - start = pgr[:start]
16
+ - last_time = pgr[:last_time]
17
+
18
+ - ellapsed = last_time - start
19
+ - if pgr[:mean]
20
+ - missing = pgr[:max].to_f - pgr[:ticks].to_f
21
+ - eta = missing / pgr[:mean].to_f
22
+ - else
23
+ - ratio = pgr[:ticks].to_f/pgr[:max].to_f
24
+ - eta = ellapsed * (1 - ratio)
25
+ - eta = Misc.format_seconds(eta)
26
+ - ellapsed = Misc.format_seconds(ellapsed)
27
+ - pgr_str = " - " + pgr[:last_percent].to_s + "%" + " " + eta
16
28
  - else
17
29
  - pgr_str = " - " + pgr[:ticks].to_s
18
30
  - status = dep_status.to_s + pgr_str
@@ -16,7 +16,7 @@ rbbt.plots.aes.map_aesthetic = function(aes, mapper, map_obj){
16
16
  }
17
17
  }
18
18
  aes.push(0)
19
- return get_gradient(aes, '#EABD5D', '#40324F')
19
+ return get_gradient(aes, '#40324F', '#EABD5D')
20
20
  case 'sign-gradient':
21
21
  if (map_obj){
22
22
  if (typeof aes == 'object')
@@ -24,7 +24,7 @@ rbbt.plots.aes.map_aesthetic = function(aes, mapper, map_obj){
24
24
  else
25
25
  aes = map_obj[aes]
26
26
  }
27
- return get_sign_gradient(aes, '#EABD5D', '#DDD', '#40324F')
27
+ return get_sign_gradient(aes, '#40324F', '#DDD', '#EABD5D')
28
28
  case 'map':
29
29
  if (typeof aes == 'object')
30
30
  return aes.map(function(value){ if (value !== undefined && value != null ) value = value.toString(); return map_obj[value] })
@@ -105,6 +105,14 @@ rbbt.plots.graph.view_cytoscapejs = function(graph_model, elem, style, layout, e
105
105
  style: { 'line-color': 'data(color)',
106
106
  'target-arrow-color': 'data(color)'}
107
107
  },
108
+ {
109
+ selector: 'edge[opacity]',
110
+ style: { 'opacity': 'data(opacity)'}
111
+ },
112
+ {
113
+ selector: 'edge[width]',
114
+ style: { 'width': 'data(width)'}
115
+ },
108
116
  {
109
117
  selector: 'edge[target-arrow-shape]',
110
118
  style: { 'target-arrow-shape': 'data(target-arrow-shape)'}
@@ -52,6 +52,22 @@
52
52
  :deferjs
53
53
  $('.step.progress').progress({label: 'ratio',text:{ratio: '{value}'}})
54
54
 
55
+ %hr
56
+ - if defined? job.info_file and File.exists? job.info_file and request.env["REQUEST_URI"].include? job.name
57
+ - clean_url = add_GET_param(remove_GET_param(request.env["REQUEST_URI"], "_layout"), "_update", "clean")
58
+ %a.ui.button.blue.clean(href=clean_url) Clean
59
+ - else
60
+ - clean_url = add_GET_param(remove_GET_param(request.env["REQUEST_URI"], "_layout"), "_update", "reload")
61
+ %a.ui.blue.button.reload(href=clean_url) Reload
62
+
63
+ - info_url = request.env["REQUEST_URI"].sub(/\?.*/,'') + '/info'
64
+ %a.ui.blue.button.reload(href=info_url) Info
65
+
66
+ - if job.files.any?
67
+ - files_url = request.env["REQUEST_URI"].sub(/\?.*/,'') + '/files'
68
+ %a.ui.blue.button.reload(href=files_url) Files
69
+
70
+
55
71
  .ui.segment
56
72
  %h3.ui.header Log
57
73
  %ul.step_messages.clean_list
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.76
4
+ version: 1.8.77
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-11-09 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -226,6 +226,7 @@ files:
226
226
  - share/views/help/UI.haml
227
227
  - share/views/help/entity.haml
228
228
  - share/views/help/workflow.haml
229
+ - share/views/job_files.haml
229
230
  - share/views/job_info.haml
230
231
  - share/views/job_result.haml
231
232
  - share/views/job_result/annotations.haml
@@ -1865,7 +1866,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1865
1866
  version: '0'
1866
1867
  requirements: []
1867
1868
  rubyforge_project:
1868
- rubygems_version: 2.6.13
1869
+ rubygems_version: 2.6.8
1869
1870
  signing_key:
1870
1871
  specification_version: 4
1871
1872
  summary: Rbbt Web and REST interfaces