trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dewr...@apache.org
Subject [2/2] incubator-trafficcontrol git commit: adds ccr dns ttl to all deliveryservices with appropriate default value
Date Wed, 12 Jul 2017 15:51:39 GMT
adds ccr dns ttl to all deliveryservices with appropriate default value


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

Branch: refs/heads/master
Commit: 8fdbc0f3ad1efd5ebf53d6bbba414178213c3ac2
Parents: 1eda3c0
Author: Jeremy Mitchell <mitchell852@gmail.com>
Authored: Mon Jul 3 12:03:18 2017 -0600
Committer: Dewayne Richardson <dewrich@apache.org>
Committed: Wed Jul 12 09:51:22 2017 -0600

----------------------------------------------------------------------
 .../deliveryService/form.deliveryService.DNS.tpl.html     |  9 +++++----
 .../deliveryService/form.deliveryService.HTTP.tpl.html    | 10 ++++++++++
 .../form.deliveryService.Steering.tpl.html                | 10 ++++++++++
 .../deliveryService/form.deliveryService.anyMap.tpl.html  | 10 ++++++++++
 .../new/FormNewDeliveryServiceController.js               |  9 +++++++++
 5 files changed, 44 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fdbc0f3/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 42600b8..dddef6f 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
@@ -232,12 +232,13 @@ under the License.
                 </div>
             </div>
 
-            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ccrDNSTtl),
'has-feedback': hasError(deliveryServiceForm.ccrDNSTtl)}">
+            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ccrDnsTtl),
'has-feedback': hasError(deliveryServiceForm.ccrDnsTtl)}">
                 <label class="control-label col-md-2 col-sm-2 col-xs-12">Delivery Service
DNS TTL</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <input id="ccrDNSTtl" name="ccrDNSTtl" type="text" class="form-control"
ng-model="deliveryService.ccrDNSTtl" ng-maxlength="11" autofocus>
-                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDNSTtl,
'maxlength')">Too Long</small>
-                    <span ng-show="hasError(deliveryServiceForm.ccrDNSTtl)" class="form-control-feedback"><i
class="fa fa-times"></i></span>
+                    <input id="ccrDnsTtl" name="ccrDnsTtl" type="text" class="form-control"
ng-model="deliveryService.ccrDnsTtl" ng-maxlength="11" ng-pattern="/^\d+$/" autofocus>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'maxlength')">Too Long</small>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'pattern')">Number</small>
+                    <span ng-show="hasError(deliveryServiceForm.ccrDnsTtl)" class="form-control-feedback"><i
class="fa fa-times"></i></span>
                 </div>
             </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fdbc0f3/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 8d26395..f11079a 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
@@ -180,6 +180,16 @@ under the License.
                 </div>
             </div>
 
+            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ccrDnsTtl),
'has-feedback': hasError(deliveryServiceForm.ccrDnsTtl)}">
+                <label class="control-label col-md-2 col-sm-2 col-xs-12">Delivery Service
DNS TTL</label>
+                <div class="col-md-10 col-sm-10 col-xs-12">
+                    <input id="ccrDnsTtl" name="ccrDnsTtl" type="text" class="form-control"
ng-model="deliveryService.ccrDnsTtl" ng-maxlength="11" ng-pattern="/^\d+$/" autofocus>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'maxlength')">Too Long</small>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'pattern')">Number</small>
+                    <span ng-show="hasError(deliveryServiceForm.ccrDnsTtl)" class="form-control-feedback"><i
class="fa fa-times"></i></span>
+                </div>
+            </div>
+
             <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.initialDispersion),
'has-feedback': hasError(deliveryServiceForm.initialDispersion)}">
                 <label class="control-label col-md-2 col-sm-2 col-xs-12">Initial Dispersion
*</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fdbc0f3/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html
index 3a895f7..7c1acc2 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.Steering.tpl.html
@@ -129,6 +129,16 @@ under the License.
                 </div>
             </div>
 
+            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ccrDnsTtl),
'has-feedback': hasError(deliveryServiceForm.ccrDnsTtl)}">
+                <label class="control-label col-md-2 col-sm-2 col-xs-12">Delivery Service
DNS TTL</label>
+                <div class="col-md-10 col-sm-10 col-xs-12">
+                    <input id="ccrDnsTtl" name="ccrDnsTtl" type="text" class="form-control"
ng-model="deliveryService.ccrDnsTtl" ng-maxlength="11" ng-pattern="/^\d+$/" autofocus>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'maxlength')">Too Long</small>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'pattern')">Number</small>
+                    <span ng-show="hasError(deliveryServiceForm.ccrDnsTtl)" class="form-control-feedback"><i
class="fa fa-times"></i></span>
+                </div>
+            </div>
+
             <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.longDesc),
'has-feedback': hasError(deliveryServiceForm.longDesc)}">
                 <label class="control-label col-md-2 col-sm-2 col-xs-12">Long Description</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fdbc0f3/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html
b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html
index ca04ef2..e4aa27e 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/form.deliveryService.anyMap.tpl.html
@@ -137,6 +137,16 @@ under the License.
                 </div>
             </div>
 
+            <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.ccrDnsTtl),
'has-feedback': hasError(deliveryServiceForm.ccrDnsTtl)}">
+                <label class="control-label col-md-2 col-sm-2 col-xs-12">Delivery Service
DNS TTL</label>
+                <div class="col-md-10 col-sm-10 col-xs-12">
+                    <input id="ccrDnsTtl" name="ccrDnsTtl" type="text" class="form-control"
ng-model="deliveryService.ccrDnsTtl" ng-maxlength="11" ng-pattern="/^\d+$/" autofocus>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'maxlength')">Too Long</small>
+                    <small class="input-error" ng-show="hasPropertyError(deliveryServiceForm.ccrDnsTtl,
'pattern')">Number</small>
+                    <span ng-show="hasError(deliveryServiceForm.ccrDnsTtl)" class="form-control-feedback"><i
class="fa fa-times"></i></span>
+                </div>
+            </div>
+
             <div class="form-group" ng-class="{'has-error': hasError(deliveryServiceForm.remapText),
'has-feedback': hasError(deliveryServiceForm.remapText)}">
                 <label class="control-label col-md-2 col-sm-2 col-xs-12">Raw remap
text</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/8fdbc0f3/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
----------------------------------------------------------------------
diff --git a/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
b/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
index 01b764b..d8f8e8d 100644
--- a/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
+++ b/traffic_portal/app/src/common/modules/form/deliveryService/new/FormNewDeliveryServiceController.js
@@ -23,6 +23,15 @@ var FormNewDeliveryServiceController = function(deliveryService, type,
types, $s
 		return currentType.name.indexOf(type) != -1;
 	});
 
+	var setDNSTtl = function() {
+		if (type.indexOf('HTTP') != -1) {
+			deliveryService.ccrDnsTtl = 3600;
+		} else {
+			deliveryService.ccrDnsTtl = 30;
+		}
+	};
+	setDNSTtl();
+
 	// extends the FormDeliveryServiceController to inherit common methods
 	angular.extend(this, $controller('FormDeliveryServiceController', { deliveryService: deliveryService,
types: filteredTypes, $scope: $scope }));
 


Mime
View raw message