batman-rails-flo 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +29 -0
  3. data/Rakefile +2 -0
  4. data/lib/batman-rails-flo.rb +5 -0
  5. data/lib/batman_rails_flo/railtie.rb +9 -0
  6. data/lib/batman_rails_flo/tasks.rake +14 -0
  7. data/lib/batman_rails_flo/version.rb +3 -0
  8. data/vendor/assets/javascripts/batman_rails_flo/flo_server.js +67 -0
  9. data/vendor/assets/javascripts/batman_rails_flo/live_reload.js.coffee +129 -0
  10. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/CNAME +1 -0
  11. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/CONTRIBUTING.md +9 -0
  12. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/LICENSE +22 -0
  13. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/README +50 -0
  14. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/bin/cake +7 -0
  15. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/bin/coffee +7 -0
  16. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/browser.js +134 -0
  17. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/cake.js +112 -0
  18. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/coffee-script.js +335 -0
  19. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/command.js +569 -0
  20. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/grammar.js +631 -0
  21. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/helpers.js +252 -0
  22. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
  23. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/lexer.js +926 -0
  24. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/nodes.js +3158 -0
  25. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/optparse.js +139 -0
  26. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/parser.js +724 -0
  27. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/register.js +66 -0
  28. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/repl.js +163 -0
  29. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/rewriter.js +475 -0
  30. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
  31. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/lib/coffee-script/sourcemap.js +161 -0
  32. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/LICENSE +21 -0
  33. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/examples/pow.js +6 -0
  34. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/index.js +82 -0
  35. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/package.json +34 -0
  36. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/readme.markdown +63 -0
  37. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/chmod.js +38 -0
  38. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/clobber.js +37 -0
  39. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/mkdirp.js +28 -0
  40. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/perm.js +32 -0
  41. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/perm_sync.js +39 -0
  42. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/race.js +41 -0
  43. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/rel.js +32 -0
  44. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/return.js +25 -0
  45. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/return_sync.js +24 -0
  46. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/root.js +18 -0
  47. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/sync.js +32 -0
  48. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/umask.js +28 -0
  49. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/node_modules/mkdirp/test/umask_sync.js +32 -0
  50. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/package.json +50 -0
  51. data/vendor/assets/javascripts/batman_rails_flo/node_modules/coffee-script/register.js +1 -0
  52. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/LICENSE +30 -0
  53. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/PATENTS +23 -0
  54. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/README.md +124 -0
  55. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/bin/flo +26 -0
  56. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.html +57 -0
  57. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/configure.js +205 -0
  58. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/configure/style.css +334 -0
  59. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/connection.js +235 -0
  60. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/devtools.html +12 -0
  61. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/index.js +323 -0
  62. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/logger.js +42 -0
  63. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/logo.png +0 -0
  64. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/manifest.json +13 -0
  65. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/client/session.js +305 -0
  66. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/index.js +10 -0
  67. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/lib/flo.js +226 -0
  68. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/lib/server.js +94 -0
  69. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/README.md +66 -0
  70. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/index.js +437 -0
  71. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/LICENSE +23 -0
  72. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/README.md +218 -0
  73. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/minimatch.js +1055 -0
  74. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
  75. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
  76. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
  77. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
  78. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
  79. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
  80. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
  81. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
  82. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
  83. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
  84. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
  85. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
  86. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
  87. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
  88. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/package.json +40 -0
  89. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/basic.js +399 -0
  90. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/brace-expand.js +33 -0
  91. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/caching.js +14 -0
  92. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/defaults.js +274 -0
  93. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
  94. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/lib/walker.js +111 -0
  95. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/license +13 -0
  96. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/lib/makeerror.js +87 -0
  97. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/node_modules/tmpl/lib/tmpl.js +17 -0
  98. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/node_modules/tmpl/package.json +31 -0
  99. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/node_modules/tmpl/readme.md +10 -0
  100. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/package.json +34 -0
  101. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/node_modules/makeerror/readme.md +77 -0
  102. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/package.json +36 -0
  103. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/walker/readme.md +52 -0
  104. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/LICENSE +55 -0
  105. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/main.js +128 -0
  106. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/package.json +34 -0
  107. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/readme.mkd +72 -0
  108. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/d/d/t +0 -0
  109. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/d/t +0 -0
  110. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_monitor.js +31 -0
  111. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_monitorRootDirectory.js +28 -0
  112. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/node_modules/watch/test/test_watchTree.js +20 -0
  113. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/package.json +45 -0
  114. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/sane/test/test.js +243 -0
  115. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/CHANGELOG.md +81 -0
  116. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/LICENSE +177 -0
  117. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/Makefile +11 -0
  118. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/README.md +245 -0
  119. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/binding.gyp +14 -0
  120. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Makefile +355 -0
  121. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/linker.lock +0 -0
  122. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/obj.target/validation/src/validation.o +0 -0
  123. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/obj.target/xor/src/xor.o +0 -0
  124. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/validation.node +0 -0
  125. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/Release/xor.node +0 -0
  126. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/binding.Makefile +6 -0
  127. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/config.gypi +115 -0
  128. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/gyp-mac-tool +512 -0
  129. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/validation.target.mk +154 -0
  130. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/build/xor.target.mk +154 -0
  131. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/index.js +1 -0
  132. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/install.js +31 -0
  133. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Constants.js +23 -0
  134. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Deprecation.js +38 -0
  135. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Validation.fallback.js +12 -0
  136. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/Validation.js +18 -0
  137. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketClient.js +359 -0
  138. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketConnection.js +717 -0
  139. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketFrame.js +282 -0
  140. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRequest.js +478 -0
  141. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRouter.js +154 -0
  142. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketRouterRequest.js +59 -0
  143. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/WebSocketServer.js +216 -0
  144. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/utils.js +7 -0
  145. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/websocket.js +11 -0
  146. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/xor.fallback.js +13 -0
  147. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/lib/xor.js +18 -0
  148. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/package.json +43 -0
  149. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/src/validation.cc +144 -0
  150. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/src/xor.cpp +86 -0
  151. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/FastBufferList.js +192 -0
  152. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/node-ctype/LICENSE +18 -0
  153. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/node_modules/websocket/vendor/node-ctype/ctio-faster.js +1126 -0
  154. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/package.json +25 -0
  155. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/browser_websocket.js +63 -0
  156. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/connection_test.js +57 -0
  157. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/logger_mock.js +15 -0
  158. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/client/session_test.js +194 -0
  159. data/vendor/assets/javascripts/batman_rails_flo/node_modules/fb-flo/test/server/flo_test.js +211 -0
  160. data/vendor/assets/javascripts/batman_rails_flo/package.json +15 -0
  161. data/vendor/assets/javascripts/batman_rails_flo/reload_event_handler.js.coffee +56 -0
  162. metadata +232 -0
@@ -0,0 +1,334 @@
1
+ html {
2
+ height: 100%;
3
+ }
4
+
5
+ body {
6
+ cursor: default;
7
+ position: absolute;
8
+ top: 0;
9
+ bottom: 0;
10
+ left: 0;
11
+ right: 0;
12
+ overflow: hidden;
13
+ font-family: Lucida Grande, sans-serif;
14
+ font-size: 12px;
15
+ margin: 0;
16
+ tab-size: 4;
17
+ -webkit-user-select: none;
18
+ color: #222;
19
+ }
20
+
21
+ body.platform-linux {
22
+ color: rgb(48, 57, 66);
23
+ font-family: Ubuntu, Arial, sans-serif;
24
+ }
25
+
26
+ body.platform-mac {
27
+ color: rgb(48, 57, 66);
28
+ font-family: 'Lucida Grande', sans-serif;
29
+ }
30
+
31
+ body.dock-to-right:not(.undocked):not(.overlay-contents) {
32
+ border-left: 1px solid rgb(80, 80, 80);
33
+ }
34
+
35
+ body.dock-to-right.inactive:not(.undocked):not(.overlay-contents) {
36
+ border-left: 1px solid rgb(64%, 64%, 64%);
37
+ }
38
+
39
+ body.platform-windows {
40
+ font-family: 'Segoe UI', Tahoma, sans-serif;
41
+ }
42
+
43
+ * {
44
+ box-sizing: border-box;
45
+ }
46
+
47
+ :focus {
48
+ outline: none;
49
+ }
50
+
51
+ img {
52
+ -webkit-user-drag: none;
53
+ }
54
+
55
+ iframe,
56
+ a img {
57
+ border: none;
58
+ }
59
+
60
+ iframe.view {
61
+ position: absolute;
62
+ width: 100%;
63
+ height: 100%;
64
+ left: 0;
65
+ right: 0;
66
+ top: 0;
67
+ bottom: 0;
68
+ }
69
+
70
+ .hidden {
71
+ display: none !important;
72
+ }
73
+
74
+ main {
75
+ display: flex;
76
+ flex-direction: row;
77
+ position: absolute;
78
+ top: 0;
79
+ left: 0;
80
+ right: 0;
81
+ bottom: 0;
82
+ overflow: hidden;
83
+ }
84
+
85
+ nav {
86
+ flex: none;
87
+ flex-basis: 200px;
88
+ flex-direction: column;
89
+ display: flex !important;
90
+ border-right: 1px solid rgb(64%, 64%, 64%);
91
+ background-color: rgb(214, 221, 229);
92
+ overflow: auto;
93
+ overflow-x: hidden;
94
+ cursor: default;
95
+ position: relative;
96
+ }
97
+
98
+ ol {
99
+ position: relative;
100
+ padding: 0;
101
+ margin: 0;
102
+ list-style: none;
103
+ }
104
+
105
+ nav ol li.selected {
106
+ color: white;
107
+ text-shadow: rgba(0, 0, 0, 0.33) 1px 1px 0;
108
+ background-color: rgb(180,180,180);
109
+ background-color: rgb(56, 121, 217);
110
+ }
111
+
112
+ nav ol li {
113
+ position: relative;
114
+ height: 36px;
115
+ padding: 0 5px 0 7px;
116
+ white-space: nowrap;
117
+ overflow-x: hidden;
118
+ overflow-y: hidden;
119
+ margin-top: 1px;
120
+ line-height: 34px;
121
+ }
122
+
123
+ nav ol li:first-child {
124
+ margin-top: 2px;
125
+ }
126
+
127
+ section.tab {
128
+ display: flex;
129
+ flex-direction: column;
130
+ flex: auto;
131
+ overflow: auto;
132
+ cursor: default;
133
+ position: relative;
134
+ padding: 0 16px;
135
+ font-size: 13px;
136
+ display: none;
137
+ }
138
+
139
+ section.tab.selected {
140
+ display: flex;
141
+ }
142
+
143
+ section.tab > *{
144
+ flex-shrink: 0;
145
+ }
146
+
147
+ h1 {
148
+ color: rgb(110, 116, 128);
149
+ font-size: 16px;
150
+ line-height: 20px;
151
+ font-weight: normal;
152
+ margin-top: 0;
153
+ padding: 15px 0 10px;
154
+ }
155
+
156
+ .desc {
157
+ color: #808080;
158
+ padding: 0;
159
+ margin: 3px 0 15px;
160
+ }
161
+
162
+ select.hostnames {
163
+ min-width: 300px;
164
+ height: 100px;
165
+ font-size: 13px;
166
+ }
167
+
168
+ button {
169
+ font-size: 12px;
170
+ padding: 2px 20px;
171
+ height: 24px;
172
+ color: rgb(6, 6, 6);
173
+ border: 1px solid rgb(165, 165, 165);
174
+ background-color: rgb(237, 237, 237);
175
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
176
+ border-radius: 12px;
177
+ -webkit-appearance: none;
178
+ }
179
+
180
+ button:active {
181
+ background-color: rgb(215, 215, 215);
182
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
183
+ }
184
+
185
+ .hostnames-container {
186
+ margin-bottom: 14px;
187
+ overflow: hidden;
188
+ }
189
+
190
+ .hostnames-options {
191
+ overflow: hidden;
192
+ }
193
+
194
+ .hostnames-container button.add {
195
+ margin-left: 5px;
196
+ display:block;
197
+ margin-top: 10px;
198
+ }
199
+ .hostnames {
200
+ min-height: 115px;
201
+ max-height: 180px;
202
+ min-width: 300px;
203
+ max-width: 80%;
204
+ border: 1px;
205
+ border: 1px solid #ddd;
206
+ padding: 8px;
207
+ margin: 0;
208
+ display: inline-block;
209
+ overflow-y: scroll;
210
+ }
211
+
212
+ .hostnames .item {
213
+ padding: 4px;
214
+ position: relative;
215
+ height: 30px;
216
+ margin-bottom: 5px;
217
+ line-height: 19px;
218
+ background: #FAFAFA;
219
+ border-radius: 4px;
220
+ }
221
+
222
+ .hostnames .item:last-child {
223
+ margin-bottom: 0;
224
+ }
225
+
226
+ .hostnames .item a {
227
+ position: absolute;
228
+ right: 0;
229
+ bottom: 0;
230
+ top: 0;
231
+ text-align: center;
232
+ line-height: 20px;
233
+ width: 30px;
234
+ line-height: 24px;
235
+ width: 30px;
236
+ color: #ddd;
237
+ cursor: pointer;
238
+ font-size: 15px;
239
+ }
240
+
241
+ .hostnames .item a:hover {
242
+ color: black;
243
+ }
244
+
245
+ .port-container {
246
+ clear: both;
247
+ }
248
+
249
+ input {
250
+ border: 1px solid #ddd;
251
+ font-size: 13px;
252
+ padding: 4px;
253
+ }
254
+
255
+ .status .indicator {
256
+ display: inline-block;
257
+ width: 16px;
258
+ height: 16px;
259
+ border-radius: 10px;
260
+ background-color: red;
261
+ margin: 0 10px -3px 10px;
262
+ }
263
+
264
+ .status .indicator.connected,
265
+ .status .indicator.started {
266
+ background-color: green;
267
+ }
268
+
269
+ .status .indicator.connecting {
270
+ background-color: orange;
271
+ }
272
+
273
+ .status .indicator.disabled {
274
+ background-color: gray;
275
+ }
276
+
277
+ .status .text {
278
+ line-height: 19px;
279
+ }
280
+
281
+ .status .action {
282
+ display: block;
283
+ margin-top: 13px;
284
+ }
285
+
286
+ .log-box {
287
+ min-height: 100px;
288
+ max-height: 180px;
289
+ min-width: 300px;
290
+ max-width: 80%;
291
+ border: 1px;
292
+ border: 1px solid #ddd;
293
+ padding: 8px;
294
+ margin: 0;
295
+ display: inline-block;
296
+ overflow-y: scroll;
297
+ margin-bottom: 15px;
298
+ }
299
+
300
+ .log-box .loglevel-error {
301
+ color: #FF0000;
302
+ }
303
+
304
+ .hostnames-options, .hostname-form {
305
+ float: left;
306
+ }
307
+
308
+ .hostname-form {
309
+ padding-left: 15px
310
+ }
311
+
312
+ .hostname-form input {
313
+ width: 165px;
314
+ }
315
+
316
+ .hostname-form div:nth-child(2) {
317
+ margin-top: 10px;
318
+ }
319
+
320
+ ::-webkit-input-placeholder {
321
+ color: #6E7487;
322
+ }
323
+
324
+ input.red::-webkit-input-placeholder {
325
+ color: red;
326
+ }
327
+
328
+ .hidden {
329
+ display: none;
330
+ }
331
+
332
+ .report-bug {
333
+ font-size: 11px;
334
+ }
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Copyright (c) 2014, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+
10
+ (function() {
11
+ 'use strict';
12
+
13
+ /**
14
+ * Export to node for testing and to global for production.
15
+ */
16
+
17
+ if (typeof module === 'object' && typeof exports === 'object') {
18
+ module.exports = Connection;
19
+ } else {
20
+ this.Connection = Connection;
21
+ }
22
+
23
+ /**
24
+ * Constants.
25
+ */
26
+
27
+ var DELAY = 500;
28
+ var RETRIES = 5;
29
+ var NOP = function () {};
30
+
31
+ /**
32
+ * Takes care of connecting, messaging, handling connection retries with the
33
+ * flo server.
34
+ *
35
+ * @param {string} host
36
+ * @param {string} port
37
+ * @param {object} logger
38
+ * @class Connection
39
+ * @public
40
+ */
41
+
42
+ function Connection(host, port, createLogger) {
43
+ this.retries = RETRIES;
44
+ this.host = host;
45
+ this.port = port;
46
+ this.logger = createLogger('connection');
47
+ this.openHandler = this.openHandler.bind(this);
48
+ this.messageHandler = this.messageHandler.bind(this);
49
+ this.closeHandler = this.closeHandler.bind(this);
50
+ }
51
+
52
+ /**
53
+ * Callbacks.
54
+ */
55
+
56
+ Connection.prototype.callbacks = {
57
+ connecting: NOP,
58
+ message: NOP,
59
+ error: NOP,
60
+ retry: NOP,
61
+ open: NOP
62
+ };
63
+
64
+ /**
65
+ * Connect to host.
66
+ *
67
+ * @public
68
+ * @returns {Connection} this
69
+ */
70
+
71
+ Connection.prototype.connect = function() {
72
+ var url = 'ws://' + this.host + ':' + this.port + '/';
73
+ var ws = new WebSocket(url);
74
+
75
+ this.callbacks.connecting();
76
+ this.logger.log('Connecting to', url);
77
+
78
+ ws.onopen = this.openHandler;
79
+ ws.onmessage = this.messageHandler;
80
+ ws.onclose = this.closeHandler;
81
+
82
+ this.ws = ws;
83
+ return this;
84
+ };
85
+
86
+ /**
87
+ * Registers a message handler.
88
+ *
89
+ * @param {function} callback
90
+ * @param {object} thisObj
91
+ * @return {Connection} this
92
+ * @public
93
+ */
94
+
95
+ Connection.prototype.onmessage = makeCallbackRegistrar('message');
96
+
97
+ /**
98
+ * Registers an error handler.
99
+ *
100
+ * @param {function} callback
101
+ * @param {object} thisObj
102
+ * @return {Connection} this
103
+ * @public
104
+ */
105
+
106
+ Connection.prototype.onerror = makeCallbackRegistrar('error');
107
+
108
+ /**
109
+ * Registers a connection handler.
110
+ *
111
+ * @param {function} callback
112
+ * @param {object} thisObj
113
+ * @return {Connection} this
114
+ * @public
115
+ */
116
+
117
+ Connection.prototype.onopen = makeCallbackRegistrar('open');
118
+
119
+ /**
120
+ * Registers a retry handler.
121
+ *
122
+ * @param {function} callback
123
+ * @param {object} thisObj
124
+ * @return {Connection} this
125
+ * @public
126
+ */
127
+
128
+ Connection.prototype.onretry = makeCallbackRegistrar('retry');
129
+
130
+ /**
131
+ * Connecting callback
132
+ *
133
+ * @param {function} callback
134
+ * @param {object} thisObj
135
+ * @return {Connection} this
136
+ * @public
137
+ */
138
+
139
+ Connection.prototype.onconnecting = makeCallbackRegistrar('connecting');
140
+
141
+ /**
142
+ * Disconnects from the server
143
+ *
144
+ * @param {function} callback
145
+ * @return {Connection} this
146
+ * @public
147
+ */
148
+
149
+ Connection.prototype.disconnect = function (callback) {
150
+ callback = callback || NOP;
151
+ if (this.connected()) {
152
+ this.ws.onclose = callback;
153
+ this.ws.close();
154
+ } else {
155
+ callback();
156
+ }
157
+ return this;
158
+ };
159
+
160
+ /**
161
+ * Are we connected?
162
+ *
163
+ * @public
164
+ * @return {boolean}
165
+ */
166
+
167
+ Connection.prototype.connected = function() {
168
+ return this.ws && this.ws.readyState === this.ws.OPEN;
169
+ };
170
+
171
+ /**
172
+ * Message handler.
173
+ *
174
+ * @param {object} evt
175
+ * @private
176
+ */
177
+
178
+ Connection.prototype.messageHandler = function(evt) {
179
+ var msg = JSON.parse(evt.data);
180
+ this.callbacks.message(msg);
181
+ };
182
+
183
+
184
+ /**
185
+ * Open handler.
186
+ *
187
+ * @private
188
+ */
189
+
190
+ Connection.prototype.openHandler = function() {
191
+ this.logger.log('Connected');
192
+ this.callbacks.open();
193
+ this.retries = RETRIES;
194
+ };
195
+
196
+
197
+ /**
198
+ * Retries to connect or emits error.
199
+ *
200
+ * @param {object} evt The event that caused the retry.
201
+ * @private
202
+ */
203
+
204
+ Connection.prototype.closeHandler = function(evt) {
205
+ this.logger.error('Failed to connect with', evt.reason, evt.code);
206
+ this.retries -= 1;
207
+ if (this.retries < 1) {
208
+ var err = new Error(evt.reason || 'Error connecting.');
209
+ this.callbacks.error(err);
210
+ } else {
211
+ var delay = (RETRIES - this.retries) * DELAY;
212
+ this.logger.log('Reconnecting in ', delay);
213
+ this.callbacks.retry(delay);
214
+ setTimeout(function () {
215
+ this.connect();
216
+ }.bind(this), delay);
217
+ }
218
+ };
219
+
220
+ /**
221
+ * Creates a function that registers an event listener when called.
222
+ *
223
+ * @param {string} name
224
+ * @return {function}
225
+ * @private
226
+ */
227
+
228
+ function makeCallbackRegistrar(name) {
229
+ return function(cb, context) {
230
+ this.callbacks[name] = cb.bind(context || null);
231
+ return this;
232
+ };
233
+ }
234
+
235
+ }).call(this);