Permalink
Browse files

First commit to github

  • Loading branch information...
0 parents commit e8aef34f8e6bcf0d47f32b5259324078292f6523 @frodenas committed Oct 23, 2011
Showing with 6,444 additions and 0 deletions.
  1. +9 −0 .gitignore
  2. +1 −0 .rspec
  3. +2 −0 CHANGELOG
  4. +18 −0 Gemfile
  5. +136 −0 Gemfile.lock
  6. +21 −0 LICENSE
  7. +35 −0 README.md
  8. +7 −0 Rakefile
  9. BIN app/assets/images/cflogo_blue.png
  10. BIN app/assets/images/cflogo_bw.png
  11. BIN app/assets/images/close.png
  12. BIN app/assets/images/delete.png
  13. BIN app/assets/images/dir.png
  14. BIN app/assets/images/django.png
  15. BIN app/assets/images/erlangR14B02.png
  16. BIN app/assets/images/file.png
  17. BIN app/assets/images/grails.png
  18. BIN app/assets/images/java.png
  19. BIN app/assets/images/java_web.png
  20. BIN app/assets/images/jquery.selectBox-arrow.gif
  21. BIN app/assets/images/lift.png
  22. BIN app/assets/images/mongodb.png
  23. BIN app/assets/images/mysql.png
  24. BIN app/assets/images/node.png
  25. BIN app/assets/images/nook.png
  26. BIN app/assets/images/ok.png
  27. BIN app/assets/images/otp_rebar.png
  28. BIN app/assets/images/php.png
  29. BIN app/assets/images/postgresql.png
  30. BIN app/assets/images/rabbitmq.png
  31. BIN app/assets/images/rails3.png
  32. BIN app/assets/images/red_alert.png
  33. BIN app/assets/images/redis.png
  34. BIN app/assets/images/restart.png
  35. BIN app/assets/images/ruby18.png
  36. BIN app/assets/images/ruby19.png
  37. BIN app/assets/images/sinatra.png
  38. BIN app/assets/images/sort_asc.png
  39. BIN app/assets/images/sort_asc_disabled.png
  40. BIN app/assets/images/sort_both.png
  41. BIN app/assets/images/sort_desc.png
  42. BIN app/assets/images/sort_desc_disabled.png
  43. BIN app/assets/images/spring.png
  44. BIN app/assets/images/start.png
  45. BIN app/assets/images/stop.png
  46. BIN app/assets/images/wait.gif
  47. +36 −0 app/assets/javascripts/application.js
  48. +78 −0 app/assets/javascripts/apps.js.erb
  49. +317 −0 app/assets/javascripts/appsshow.js.erb
  50. +84 −0 app/assets/javascripts/dashboard.js.erb
  51. +1 −0 app/assets/javascripts/excanvas.min.js
  52. +153 −0 app/assets/javascripts/jquery.dataTables.min.js
  53. +6 −0 app/assets/javascripts/jquery.flot.min.js
  54. +1 −0 app/assets/javascripts/jquery.flot.pie.min.js
  55. +38 −0 app/assets/javascripts/jquery.jeditable.mini.js
  56. +4 −0 app/assets/javascripts/jquery.min.js
  57. +1 −0 app/assets/javascripts/jquery.selectBox.min.js
  58. +4 −0 app/assets/javascripts/modernizr.js
  59. +20 −0 app/assets/javascripts/plugins.js
  60. +367 −0 app/assets/javascripts/rails.js
  61. +66 −0 app/assets/javascripts/services.js.erb
  62. +34 −0 app/assets/javascripts/system.js.erb
  63. +80 −0 app/assets/javascripts/users.js.erb
  64. +15 −0 app/assets/stylesheets/application-media.scss
  65. +46 −0 app/assets/stylesheets/application-post.scss
  66. +202 −0 app/assets/stylesheets/application-pre.scss
  67. +1,208 −0 app/assets/stylesheets/application.scss
  68. +116 −0 app/assets/stylesheets/coderay.scss
  69. +32 −0 app/controllers/application_controller.rb
  70. +457 −0 app/controllers/apps_controller.rb
  71. +44 −0 app/controllers/dashboard_controller.rb
  72. +92 −0 app/controllers/services_controller.rb
  73. +43 −0 app/controllers/sessions_controller.rb
  74. +13 −0 app/controllers/system_controller.rb
  75. +65 −0 app/controllers/users_controller.rb
  76. +78 −0 app/helpers/application_helper.rb
  77. +412 −0 app/models/app.rb
  78. +41 −0 app/models/service.rb
  79. +39 −0 app/models/system.rb
  80. +47 −0 app/models/user.rb
  81. +35 −0 app/views/apps/_app_item.html.haml
  82. +16 −0 app/views/apps/_apps.html.haml
  83. +3 −0 app/views/apps/crashes/_app_crash_item.html.haml
  84. +7 −0 app/views/apps/crashes/_app_crashes.html.haml
  85. +8 −0 app/views/apps/delete.js.erb
  86. +7 −0 app/views/apps/envvars/_app_envvar_item.html.haml
  87. +17 −0 app/views/apps/envvars/_app_envvar_new.html.haml
  88. +16 −0 app/views/apps/envvars/_app_envvars.html.haml
  89. +24 −0 app/views/apps/envvars/set_var.js.erb
  90. +8 −0 app/views/apps/envvars/unset_var.js.erb
  91. +9 −0 app/views/apps/files/_app_file_item.html.haml
  92. +37 −0 app/views/apps/files/_app_files.html.haml
  93. +38 −0 app/views/apps/files/app_view_file.html.haml
  94. +10 −0 app/views/apps/files/files.js.erb
  95. +10 −0 app/views/apps/files/view_file.js.erb
  96. +10 −0 app/views/apps/index.html.haml
  97. +19 −0 app/views/apps/instances/_app_instance_item.html.haml
  98. +15 −0 app/views/apps/instances/_app_instances.html.haml
  99. +37 −0 app/views/apps/resources/_app_resources.html.haml
  100. +5 −0 app/views/apps/resources/set_instances.js.erb
  101. +5 −0 app/views/apps/resources/set_memsize.js.erb
  102. +12 −0 app/views/apps/restart.js.erb
  103. +10 −0 app/views/apps/services/_app_service_item.html.haml
  104. +11 −0 app/views/apps/services/_app_service_new.html.haml
  105. +11 −0 app/views/apps/services/_app_services.html.haml
  106. +13 −0 app/views/apps/services/bind_service.js.erb
  107. +8 −0 app/views/apps/services/unbind_service.js.erb
  108. +34 −0 app/views/apps/show.html.haml
  109. +12 −0 app/views/apps/start.js.erb
  110. +12 −0 app/views/apps/stop.js.erb
  111. +7 −0 app/views/apps/urls/_app_url_item.html.haml
  112. +11 −0 app/views/apps/urls/_app_url_new.html.haml
  113. +9 −0 app/views/apps/urls/_app_urls.html.haml
  114. +13 −0 app/views/apps/urls/map_url.js.erb
  115. +9 −0 app/views/apps/urls/unmap_url.js.erb
  116. +45 −0 app/views/dashboard/_account_overview.html.haml
  117. +20 −0 app/views/dashboard/_apps_overview.html.haml
  118. +13 −0 app/views/dashboard/index.html.haml
  119. +11 −0 app/views/layouts/_flashes.html.haml
  120. +26 −0 app/views/layouts/_footer.html.haml
  121. +2 −0 app/views/layouts/_forkapp.html.haml
  122. +13 −0 app/views/layouts/_head.html.haml
  123. +12 −0 app/views/layouts/_header.html.haml
  124. +7 −0 app/views/layouts/_javascripts.html.haml
  125. +9 −0 app/views/layouts/_menu.html.haml
  126. +27 −0 app/views/layouts/application.html.haml
  127. +15 −0 app/views/services/_service_item.html.haml
  128. +14 −0 app/views/services/_service_new.html.haml
  129. +14 −0 app/views/services/_services.html.haml
  130. +13 −0 app/views/services/create.js.erb
  131. +9 −0 app/views/services/delete.js.erb
  132. +10 −0 app/views/services/index.html.haml
  133. +43 −0 app/views/sessions/new.html.haml
  134. +22 −0 app/views/system/_frameworks.html.haml
  135. +12 −0 app/views/system/_runtimes.html.haml
  136. +14 −0 app/views/system/_system_services.html.haml
  137. +9 −0 app/views/system/_target.html.haml
  138. +21 −0 app/views/system/index.html.haml
  139. +15 −0 app/views/users/_user_item.html.haml
  140. +17 −0 app/views/users/_user_new.html.haml
  141. +11 −0 app/views/users/_users.html.haml
  142. +13 −0 app/views/users/create.js.erb
  143. +8 −0 app/views/users/delete.js.erb
  144. +10 −0 app/views/users/index.html.haml
  145. +4 −0 config.ru
  146. +54 −0 config/application.rb
  147. +6 −0 config/boot.rb
  148. +5 −0 config/environment.rb
  149. +30 −0 config/environments/development.rb
  150. +60 −0 config/environments/production.rb
  151. +39 −0 config/environments/test.rb
  152. +7 −0 config/initializers/backtrace_silencers.rb
  153. +10 −0 config/initializers/inflections.rb
  154. +5 −0 config/initializers/mime_types.rb
  155. +7 −0 config/initializers/secret_token.rb
  156. +8 −0 config/initializers/session_store.rb
  157. +10 −0 config/initializers/wrap_parameters.rb
  158. +5 −0 config/locales/en.yml
  159. +42 −0 config/routes.rb
  160. +7 −0 db/seeds.rb
  161. +2 −0 doc/README_FOR_APP
  162. 0 lib/assets/.gitkeep
  163. 0 lib/tasks/.gitkeep
  164. 0 log/.gitkeep
  165. +522 −0 public/.htaccess
  166. +26 −0 public/404.html
  167. +26 −0 public/422.html
  168. +26 −0 public/500.html
  169. BIN public/apple-touch-icon-114x114-precomposed.png
  170. BIN public/apple-touch-icon-57x57-precomposed.png
  171. BIN public/apple-touch-icon-72x72-precomposed.png
  172. BIN public/apple-touch-icon-precomposed.png
  173. BIN public/apple-touch-icon.png
  174. 0 public/assets/.gitkeep
  175. +25 −0 public/crossdomain.xml
  176. BIN public/favicon.ico
  177. +43 −0 public/humans.txt
  178. +4 −0 public/robots.txt
  179. +6 −0 script/rails
  180. +33 −0 spec/spec_helper.rb
  181. 0 vendor/assets/stylesheets/.gitkeep
  182. 0 vendor/plugins/.gitkeep
@@ -0,0 +1,9 @@
+.bundle
+.DS_Store
+.idea
+.sass-cache/
+db/*.sqlite3
+log/*.log
+tmp/
+
+
1 .rspec
@@ -0,0 +1 @@
+--colour
@@ -0,0 +1,2 @@
+2011-10-23 - v0.1:
+ * First commit to github
18 Gemfile
@@ -0,0 +1,18 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.1'
+gem 'json', '~> 1.6.1'
+gem 'haml', '~> 3.1.3'
+gem 'vmc', '~> 0.3.12'
+gem 'coderay', '~> 1.0.1'
+
+group :assets do
+ gem 'sass-rails', '~> 3.1.4'
+ gem 'uglifier', '>= 1.0.4'
+ #gem 'execjs', '~> 1.2.9'
+ #gem 'therubyracer', '~> 0.9.8'
+end
+
+group :test, :development do
+ gem "rspec-rails", "~> 2.7.0"
+end
@@ -0,0 +1,136 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.1)
+ actionpack (= 3.1.1)
+ mail (~> 2.3.0)
+ actionpack (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.1)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.2)
+ activemodel (3.1.1)
+ activesupport (= 3.1.1)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.1)
+ activemodel (= 3.1.1)
+ activesupport (= 3.1.1)
+ activesupport (3.1.1)
+ multi_json (~> 1.0)
+ arel (2.2.1)
+ builder (3.0.0)
+ coderay (1.0.1)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ execjs (1.2.9)
+ multi_json (~> 1.0)
+ haml (3.1.3)
+ highline (1.6.2)
+ hike (1.2.1)
+ i18n (0.6.0)
+ json (1.6.1)
+ json_pure (1.5.4)
+ spruz (~> 0.2.8)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ polyglot (0.3.2)
+ rack (1.3.5)
+ rack-cache (1.1)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.1)
+ actionmailer (= 3.1.1)
+ actionpack (= 3.1.1)
+ activerecord (= 3.1.1)
+ activeresource (= 3.1.1)
+ activesupport (= 3.1.1)
+ bundler (~> 1.0)
+ railties (= 3.1.1)
+ railties (3.1.1)
+ actionpack (= 3.1.1)
+ activesupport (= 3.1.1)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.11)
+ json (~> 1.4)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ rspec (2.7.0)
+ rspec-core (~> 2.7.0)
+ rspec-expectations (~> 2.7.0)
+ rspec-mocks (~> 2.7.0)
+ rspec-core (2.7.1)
+ rspec-expectations (2.7.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.7.0)
+ rspec-rails (2.7.0)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.7.0)
+ rubyzip2 (2.0.1)
+ sass (3.1.10)
+ sass-rails (3.1.4)
+ actionpack (~> 3.1.0)
+ railties (~> 3.1.0)
+ sass (>= 3.1.4)
+ sprockets (~> 2.0.0)
+ tilt (~> 1.3.2)
+ sprockets (2.0.3)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ spruz (0.2.13)
+ terminal-table (1.4.3)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.30)
+ uglifier (1.0.4)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ vmc (0.3.12)
+ highline (~> 1.6.1)
+ json_pure (~> 1.5.1)
+ rest-client (>= 1.6.1, < 1.7.0)
+ rubyzip2 (~> 2.0.1)
+ terminal-table (~> 1.4.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coderay (~> 1.0.1)
+ haml (~> 3.1.3)
+ json (~> 1.6.1)
+ rails (= 3.1.1)
+ rspec-rails (~> 2.7.0)
+ sass-rails (~> 3.1.4)
+ uglifier (>= 1.0.4)
+ vmc (~> 0.3.12)
21 LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011 Ferran Rodenas
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
@@ -0,0 +1,35 @@
+CF-Console
+==========
+
+CF-Console is an easy-to-use web-based interface for [Cloud Foundry](http://cloudfoundry.org/),
+the industry’s first open Platform as a Service (PaaS) offering.
+
+Demo
+----
+Check [CF-Console at cloudfoundry.com](http://cf-console.cloudfoundry.com/).
+
+Installation
+------------
+No DB required, just clone the project and start the server:
+
+* git clone git://github.com/frodenas/cf-console.git
+* bundle install
+* rails s / thin start / ...
+
+If you plan to deploy this app to a production environment:
+
+* Insert your Google Analytics Web Property ID (UA-XXXXX-X) at /app/assets/javascripts/application.js
+* Change the secret token at /config/initializers/secret_token.rb
+* Remove "= render "layouts/forkapp"" at /app/views/layouts/application.html.haml
+* precompile the assets -> RAILS_ENV=production rake assets:precompile
+
+Changelog
+---------
+
+### v0.1: October 23, 2011
+* First commit to github
+
+Copyright
+---------
+
+Copyright (c) 2011 Ferran Rodenas. See LICENSE for details.
@@ -0,0 +1,7 @@
+#!/usr/bin/env rake
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+CfConsole::Application.load_tasks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -0,0 +1,36 @@
+// This is a manifest file that'll be compiled into including all the files listed below.
+// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
+// be included in the compiled file accessible from http://example.com/assets/application.js
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// the compiled file.
+//
+//= require rails
+//= require plugins
+//= require jquery.dataTables.min
+//= require jquery.jeditable.mini
+//= require jquery.selectBox.min
+//= require excanvas.min
+//= require jquery.flot.min
+//= require jquery.flot.pie.min
+//= require dashboard
+//= require apps
+//= require appsshow
+//= require services
+//= require system
+//= require users
+//= require_self
+
+var $buoop = {vs:{i:8,f:4,o:11,s:5,n:9}}
+$buoop.ol = window.onload;
+window.onload=function(){
+ try {if ($buoop.ol) $buoop.ol();}catch (e) {}
+ var e = document.createElement("script");
+ e.setAttribute("type", "text/javascript");
+ e.setAttribute("src", "http://browser-update.org/update.js");
+ document.body.appendChild(e);
+}
+
+var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];
+(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
+g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
+s.parentNode.insertBefore(g,s)}(document,'script'));
@@ -0,0 +1,78 @@
+$(function() {
+ if ($('body').hasClass('apps') && !$('body').hasClass('show')) {
+ $('#apps-menu-link').addClass('menu-current');
+ appsTable_Settings = {
+ 'bAutoWidth': false,
+ 'bFilter': false,
+ 'bLengthChange': false,
+ 'bStateSave': true,
+ 'sPaginationType': 'full_numbers',
+ 'aoColumnDefs': [{'bSortable': false, 'aTargets': [8]}, {'sType': 'string', 'aTargets': [5, 6, 7]}],
+ 'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
+ var appid = '#' + nRow.id + '-tooltip';
+ $(appid).tooltip({'tip': appid + 'box'});
+ return nRow;
+ }
+ };
+ appsTable = $('#apps-table').dataTable(appsTable_Settings);
+ var ultabs = $('ul.tabs');
+ ultabs.tabs('div.panels > div.panel', {effect: 'slide', tabs: 'li'});
+ $('#start-app-link')
+ .live('ajax:beforeSend', function(evt, xhr, settings) {
+ request_processed = false;
+ $(this).find('img').attr({ src : '<%= asset_path('wait.gif') %>'});
+ })
+ .live('ajax:error', function(evt, xhr, status, error) {
+ $('#flash').empty();
+ $('#flash').append('<div class="alert">An error occurred processing your request, please reload the page and try again.</div>');
+ $('#flash').fadeIn('slow');
+ })
+ .live('ajax:complete', function(evt, xhr, status) {
+ if (request_processed == false) {
+ $(this).find('img').attr({ src : '<%= asset_path('start.png') %>'});
+ }
+ });
+ $('#stop-app-link')
+ .live('ajax:beforeSend', function(evt, xhr, settings) {
+ request_processed = false;
+ $(this).find('img').attr({ src : '<%= asset_path('wait.gif') %>'});
+ })
+ .live('ajax:error', function(evt, xhr, status, error) {
+ $('#flash').empty();
+ $('#flash').append('<div class="alert">An error occurred processing your request, please reload the page and try again.</div>');
+ $('#flash').fadeIn('slow');
+ })
+ .live('ajax:complete', function(evt, xhr, status) {
+ if (request_processed == false) {
+ $(this).find('img').attr({ src : '<%= asset_path('stop.png') %>'});
+ }
+ });
+ $('#restart-app-link')
+ .live('ajax:beforeSend', function(evt, xhr, settings) {
+ request_processed = false;
+ $(this).find('img').attr({ src : '<%= asset_path('wait.gif') %>'});
+ })
+ .live('ajax:error', function(evt, xhr, status, error) {
+ $('#flash').empty();
+ $('#flash').append('<div class="alert">An error occurred processing your request, please reload the page and try again.</div>');
+ $('#flash').fadeIn('slow');
+ })
+ .live('ajax:complete', function(evt, xhr, status) {
+ if (request_processed == false) {
+ $(this).find('img').attr({ src : '<%= asset_path('restart.png') %>'});
+ }
+ });
+ $('#delete-app-link')
+ .live('ajax:beforeSend', function(evt, xhr, settings) {
+ $(this).find('img').attr({ src : '<%= asset_path('wait.gif') %>'});
+ })
+ .live('ajax:error', function(evt, xhr, status, error) {
+ $('#flash').empty();
+ $('#flash').append('<div class="alert">An error occurred processing your request, please reload the page and try again.</div>');
+ $('#flash').fadeIn('slow');
+ })
+ .live('ajax:complete', function(evt, xhr, status) {
+ $(this).find('img').attr({ src : '<%= asset_path('delete.png') %>'});
+ });
+ }
+});
Oops, something went wrong.

0 comments on commit e8aef34

Please sign in to comment.