You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by mi...@apache.org on 2018/08/16 16:41:11 UTC

[trafficcontrol] branch master updated: Fixes #2651 - Set Serves Status dropdown to be enabled when creating new

This is an automated email from the ASF dual-hosted git repository.

mitchell852 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new a24d150  Fixes #2651 - Set Serves Status dropdown to be enabled when creating new
a24d150 is described below

commit a24d1505f6c9c5becac987709da3afc1a2946b81
Author: cgillo000 <ch...@cable.comcast.com>
AuthorDate: Wed Aug 15 08:08:19 2018 -0600

    Fixes #2651 - Set Serves Status dropdown to be enabled when creating new
---
 traffic_portal/app/src/common/modules/form/server/form.server.tpl.html  | 2 +-
 .../app/src/common/modules/form/server/new/FormNewServerController.js   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 3bcdf01..61dda32 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 @@ under the License.
             <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 8dad664..2075ea3 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;
             });