mitchell852 closed pull request #2696: Fixes #2651 - Set Serves Status dropdown 
to be enabled when creating new
URL: https://github.com/apache/trafficcontrol/pull/2696
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/traffic_portal/app/src/common/modules/form/server/form.server.tpl.html 
b/traffic_portal/app/src/common/modules/form/server/form.server.tpl.html
index 3bcdf0158..61dda32da 100644
--- a/traffic_portal/app/src/common/modules/form/server/form.server.tpl.html
+++ b/traffic_portal/app/src/common/modules/form/server/form.server.tpl.html
@@ -48,7 +48,7 @@
             <div class="form-group">
                 <label class="control-label col-md-2 col-sm-2 
col-xs-12">Status *</label>
                 <div class="col-md-10 col-sm-10 col-xs-12">
-                    <select name="status" class="form-control" 
ng-model="server.statusId" ng-options="status.id as status.name for status in 
statuses" ng-disabled="true"></select>
+                    <select name="status" class="form-control" 
ng-model="server.statusId" ng-options="status.id as status.name for status in 
statuses" ng-disabled="!settings.isNew"></select>
                 </div>
             </div>
             <div class="form-group" ng-show="server.offlineReason.length > 0">
diff --git 
a/traffic_portal/app/src/common/modules/form/server/new/FormNewServerController.js
 
b/traffic_portal/app/src/common/modules/form/server/new/FormNewServerController.js
index 8dad66455..2075ea3b9 100644
--- 
a/traffic_portal/app/src/common/modules/form/server/new/FormNewServerController.js
+++ 
b/traffic_portal/app/src/common/modules/form/server/new/FormNewServerController.js
@@ -26,7 +26,7 @@ var FormNewServerController = function(server, $scope, 
$controller, serverServic
         statusService.getStatuses()
             .then(function(result) {
                 $scope.statuses = result;
-                // new servers are set to OFFLINE by default
+                // Issue #2651 - Enabling server status for New Server but 
still defaulting enabled dropdown to OFFLINE
                 var offlineStatus = _.find(result, function(status){ return 
status.name == 'OFFLINE' });
                 $scope.server.statusId = offlineStatus.id;
             });


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to