You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/02/27 06:45:07 UTC
git commit: adding validation to the subscription page
Repository: incubator-stratos
Updated Branches:
refs/heads/master 53f1fc8bf -> 85843e626
adding validation to the subscription page
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/85843e62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/85843e62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/85843e62
Branch: refs/heads/master
Commit: 85843e6264e9b845896d71dc92cc352792b4e35d
Parents: 53f1fc8
Author: rekathiru <rt...@gmail.com>
Authored: Thu Feb 27 11:14:45 2014 +0530
Committer: rekathiru <rt...@gmail.com>
Committed: Thu Feb 27 11:14:45 2014 +0530
----------------------------------------------------------------------
.../theme1/partials/subscribe_cartridge.hbs | 95 +++++++++++---------
1 file changed, 53 insertions(+), 42 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/85843e62/components/org.apache.stratos.manager.console/console/themes/theme1/partials/subscribe_cartridge.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/subscribe_cartridge.hbs b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/subscribe_cartridge.hbs
index 7dac9c3..8368fe0 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/subscribe_cartridge.hbs
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/subscribe_cartridge.hbs
@@ -9,13 +9,14 @@
<div class="container">
<div class="row">
<div class="col-lg-12">
- <form method="post" role="form" action="{{url "/controllers/cartridgeSubscribeSubmit.jag"}}">
+ <form method="post" role="form" action="{{url "/controllers/cartridgeSubscribeSubmit.jag"}}" id="newTenantForm">
<div class="form-group">
<label class="required">Public URL:</label>
<div class="form-inline">
<input name="cartridgeType" type="hidden" value="{{cartridgeType}}"/>
<input name="alias"
type="text"
+ class="required"
class="form-control input-xlarge js-help"
data-help="Specify a unique alias which can be used to generate the hostname as alias.hostname from cartridge"
data-help-x-offset="50"
@@ -25,62 +26,41 @@
</div>
</div>
- {{#if cartridge.persistence.persistanceRequired}}
- {{#unless cartridge.multiTenant}}
- <label class="required">Persistent Storage:</label>
- <label>
- <input name="persistencerequired" type="checkbox" id="volume_check"/> Require Persistent storage
- </label>
- <div id="persistence_container" style="display: none;padding-left:20px;margin-left:20px; background: #efefef;padding-bottom:10px;margin-bottom:10px;">
- <div class="form-group">
- <label class="required">Size(GB):</label>
- </div>
- <div class="form-group">
- <div class="form-inline">
- <input name="size" class="form-control input-xlarge" placeholder="10"/>
- </div>
- </div>
- <div class="form-group">
- <label>
- <input name="removeOnUnsubscription" type="checkbox" id="volume_check" />Remove On Unsubscription
- </label>
- </div>
- </div>
- {{/unless}}
- {{/if}}
+
{{#ifCond cartridge.provider "==" "data"}}
{{else}}
{{#ifCond cartridge.provider "==" "application"}}
{{else}}
<div class="form-group">
- <label class="required">Repo URL:</label>
- <div class="form-inline">
- <input name="repoURL"
- type="text"
- class="form-control input-xlarge js-help"
- data-help="Specify a repository URL of the artifacts."
- data-help-x-offset="50"
- data-help-y-offset="10"
- placeholder="https://github.com/test/mytestphp.git" />
- </div>
- <div class="checkbox">
- <label>
- <input name="isPublicRepo" type="checkbox" checked="checked" id="public_check" /> This is a public repository
- </label>
+ <label class="required">Repo URL:</label>
+ <div class="form-inline">
+ <input name="repoURL"
+ type="text"
+ class="required"
+ class="form-control input-xlarge js-help"
+ data-help="Specify a repository URL of the artifacts."
+ data-help-x-offset="50"
+ data-help-y-offset="10"
+ placeholder="https://github.com/test/mytestphp.git" />
+ </div>
+ <div class="checkbox">
+ <label>
+ <input name="isPublicRepo" type="checkbox" checked="checked" id="public_check" /> This is a public repository
+ </label>
+ </div>
</div>
- </div>
<div id="credential_container" style="display: none;padding-left:20px;margin-left:20px; background: #efefef;padding-bottom:10px;margin-bottom:10px;">
<h2>Provide Credentials</h2>
<div class="form-group">
<label class="required">Username:</label>
<div class="form-inline">
- <input name="repoUsername" class="form-control input-xlarge" placeholder="username"/>
+ <input name="repoUsername" class="required" class="form-control input-xlarge" placeholder="username"/>
</div>
</div>
<div class="form-group">
<label class="required">Password:</label>
<div class="form-inline">
- <input name="repoPassword" type="password" class="form-control input-xlarge" placeholder="******"/>
+ <input name="repoPassword" class="required" type="password" class="form-control input-xlarge" placeholder="******"/>
</div>
</div>
</div>
@@ -88,6 +68,7 @@
{{/ifCond}}
+
{{#unless cartridge.multiTenant}}
<div class="form-group">
<label class="required">Autoscale Policy:</label>
@@ -138,12 +119,41 @@
{{/unless}}
+ {{#if cartridge.persistence.persistanceRequired}}
+ {{#unless cartridge.multiTenant}}
+
+ <div class="form-group">
+ <label class="required">Persistent Storage:</label>
+ <label>
+ <input name="persistencerequired" type="checkbox" id="volume_check"/> Require Persistent Storage
+ </label>
+ </div>
+ <div id="persistence_container" style="display: none;padding-left:20px;margin-left:20px; background: #efefef;padding-bottom:10px;margin-bottom:10px;">
+ <div class="form-group">
+ <label class="required">Size(GB):</label>
+ </div>
+ <div class="form-group">
+ <div class="form-inline">
+ <input name="size" class="form-control input-xlarge" placeholder="10"/>
+ </div>
+ </div>
+ <div class="form-group">
+ <label>
+ <input name="removeOnUnsubscription" type="checkbox" id="volume_check" />Remove On Unsubscription
+ </label>
+ </div>
+ </div>
+ {{/unless}}
+ {{/if}}
+
+
<button type="submit" class="btn btn-primary">Subscribe to Cartridge</button>
</form>
</div>
</div>
</div>
-
+<script src="{{url "/themes/theme1/ui/js/utils.js"}}"></script>
+<script src="{{url "/themes/theme1/ui/js/tenant_management.js"}}"></script>
<script>
$(function(){
$('.js-help')
@@ -190,3 +200,4 @@
});
</script>
+<script src="{{url "/themes/theme1/ui/js/utils.js"}}"></script>