Repository: incubator-trafficcontrol
Updated Branches:
  refs/heads/2.1.x 47595628c -> 66fa1115f


fixes number validation on global max settings

(cherry picked from commit 8603bc83dfe9b667af54f9101028740940bac86f)


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a376bc06
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a376bc06
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a376bc06

Branch: refs/heads/2.1.x
Commit: a376bc0670ea137ceef7da7a6e26394600fc77b3
Parents: 4759562
Author: Jeremy Mitchell <mitchell...@gmail.com>
Authored: Wed Aug 9 08:58:10 2017 -0600
Committer: Jeremy Mitchell <mitchell...@gmail.com>
Committed: Wed Aug 9 10:15:10 2017 -0600

----------------------------------------------------------------------
 .../form/deliveryService/form.deliveryService.DNS.tpl.html    | 7 ++++---
 .../form/deliveryService/form.deliveryService.HTTP.tpl.html   | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a376bc06/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
----------------------------------------------------------------------
diff --git 
a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
 
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
index 3bb2040..be4b8b6 100644
--- 
a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
+++ 
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.DNS.tpl.html
@@ -281,9 +281,9 @@ under the License.
             <div class="form-group" ng-class="{'has-error': 
hasError(deliveryServiceForm.globalMaxMbps), 'has-feedback': 
hasError(deliveryServiceForm.globalMaxMbps)}">
                 <label class="control-label col-md-2 col-sm-2 
col-xs-12">Global Max Mbps</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <input id="globalMaxMbps" name="globalMaxMbps" type="text" 
class="form-control" placeholder="Max bits per second allowed globally (4T or 
500M)" ng-model="deliveryService.globalMaxMbps" ng-maxlength="11" 
ng-pattern="/(^4T$|^500M$)/" autofocus>
+                    <input id="globalMaxMbps" name="globalMaxMbps" type="text" 
class="form-control" placeholder="Max bits per second allowed globally" 
ng-model="deliveryService.globalMaxMbps" ng-maxlength="11" ng-pattern="/^\d+$/" 
autofocus>
                     <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 'maxlength')">Too 
Long</small>
-                    <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 'pattern')">4T or 
500M</small>
+                    <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 
'pattern')">Number</small>
                     <span 
ng-show="hasError(deliveryServiceForm.globalMaxMbps)" 
class="form-control-feedback"><i class="fa fa-times"></i></span>
                 </div>
             </div>
@@ -291,8 +291,9 @@ under the License.
             <div class="form-group" ng-class="{'has-error': 
hasError(deliveryServiceForm.globalMaxTps), 'has-feedback': 
hasError(deliveryServiceForm.globalMaxTps)}">
                 <label class="control-label col-md-2 col-sm-2 
col-xs-12">Global Max TPS</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <input id="globalMaxTps" name="globalMaxTps" type="text" 
class="form-control" placeholder="Max transactions per second allowed globally" 
ng-model="deliveryService.globalMaxTps" ng-maxlength="11" autofocus>
+                    <input id="globalMaxTps" name="globalMaxTps" type="text" 
class="form-control" placeholder="Max transactions per second allowed globally" 
ng-model="deliveryService.globalMaxTps" ng-maxlength="11" ng-pattern="/^\d+$/" 
autofocus>
                     <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxTps, 'maxlength')">Too 
Long</small>
+                    <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxTps, 
'pattern')">Number</small>
                     <span ng-show="hasError(deliveryServiceForm.globalMaxTps)" 
class="form-control-feedback"><i class="fa fa-times"></i></span>
                 </div>
             </div>

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a376bc06/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
----------------------------------------------------------------------
diff --git 
a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
 
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
index efdae30..56d6ffc 100644
--- 
a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
+++ 
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.HTTP.tpl.html
@@ -262,9 +262,9 @@ under the License.
             <div class="form-group" ng-class="{'has-error': 
hasError(deliveryServiceForm.globalMaxMbps), 'has-feedback': 
hasError(deliveryServiceForm.globalMaxMbps)}">
                 <label class="control-label col-md-2 col-sm-2 
col-xs-12">Global Max Mbps</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <input id="globalMaxMbps" name="globalMaxMbps" type="text" 
class="form-control" placeholder="Max bits per second allowed globally (4T or 
500M)" ng-model="deliveryService.globalMaxMbps" ng-maxlength="11" 
ng-pattern="/(^4T$|^500M$)/" autofocus>
+                    <input id="globalMaxMbps" name="globalMaxMbps" type="text" 
class="form-control" placeholder="Max bits per second allowed globally" 
ng-model="deliveryService.globalMaxMbps" ng-maxlength="11" ng-pattern="/^\d+$/" 
autofocus>
                     <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 'maxlength')">Too 
Long</small>
-                    <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 'pattern')">4T or 
500M</small>
+                    <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxMbps, 
'pattern')">Number</small>
                     <span 
ng-show="hasError(deliveryServiceForm.globalMaxMbps)" 
class="form-control-feedback"><i class="fa fa-times"></i></span>
                 </div>
             </div>
@@ -272,8 +272,9 @@ under the License.
             <div class="form-group" ng-class="{'has-error': 
hasError(deliveryServiceForm.globalMaxTps), 'has-feedback': 
hasError(deliveryServiceForm.globalMaxTps)}">
                 <label class="control-label col-md-2 col-sm-2 
col-xs-12">Global Max TPS</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <input id="globalMaxTps" name="globalMaxTps" type="text" 
class="form-control" placeholder="Max transactions per second allowed globally" 
ng-model="deliveryService.globalMaxTps" ng-maxlength="11" autofocus>
+                    <input id="globalMaxTps" name="globalMaxTps" type="text" 
class="form-control" placeholder="Max transactions per second allowed globally" 
ng-model="deliveryService.globalMaxTps" ng-maxlength="11" ng-pattern="/^\d+$/" 
autofocus>
                     <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxTps, 'maxlength')">Too 
Long</small>
+                    <small class="input-error" 
ng-show="hasPropertyError(deliveryServiceForm.globalMaxTps, 
'pattern')">Number</small>
                     <span ng-show="hasError(deliveryServiceForm.globalMaxTps)" 
class="form-control-feedback"><i class="fa fa-times"></i></span>
                 </div>
             </div>

Reply via email to