openshift-origin-console 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYRIGHT +1 -0
- data/Gemfile +21 -0
- data/LICENSE +203 -0
- data/README.md +123 -0
- data/Rakefile +44 -0
- data/app/assets/images/cartridge-edge.gif +0 -0
- data/app/assets/images/console/arrow-down.png +0 -0
- data/app/assets/images/console/console-sprite.png +0 -0
- data/app/assets/images/favicon-32.png +0 -0
- data/app/assets/images/loader-dark.gif +0 -0
- data/app/assets/images/loader.gif +0 -0
- data/app/assets/images/sprite-vert.png +0 -0
- data/app/assets/javascripts/console.js +10 -0
- data/app/assets/javascripts/console/form.js.coffee +51 -0
- data/app/assets/stylesheets/_alerts.scss +84 -0
- data/app/assets/stylesheets/_breadcrumbs.scss +31 -0
- data/app/assets/stylesheets/_buttons.scss +229 -0
- data/app/assets/stylesheets/_code.scss +86 -0
- data/app/assets/stylesheets/_custom.scss +207 -0
- data/app/assets/stylesheets/_footer.scss +54 -0
- data/app/assets/stylesheets/_forms.scss +710 -0
- data/app/assets/stylesheets/_grid.scss +28 -0
- data/app/assets/stylesheets/_input-prepend-append.scss +138 -0
- data/app/assets/stylesheets/_labels.scss +40 -0
- data/app/assets/stylesheets/_mixins.scss +76 -0
- data/app/assets/stylesheets/_override-variables.scss +1 -0
- data/app/assets/stylesheets/_responsive.scss +438 -0
- data/app/assets/stylesheets/_ribbon.scss +57 -0
- data/app/assets/stylesheets/_type.scss +306 -0
- data/app/assets/stylesheets/_utilities.scss +10 -0
- data/app/assets/stylesheets/_variables.scss +131 -0
- data/app/assets/stylesheets/common.css.scss +82 -0
- data/app/assets/stylesheets/console/_application.scss +194 -0
- data/app/assets/stylesheets/console/_base.scss +26 -0
- data/app/assets/stylesheets/console/_breadcrumbs.scss +32 -0
- data/app/assets/stylesheets/console/_buttons.scss +214 -0
- data/app/assets/stylesheets/console/_core.scss +1002 -0
- data/app/assets/stylesheets/console/_dropdowns.scss +63 -0
- data/app/assets/stylesheets/console/_help.scss +54 -0
- data/app/assets/stylesheets/console/_mixins.scss +11 -0
- data/app/assets/stylesheets/console/_navbar.scss +415 -0
- data/app/assets/stylesheets/console/_ribbon.scss +82 -0
- data/app/assets/stylesheets/console/_tile.scss +122 -0
- data/app/assets/stylesheets/origin.css.scss +37 -0
- data/app/controllers/account/dashboard.rb +13 -0
- data/app/controllers/account_controller.rb +3 -0
- data/app/controllers/application_types_controller.rb +80 -0
- data/app/controllers/applications_controller.rb +183 -0
- data/app/controllers/building_controller.rb +81 -0
- data/app/controllers/capability_aware.rb +18 -0
- data/app/controllers/cartridge_types_controller.rb +53 -0
- data/app/controllers/cartridges_controller.rb +43 -0
- data/app/controllers/console/auth/basic.rb +65 -0
- data/app/controllers/console/auth/none.rb +5 -0
- data/app/controllers/console/auth/remote_user.rb +69 -0
- data/app/controllers/console/rescue.rb +48 -0
- data/app/controllers/console_controller.rb +19 -0
- data/app/controllers/console_index_controller.rb +14 -0
- data/app/controllers/domain_aware.rb +26 -0
- data/app/controllers/domain_session_sweeper.rb +29 -0
- data/app/controllers/domains_controller.rb +30 -0
- data/app/controllers/keys_controller.rb +43 -0
- data/app/controllers/scaling_controller.rb +46 -0
- data/app/controllers/sshkey_aware.rb +23 -0
- data/app/controllers/sshkey_session_sweeper.rb +29 -0
- data/app/controllers/user_session_sweeper.rb +29 -0
- data/app/helpers/console/community_helper.rb +78 -0
- data/app/helpers/console/console_helper.rb +26 -0
- data/app/helpers/console/help_helper.rb +270 -0
- data/app/helpers/console/html5_boilerplate_helper.rb +63 -0
- data/app/helpers/console/layout_helper.rb +277 -0
- data/app/helpers/console/model_helper.rb +106 -0
- data/app/helpers/console/secured_helper.rb +5 -0
- data/app/models/alias.rb +10 -0
- data/app/models/application.rb +148 -0
- data/app/models/application_associations.rb +36 -0
- data/app/models/application_template.rb +90 -0
- data/app/models/application_type.rb +258 -0
- data/app/models/async_aware.rb +60 -0
- data/app/models/capabilities.rb +62 -0
- data/app/models/cartridge.rb +122 -0
- data/app/models/cartridge_type.rb +140 -0
- data/app/models/domain.rb +44 -0
- data/app/models/domain_associations.rb +33 -0
- data/app/models/embedded.rb +11 -0
- data/app/models/gear.rb +13 -0
- data/app/models/gear_group.rb +104 -0
- data/app/models/key.rb +87 -0
- data/app/models/quickstart.rb +135 -0
- data/app/models/rest_api.rb +130 -0
- data/app/models/rest_api/base.rb +781 -0
- data/app/models/rest_api/cacheable.rb +91 -0
- data/app/models/rest_api/environment.rb +13 -0
- data/app/models/rest_api/info.rb +34 -0
- data/app/models/rest_api/log_subscriber.rb +29 -0
- data/app/models/rest_api/railties/controller_runtime.rb +37 -0
- data/app/models/user.rb +27 -0
- data/app/models/user_associations.rb +6 -0
- data/app/views/account/_domain.html.haml +14 -0
- data/app/views/account/_keys.html.haml +20 -0
- data/app/views/account/_user.html.haml +5 -0
- data/app/views/account/show.html.haml +15 -0
- data/app/views/application_templates/_application_template.html.haml +5 -0
- data/app/views/application_types/_application_type.html.haml +19 -0
- data/app/views/application_types/_custom.html.haml +19 -0
- data/app/views/application_types/_persisted.html.haml +26 -0
- data/app/views/application_types/_tile.html.haml +9 -0
- data/app/views/application_types/index.html.haml +87 -0
- data/app/views/application_types/search.html.haml +67 -0
- data/app/views/application_types/show.html.haml +219 -0
- data/app/views/applications/_application.html.haml +34 -0
- data/app/views/applications/_applications_filter.html.haml +8 -0
- data/app/views/applications/_footer.html.haml +0 -0
- data/app/views/applications/_name.html.haml +28 -0
- data/app/views/applications/delete.html.haml +19 -0
- data/app/views/applications/get_started.html.haml +145 -0
- data/app/views/applications/index.html.haml +55 -0
- data/app/views/applications/show.html.haml +193 -0
- data/app/views/building/delete.html.haml +22 -0
- data/app/views/building/new.html.haml +57 -0
- data/app/views/building/show.html.haml +12 -0
- data/app/views/cartridge_types/_cartridge_type.html.haml +61 -0
- data/app/views/cartridge_types/index.html.haml +37 -0
- data/app/views/cartridge_types/show.html.haml +21 -0
- data/app/views/cartridges/next_steps.html.haml +58 -0
- data/app/views/cartridges/show.html.haml +1 -0
- data/app/views/console/error.html.haml +58 -0
- data/app/views/console/help.html.haml +90 -0
- data/app/views/console/not_found.html.haml +69 -0
- data/app/views/console/unauthorized.html.haml +7 -0
- data/app/views/domains/_domain.html.haml +14 -0
- data/app/views/domains/_form.html.haml +13 -0
- data/app/views/domains/edit.html.haml +5 -0
- data/app/views/domains/new.html.haml +6 -0
- data/app/views/keys/_form.html.haml +14 -0
- data/app/views/keys/_simple_form.html.haml +14 -0
- data/app/views/keys/new.html.haml +2 -0
- data/app/views/layouts/_footer.html.haml +38 -0
- data/app/views/layouts/_head.html.haml +35 -0
- data/app/views/layouts/console.html.haml +60 -0
- data/app/views/layouts/console/_header.html.haml +44 -0
- data/app/views/layouts/console/_identity.html.haml +7 -0
- data/app/views/layouts/console/_javascripts.html.haml +5 -0
- data/app/views/layouts/console/_stylesheets.html.haml +6 -0
- data/app/views/scaling/delete.html.haml +17 -0
- data/app/views/scaling/new.html.haml +24 -0
- data/app/views/scaling/show.html.haml +81 -0
- data/app/views/shared/_tracking.html.haml +0 -0
- data/conf/console.conf.example +108 -0
- data/conf/openshift_console.conf +10 -0
- data/config/cartridge_types.yml +54 -0
- data/config/initializers/barista_config.rb +86 -0
- data/config/initializers/cartridge_types.rb +5 -0
- data/config/initializers/console_security.rb +1 -0
- data/config/initializers/date_helper.rb +5 -0
- data/config/initializers/extended_logger.rb +51 -0
- data/config/initializers/formtastic.rb +100 -0
- data/config/initializers/inflections.rb +38 -0
- data/config/initializers/rdiscount.rb +8 -0
- data/config/initializers/rest_api.rb +22 -0
- data/config/initializers/sass.rb +30 -0
- data/config/initializers/session_trace.rb +32 -0
- data/config/initializers/x_frame_options.rb +53 -0
- data/config/locales/en.yml +12 -0
- data/lib/active_resource/associations.rb +107 -0
- data/lib/active_resource/associations/builder/association.rb +35 -0
- data/lib/active_resource/associations/builder/belongs_to.rb +5 -0
- data/lib/active_resource/associations/builder/has_many.rb +5 -0
- data/lib/active_resource/associations/builder/has_one.rb +5 -0
- data/lib/active_resource/persistent_connection.rb +341 -0
- data/lib/active_resource/persistent_http_mock.rb +68 -0
- data/lib/active_resource/reflection.rb +78 -0
- data/lib/console.rb +8 -0
- data/lib/console/config_file.rb +13 -0
- data/lib/console/configuration.rb +163 -0
- data/lib/console/engine.rb +28 -0
- data/lib/console/formtastic/bootstrap_form_builder.rb +369 -0
- data/lib/console/rails/app_redirector.rb +40 -0
- data/lib/console/rails/filter_hash.rb +15 -0
- data/lib/console/rails/routes.rb +51 -0
- data/lib/console/version.rb +5 -0
- data/lib/tasks/assets.rake +79 -0
- data/lib/tasks/stats.rake +18 -0
- data/lib/tasks/test_suites.rake +73 -0
- data/test/coverage_helper.rb +27 -0
- data/test/fixtures/cartridges.json +1 -0
- data/test/fixtures/quickstarts.csv +3 -0
- data/test/functional/account_controller_test.rb +14 -0
- data/test/functional/application_types_controller_test.rb +251 -0
- data/test/functional/applications_controller_sanity_test.rb +26 -0
- data/test/functional/applications_controller_test.rb +365 -0
- data/test/functional/building_controller_test.rb +203 -0
- data/test/functional/cartridge_types_controller_isolation_test.rb +68 -0
- data/test/functional/cartridge_types_controller_test.rb +48 -0
- data/test/functional/cartridges_controller_test.rb +83 -0
- data/test/functional/console_auth_basic_controller_test.rb +82 -0
- data/test/functional/console_auth_remote_user_controller_test.rb +90 -0
- data/test/functional/console_index_controller_test.rb +22 -0
- data/test/functional/domains_controller_test.rb +194 -0
- data/test/functional/keys_controller_test.rb +163 -0
- data/test/functional/quickstarts.json +18 -0
- data/test/functional/scaling_controller_test.rb +153 -0
- data/test/integration/assets_test.rb +34 -0
- data/test/integration/help_link_test.rb +43 -0
- data/test/integration/quickstarts_test.rb +24 -0
- data/test/integration/rescue_from_test.rb +25 -0
- data/test/integration/rest_api/application_test.rb +115 -0
- data/test/integration/rest_api/cartridge_test.rb +44 -0
- data/test/integration/rest_api/cartridge_type_test.rb +143 -0
- data/test/integration/rest_api/domain_test.rb +91 -0
- data/test/integration/rest_api/info_test.rb +9 -0
- data/test/integration/rest_api/key_test.rb +85 -0
- data/test/integration/static_pages_test.rb +44 -0
- data/test/rails_app/Rakefile +7 -0
- data/test/rails_app/app/controllers/application_controller.rb +5 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/config/application.rb +48 -0
- data/test/rails_app/config/boot.rb +10 -0
- data/test/rails_app/config/database.yml +25 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +38 -0
- data/test/rails_app/config/environments/production.rb +70 -0
- data/test/rails_app/config/environments/test.rb +43 -0
- data/test/rails_app/config/initializers/auth.rb +0 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +10 -0
- data/test/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/rails_app/config/initializers/session_store.rb +8 -0
- data/test/rails_app/config/locales/en.yml +5 -0
- data/test/rails_app/config/routes.rb +4 -0
- data/test/rails_app/script/rails +6 -0
- data/test/support/auth.rb +111 -0
- data/test/support/base.rb +142 -0
- data/test/support/errors.rb +28 -0
- data/test/support/rest_api.rb +189 -0
- data/test/test_helper.rb +14 -0
- data/test/unit/active_model_compliance_test.rb +23 -0
- data/test/unit/async_aware_test.rb +55 -0
- data/test/unit/configuration_test.rb +158 -0
- data/test/unit/filter_hash_test.rb +64 -0
- data/test/unit/helpers/model_helper_test.rb +61 -0
- data/test/unit/overrides_test.rb +9 -0
- data/test/unit/rest_api_test.rb +1590 -0
- data/vendor/assets/javascripts/MIT-LICENSE.txt +20 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +157 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +100 -0
- data/vendor/assets/javascripts/bootstrap-tab.js +135 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +61 -0
- data/vendor/assets/javascripts/jquery.spin.js +47 -0
- data/vendor/assets/javascripts/jquery.ui.widget.js +16 -0
- data/vendor/assets/javascripts/jquery_cookie.js +41 -0
- data/vendor/assets/javascripts/jquery_validate_min.js +51 -0
- data/vendor/assets/javascripts/modernizr.min.js +2 -0
- data/vendor/assets/javascripts/plugins.js +16 -0
- data/vendor/assets/stylesheets/bootstrap/_accordion.scss +28 -0
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +70 -0
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +22 -0
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +147 -0
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +183 -0
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +121 -0
- data/vendor/assets/stylesheets/bootstrap/_close.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/_code.scss +57 -0
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +130 -0
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +522 -0
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +8 -0
- data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +20 -0
- data/vendor/assets/stylesheets/bootstrap/_labels.scss +32 -0
- data/vendor/assets/stylesheets/bootstrap/_layouts.scss +17 -0
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +602 -0
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +84 -0
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +299 -0
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +353 -0
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +30 -0
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +55 -0
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +49 -0
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +95 -0
- data/vendor/assets/stylesheets/bootstrap/_reset.scss +126 -0
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +33 -0
- data/vendor/assets/stylesheets/bootstrap/_sprites.scss +158 -0
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +150 -0
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_type.scss +218 -0
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +23 -0
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +107 -0
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +17 -0
- data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +66 -0
- data/vendor/assets/stylesheets/bootstrap/responsive.scss +334 -0
- metadata +506 -0
@@ -0,0 +1,67 @@
|
|
1
|
+
%h1.invisible Create a New Application
|
2
|
+
= breadcrumb_for_create_application(@type_groups[0][0])
|
3
|
+
= app_wizard_steps_create 0, :active => true
|
4
|
+
= flashes
|
5
|
+
|
6
|
+
%section
|
7
|
+
%p.larger
|
8
|
+
Choose a web programming cartridge or kick the tires with a
|
9
|
+
quickstart. After you create the application
|
10
|
+
you can add <strong>cartridges</strong> to enable additional
|
11
|
+
capabilities like databases, metrics, and continuous build
|
12
|
+
support with Jenkins.
|
13
|
+
|
14
|
+
%section
|
15
|
+
%form.form-search.form-search-block{:id => 'form-search-create-apps', :method => 'get'}
|
16
|
+
%input.search-query{:type => 'text', :name => 'search', :placeholder => 'Search by keyword or tag', :value => @search}
|
17
|
+
%button.search{:type => 'submit'}
|
18
|
+
- if @browse_tags.present?
|
19
|
+
%span.dropdown
|
20
|
+
%a.btn.dropdown-toggle{:href => '#', :data => {:toggle => 'dropdown'}}
|
21
|
+
Browse by tag...
|
22
|
+
%span.caret
|
23
|
+
%ul.dropdown-menu#tag-filter
|
24
|
+
- @browse_tags.each do |(name, tag)|
|
25
|
+
- if name
|
26
|
+
%li= link_to name, application_types_path(:tag => tag)
|
27
|
+
- else
|
28
|
+
%hr
|
29
|
+
|
30
|
+
%section
|
31
|
+
- if @type_groups.length == 1
|
32
|
+
|
33
|
+
- title, types = @type_groups.first
|
34
|
+
|
35
|
+
%h3.divide
|
36
|
+
#{title}
|
37
|
+
- if types.length > 4
|
38
|
+
%small= link_to '(show all)', application_types_path
|
39
|
+
.row
|
40
|
+
- in_columns_of(2, types).each do |types|
|
41
|
+
.span6.tile-dark
|
42
|
+
= render :partial => 'application_type', :collection => types, :locals => {:excluded_tags => []}
|
43
|
+
|
44
|
+
- else
|
45
|
+
.row
|
46
|
+
- in_balanced_columns_of(2, @type_groups).each do |groups|
|
47
|
+
.span6
|
48
|
+
- groups.each do |(title, types)|
|
49
|
+
%h3.divide= title
|
50
|
+
= render :collection => types, :locals => {:excluded_tags => []}
|
51
|
+
|
52
|
+
%p #{link_to "See all application types", application_types_path}
|
53
|
+
|
54
|
+
%section
|
55
|
+
%p
|
56
|
+
Can't find what you're looking for? Try broadening your search or filtering by another tag.
|
57
|
+
-#%p
|
58
|
+
Can't find what you're looking for? #{link_to "Browse the Quickstarts", community_quickstarts_url}
|
59
|
+
on our community, or #{link_to "create your own!", create_quickstart_url}
|
60
|
+
|
61
|
+
- content_for :javascripts do
|
62
|
+
:javascript
|
63
|
+
jQuery('.tile-click').click(function(evt) {
|
64
|
+
if (evt.target.type == 'a') return;
|
65
|
+
a = $('h3 > a', this)[0];
|
66
|
+
window.location = a.href
|
67
|
+
});
|
@@ -0,0 +1,219 @@
|
|
1
|
+
%h1.invisible Configure New Application
|
2
|
+
= app_wizard_steps_create 1
|
3
|
+
= breadcrumb_for_create_application(@application_type.persisted? ? "Based on '#{@application_type.display_name}'" : "From scratch")
|
4
|
+
= flashes
|
5
|
+
|
6
|
+
:css
|
7
|
+
#new_application.form-horizontal .control-group { margin-bottom: 14px; }
|
8
|
+
#new_application.form-horizontal .controls { margin-left: 140px; }
|
9
|
+
#new_application.form-horizontal input.expand { width: auto; max-width: -moz-available; }
|
10
|
+
#new_application.form-horizontal input.narrow { width: 140px; }
|
11
|
+
#new_application.form-horizontal .controls > h3 { margin-top: 5px; margin-bottom: 0; color: #FAFBFC; }
|
12
|
+
#new_application.form-horizontal .controls > h3 > small { margin-left: 10px; vertical-align: middle; display: inline-block; }
|
13
|
+
#new_application.form-horizontal .controls > h3 > select { margin-top: -5px; }
|
14
|
+
#new_application.form-horizontal .control-label { margin-left: 15px; width: 120px; text-align: left; color: #949494; }
|
15
|
+
#new_application.form-horizontal .help-block { color: #949494; max-width: 500px; -moz-transition: 0.2s; overflow: hidden; text-overflow: ellipsis; }
|
16
|
+
#new_application.form-horizontal .form-actions { padding-left: 140px; }
|
17
|
+
#new_application.collapse-help .help-block { white-space: nowrap; opacity: 0.5; margin-top: 0; }
|
18
|
+
#new_application.collapse-help .help-block:hover { opacity: 1; cursor: pointer; }
|
19
|
+
@media (max-width: 767px) {
|
20
|
+
#new_application.form-horizontal .control-label { margin-left: 0; }
|
21
|
+
#new_application.form-horizontal .controls { margin-left: 0; }
|
22
|
+
#new_application.form-horizontal .help-block { max-width: inherit; white-space: normal; }
|
23
|
+
#new_application.form-horizontal .controls input { display: inline; }
|
24
|
+
#new_application.form-horizontal .controls > h3 { display: inline-block; margin-top: 0; }
|
25
|
+
#new_application.form-horizontal .form-actions { padding-left: 10px; }
|
26
|
+
}
|
27
|
+
|
28
|
+
- advanced_path = application_type_path(@application_type.id, @application_type.to_params.merge(:advanced => true))
|
29
|
+
|
30
|
+
= semantic_form_for @application, :url => applications_path, :html => {:class => "form-horizontal #{@compact ? 'collapse-help' : ''}"} do |f|
|
31
|
+
= hidden_field_tag :advanced, @advanced
|
32
|
+
- if @application_type.persisted?
|
33
|
+
= f.hidden_field :application_type, :value => @application_type.id
|
34
|
+
- else
|
35
|
+
- Array(@application_type.cartridges).each do |c|
|
36
|
+
= hidden_field_tag 'application_type[cartridges][]', c
|
37
|
+
= hidden_field_tag 'application_type[initial_git_url]', @application_type.initial_git_url
|
38
|
+
-#= hidden_field_tag 'application_type[initial_git_branch]', @application_type.initial_git_branch
|
39
|
+
|
40
|
+
= f.semantic_errors :name, :domain_name, :node_profile, :cartridges, :cartridge, :initial_git_url, :initial_git_branch, :scale
|
41
|
+
|
42
|
+
- if @application_type.tags.include? :in_development
|
43
|
+
.alert This template is development only and not accessible in production
|
44
|
+
|
45
|
+
%fieldset.inputs
|
46
|
+
.control-group.control-group-important
|
47
|
+
%h3.control-label Based On
|
48
|
+
.controls.first
|
49
|
+
%h3
|
50
|
+
#{@application_type.display_name} #{@application_type.source.to_s.humanize}
|
51
|
+
|
52
|
+
.controls
|
53
|
+
- if @application_type.persisted?
|
54
|
+
- if @application_type.description.html_safe?
|
55
|
+
= @application_type.description
|
56
|
+
- else
|
57
|
+
%p.help-block= @application_type.description
|
58
|
+
|
59
|
+
- if @application_type.website
|
60
|
+
%p.help-block= link_to @application_type.website, @application_type.website
|
61
|
+
- if @application_type.learn_more_url
|
62
|
+
%p.help-block= link_to "Learn more", @application_type.learn_more_url
|
63
|
+
|
64
|
+
%p.help-block.label-tags= application_type_tags(@application_type.tags)
|
65
|
+
|
66
|
+
- else
|
67
|
+
%p.help-block
|
68
|
+
This application is based on a link.
|
69
|
+
-# If you want others to see this application, #{link_to "create a quickstart in our community", create_quickstart_url}.
|
70
|
+
%p.help-block= link_to "Share this link", application_type_url(@application_type.id, @application_type.to_params)
|
71
|
+
|
72
|
+
%fieldset.inputs
|
73
|
+
- errors = @application.errors.full_messages.present?
|
74
|
+
-# This is implemented custom here rather than integrating into Formtastic because of its specific nature
|
75
|
+
.control-group.control-group-important{:data => errors ? {:"server-error" => 'true'} : {}, :class => errors ? 'error' : ''}
|
76
|
+
%h3.control-label Public URL
|
77
|
+
.controls.first
|
78
|
+
= render :partial => 'applications/name', :locals => {:form => f, :application => @application}
|
79
|
+
.controls
|
80
|
+
%p.help-block
|
81
|
+
OpenShift will automatically register this domain name for your application. You can add
|
82
|
+
your own domain name later.
|
83
|
+
|
84
|
+
.control-group.control-group-important
|
85
|
+
%h3.control-label Source Code
|
86
|
+
.controls.first
|
87
|
+
- if @advanced
|
88
|
+
= f.text_field :initial_git_url, :class => 'expand', :placeholder => 'URL to a Git repository'
|
89
|
+
-#= f.text_field :initial_git_branch, :class => 'narrow', :placeholder => 'Git branch (optional)'
|
90
|
+
%span branch 'master'
|
91
|
+
- else
|
92
|
+
%h3
|
93
|
+
- if @application_type.initial_git_url.present?
|
94
|
+
#{link_to @application_type.initial_git_url, @application_type.initial_git_url, :target => "_blank"}
|
95
|
+
-# if @application_type.initial_git_branch
|
96
|
+
(branch '#{@application_type.initial_git_branch}')
|
97
|
+
- else
|
98
|
+
Default
|
99
|
+
%small= link_to "Change", advanced_path, :data => {:submit_form => true}
|
100
|
+
|
101
|
+
.controls
|
102
|
+
%p.help-block
|
103
|
+
- if @application_type.initial_git_url || @advanced
|
104
|
+
Your application will start with a copy of the code and configuration provided in
|
105
|
+
this Git repository.
|
106
|
+
- else
|
107
|
+
We'll create a Git code repository in the cloud, and populate it with a set of
|
108
|
+
reasonable defaults.
|
109
|
+
|
110
|
+
.control-group.control-group-important
|
111
|
+
%h3.control-label Gears
|
112
|
+
.controls.first
|
113
|
+
- gear_sizes = @capabilities.gear_sizes
|
114
|
+
- if gear_sizes.length > 1
|
115
|
+
- if @advanced
|
116
|
+
= f.select :gear_profile, gear_sizes.map{ |size| [size.to_s.titleize, size]}
|
117
|
+
- else
|
118
|
+
%h3
|
119
|
+
= gear_sizes.first.to_s.titleize
|
120
|
+
%small= link_to 'Change', advanced_path, :data => {:submit_form => true}
|
121
|
+
= f.hidden_field :gear_profile
|
122
|
+
|
123
|
+
- else
|
124
|
+
%h3= gear_sizes.first.to_s.titleize
|
125
|
+
= f.hidden_field :gear_profile
|
126
|
+
|
127
|
+
.controls
|
128
|
+
%p.help-block
|
129
|
+
Gears are the application containers running your code. For most applications,
|
130
|
+
the '#{gear_sizes.first.to_s}' gear size provides plenty of resources.
|
131
|
+
|
132
|
+
- if gear_sizes.length > 1
|
133
|
+
If you require more resources, select a larger gear size here.
|
134
|
+
|
135
|
+
.control-group.control-group-important
|
136
|
+
%h3.control-label Cartridges
|
137
|
+
.controls.first
|
138
|
+
- if @cartridges.present?
|
139
|
+
%h3
|
140
|
+
= map_to_sentence(@cartridges) do |(name, carts)|
|
141
|
+
- if carts.length > 1
|
142
|
+
= select_tag 'application[cartridges][]', options_for_select(carts.sort.map{ |c| [c.display_name, c.name] }, [carts.map(&:name) & @application.cartridge_names].first ), :title => "Choose a cartridge that matches '#{name}'"
|
143
|
+
- elsif carts.length == 1
|
144
|
+
= hidden_field_tag 'application[cartridges][]', [carts.first.name]
|
145
|
+
= carts.first.display_name
|
146
|
+
- else
|
147
|
+
%span.text-warning #{name}
|
148
|
+
- else
|
149
|
+
%h3
|
150
|
+
%span.text-warning{:title => 'All applications require at least a web cartridge'} None
|
151
|
+
|
152
|
+
.controls
|
153
|
+
%p.help-block
|
154
|
+
Applications are composed of cartridges - each of which exposes a service or
|
155
|
+
capability to your code. All applications must have a web cartridge.
|
156
|
+
|
157
|
+
.control-group.control-group-important
|
158
|
+
%h3.control-label Scaling
|
159
|
+
.controls.first
|
160
|
+
- can_scale = can_scale_application_type(@application_type, @capabilities)
|
161
|
+
- scale_reason = cannot_scale_title(@application_type, @capabilities)
|
162
|
+
- if can_scale
|
163
|
+
- if @advanced
|
164
|
+
= f.select :scale, scale_options
|
165
|
+
- else
|
166
|
+
%h3{:title => "Scaling your web cartridge will allocate an extra gear for the load balancer"}
|
167
|
+
= scale_options[@application.scale? ? 1 : 0][0]
|
168
|
+
%small= link_to 'Change', advanced_path, :data => {:submit_form => true}
|
169
|
+
- else
|
170
|
+
%h3
|
171
|
+
%span.text-warning{:title => scale_reason}= scale_options[0][0]
|
172
|
+
|
173
|
+
.controls
|
174
|
+
%p.help-block
|
175
|
+
OpenShift automatically routes web requests to your web gear.
|
176
|
+
|
177
|
+
- if can_scale
|
178
|
+
If you allow your application to scale, we'll set up a load balancer and
|
179
|
+
allocate more gears to handle traffic as you need it.
|
180
|
+
|
181
|
+
- else
|
182
|
+
%span.text-warning= scale_reason
|
183
|
+
|
184
|
+
.control-group
|
185
|
+
.controls
|
186
|
+
- if @application_type.template
|
187
|
+
%p.text-warning
|
188
|
+
After creation, check the repository README for any manual configuration
|
189
|
+
required to secure this application.
|
190
|
+
|
191
|
+
%p
|
192
|
+
%em Note: It may take up to a minute to deploy your application
|
193
|
+
|
194
|
+
= f.buttons do
|
195
|
+
= link_to "Back", application_types_path, :class => 'btn'
|
196
|
+
= f.commit_button :button_html => { :disabled => @disabled }
|
197
|
+
= f.loading
|
198
|
+
|
199
|
+
- if @compact
|
200
|
+
- content_for :javascripts do
|
201
|
+
:javascript
|
202
|
+
$(function() {
|
203
|
+
$('.help-block').click(function() {
|
204
|
+
$("#new_application.collapse-help").removeClass('collapse-help');
|
205
|
+
});
|
206
|
+
});
|
207
|
+
|
208
|
+
- content_for :javascripts do
|
209
|
+
:javascript
|
210
|
+
$(function() {
|
211
|
+
$('a[data-submit-form]').click(function() {
|
212
|
+
$('#advanced').attr('value', 'true');
|
213
|
+
$(this).closest('form').attr({
|
214
|
+
'action': this.href,
|
215
|
+
'method': 'get'
|
216
|
+
}).submit();
|
217
|
+
return false;
|
218
|
+
});
|
219
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
:css
|
2
|
+
.subtitle { margin-top: 0.8em; margin-left: 0.5em;}
|
3
|
+
|
4
|
+
.hero-unit
|
5
|
+
.row-fluid
|
6
|
+
.span12.title
|
7
|
+
%h2.pull-left
|
8
|
+
= application.name
|
9
|
+
.pull-left.subtitle
|
10
|
+
= application.framework_name
|
11
|
+
-# Status and gears not supported yet
|
12
|
+
-#.span1
|
13
|
+
-# Status:
|
14
|
+
-# %img{:src => '/app/images/icons/success.png'}
|
15
|
+
-#.span4
|
16
|
+
-# Gears:
|
17
|
+
.row-fluid
|
18
|
+
.span12
|
19
|
+
%strong.app_url
|
20
|
+
= link_to application.web_url, application.web_url
|
21
|
+
<!--.span1.web_icon-->
|
22
|
+
.row-fluid
|
23
|
+
.span12
|
24
|
+
%pre.command-line.git_url
|
25
|
+
= application.git_url
|
26
|
+
<!--.span1.git_icon-->
|
27
|
+
|
28
|
+
.row-fluid
|
29
|
+
.span6
|
30
|
+
Created
|
31
|
+
= "#{time_ago_in_words(application.creation_time)} ago"
|
32
|
+
.span6.right
|
33
|
+
= link_to("Delete", delete_application_path(application), :class => ['btn', 'btn-danger'])
|
34
|
+
= link_to("Details »", application_path(application), :class => ['btn', 'btn-info'])
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= semantic_form_for applications_filter, :url => applications_path, :simple => true, :method => :get do |f|
|
2
|
+
= f.inputs do
|
3
|
+
= f.input :name
|
4
|
+
= f.input :type, :collection => applications_filter.type_options, :include_blank => false
|
5
|
+
= f.buttons do
|
6
|
+
= f.commit_button :label => 'Filter'
|
7
|
+
- if applications_filter.present?
|
8
|
+
= link_to "Clear Filters", applications_path, :class => 'btn'
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
.input-prepend-append
|
2
|
+
%span.add-on-first http://
|
3
|
+
|
4
|
+
= form.text_field :name,
|
5
|
+
:value => "#{application.name}",
|
6
|
+
:autofocus => true,
|
7
|
+
:maxlength => 32,
|
8
|
+
:placeholder => 'Application name',
|
9
|
+
:class => "application_name #{'error' if application.errors.include? :name}"
|
10
|
+
|
11
|
+
-# If the user has a domain, use it, otherwise prompt them for that field
|
12
|
+
- if @domain and @domain.persisted?
|
13
|
+
|
14
|
+
%span.add-on-last> -#{@domain.name}.#{RestApi.application_domain_suffix}
|
15
|
+
|
16
|
+
- else
|
17
|
+
|
18
|
+
%span.add-on-middle> –
|
19
|
+
= form.text_field :domain_name,
|
20
|
+
:value => "#{application.domain_name}",
|
21
|
+
:placeholder => 'Namespace',
|
22
|
+
:maxlength => 16,
|
23
|
+
:class => "domain_name #{'error' if application.errors.include? :domain_name}"
|
24
|
+
%span.add-on-last>= ".#{RestApi.application_domain_suffix}"
|
25
|
+
|
26
|
+
- unless @domain and @domain.persisted?
|
27
|
+
%p.help-block
|
28
|
+
%span.text-warning Because this is your first application, you need to provide a domain name under which your applications will be grouped
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- breadcrumb_for_application @application, 'Confirm delete'
|
2
|
+
|
3
|
+
%h1 Delete Application
|
4
|
+
|
5
|
+
= semantic_form_for @application, :html => {:method => :delete, :class => 'form'} do |f|
|
6
|
+
%p
|
7
|
+
Are you sure you want to delete the application
|
8
|
+
<strong>'#{@application.name}'?</strong>
|
9
|
+
|
10
|
+
%p
|
11
|
+
This will delete all the code and data associated with
|
12
|
+
the app, and cannot be undone. Make sure this is something
|
13
|
+
you really want to do!
|
14
|
+
|
15
|
+
= f.semantic_errors
|
16
|
+
= f.buttons do
|
17
|
+
= link_to 'Cancel', @referer || application_path(@application), :class => 'btn'
|
18
|
+
= f.commit_button :label => "Delete", :button_html => {:class => 'btn btn-danger'}
|
19
|
+
= f.loading
|
@@ -0,0 +1,145 @@
|
|
1
|
+
- breadcrumb_for_application @application, @wizard ? 'Next steps' : 'Get Started'
|
2
|
+
|
3
|
+
- if @wizard
|
4
|
+
= app_wizard_steps_create 2, :completed => true
|
5
|
+
%h1.invisible Get Started
|
6
|
+
%section
|
7
|
+
= flashes
|
8
|
+
%p.larger Your application has been created. If you're new to OpenShift check out these tips for where to go next.
|
9
|
+
|
10
|
+
- else
|
11
|
+
%h1 Get Started
|
12
|
+
%section
|
13
|
+
= flashes
|
14
|
+
%p.larger Looking for tips on what to build or where to go next? We've organized some helpful hints for you.
|
15
|
+
|
16
|
+
|
17
|
+
%section.row
|
18
|
+
.span7
|
19
|
+
-# application url
|
20
|
+
%h2 Accessing your application
|
21
|
+
%p
|
22
|
+
- if true #FIXME Need to come up with a better way to control this in the model. Requires info about carts.
|
23
|
+
Your application has one or more cartridges that expose a public URL to the Internet. Click the link below
|
24
|
+
to see your application:
|
25
|
+
- else
|
26
|
+
If your application exposes services to the Internet they will be available at
|
27
|
+
|
28
|
+
- if @template
|
29
|
+
.alert.alert-info
|
30
|
+
Your application is currently being created. Preconfigured applications take a little longer to get ready.
|
31
|
+
If you try to access your application and get a 503 error, it means the deployment is in progress.
|
32
|
+
|
33
|
+
%p.well.application-url.larger
|
34
|
+
= link_to @application.web_url, @application.web_url, :target => '_blank'
|
35
|
+
|
36
|
+
%p
|
37
|
+
The
|
38
|
+
= link_to "application overview page", application_path(@application)
|
39
|
+
provides a summary of your application and its cartridges.
|
40
|
+
|
41
|
+
-# git/setup
|
42
|
+
- if true #FIXME has at least one cartridge with source code
|
43
|
+
%h2 Making code changes
|
44
|
+
|
45
|
+
- unless @has_keys
|
46
|
+
%div.well
|
47
|
+
%h4 Set your Public Key
|
48
|
+
%p
|
49
|
+
Before you can upload code, you need to provide us with a <strong>public key</strong>
|
50
|
+
to identify you to our servers. If this is your first time creating a public key
|
51
|
+
#{link_to "read more about SSH keys and remote access", ssh_keys_help_path}.
|
52
|
+
= render :partial => 'keys/simple_form', :locals => { :key => Key.new, :input_class => 'span6' }
|
53
|
+
|
54
|
+
%p
|
55
|
+
OpenShift uses the #{link_to "Git version control system", git_homepage_url}
|
56
|
+
to manage the code of your application. Each cartridge has a single Git <strong>repository</strong>
|
57
|
+
that you'll use to check in changes to your application. When you <strong>push</strong>
|
58
|
+
a change to your Git repository we'll automatically deploy your code and restart your
|
59
|
+
application if necessary.
|
60
|
+
|
61
|
+
- if @has_keys
|
62
|
+
- if true #FIXME has a single cartridge with source code
|
63
|
+
%p Install the Git client for your operating system, and from your command line run
|
64
|
+
%pre.cli
|
65
|
+
= preserve do
|
66
|
+
:escaped
|
67
|
+
git clone #{@application.git_url}
|
68
|
+
cd #{@application.name}/
|
69
|
+
%p
|
70
|
+
This will create a folder with the source code of your application. After making a change,
|
71
|
+
%strong add,
|
72
|
+
%strong commit,
|
73
|
+
and
|
74
|
+
%strong push
|
75
|
+
your changes.
|
76
|
+
%pre.cli
|
77
|
+
= preserve do
|
78
|
+
:escaped
|
79
|
+
git add .
|
80
|
+
git commit -m 'My changes'
|
81
|
+
git push
|
82
|
+
|
83
|
+
%p
|
84
|
+
When you push changes the OpenShift server will report back its status on deploying your code.
|
85
|
+
The server will run any of your configured
|
86
|
+
= link_to "deploy hooks", deploy_hook_user_guide_topic_url
|
87
|
+
and then restart the application.
|
88
|
+
|
89
|
+
- else
|
90
|
+
-#FIXME has multiple cartridges with source code
|
91
|
+
|
92
|
+
|
93
|
+
.span5
|
94
|
+
|
95
|
+
-# cartridges
|
96
|
+
%h2 Adding capabilities
|
97
|
+
%p
|
98
|
+
Cartridges are the components of an OpenShift application, and include databases, build systems,
|
99
|
+
and management capabilities. <strong>#{link_to 'Adding a cartridge', application_cartridge_types_path(@application)}</strong> such as
|
100
|
+
#{link_to 'MySQL', application_cartridge_type_path(@application, 'mysql-5.1')} or #{link_to 'MongoDB', application_cartridge_type_path(@application, 'mongodb-2.2')}
|
101
|
+
to an application provides the desired capability without forcing you to administrate or update that feature.
|
102
|
+
-#%p
|
103
|
+
To run a PHP application with MySQL (the M and P in LAMP) you
|
104
|
+
%strong embed
|
105
|
+
the MySQL cartridge into your application. OpenShift gives your PHP code access to your new MySQL database, but
|
106
|
+
manages the database server for you.
|
107
|
+
%p
|
108
|
+
= link_to "Add a cartridge to your application now", application_cartridge_types_path(@application)
|
109
|
+
-#or from the command line with
|
110
|
+
-#%pre.cli
|
111
|
+
= preserve do
|
112
|
+
:escaped
|
113
|
+
rhc app cartridge list
|
114
|
+
-#%p
|
115
|
+
You may also add a cartridge to your application by running
|
116
|
+
-#%pre.cli
|
117
|
+
= preserve do
|
118
|
+
:escaped
|
119
|
+
rhc app cartridge add -a #{@application.name} -c <cart_id>
|
120
|
+
|
121
|
+
-# client
|
122
|
+
%h2 Managing your application
|
123
|
+
|
124
|
+
%h3 RHC Client Tools
|
125
|
+
|
126
|
+
%p
|
127
|
+
Most of the capabilities of OpenShift are exposed through our command line tool,
|
128
|
+
%strong rhc.
|
129
|
+
Whether it's adding cartridges, checking uptime, or pulling log files from
|
130
|
+
the server, you can quickly put a finger on the pulse of your application.
|
131
|
+
#{link_to "Follow these steps to install the client", client_tools_install_help_url}
|
132
|
+
on Linux, Mac OS X, or Windows.
|
133
|
+
%p
|
134
|
+
After installing the command line tool read more
|
135
|
+
#{link_to "on how to manage your application from the command line in our User Guide", user_guide_url }.
|
136
|
+
|
137
|
+
%h3 JBoss Developer Studio
|
138
|
+
|
139
|
+
%p
|
140
|
+
The JBoss Developer Studio is a full featured IDE with OpenShift integration built in.
|
141
|
+
It gives you the ability to create, edit and deploy applications without having to
|
142
|
+
leave the IDE. Links to download, install and use the JBoss Developer Studio for Linux,
|
143
|
+
Mac OS X, or Windows can be found on the
|
144
|
+
#{link_to("JBoss Developer Studio tools page.", "#{client_tools_help_url}")}
|
145
|
+
-# tech specific
|