omf_web 0.9.9 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +31 -0
  3. data/bin/omf_web_server.rb +157 -0
  4. data/doc/screenshot2.png +0 -0
  5. data/doc/widget_detail.png +0 -0
  6. data/example/demo/data_sources/downloads.rb +2 -1
  7. data/example/simple/README.md +12 -13
  8. data/example/simple/create_waveform.rb +29 -0
  9. data/example/simple/introduction.md +17 -0
  10. data/example/simple/sample.sq3 +0 -0
  11. data/example/simple/sample.sql +1008 -0
  12. data/example/simple/simple.yaml +62 -0
  13. data/example/simple/simple_dynamic.yaml +66 -0
  14. data/lib/irods4r/file.rb +15 -14
  15. data/lib/irods4r/icommands.rb +18 -18
  16. data/lib/irods4r.rb +9 -9
  17. data/lib/omf-web/config.ru +41 -16
  18. data/lib/omf-web/content/git_repository.rb +32 -31
  19. data/lib/omf-web/content/irods_repository.rb +34 -33
  20. data/lib/omf-web/content/repository.rb +48 -44
  21. data/lib/omf-web/data_source_proxy.rb +33 -22
  22. data/lib/omf-web/rack/session_authenticator.rb +48 -12
  23. data/lib/omf-web/rack/tab_mapper.rb +30 -36
  24. data/lib/omf-web/rack/websocket_handler.rb +26 -25
  25. data/lib/omf-web/session_store.rb +16 -13
  26. data/lib/omf-web/theme/abstract_page.rb +26 -22
  27. data/lib/omf-web/theme/bright/page.rb +84 -34
  28. data/lib/omf-web/theme/bright/stacked_renderer.rb +20 -19
  29. data/lib/omf-web/theme.rb +14 -9
  30. data/lib/omf-web/thin/runner.rb +38 -36
  31. data/lib/omf-web/thin/server.rb +255 -0
  32. data/lib/omf-web/version.rb +1 -1
  33. data/lib/omf-web/widget/data_widget.rb +6 -6
  34. data/lib/omf-web/widget/text/maruku/helpers.rb +33 -30
  35. data/lib/omf-web/widget/text/maruku/input/parse_block.rb +117 -117
  36. data/lib/omf-web/widget/text/maruku/output/to_html.rb +155 -154
  37. data/lib/omf-web/widget/text/maruku.rb +17 -16
  38. data/omf_web.gemspec +6 -2
  39. data/sample.sq3 +0 -0
  40. data/share/htdocs/graph/js/gauge.js +524 -0
  41. data/share/htdocs/vendor/VERSION_MAP.yaml +3 -3
  42. data/share/htdocs/vendor/backbone-1.0.0/backbone.js +1571 -0
  43. data/share/htdocs/vendor/d3-3.0/LICENSE.brewer.txt +38 -0
  44. data/share/htdocs/vendor/d3-3.0/colorbrewer.js +1 -0
  45. data/share/htdocs/vendor/d3-3.0/d3.js +8810 -0
  46. data/share/htdocs/vendor/d3-3.0/d3.min.js +5 -0
  47. data/share/htdocs/vendor/geo_json/Readme.txt +71 -0
  48. data/share/htdocs/vendor/geo_json/regions.json +41 -0
  49. data/share/htdocs/vendor/geo_json/switzerland.json +24 -0
  50. data/share/htdocs/vendor/geo_json/world.json +497 -0
  51. data/share/htdocs/vendor/nv_d3/js/nv.d3.js +8801 -4447
  52. data/share/htdocs/vendor/spin/jquery.spin.js +46 -0
  53. data/share/htdocs/vendor/spin/spin.js +349 -0
  54. data/share/htdocs/vendor/spin/spin.min.js +1 -0
  55. data/share/htdocs/vendor/underscore-1.4.4/underscore.js +1227 -0
  56. metadata +63 -48
  57. data/example/simple/data_sources/gimi31.sq3 +0 -0
  58. data/example/simple/data_sources/ping_source.rb +0 -56
  59. data/example/simple/simple_viz_server.rb +0 -39
  60. data/example/simple/widgets/charts_tab.yaml +0 -38
  61. data/share/.DS_Store +0 -0
  62. data/share/htdocs/.DS_Store +0 -0
  63. data/share/htdocs/vendor/backbone-0.5.3/backbone.js +0 -1158
  64. data/share/htdocs/vendor/underscore-1.2.1/underscore.js +0 -958
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omf_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
5
- prerelease:
4
+ version: 1.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - NICTA
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-31 00:00:00.000000000 Z
11
+ date: 2013-11-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: omf_oml
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '0.9'
19
+ version: '1.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: '0.9'
26
+ version: '1.0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: erector
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: activesupport
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rack
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: thin
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: coderay
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: log4r
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: maruku
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ~>
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ~>
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: ritex
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - ~>
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :runtime
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - ~>
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: json
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - ~>
164
144
  - !ruby/object:Gem::Version
@@ -166,7 +146,6 @@ dependencies:
166
146
  type: :runtime
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - ~>
172
151
  - !ruby/object:Gem::Version
@@ -174,7 +153,6 @@ dependencies:
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: grit
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
157
  - - ~>
180
158
  - !ruby/object:Gem::Version
@@ -182,7 +160,6 @@ dependencies:
182
160
  type: :runtime
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
164
  - - ~>
188
165
  - !ruby/object:Gem::Version
@@ -190,7 +167,6 @@ dependencies:
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: sqlite3
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
171
  - - ~>
196
172
  - !ruby/object:Gem::Version
@@ -198,7 +174,6 @@ dependencies:
198
174
  type: :runtime
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
178
  - - ~>
204
179
  - !ruby/object:Gem::Version
@@ -206,7 +181,6 @@ dependencies:
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: postgres-pr
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
185
  - - ~>
212
186
  - !ruby/object:Gem::Version
@@ -214,7 +188,6 @@ dependencies:
214
188
  type: :runtime
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
192
  - - ~>
220
193
  - !ruby/object:Gem::Version
@@ -222,7 +195,6 @@ dependencies:
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: websocket-rack
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
199
  - - ~>
228
200
  - !ruby/object:Gem::Version
@@ -230,17 +202,45 @@ dependencies:
230
202
  type: :runtime
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
206
  - - ~>
236
207
  - !ruby/object:Gem::Version
237
208
  version: 0.4.0
209
+ - !ruby/object:Gem::Dependency
210
+ name: rack-accept
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ~>
214
+ - !ruby/object:Gem::Version
215
+ version: 0.4.5
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ~>
221
+ - !ruby/object:Gem::Version
222
+ version: 0.4.5
223
+ - !ruby/object:Gem::Dependency
224
+ name: ruby-openid
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ~>
228
+ - !ruby/object:Gem::Version
229
+ version: 2.2.3
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ~>
235
+ - !ruby/object:Gem::Version
236
+ version: 2.2.3
238
237
  description: OMF's Web based control and visualization framework.
239
238
  email:
240
239
  - omf-user@lists.nicta.com.au
241
240
  executables:
242
241
  - omf_web_demo
243
242
  - omf_web_demo.sh
243
+ - omf_web_server.rb
244
244
  extensions: []
245
245
  extra_rdoc_files: []
246
246
  files:
@@ -250,6 +250,7 @@ files:
250
250
  - Rakefile
251
251
  - bin/omf_web_demo
252
252
  - bin/omf_web_demo.sh
253
+ - bin/omf_web_server.rb
253
254
  - debug/README
254
255
  - debug/brooklyn.dat
255
256
  - debug/ca.crt
@@ -273,10 +274,12 @@ files:
273
274
  - debug/test_server.rb
274
275
  - doc/index.md
275
276
  - doc/screenshot.png
277
+ - doc/screenshot2.png
276
278
  - doc/tutorial/tut01/hello_world.rb
277
279
  - doc/tutorial/tut02/hello_graph.rb
278
280
  - doc/tutorial/tut03/hello_database.rb
279
281
  - doc/tutorial/tut03/nmetric.sq3
282
+ - doc/widget_detail.png
280
283
  - etc/omf-web/omf_web.yml
281
284
  - example/NOT_WORKING/basic/hello-world-wired.rb
282
285
  - example/NOT_WORKING/basic/visualisation.yml
@@ -372,10 +375,12 @@ files:
372
375
  - example/openflow-gec15/repository/sample.md
373
376
  - example/openflow-gec15/repository/trema-ctl6.rb
374
377
  - example/simple/README.md
375
- - example/simple/data_sources/gimi31.sq3
376
- - example/simple/data_sources/ping_source.rb
377
- - example/simple/simple_viz_server.rb
378
- - example/simple/widgets/charts_tab.yaml
378
+ - example/simple/create_waveform.rb
379
+ - example/simple/introduction.md
380
+ - example/simple/sample.sq3
381
+ - example/simple/sample.sql
382
+ - example/simple/simple.yaml
383
+ - example/simple/simple_dynamic.yaml
379
384
  - lib/irods4r.rb
380
385
  - lib/irods4r/directory.rb
381
386
  - lib/irods4r/file.rb
@@ -428,6 +433,7 @@ files:
428
433
  - lib/omf-web/theme/bright/widget_page.rb
429
434
  - lib/omf-web/thin/logging.rb
430
435
  - lib/omf-web/thin/runner.rb
436
+ - lib/omf-web/thin/server.rb
431
437
  - lib/omf-web/version.rb
432
438
  - lib/omf-web/widget.rb
433
439
  - lib/omf-web/widget/UNUSED/code/code.rb
@@ -457,8 +463,7 @@ files:
457
463
  - lib/omf_common/log4r_outputter.rb
458
464
  - lib/omf_web.rb
459
465
  - omf_web.gemspec
460
- - share/.DS_Store
461
- - share/htdocs/.DS_Store
466
+ - sample.sq3
462
467
  - share/htdocs/UNUSED/log/table.js
463
468
  - share/htdocs/graph/css/graph.css
464
469
  - share/htdocs/graph/img/bar_chart.png
@@ -482,6 +487,7 @@ files:
482
487
  - share/htdocs/graph/js/barchart_brush.js
483
488
  - share/htdocs/graph/js/code_mirror.js
484
489
  - share/htdocs/graph/js/discrete_bar_chart.js
490
+ - share/htdocs/graph/js/gauge.js
485
491
  - share/htdocs/graph/js/histogram2.js
486
492
  - share/htdocs/graph/js/holt_winters_chart.js
487
493
  - share/htdocs/graph/js/line_chart3.js
@@ -660,7 +666,7 @@ files:
660
666
  - share/htdocs/vendor/CodeMirror-2.32/theme/vibrant-ink.css
661
667
  - share/htdocs/vendor/CodeMirror-2.32/theme/xq-dark.css
662
668
  - share/htdocs/vendor/VERSION_MAP.yaml
663
- - share/htdocs/vendor/backbone-0.5.3/backbone.js
669
+ - share/htdocs/vendor/backbone-1.0.0/backbone.js
664
670
  - share/htdocs/vendor/bootstrap-2.3.1/css/bootstrap-responsive.css
665
671
  - share/htdocs/vendor/bootstrap-2.3.1/css/bootstrap-responsive.min.css
666
672
  - share/htdocs/vendor/bootstrap-2.3.1/css/bootstrap.css
@@ -671,6 +677,14 @@ files:
671
677
  - share/htdocs/vendor/bootstrap-2.3.1/js/bootstrap.min.js
672
678
  - share/htdocs/vendor/d3-2.9.2/d3.js
673
679
  - share/htdocs/vendor/d3-2.9.2/d3.min.js
680
+ - share/htdocs/vendor/d3-3.0/LICENSE.brewer.txt
681
+ - share/htdocs/vendor/d3-3.0/colorbrewer.js
682
+ - share/htdocs/vendor/d3-3.0/d3.js
683
+ - share/htdocs/vendor/d3-3.0/d3.min.js
684
+ - share/htdocs/vendor/geo_json/Readme.txt
685
+ - share/htdocs/vendor/geo_json/regions.json
686
+ - share/htdocs/vendor/geo_json/switzerland.json
687
+ - share/htdocs/vendor/geo_json/world.json
674
688
  - share/htdocs/vendor/jquery-1.7.2/jquery.dataTables.js
675
689
  - share/htdocs/vendor/jquery-1.7.2/jquery.event.drag-2.0.js
676
690
  - share/htdocs/vendor/jquery-1.7.2/jquery.event.drag.js
@@ -2288,11 +2302,14 @@ files:
2288
2302
  - share/htdocs/vendor/slickgrid-200512/tests/index.html
2289
2303
  - share/htdocs/vendor/slickgrid-200512/tests/model benchmarks.html
2290
2304
  - share/htdocs/vendor/slickgrid-200512/tests/scrolling benchmarks.html
2305
+ - share/htdocs/vendor/spin/jquery.spin.js
2306
+ - share/htdocs/vendor/spin/spin.js
2307
+ - share/htdocs/vendor/spin/spin.min.js
2291
2308
  - share/htdocs/vendor/stacktrace-0.3/.DS_Store
2292
2309
  - share/htdocs/vendor/stacktrace-0.3/LICENSE.txt
2293
2310
  - share/htdocs/vendor/stacktrace-0.3/stacktrace.js
2294
2311
  - share/htdocs/vendor/thematicmapping/js/world.json
2295
- - share/htdocs/vendor/underscore-1.2.1/underscore.js
2312
+ - share/htdocs/vendor/underscore-1.4.4/underscore.js
2296
2313
  - share/htdocs/vendor/unknown/image/.DS_Store
2297
2314
  - share/htdocs/vendor/unknown/image/add_icon.gif
2298
2315
  - share/htdocs/vendor/unknown/image/alertbad_icon.gif
@@ -2396,27 +2413,25 @@ files:
2396
2413
  - share/htdocs/vendor/valums-file-uploader-cf7bfb1/tests/test-upload-handlers.htm
2397
2414
  homepage: https://www.mytestbed.net
2398
2415
  licenses: []
2416
+ metadata: {}
2399
2417
  post_install_message:
2400
2418
  rdoc_options: []
2401
2419
  require_paths:
2402
2420
  - lib
2403
2421
  required_ruby_version: !ruby/object:Gem::Requirement
2404
- none: false
2405
2422
  requirements:
2406
- - - ! '>='
2423
+ - - '>='
2407
2424
  - !ruby/object:Gem::Version
2408
2425
  version: '0'
2409
2426
  required_rubygems_version: !ruby/object:Gem::Requirement
2410
- none: false
2411
2427
  requirements:
2412
- - - ! '>='
2428
+ - - '>='
2413
2429
  - !ruby/object:Gem::Version
2414
2430
  version: '0'
2415
2431
  requirements: []
2416
2432
  rubyforge_project: omf_web
2417
- rubygems_version: 1.8.24
2433
+ rubygems_version: 2.0.6
2418
2434
  signing_key:
2419
- specification_version: 3
2435
+ specification_version: 4
2420
2436
  summary: OMF's web frontend.
2421
2437
  test_files: []
2422
- has_rdoc:
Binary file
@@ -1,56 +0,0 @@
1
- require 'omf_web'
2
- require 'omf_common/lobject'
3
- require 'omf_oml/table'
4
- require 'omf_oml/sql_source'
5
-
6
-
7
- class PingDB < OMF::Common::LObject
8
-
9
- LINKS = {'Source1::192.168.4.11' => 'link 4',
10
- 'Source1::192.168.5.11' => 'link 5',
11
- 'Source2::192.168.1.13' => 'link 1',
12
- 'Source2::192.168.2.10' => 'link 2',
13
- 'Source2::192.168.4.10' => 'link 4',
14
- 'Source3::192.168.2.12' => 'link 2',
15
- 'Source3::192.168.3.12' => 'link 3',
16
- 'Source3::192.168.5.12' => 'link 5',
17
- 'Source3::192.168.6.12' => 'link 6',
18
- 'Source4::192.168.1.13' => 'link 1',
19
- 'Source4::192.168.3.12' => 'link 3',
20
- 'Source5::192.168.6.12' => 'link 6'
21
- }
22
-
23
- def initialize(db_name)
24
- @db_name = db_name
25
- end
26
-
27
- def setup_table(stream)
28
- schema = stream.schema.clone
29
- schema.insert_column_at(0, :link)
30
- #puts stream.schema.names.inspect
31
-
32
- t = OMF::OML::OmlTable.new(:ping, schema)
33
- stream.on_new_tuple() do |v|
34
- r = v.to_a(true)
35
- link_name = "#{v[:oml_sender]}::#{v[:dest_addr]}"
36
- #r.insert 0, LINKS[link_name] || "XXX - #{link_name}"
37
- r.insert 0, link_name
38
- t.add_row(r)
39
- end
40
- OMF::Web.register_datasource t
41
- end
42
-
43
- def run
44
- ep = OMF::OML::OmlSqlSource.new(@db_name, :check_interval => 3.0)
45
- ep.on_new_stream() do |stream|
46
- info "Stream: #{stream.stream_name}"
47
- if stream.stream_name == 'pingmonitor_myping'
48
- setup_table(stream)
49
- end
50
- end
51
- ep.run
52
- self
53
- end
54
-
55
- end
56
- wv = PingDB.new("sqlite://#{File.dirname(__FILE__)}/gimi31.sq3").run()
@@ -1,39 +0,0 @@
1
-
2
- require 'omf_common/lobject'
3
- OMF::Common::Loggable.init_log 'simple'
4
-
5
-
6
- require 'omf_oml/table'
7
-
8
- def load_environment
9
- require 'omf-web/content/file_repository'
10
-
11
-
12
- Dir.glob("#{File.dirname(__FILE__)}/data_sources/*.rb").each do |fn|
13
- load fn
14
- end
15
-
16
- require 'yaml'
17
- Dir.glob("#{File.dirname(__FILE__)}/widgets/*.yaml").each do |fn|
18
- h = YAML.load_file(fn)
19
- if w = h['widget']
20
- OMF::Web.register_widget w
21
- else
22
- MObject.error "Don't know what to do with '#{fn}'"
23
- end
24
- end
25
- end
26
-
27
-
28
- # Configure the web server
29
- #
30
- opts = {
31
- :app_name => 'simple',
32
- :page_title => 'Simple Demo',
33
- :handlers => {
34
- # delay connecting to databases to AFTER we may run as daemon
35
- :pre_rackup => lambda { load_environment },
36
- }
37
- }
38
- require 'omf_web'
39
- OMF::Web.start(opts)
@@ -1,38 +0,0 @@
1
-
2
-
3
-
4
- # Simple tab showing a line chart with supporting table
5
- #
6
-
7
- widget:
8
- id: main
9
- name: Main
10
- top_level: true
11
- priority: 900
12
- type: layout/tabbed
13
- widgets:
14
-
15
- - name: Ping Line
16
- type: data/line_chart3
17
- data_source:
18
- name: ping
19
- mapping:
20
- x_axis:
21
- property: oml_ts_client
22
- y_axis:
23
- property: rtt
24
- max: 2.0
25
- group_by: link
26
- axis:
27
- x:
28
- legend: Time (sec)
29
- y:
30
- legend: RTT (ms)
31
-
32
-
33
- - name: Table
34
- type: data/table2
35
- data_source:
36
- name: ping
37
-
38
-
data/share/.DS_Store DELETED
Binary file
Binary file