rottenegg 1.2.5.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (374) hide show
  1. data/.gitignore +7 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +14 -0
  4. data/README.rdoc +47 -0
  5. data/Rakefile +2 -0
  6. data/bin/rottenegg +4 -0
  7. data/bin/rottenegg_gen +55 -0
  8. data/lib/rotten_egg.rb +14 -0
  9. data/lib/rotten_egg/app_setting.rb +76 -0
  10. data/lib/rotten_egg/application.rb +299 -0
  11. data/lib/rotten_egg/message_logger.rb +36 -0
  12. data/lib/rotten_egg/scm.rb +229 -0
  13. data/lib/rotten_egg/server.rb +238 -0
  14. data/lib/rotten_egg/user.rb +30 -0
  15. data/lib/rotten_egg/util.rb +381 -0
  16. data/lib/rotten_egg/version.rb +4 -0
  17. data/public/javascripts/extjs4/bootstrap.js +58 -0
  18. data/public/javascripts/extjs4/ext-all.js +7 -0
  19. data/public/javascripts/extjs4/ext.js +7 -0
  20. data/public/javascripts/extjs4/resources/css/ext-all.css +1 -0
  21. data/public/javascripts/extjs4/resources/themes/images/default/boundlist/trigger-arrow.png +0 -0
  22. data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-corners.gif +0 -0
  23. data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-corners.gif +0 -0
  24. data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-notitle-sides.gif +0 -0
  25. data/public/javascripts/extjs4/resources/themes/images/default/btn-group/btn-group-default-framed-sides.gif +0 -0
  26. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-bg.gif +0 -0
  27. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-corners.gif +0 -0
  28. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-disabled-bg.gif +0 -0
  29. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-disabled-corners.gif +0 -0
  30. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-disabled-sides.gif +0 -0
  31. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-focus-bg.gif +0 -0
  32. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-focus-corners.gif +0 -0
  33. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-focus-sides.gif +0 -0
  34. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-over-bg.gif +0 -0
  35. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-over-corners.gif +0 -0
  36. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-over-sides.gif +0 -0
  37. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-pressed-bg.gif +0 -0
  38. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-pressed-corners.gif +0 -0
  39. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-pressed-sides.gif +0 -0
  40. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-large-sides.gif +0 -0
  41. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-bg.gif +0 -0
  42. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-corners.gif +0 -0
  43. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-disabled-bg.gif +0 -0
  44. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-disabled-corners.gif +0 -0
  45. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-disabled-sides.gif +0 -0
  46. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-focus-bg.gif +0 -0
  47. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-focus-corners.gif +0 -0
  48. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-focus-sides.gif +0 -0
  49. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-over-bg.gif +0 -0
  50. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-over-corners.gif +0 -0
  51. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-over-sides.gif +0 -0
  52. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-pressed-bg.gif +0 -0
  53. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-pressed-corners.gif +0 -0
  54. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-pressed-sides.gif +0 -0
  55. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-medium-sides.gif +0 -0
  56. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-bg.gif +0 -0
  57. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-corners.gif +0 -0
  58. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-disabled-bg.gif +0 -0
  59. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-disabled-corners.gif +0 -0
  60. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-disabled-sides.gif +0 -0
  61. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-focus-bg.gif +0 -0
  62. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-focus-corners.gif +0 -0
  63. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-focus-sides.gif +0 -0
  64. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-over-bg.gif +0 -0
  65. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-over-corners.gif +0 -0
  66. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-over-sides.gif +0 -0
  67. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-pressed-bg.gif +0 -0
  68. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-pressed-corners.gif +0 -0
  69. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-pressed-sides.gif +0 -0
  70. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-small-sides.gif +0 -0
  71. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-corners.gif +0 -0
  72. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-corners.gif +0 -0
  73. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-disabled-sides.gif +0 -0
  74. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-focus-bg.gif +0 -0
  75. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-focus-corners.gif +0 -0
  76. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-focus-sides.gif +0 -0
  77. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-over-bg.gif +0 -0
  78. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-over-corners.gif +0 -0
  79. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-over-sides.gif +0 -0
  80. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-bg.gif +0 -0
  81. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-corners.gif +0 -0
  82. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-pressed-sides.gif +0 -0
  83. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-large-sides.gif +0 -0
  84. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-corners.gif +0 -0
  85. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-corners.gif +0 -0
  86. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-disabled-sides.gif +0 -0
  87. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-bg.gif +0 -0
  88. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-corners.gif +0 -0
  89. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-focus-sides.gif +0 -0
  90. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-over-bg.gif +0 -0
  91. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-over-corners.gif +0 -0
  92. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-over-sides.gif +0 -0
  93. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-bg.gif +0 -0
  94. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-corners.gif +0 -0
  95. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-pressed-sides.gif +0 -0
  96. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-medium-sides.gif +0 -0
  97. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-corners.gif +0 -0
  98. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-corners.gif +0 -0
  99. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-disabled-sides.gif +0 -0
  100. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-focus-bg.gif +0 -0
  101. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-focus-corners.gif +0 -0
  102. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-focus-sides.gif +0 -0
  103. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-over-bg.gif +0 -0
  104. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-over-corners.gif +0 -0
  105. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-over-sides.gif +0 -0
  106. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-bg.gif +0 -0
  107. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-corners.gif +0 -0
  108. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-pressed-sides.gif +0 -0
  109. data/public/javascripts/extjs4/resources/themes/images/default/btn/btn-default-toolbar-small-sides.gif +0 -0
  110. data/public/javascripts/extjs4/resources/themes/images/default/button/arrow.gif +0 -0
  111. data/public/javascripts/extjs4/resources/themes/images/default/button/btn.gif +0 -0
  112. data/public/javascripts/extjs4/resources/themes/images/default/button/group-cs.gif +0 -0
  113. data/public/javascripts/extjs4/resources/themes/images/default/button/group-lr.gif +0 -0
  114. data/public/javascripts/extjs4/resources/themes/images/default/button/group-tb.gif +0 -0
  115. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-b-noline.gif +0 -0
  116. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-b.gif +0 -0
  117. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-bo.gif +0 -0
  118. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-light.gif +0 -0
  119. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-noline.gif +0 -0
  120. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow-o.gif +0 -0
  121. data/public/javascripts/extjs4/resources/themes/images/default/button/s-arrow.gif +0 -0
  122. data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-footer-bg.gif +0 -0
  123. data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-footer-bg.png +0 -0
  124. data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-header-bg.gif +0 -0
  125. data/public/javascripts/extjs4/resources/themes/images/default/datepicker/datepicker-header-bg.png +0 -0
  126. data/public/javascripts/extjs4/resources/themes/images/default/dd/drop-add.gif +0 -0
  127. data/public/javascripts/extjs4/resources/themes/images/default/dd/drop-no.gif +0 -0
  128. data/public/javascripts/extjs4/resources/themes/images/default/dd/drop-yes.gif +0 -0
  129. data/public/javascripts/extjs4/resources/themes/images/default/editor/tb-sprite.gif +0 -0
  130. data/public/javascripts/extjs4/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-corners.gif +0 -0
  131. data/public/javascripts/extjs4/resources/themes/images/default/form-invalid-tip/form-invalid-tip-default-sides.gif +0 -0
  132. data/public/javascripts/extjs4/resources/themes/images/default/form/checkbox.gif +0 -0
  133. data/public/javascripts/extjs4/resources/themes/images/default/form/clear-trigger.gif +0 -0
  134. data/public/javascripts/extjs4/resources/themes/images/default/form/date-trigger.gif +0 -0
  135. data/public/javascripts/extjs4/resources/themes/images/default/form/error-tip-corners.gif +0 -0
  136. data/public/javascripts/extjs4/resources/themes/images/default/form/exclamation.gif +0 -0
  137. data/public/javascripts/extjs4/resources/themes/images/default/form/radio.gif +0 -0
  138. data/public/javascripts/extjs4/resources/themes/images/default/form/search-trigger.gif +0 -0
  139. data/public/javascripts/extjs4/resources/themes/images/default/form/spinner-small.gif +0 -0
  140. data/public/javascripts/extjs4/resources/themes/images/default/form/spinner.gif +0 -0
  141. data/public/javascripts/extjs4/resources/themes/images/default/form/text-bg.gif +0 -0
  142. data/public/javascripts/extjs4/resources/themes/images/default/form/trigger-square.gif +0 -0
  143. data/public/javascripts/extjs4/resources/themes/images/default/form/trigger-tpl.gif +0 -0
  144. data/public/javascripts/extjs4/resources/themes/images/default/form/trigger.gif +0 -0
  145. data/public/javascripts/extjs4/resources/themes/images/default/grid/arrow-left-white.gif +0 -0
  146. data/public/javascripts/extjs4/resources/themes/images/default/grid/arrow-right-white.gif +0 -0
  147. data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-bg.gif +0 -0
  148. data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-bg.png +0 -0
  149. data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-selected-bg.gif +0 -0
  150. data/public/javascripts/extjs4/resources/themes/images/default/grid/cell-special-selected-bg.png +0 -0
  151. data/public/javascripts/extjs4/resources/themes/images/default/grid/checked.gif +0 -0
  152. data/public/javascripts/extjs4/resources/themes/images/default/grid/col-move-bottom.gif +0 -0
  153. data/public/javascripts/extjs4/resources/themes/images/default/grid/col-move-top.gif +0 -0
  154. data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-bg.gif +0 -0
  155. data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-bg.png +0 -0
  156. data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-over-bg.gif +0 -0
  157. data/public/javascripts/extjs4/resources/themes/images/default/grid/column-header-over-bg.png +0 -0
  158. data/public/javascripts/extjs4/resources/themes/images/default/grid/columns.gif +0 -0
  159. data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-left.gif +0 -0
  160. data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-left.png +0 -0
  161. data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-right.gif +0 -0
  162. data/public/javascripts/extjs4/resources/themes/images/default/grid/dd-insert-arrow-right.png +0 -0
  163. data/public/javascripts/extjs4/resources/themes/images/default/grid/dirty.gif +0 -0
  164. data/public/javascripts/extjs4/resources/themes/images/default/grid/done.gif +0 -0
  165. data/public/javascripts/extjs4/resources/themes/images/default/grid/drop-no.gif +0 -0
  166. data/public/javascripts/extjs4/resources/themes/images/default/grid/drop-yes.gif +0 -0
  167. data/public/javascripts/extjs4/resources/themes/images/default/grid/footer-bg.gif +0 -0
  168. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-blue-hd.gif +0 -0
  169. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-blue-split.gif +0 -0
  170. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-hrow.gif +0 -0
  171. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-loading.gif +0 -0
  172. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-split.gif +0 -0
  173. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid-vista-hd.gif +0 -0
  174. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-hd-btn.gif +0 -0
  175. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-hrow-over.gif +0 -0
  176. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-hrow.gif +0 -0
  177. data/public/javascripts/extjs4/resources/themes/images/default/grid/grid3-rowheader.gif +0 -0
  178. data/public/javascripts/extjs4/resources/themes/images/default/grid/group-by.gif +0 -0
  179. data/public/javascripts/extjs4/resources/themes/images/default/grid/group-collapse.gif +0 -0
  180. data/public/javascripts/extjs4/resources/themes/images/default/grid/group-expand-sprite.gif +0 -0
  181. data/public/javascripts/extjs4/resources/themes/images/default/grid/group-expand.gif +0 -0
  182. data/public/javascripts/extjs4/resources/themes/images/default/grid/hd-pop.gif +0 -0
  183. data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-asc.gif +0 -0
  184. data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-desc.gif +0 -0
  185. data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-lock.gif +0 -0
  186. data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-lock.png +0 -0
  187. data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-unlock.gif +0 -0
  188. data/public/javascripts/extjs4/resources/themes/images/default/grid/hmenu-unlock.png +0 -0
  189. data/public/javascripts/extjs4/resources/themes/images/default/grid/invalid_line.gif +0 -0
  190. data/public/javascripts/extjs4/resources/themes/images/default/grid/loading.gif +0 -0
  191. data/public/javascripts/extjs4/resources/themes/images/default/grid/mso-hd.gif +0 -0
  192. data/public/javascripts/extjs4/resources/themes/images/default/grid/nowait.gif +0 -0
  193. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-first-disabled.gif +0 -0
  194. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-first.gif +0 -0
  195. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-last-disabled.gif +0 -0
  196. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-last.gif +0 -0
  197. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-next-disabled.gif +0 -0
  198. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-next.gif +0 -0
  199. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-prev-disabled.gif +0 -0
  200. data/public/javascripts/extjs4/resources/themes/images/default/grid/page-prev.gif +0 -0
  201. data/public/javascripts/extjs4/resources/themes/images/default/grid/pick-button.gif +0 -0
  202. data/public/javascripts/extjs4/resources/themes/images/default/grid/property-cell-bg.gif +0 -0
  203. data/public/javascripts/extjs4/resources/themes/images/default/grid/property-cell-selected-bg.gif +0 -0
  204. data/public/javascripts/extjs4/resources/themes/images/default/grid/refresh-disabled.gif +0 -0
  205. data/public/javascripts/extjs4/resources/themes/images/default/grid/refresh.gif +0 -0
  206. data/public/javascripts/extjs4/resources/themes/images/default/grid/row-check-sprite.gif +0 -0
  207. data/public/javascripts/extjs4/resources/themes/images/default/grid/row-expand-sprite.gif +0 -0
  208. data/public/javascripts/extjs4/resources/themes/images/default/grid/row-over.gif +0 -0
  209. data/public/javascripts/extjs4/resources/themes/images/default/grid/row-sel.gif +0 -0
  210. data/public/javascripts/extjs4/resources/themes/images/default/grid/sort-hd.gif +0 -0
  211. data/public/javascripts/extjs4/resources/themes/images/default/grid/sort_asc.gif +0 -0
  212. data/public/javascripts/extjs4/resources/themes/images/default/grid/sort_desc.gif +0 -0
  213. data/public/javascripts/extjs4/resources/themes/images/default/grid/unchecked.gif +0 -0
  214. data/public/javascripts/extjs4/resources/themes/images/default/grid/wait.gif +0 -0
  215. data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-bottom.gif +0 -0
  216. data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-left.gif +0 -0
  217. data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-right.gif +0 -0
  218. data/public/javascripts/extjs4/resources/themes/images/default/layout/mini-top.gif +0 -0
  219. data/public/javascripts/extjs4/resources/themes/images/default/menu/checked.gif +0 -0
  220. data/public/javascripts/extjs4/resources/themes/images/default/menu/group-checked.gif +0 -0
  221. data/public/javascripts/extjs4/resources/themes/images/default/menu/item-over.gif +0 -0
  222. data/public/javascripts/extjs4/resources/themes/images/default/menu/menu-parent.gif +0 -0
  223. data/public/javascripts/extjs4/resources/themes/images/default/menu/menu.gif +0 -0
  224. data/public/javascripts/extjs4/resources/themes/images/default/menu/unchecked.gif +0 -0
  225. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-bottom-bg.gif +0 -0
  226. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-bg.gif +0 -0
  227. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-corners.gif +0 -0
  228. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-bottom-sides.gif +0 -0
  229. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-bg.gif +0 -0
  230. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-corners.gif +0 -0
  231. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-bottom-sides.gif +0 -0
  232. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-bg.gif +0 -0
  233. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-corners.gif +0 -0
  234. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-left-sides.gif +0 -0
  235. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-bg.gif +0 -0
  236. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-corners.gif +0 -0
  237. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-right-sides.gif +0 -0
  238. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-bg.gif +0 -0
  239. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-corners.gif +0 -0
  240. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-collapsed-top-sides.gif +0 -0
  241. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-left-bg.gif +0 -0
  242. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-left-corners.gif +0 -0
  243. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-left-sides.gif +0 -0
  244. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-right-bg.gif +0 -0
  245. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-right-corners.gif +0 -0
  246. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-right-sides.gif +0 -0
  247. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-top-bg.gif +0 -0
  248. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-top-corners.gif +0 -0
  249. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-framed-top-sides.gif +0 -0
  250. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-left-bg.gif +0 -0
  251. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-right-bg.gif +0 -0
  252. data/public/javascripts/extjs4/resources/themes/images/default/panel-header/panel-header-default-top-bg.gif +0 -0
  253. data/public/javascripts/extjs4/resources/themes/images/default/panel/panel-default-framed-corners.gif +0 -0
  254. data/public/javascripts/extjs4/resources/themes/images/default/panel/panel-default-framed-sides.gif +0 -0
  255. data/public/javascripts/extjs4/resources/themes/images/default/progress/progress-default-bg.gif +0 -0
  256. data/public/javascripts/extjs4/resources/themes/images/default/shared/blue-loading.gif +0 -0
  257. data/public/javascripts/extjs4/resources/themes/images/default/shared/calendar.gif +0 -0
  258. data/public/javascripts/extjs4/resources/themes/images/default/shared/glass-bg.gif +0 -0
  259. data/public/javascripts/extjs4/resources/themes/images/default/shared/hd-sprite.gif +0 -0
  260. data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-error.gif +0 -0
  261. data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-info.gif +0 -0
  262. data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-question.gif +0 -0
  263. data/public/javascripts/extjs4/resources/themes/images/default/shared/icon-warning.gif +0 -0
  264. data/public/javascripts/extjs4/resources/themes/images/default/shared/large-loading.gif +0 -0
  265. data/public/javascripts/extjs4/resources/themes/images/default/shared/left-btn.gif +0 -0
  266. data/public/javascripts/extjs4/resources/themes/images/default/shared/loading-balls.gif +0 -0
  267. data/public/javascripts/extjs4/resources/themes/images/default/shared/right-btn.gif +0 -0
  268. data/public/javascripts/extjs4/resources/themes/images/default/shared/shadow-c.png +0 -0
  269. data/public/javascripts/extjs4/resources/themes/images/default/shared/shadow-lr.png +0 -0
  270. data/public/javascripts/extjs4/resources/themes/images/default/shared/shadow.png +0 -0
  271. data/public/javascripts/extjs4/resources/themes/images/default/shared/warning.gif +0 -0
  272. data/public/javascripts/extjs4/resources/themes/images/default/sizer/e-handle-dark.gif +0 -0
  273. data/public/javascripts/extjs4/resources/themes/images/default/sizer/e-handle.gif +0 -0
  274. data/public/javascripts/extjs4/resources/themes/images/default/sizer/ne-handle-dark.gif +0 -0
  275. data/public/javascripts/extjs4/resources/themes/images/default/sizer/ne-handle.gif +0 -0
  276. data/public/javascripts/extjs4/resources/themes/images/default/sizer/nw-handle-dark.gif +0 -0
  277. data/public/javascripts/extjs4/resources/themes/images/default/sizer/nw-handle.gif +0 -0
  278. data/public/javascripts/extjs4/resources/themes/images/default/sizer/s-handle-dark.gif +0 -0
  279. data/public/javascripts/extjs4/resources/themes/images/default/sizer/s-handle.gif +0 -0
  280. data/public/javascripts/extjs4/resources/themes/images/default/sizer/se-handle-dark.gif +0 -0
  281. data/public/javascripts/extjs4/resources/themes/images/default/sizer/se-handle.gif +0 -0
  282. data/public/javascripts/extjs4/resources/themes/images/default/sizer/square.gif +0 -0
  283. data/public/javascripts/extjs4/resources/themes/images/default/sizer/sw-handle-dark.gif +0 -0
  284. data/public/javascripts/extjs4/resources/themes/images/default/sizer/sw-handle.gif +0 -0
  285. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-bg.gif +0 -0
  286. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-bg.png +0 -0
  287. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-thumb.gif +0 -0
  288. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-thumb.png +0 -0
  289. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-bg.gif +0 -0
  290. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-bg.png +0 -0
  291. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-thumb.gif +0 -0
  292. data/public/javascripts/extjs4/resources/themes/images/default/slider/slider-v-thumb.png +0 -0
  293. data/public/javascripts/extjs4/resources/themes/images/default/tab-bar/scroll-left.gif +0 -0
  294. data/public/javascripts/extjs4/resources/themes/images/default/tab-bar/scroll-right.gif +0 -0
  295. data/public/javascripts/extjs4/resources/themes/images/default/tab-bar/tab-bar-default-bg.gif +0 -0
  296. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-active-bg.gif +0 -0
  297. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-active-corners.gif +0 -0
  298. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-active-sides.gif +0 -0
  299. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-bg.gif +0 -0
  300. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-corners.gif +0 -0
  301. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-disabled-bg.gif +0 -0
  302. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-disabled-corners.gif +0 -0
  303. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-disabled-sides.gif +0 -0
  304. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-over-bg.gif +0 -0
  305. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-over-corners.gif +0 -0
  306. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-over-sides.gif +0 -0
  307. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-bottom-sides.gif +0 -0
  308. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-close.gif +0 -0
  309. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-active-bg.gif +0 -0
  310. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-active-corners.gif +0 -0
  311. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-active-sides.gif +0 -0
  312. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-bg.gif +0 -0
  313. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-corners.gif +0 -0
  314. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-disabled-bg.gif +0 -0
  315. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-disabled-corners.gif +0 -0
  316. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-disabled-sides.gif +0 -0
  317. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-over-bg.gif +0 -0
  318. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-over-corners.gif +0 -0
  319. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-over-sides.gif +0 -0
  320. data/public/javascripts/extjs4/resources/themes/images/default/tab/tab-default-top-sides.gif +0 -0
  321. data/public/javascripts/extjs4/resources/themes/images/default/tip/tip-corners.gif +0 -0
  322. data/public/javascripts/extjs4/resources/themes/images/default/tip/tip-sides.gif +0 -0
  323. data/public/javascripts/extjs4/resources/themes/images/default/toolbar/more.gif +0 -0
  324. data/public/javascripts/extjs4/resources/themes/images/default/toolbar/scroll-left.gif +0 -0
  325. data/public/javascripts/extjs4/resources/themes/images/default/toolbar/scroll-right.gif +0 -0
  326. data/public/javascripts/extjs4/resources/themes/images/default/toolbar/toolbar-default-bg.gif +0 -0
  327. data/public/javascripts/extjs4/resources/themes/images/default/tools/tool-sprite-tpl.gif +0 -0
  328. data/public/javascripts/extjs4/resources/themes/images/default/tools/tool-sprites.gif +0 -0
  329. data/public/javascripts/extjs4/resources/themes/images/default/tools/tools-sprites-trans.gif +0 -0
  330. data/public/javascripts/extjs4/resources/themes/images/default/tree/arrows.gif +0 -0
  331. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-above.gif +0 -0
  332. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-add.gif +0 -0
  333. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-append.gif +0 -0
  334. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-below.gif +0 -0
  335. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-between.gif +0 -0
  336. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-no.gif +0 -0
  337. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-over.gif +0 -0
  338. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-under.gif +0 -0
  339. data/public/javascripts/extjs4/resources/themes/images/default/tree/drop-yes.gif +0 -0
  340. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-minus-nl.gif +0 -0
  341. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-minus.gif +0 -0
  342. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-plus-nl.gif +0 -0
  343. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end-plus.gif +0 -0
  344. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-end.gif +0 -0
  345. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-line.gif +0 -0
  346. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-minus-nl.gif +0 -0
  347. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-minus.gif +0 -0
  348. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-plus-nl.gif +0 -0
  349. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow-plus.gif +0 -0
  350. data/public/javascripts/extjs4/resources/themes/images/default/tree/elbow.gif +0 -0
  351. data/public/javascripts/extjs4/resources/themes/images/default/tree/folder-open.gif +0 -0
  352. data/public/javascripts/extjs4/resources/themes/images/default/tree/folder.gif +0 -0
  353. data/public/javascripts/extjs4/resources/themes/images/default/tree/leaf.gif +0 -0
  354. data/public/javascripts/extjs4/resources/themes/images/default/tree/loading.gif +0 -0
  355. data/public/javascripts/extjs4/resources/themes/images/default/tree/s.gif +0 -0
  356. data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-bottom.gif +0 -0
  357. data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-left.gif +0 -0
  358. data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-right.gif +0 -0
  359. data/public/javascripts/extjs4/resources/themes/images/default/util/splitter/mini-top.gif +0 -0
  360. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-bottom-corners.gif +0 -0
  361. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-bottom-sides.gif +0 -0
  362. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-left-corners.gif +0 -0
  363. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-left-sides.gif +0 -0
  364. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-right-corners.gif +0 -0
  365. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-right-sides.gif +0 -0
  366. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-top-corners.gif +0 -0
  367. data/public/javascripts/extjs4/resources/themes/images/default/window-header/window-header-default-top-sides.gif +0 -0
  368. data/public/javascripts/extjs4/resources/themes/images/default/window/window-default-corners.gif +0 -0
  369. data/public/javascripts/extjs4/resources/themes/images/default/window/window-default-sides.gif +0 -0
  370. data/rotten_egg.gemspec +36 -0
  371. data/views/index.haml +490 -0
  372. data/views/layout.haml +8 -0
  373. data/views/session/login.haml +108 -0
  374. metadata +537 -0
@@ -0,0 +1,36 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "rotten_egg/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "rottenegg"
7
+ s.version = RottenEgg::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["elvuel"]
10
+ s.email = ["elvuel@gmail.com"]
11
+ s.homepage = "http://elvuel.com"
12
+ s.summary = %q{Upload SCM files via FTP}
13
+ s.description = %q{Upload SCM files via FTP}
14
+
15
+ s.required_ruby_version = '>= 1.8.7'
16
+ s.required_rubygems_version = ">= 1.3.6"
17
+
18
+ s.rubyforge_project = "rotten_egg"
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
+ s.require_paths = ["lib"]
24
+
25
+ s.add_dependency 'thin'
26
+ s.add_dependency 'sinatra', '>= 1.2.6'
27
+ s.add_dependency 'tmail'
28
+ s.add_dependency 'i18n'
29
+ s.add_dependency 'activesupport', '3.0.9'
30
+ s.add_dependency 'sinatra_more', ">= 0.3.43"
31
+ s.add_dependency 'haml', ">= 3.1.1"
32
+ # s.add_dependency 'net-sftp', ">= 2.0.5"
33
+ s.add_dependency 'warden', ">= 1.0.4"
34
+ s.add_dependency 'nokogiri'
35
+ s.add_dependency 'yajl-ruby'
36
+ end
@@ -0,0 +1,490 @@
1
+ :javascript
2
+ Ext.require(['*']);
3
+ Ext.onReady(function() {
4
+ Ext.QuickTips.init();
5
+ var apps_tree, running=#{settings.running_status.to_s}, refreshStatusTimerId;
6
+ var treePanelId = Ext.id(), txtSelectedAppId = Ext.id(), btnsGroupId = Ext.id(), btnRemoveAppId = Ext.id(), btnRunAppId = Ext.id(), gridId = Ext.id(), comboActionModeId = Ext.id(), comboStatusId = Ext.id(), logWinId = Ext.id();
7
+
8
+ var apps_store = Ext.create('Ext.data.TreeStore', {
9
+ proxy: {
10
+ type: 'ajax',
11
+ url: 'apps_list'
12
+ },
13
+ reader: {
14
+ type: 'json'
15
+ },
16
+ root: {
17
+ text: 'apps',
18
+ id: 'root',
19
+ expanded: true
20
+ },
21
+ clearOnPageLoad: true,
22
+ folderSort: true,
23
+ autoLoad: true,
24
+ autoSync: true
25
+ });
26
+
27
+ var files_store = new Ext.data.Store({
28
+ proxy: {
29
+ type: 'ajax',
30
+ url : '/files',
31
+ reader: {
32
+ type: 'json',
33
+ root: 'files',
34
+ successProperty :'success',
35
+ totalProperty: 'total',
36
+ extraParams: {
37
+ action_mode: 'ALL',
38
+ status: 'ALL'
39
+ }
40
+ }
41
+ },
42
+ fields: [
43
+ {name: 'action', type: 'string'},
44
+ {name: 'filename', type: 'string'},
45
+ {name: 'status', type: 'string'}
46
+ ],
47
+ pageSize: #{settings.paging_size}
48
+ });
49
+
50
+ loadFiles = function() {
51
+ files_store.load();
52
+ };
53
+
54
+ setPanel = function(name, disabled) {
55
+ if (disabled) {
56
+ Ext.getCmp(btnsGroupId).setDisabled(true);
57
+ Ext.getCmp(btnRunAppId).setText("running");
58
+ Ext.getCmp(treePanelId).setTitle("Apps <font color='green'>" + name + "</font><font color='blue'> is running...</font>");
59
+ } else {
60
+ Ext.getCmp(btnsGroupId).setDisabled(false);
61
+ Ext.getCmp(btnRunAppId).setText("run!");
62
+ Ext.getCmp(treePanelId).setTitle("Apps");
63
+ }
64
+ };
65
+
66
+ turnoffRunning = function() {
67
+ Ext.Ajax.request({
68
+ method: 'GET',
69
+ timeout: 60 * 1000,
70
+ url: 'turnoff',
71
+ success: function(response) {
72
+
73
+ }
74
+ });
75
+ }
76
+
77
+ refreshLog = function() {
78
+ Ext.Ajax.request({
79
+ method: 'GET',
80
+ timeout: 60 * 1000,
81
+ url: 'logs',
82
+ success: function(response) {
83
+ if (Ext.String.trim(response.responseText) != '') {
84
+ Ext.getCmp(logWinId).setValue(Ext.getCmp(logWinId).value + Ext.String.trim(response.responseText));
85
+ if (response.responseText.indexOf('Remote ftp server is down') > 0) {
86
+ running = false;
87
+ window.clearTimeout(refreshStatusTimerId);
88
+ turnoffRunning();
89
+ loadFiles();
90
+ Ext.MessageBox.alert("", "Ftp server is down!");
91
+ setPanel('', false);
92
+ apps_tree.getStore().load();
93
+ };
94
+ }
95
+ }
96
+ });
97
+ };
98
+
99
+ checkRunningStatus = function() {
100
+ Ext.Ajax.request({
101
+ method: 'GET',
102
+ timeout: 60 * 1000,
103
+ url: 'running_status',
104
+ success: function(response) {
105
+ if (Ext.String.trim(response.responseText) == 'false') {
106
+ running = false;
107
+ window.clearTimeout(refreshStatusTimerId);
108
+ Ext.MessageBox.alert("", "Run completed!");
109
+ //Ext.getCmp(logWinId).setValue('');
110
+ setPanel('', false);
111
+ apps_tree.getStore().load();
112
+ loadFiles();
113
+ refreshLog();
114
+ }
115
+ },
116
+ failure: function(response) {
117
+ running = false;
118
+ }
119
+ });
120
+ };
121
+
122
+ refreshStatus = function() {
123
+ if (running) {
124
+ loadFiles();
125
+ refreshLog();
126
+ checkRunningStatus();
127
+ refreshStatusTimerId = window.setTimeout(refreshStatus, 1000 * 10);
128
+ } else {
129
+ window.clearTimeout(refreshStatusTimerId);
130
+ }
131
+ };
132
+
133
+ refreshWin = function() {
134
+ setPanel("#{who_is_running}", true);
135
+ Ext.getCmp(txtSelectedAppId).setValue(null);
136
+ refreshStatus();
137
+ };
138
+
139
+ Ext.create('Ext.container.Viewport', {
140
+ layout: {
141
+ type: 'border',
142
+ padding: 5
143
+ },
144
+ defaults: {
145
+ split: true
146
+ },
147
+ items: [
148
+ {
149
+ region: 'east',
150
+ xtype: 'panel',
151
+ title: 'Control Panel',
152
+ collapsible: true,
153
+ layout: 'border',
154
+ width: '40%',
155
+ split: true,
156
+ items: [
157
+ apps_tree = Ext.create('Ext.tree.Panel', {
158
+ region:'north',
159
+ id: treePanelId,
160
+ title: 'Apps',
161
+ split: true,
162
+ rootVisible: true,
163
+ collapsible: false,
164
+ autoScroll: true,
165
+ height: '50%',
166
+ store: apps_store,
167
+ listeners: {
168
+ click: {
169
+ element: 'el',
170
+ fn: function() {
171
+ // apps_tree.getView().getChecked() => Array,
172
+ Ext.getCmp(txtSelectedAppId).setValue(null);
173
+ if (null != apps_tree.getSelectionModel().getLastSelected()) {
174
+ var selectedNode = apps_tree.getSelectionModel().getLastSelected();
175
+ if (selectedNode.parentNode != null) {
176
+ while (!selectedNode.parentNode.data.root) {
177
+ selectedNode = selectedNode.parentNode;
178
+ }
179
+ Ext.getCmp(txtSelectedAppId).setValue(selectedNode.data.text);
180
+ }
181
+ }
182
+ }
183
+ }
184
+ },
185
+ dockedItems: [
186
+ {
187
+ xtype: 'toolbar',
188
+ dock: 'bottom',
189
+ items: [
190
+ {
191
+ xtype: 'button',
192
+ text : 'Refresh Apps',
193
+ handler : function () {
194
+ apps_tree.getStore().load();
195
+ }
196
+ },
197
+ {xtype: 'tbseparator'},
198
+ {
199
+ xtype: 'textfield',
200
+ fieldLabel: 'Selected',
201
+ labelWidth: 50,
202
+ id: txtSelectedAppId,
203
+ readOnly: true,
204
+ size: 15,
205
+ listeners: {
206
+ change: function() {
207
+ if (Ext.String.trim(this.value) == "") {
208
+ // Ext.getCmp(btnsGroupId).setDisabled(true);
209
+ Ext.getCmp(btnRemoveAppId).setDisabled(true);
210
+ Ext.getCmp(btnRunAppId).setDisabled(true);
211
+ } else {
212
+ // Ext.getCmp(btnsGroupId).setDisabled(false);
213
+ Ext.getCmp(btnRemoveAppId).setDisabled(false);
214
+ Ext.getCmp(btnRunAppId).setDisabled(false);
215
+ }
216
+ }
217
+ }
218
+ },
219
+ {
220
+ xtype: 'buttongroup',
221
+ id: btnsGroupId,
222
+ title: '',
223
+ columns: 2,
224
+ items: [
225
+ {
226
+ xtype: 'button',
227
+ id: btnRemoveAppId,
228
+ text: 'remove!',
229
+ disabled: true,
230
+ handler: function() {
231
+ Ext.MessageBox.confirm("", "Confirm to remove the app?", function(btn) {
232
+ if (btn == 'yes') {
233
+ if (typeof(Ext.getCmp(txtSelectedAppId).value) != "undefined") {
234
+ Ext.Ajax.request({
235
+ method: 'GET',
236
+ timeout: 60 * 1000,
237
+ url: 'rm_app',
238
+ params: {
239
+ name: Ext.getCmp(txtSelectedAppId).value
240
+ },
241
+ success: function(response) {
242
+ var json = Ext.JSON.decode(response.responseText);
243
+ switch (json.egg) {
244
+ case "ok" :
245
+ apps_tree.getStore().load();
246
+ Ext.getCmp(txtSelectedAppId).setValue(null);
247
+ break;
248
+ case "running":
249
+ Ext.MessageBox.alert('ALERT', json.msg);
250
+ break;
251
+ default:
252
+ Ext.MessageBox.alert('', json.msg);
253
+ return;
254
+ }
255
+ }
256
+ });
257
+ } else {
258
+ Ext.MessageBox.alert('', 'Please select a app to remove.')
259
+ }
260
+ }
261
+ }, this);
262
+ }
263
+ },
264
+ {
265
+ xtype: 'button',
266
+ id: btnRunAppId,
267
+ text: 'run!',
268
+ disabled: true,
269
+ handler: function() {
270
+ if (typeof(Ext.getCmp(txtSelectedAppId).value) != "undefined") {
271
+ running = true; // set running true
272
+ setPanel(Ext.getCmp(txtSelectedAppId).value, true);
273
+ Ext.Ajax.request({
274
+ method: 'GET',
275
+ timeout: 60 * 1000,
276
+ url: 'run_app',
277
+ params: {
278
+ name: Ext.getCmp(txtSelectedAppId).value
279
+ },
280
+ success: function(response) {
281
+ var json = Ext.JSON.decode(response.responseText);
282
+ switch (json.egg) {
283
+ case "rotten" :
284
+ apps_tree.getStore().load();
285
+ Ext.getCmp(txtSelectedAppId).setValue(null);
286
+ refreshStatus();
287
+ break;
288
+ default:
289
+ running = false;
290
+ Ext.MessageBox.alert(json.egg, json.msg);
291
+ Ext.getCmp(treePanelId).setTitle("Apps");
292
+ Ext.getCmp(btnRunAppId).setText("run!");
293
+ Ext.getCmp(btnsGroupId).setDisabled(false);
294
+ refreshLog();
295
+ return;
296
+ }
297
+ }
298
+ });
299
+ } else {
300
+ Ext.MessageBox.alert('', 'Please select a app to run.')
301
+ }
302
+ }
303
+ }
304
+ ]
305
+ }
306
+ ]
307
+ }
308
+ ]
309
+ }),
310
+ {
311
+ region: 'center',
312
+ xtype: 'form',
313
+ title: 'Load config',
314
+ split: true,
315
+ bodyPadding: '10 10 0',
316
+ autoHeight: true,
317
+ collapsible: true,
318
+ fileUpload: true,
319
+ labelWidth: 50,
320
+ defaults: {
321
+ anchor: '95%',
322
+ allowBlank: false,
323
+ msgTarget: 'side'
324
+ },
325
+ items:[
326
+ {
327
+ xtype: 'textfield',
328
+ fieldLabel: 'YAML Config File',
329
+ inputType: 'file',
330
+ name: 'file_path',
331
+ allowBlank: false,
332
+ emptyText: 'Select a document to upload...',
333
+ buttonText: 'Browse'
334
+ },
335
+ {
336
+ xtype: 'button',
337
+ text: 'upload',
338
+ handler: function() {
339
+ var form = this.up('form').getForm();
340
+ if (form.isValid()) {
341
+ form.submit({
342
+ url: 'cfg_upload',
343
+ waitTitle : '',
344
+ waitMsg: 'Uploading your config file ...',
345
+ success: function(form, action) {
346
+ switch (action.result.egg) {
347
+ case 1 : apps_tree.getStore().load();break;
348
+ case 0 : Ext.MessageBox.alert('', action.result.msg);break;
349
+ default : Ext.MessageBox.alert('Please check your config file', action.result.msg);
350
+ }
351
+ },
352
+ failure: function(form, action) {
353
+
354
+ }
355
+ });
356
+ }
357
+ }
358
+
359
+ }
360
+ ]
361
+ }
362
+ ],
363
+ bbar: {
364
+ xtype: 'toolbar',
365
+ items: [
366
+ {
367
+ xtype: 'button',
368
+ text: 'logout',
369
+ handler: function() {
370
+ window.location = '/logout';
371
+ }
372
+ }
373
+ ]
374
+ }
375
+ }
376
+ ,{
377
+ region: 'center',
378
+ title: 'RottenEgg',
379
+ layout: 'border',
380
+ items: [
381
+ {
382
+ xtype: 'grid',
383
+ region: 'center',
384
+ id: gridId,
385
+ store: files_store,
386
+ columns: [
387
+ { text: 'ActionMode', dataIndex:'action', align: 'center', width: 100 },
388
+ { text: 'Filename', dataIndex:'filename', align: 'left', width: 500 },
389
+ { text: 'Status', dataIndex:'status', align:'center', width: 100, renderer: function(value){
390
+ switch (value) {
391
+ case "success": return '<span style="color:green">uploaded</span>';
392
+ case "failed" : return '<span style="color:red">failed</span>';
393
+ default: return 'pending'
394
+ }
395
+ }}
396
+ ],
397
+ bbar: {
398
+ xtype: 'pagingtoolbar',
399
+ store: files_store,
400
+ dock: 'bottom',
401
+ emptyMsg: 'no files',
402
+ displayInfo: true,
403
+ items: [ '- ActionMode',
404
+ {
405
+ xtype: 'combo',
406
+ id: comboActionModeId,
407
+ width: 80,
408
+ mode: 'local',
409
+ editable: false,
410
+ store: [
411
+ ['M', 'Modified'],
412
+ ['A', 'Added'],
413
+ ['D', 'Deleted'],
414
+ ['ALL', 'All']
415
+ ],
416
+ value: 'ALL',
417
+ listeners: {
418
+ change: function() {
419
+ files_store.getProxy().extraParams.action_mode = this.getValue();
420
+ }
421
+ }
422
+ },
423
+ '- Status',
424
+ {
425
+ xtype: 'combo',
426
+ id: comboStatusId,
427
+ width: 80,
428
+ mode: 'local',
429
+ editable: false,
430
+ store: [
431
+ ['pending', 'Pending'],
432
+ ['success', 'Uploaded'],
433
+ ['failed', 'Failed'],
434
+ ['ALL', 'All']
435
+ ],
436
+ value: 'ALL',
437
+ listeners: {
438
+ change: function() {
439
+ files_store.getProxy().extraParams.status = this.getValue();
440
+ }
441
+ }
442
+ },
443
+ {
444
+ xtype: 'button',
445
+ text: 'Filter',
446
+ iconCls: 'btn-search',
447
+ handler: function() {
448
+ files_store.getProxy().extraParams.action_mode = Ext.getCmp(comboActionModeId).getValue();
449
+ files_store.getProxy().extraParams.status = Ext.getCmp(comboStatusId).getValue();
450
+ loadFiles();
451
+ }
452
+ }
453
+ ]
454
+ }
455
+
456
+ },
457
+ {
458
+ region: 'south',
459
+ height: 150,
460
+ split: true,
461
+ collapsible: true,
462
+ title: 'Messages',
463
+ layout: 'fit',
464
+ items: {
465
+ xtype: 'textarea',
466
+ id: logWinId,
467
+ readOnly: true
468
+ },
469
+ bbar: {
470
+ xtype: 'toolbar',
471
+ items: [
472
+ {
473
+ xtype: 'button',
474
+ text: 'Clear!',
475
+ handler: function() {
476
+ Ext.getCmp(logWinId).setValue('');
477
+ }
478
+ }
479
+ ]
480
+ }
481
+ }
482
+
483
+ ]
484
+ }],
485
+ listeners: {
486
+ afterrender: #{!who_is_running.empty? ? "refreshWin" : "loadFiles" }
487
+ }
488
+ });
489
+
490
+ });