You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2017/06/02 14:41:19 UTC
[1/2] incubator-trafficcontrol git commit: adds api for updating
server status and ties it into new UI
Repository: incubator-trafficcontrol
Updated Branches:
refs/heads/master ecc5f9f28 -> 68ad8ac08
adds api for updating server status and ties it into new UI
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/15177cc4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/15177cc4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/15177cc4
Branch: refs/heads/master
Commit: 15177cc40db9ea767541bacb42990e65d393c9a0
Parents: ecc5f9f
Author: Jeremy Mitchell <mi...@gmail.com>
Authored: Thu Jun 1 15:45:08 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Jun 2 08:41:10 2017 -0600
----------------------------------------------------------------------
.../traffic_ops_api/v12/api_capability.rst | 4 +-
.../traffic_ops_api/v12/capability.rst | 2 +-
.../traffic_ops_api/v12/deliveryservice.rst | 2 +-
.../development/traffic_ops_api/v12/server.rst | 60 +++++++++++++++
traffic_ops/app/lib/API/Server.pm | 80 +++++++++++++++++++-
traffic_ops/app/lib/TrafficOpsRoutes.pm | 5 +-
traffic_ops/app/t/api/1.2/server.t | 37 ++++++++-
.../ui/app/src/common/api/ServerService.js | 16 ++++
.../status/DialogSelectStatusController.js | 10 ++-
.../select/status/dialog.select.status.tpl.html | 3 +-
.../modules/form/server/FormServerController.js | 21 +++--
.../modules/form/server/form.server.tpl.html | 14 ++--
12 files changed, 230 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/docs/source/development/traffic_ops_api/v12/api_capability.rst
----------------------------------------------------------------------
diff --git a/docs/source/development/traffic_ops_api/v12/api_capability.rst b/docs/source/development/traffic_ops_api/v12/api_capability.rst
index 1ec1ed8..794dd4f 100644
--- a/docs/source/development/traffic_ops_api/v12/api_capability.rst
+++ b/docs/source/development/traffic_ops_api/v12/api_capability.rst
@@ -16,12 +16,12 @@
.. _to-api-v12-api_capability:
API-Capabilities
-============
+================
.. _to-api-v12-api-capability-route:
/api/1.2/api_capabilities
-+++++++++++++
++++++++++++++++++++++++++
**GET /api/1.2/api_capabilities**
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/docs/source/development/traffic_ops_api/v12/capability.rst
----------------------------------------------------------------------
diff --git a/docs/source/development/traffic_ops_api/v12/capability.rst b/docs/source/development/traffic_ops_api/v12/capability.rst
index e91863e..570a811 100644
--- a/docs/source/development/traffic_ops_api/v12/capability.rst
+++ b/docs/source/development/traffic_ops_api/v12/capability.rst
@@ -21,7 +21,7 @@ Capabilities
.. _to-api-v12-capability-route:
/api/1.2/capabilities
-+++++++++++++
++++++++++++++++++++++
**GET /api/1.2/capabilities**
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
----------------------------------------------------------------------
diff --git a/docs/source/development/traffic_ops_api/v12/deliveryservice.rst b/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
index 12bc0a5..0a21034 100644
--- a/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
+++ b/docs/source/development/traffic_ops_api/v12/deliveryservice.rst
@@ -1012,7 +1012,7 @@ Health
.. _to-api-v12-ds-server:
Delivery Service Server
-++++++
++++++++++++++++++++++++
**GET /api/1.2/deliveryserviceserver**
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/docs/source/development/traffic_ops_api/v12/server.rst
----------------------------------------------------------------------
diff --git a/docs/source/development/traffic_ops_api/v12/server.rst b/docs/source/development/traffic_ops_api/v12/server.rst
index 14f63d4..27ccbf3 100644
--- a/docs/source/development/traffic_ops_api/v12/server.rst
+++ b/docs/source/development/traffic_ops_api/v12/server.rst
@@ -1315,6 +1315,66 @@ Server
|
+**PUT /api/1.2/servers/{:id}/status**
+
+ Updates server status and queues updates on all child caches if server type is EDGE or MID. Also, captures offline reason if status is set to ADMIN_DOWN or OFFLINE and prepends offline reason with the user that initiated the status change.
+
+ Authentication Required: Yes
+
+ Role(s) Required: Admin or Operations
+
+ **Request Route Parameters**
+
+ +------+----------+-------------------------------+
+ | Name | Required | Description |
+ +======+==========+===============================+
+ | id | yes | The id of the server. |
+ +------+----------+-------------------------------+
+
+ **Request Properties**
+
+ +----------------+----------+-------------------------------------------------+
+ | Name | Required | Description |
+ +================+==========+=================================================+
+ | status | yes | Status ID or name. |
+ +----------------+----------+-------------------------------------------------+
+ | offlineReason | yes|no | Required if status is ADMIN_DOWN or OFFLINE. |
+ +----------------+----------+-------------------------------------------------+
+
+ **Request Example** ::
+
+ {
+ "status": "ADMIN_DOWN",
+ "offlineReason": "Bad drives"
+ }
+
+|
+
+ **Response Properties**
+
+ +-------------+--------+----------------------------------+
+ | Parameter | Type | Description |
+ +=============+========+==================================+
+ | ``alerts`` | array | A collection of alert messages. |
+ +-------------+--------+----------------------------------+
+ | ``>level`` | string | Success, info, warning or error. |
+ +-------------+--------+----------------------------------+
+ | ``>text`` | string | Alert message. |
+ +-------------+--------+----------------------------------+
+
+ **Response Example** ::
+
+ {
+ "alerts": [
+ {
+ "level": "success",
+ "text": "Updated status [ ADMIN_DOWN ] for foo.bar.net [ user23: bad drives ] and queued updates on all child caches"
+ }
+ ],
+ }
+
+|
+
**DELETE /api/1.2/servers/{:id}**
Allow user to delete server through api.
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/app/lib/API/Server.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Server.pm b/traffic_ops/app/lib/API/Server.pm
index 70eeefd..68c7273 100644
--- a/traffic_ops/app/lib/API/Server.pm
+++ b/traffic_ops/app/lib/API/Server.pm
@@ -705,7 +705,7 @@ sub totals {
}
-sub status {
+sub status_count {
my $self = shift;
my $rs = $self->db->resultset('Server')->search(
@@ -726,6 +726,84 @@ sub status {
return $self->success( $response );
}
+sub update_status {
+ my $self = shift;
+ my $id = $self->param('id');
+ my $params = $self->req->json;
+
+ if ( !&is_oper($self) ) {
+ return $self->forbidden();
+ }
+
+ my $server = $self->db->resultset('Server')->find( { id => $id }, { prefetch => [ 'type' ] } );
+ if ( !defined($server) ) {
+ return $self->not_found();
+ }
+
+ if ( !defined( $params->{status} ) ) {
+ return $self->alert("Status is required.");
+ }
+
+ my $server_status;
+ if ( $params->{status} =~ /\d+/ ) {
+ $server_status = $self->db->resultset('Status')->search( { id => $params->{status} }, { columns => [qw/id name/] } )->single();
+ } else {
+ $server_status = $self->db->resultset('Status')->search( { name => $params->{status} }, { columns => [qw/id name/] } )->single();
+ }
+
+ if ( !defined($server_status) ) {
+ return $self->alert("Invalid status.");
+ }
+
+ my $offline_reason = $params->{offlineReason};
+ if ( $server_status->name eq 'ADMIN_DOWN' || $server_status->name eq 'OFFLINE' ) {
+ if ( !defined( $offline_reason ) ) {
+ return $self->alert("Offline reason is required for ADMIN_DOWN or OFFLINE status.");
+ } else {
+ # prepend current user to offline message
+ my $current_username = $self->current_user()->{username};
+ $offline_reason = "$current_username: $offline_reason";
+
+ }
+ } else {
+ $offline_reason = undef;
+ }
+
+ my $values = {
+ status => $server_status->id,
+ offline_reason => $offline_reason,
+ };
+
+ my $update = $server->update($values);
+ if ($update) {
+ my $fqdn = $update->host_name . "." . $update->domain_name;
+ my $msg = "Updated status [ " . $server_status->name . " ] for $fqdn [ $offline_reason ]";
+
+ # queue updates on child servers if server is ^EDGE or ^MID
+ if ( $server->type->name =~ m/^EDGE/ || $server->type->name =~ m/^MID/ ) {
+ my @cg_ids = $self->get_child_cachegroup_ids($server);
+ my $servers = $self->db->resultset('Server')->search( undef, { cachegroup => { -in => \@cg_ids }, cdn_id => $server->cdn_id } );
+ $servers->update( { upd_pending => 1 } );
+ $msg .= " and queued updates on all child caches";
+ }
+
+ &log( $self, $msg, "APICHANGE" );
+ return $self->success_message( $msg );
+ }
+ else {
+ return $self->alert( "Server status update failed." );
+ }
+
+}
+
+sub get_child_cachegroup_ids {
+ my $self = shift;
+ my $server = shift;
+
+ my @edge_cache_groups = $self->db->resultset('Cachegroup')->search( { parent_cachegroup_id => $server->cachegroup->id } )->all();
+ return map { $_->id } @edge_cache_groups;
+}
+
sub get_count_by_type {
my $self = shift;
my $type_name = shift;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/app/lib/TrafficOpsRoutes.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/TrafficOpsRoutes.pm b/traffic_ops/app/lib/TrafficOpsRoutes.pm
index c7fb983..ed65fef 100644
--- a/traffic_ops/app/lib/TrafficOpsRoutes.pm
+++ b/traffic_ops/app/lib/TrafficOpsRoutes.pm
@@ -725,11 +725,14 @@ sub api_routes {
$r->get("/api/$version/servers/totals")->over( authenticated => 1 )->to( 'Server#totals', namespace => $namespace );
# -- SERVERS: COUNT BY STATUS
- $r->get("/api/$version/servers/status")->over( authenticated => 1 )->to( 'Server#status', namespace => $namespace );
+ $r->get("/api/$version/servers/status")->over( authenticated => 1 )->to( 'Server#status_count', namespace => $namespace );
# -- SERVERS: QUEUE/DEQUEUE SERVER UPDATES
$r->post("/api/$version/servers/:id/queue_update" => [ id => qr/\d+/ ] )->over( authenticated => 1 )->to( 'Server#postupdatequeue', namespace => $namespace );
+ # -- SERVERS: UPDATE STATUS
+ $r->put("/api/$version/servers/:id/status" => [ id => qr/\d+/ ] )->over( authenticated => 1 )->to( 'Server#update_status', namespace => $namespace );
+
# -- SERVERS: SERVER CHECKS
$r->get("/api/$version/servers/checks")->over( authenticated => 1 )->to( 'ServerCheck#read', namespace => $namespace );
$r->get("/api/$version/servercheck/aadata")->over( authenticated => 1 )->to( 'ServerCheck#aadata', namespace => $namespace );
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/app/t/api/1.2/server.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/server.t b/traffic_ops/app/t/api/1.2/server.t
index 58ee930..5f4062b 100644
--- a/traffic_ops/app/t/api/1.2/server.t
+++ b/traffic_ops/app/t/api/1.2/server.t
@@ -526,8 +526,43 @@ ok $t->put_ok('/api/1.2/servers/' . $server_id => {Accept => 'application/json'}
->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
, 'Does the server update succeed because ip6Address is already used by the profile but...by this server?';
+ok $t->put_ok('/api/1.2/servers/' . $server_id . '/status' => {Accept => 'application/json'} => json => {
+ "status" => 'CARROT' })
+ ->status_is(400)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+ ->json_is( "/alerts/0/level", "error" )
+ ->json_is( "/alerts/0/text", "Invalid status." )
+ , 'Does the server status update fail because the status is invalid?';
+
+ok $t->put_ok('/api/1.2/servers/' . $server_id . '/status' => {Accept => 'application/json'} => json => {
+ "status" => 'OFFLINE' })
+ ->status_is(400)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+ ->json_is( "/alerts/0/level", "error" )
+ ->json_is( "/alerts/0/text", "Offline reason is required for ADMIN_DOWN or OFFLINE status." )
+ , 'Does the server status update fail because offline reason was not provided?';
+
+ok $t->put_ok('/api/1.2/servers/' . $server_id . '/status' => {Accept => 'application/json'} => json => {
+ "status" => 1,
+ "offlineReason" => "taco tuesday" })
+ ->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+ ->json_is( "/alerts/0/level", "success" )
+ , 'Does the server status update succeed with status ID?';
+
+ok $t->put_ok('/api/1.2/servers/' . $server_id . '/status' => {Accept => 'application/json'} => json => {
+ "status" => "OFFLINE",
+ "offlineReason" => "wacky wednesday" })
+ ->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+ ->json_is( "/alerts/0/level", "success" )
+ , 'Does the server status update succeed with status name?';
+
+ok $t->put_ok('/api/1.2/servers/' . $server_id . '/status' => {Accept => 'application/json'} => json => {
+ "status" => "ONLINE" })
+ ->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+ ->json_is( "/alerts/0/level", "success" )
+ ->json_is( "/alerts/0/text", "Updated status [ ONLINE ] for my-server-host-ip6.example-domain.com [ ] and queued updates on all child caches" )
+ , 'Does the server status update succeed and updates are queued when the status is changed on an Edge server?';
+
ok $t->get_ok('/api/1.2/servers/status')->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
- ->json_is( "/response/ONLINE", 17 )
+ ->json_is( "/response/ONLINE", 18 )
->json_is( "/response/REPORTED", 5 )
->or( sub { diag $t->tx->res->content->asset->{content}; } );
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/ServerService.js b/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
index b6c7563..de05a0e 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/ServerService.js
@@ -112,6 +112,22 @@ var ServerService = function($http, $q, Restangular, locationUtils, messageModel
return request.promise;
};
+ this.updateStatus = function(id, payload) {
+ var request = $q.defer();
+
+ $http.put(ENV.api['root'] + "servers/" + id + "/status", payload)
+ .then(
+ function(result) {
+ request.resolve(result);
+ },
+ function(fault) {
+ request.reject(fault);
+ }
+ );
+
+ return request.promise;
+ };
+
};
ServerService.$inject = ['$http', '$q', 'Restangular', 'locationUtils', 'messageModel', 'ENV'];
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/DialogSelectStatusController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/DialogSelectStatusController.js b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/DialogSelectStatusController.js
index 19a5ec3..6bdf02e 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/DialogSelectStatusController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/DialogSelectStatusController.js
@@ -17,7 +17,9 @@
* under the License.
*/
-var DialogSelectStatusController = function(statuses, $scope, $uibModalInstance) {
+var DialogSelectStatusController = function(server, statuses, $scope, $uibModalInstance) {
+
+ $scope.server = server;
$scope.statuses = statuses;
@@ -36,6 +38,10 @@ var DialogSelectStatusController = function(statuses, $scope, $uibModalInstance)
$uibModalInstance.close($scope.status);
};
+ $scope.needsUpdates = function(server) {
+ return (server.type.indexOf('EDGE') != -1) || (server.type.indexOf('MID') != -1);
+ };
+
$scope.cancel = function () {
$uibModalInstance.dismiss('cancel');
};
@@ -47,5 +53,5 @@ var DialogSelectStatusController = function(statuses, $scope, $uibModalInstance)
};
-DialogSelectStatusController.$inject = ['statuses', '$scope', '$uibModalInstance'];
+DialogSelectStatusController.$inject = ['server', 'statuses', '$scope', '$uibModalInstance'];
module.exports = DialogSelectStatusController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/dialog.select.status.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/dialog.select.status.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/dialog.select.status.tpl.html
index 3cc4441..335a190 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/dialog.select.status.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/dialog/select/status/dialog.select.status.tpl.html
@@ -19,7 +19,8 @@ under the License.
<div class="modal-header">
<button type="button" class="close" ng-click="cancel()"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
- <h4 class="modal-title">Select Server Status</h4>
+ <h4 class="modal-title">Update {{::server.hostName}} status</h4>
+ <h5 ng-if="needsUpdates(server)">Note: Config file updates will be queued on ALL child caches</h5>
</div>
<div class="modal-body">
<form name="statusForm" novalidate>
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
index fa81e5f..c23b03d 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
@@ -17,7 +17,7 @@
* under the License.
*/
-var FormServerController = function(server, $scope, $location, $state, $uibModal, formUtils, locationUtils, serverService, cacheGroupService, cdnService, physLocationService, profileService, statusService, typeService) {
+var FormServerController = function(server, $scope, $location, $state, $uibModal, formUtils, locationUtils, serverService, cacheGroupService, cdnService, physLocationService, profileService, statusService, typeService, messageModel) {
var getPhysLocations = function() {
physLocationService.getPhysLocations()
@@ -64,10 +64,16 @@ var FormServerController = function(server, $scope, $location, $state, $uibModal
};
var updateStatus = function(status) {
- // todo: hook this into PUT /api/version/server/:id/status
- console.log(status.name);
- console.log(status.offlineReason);
- alert('this still needs to be hooked into the api');
+ serverService.updateStatus(server.id, { status: status.id, offlineReason: status.offlineReason })
+ .then(
+ function(result) {
+ messageModel.setMessages(result.data.alerts, false);
+ refresh();
+ },
+ function(fault) {
+ messageModel.setMessages(fault.data.alerts, false);
+ }
+ );
};
var refresh = function() {
@@ -112,6 +118,9 @@ var FormServerController = function(server, $scope, $location, $state, $uibModal
controller: 'DialogSelectStatusController',
size: 'md',
resolve: {
+ server: function() {
+ return server;
+ },
statuses: function() {
return $scope.statuses;
}
@@ -151,5 +160,5 @@ var FormServerController = function(server, $scope, $location, $state, $uibModal
};
-FormServerController.$inject = ['server', '$scope', '$location', '$state', '$uibModal', 'formUtils', 'locationUtils', 'serverService', 'cacheGroupService', 'cdnService', 'physLocationService', 'profileService', 'statusService', 'typeService'];
+FormServerController.$inject = ['server', '$scope', '$location', '$state', '$uibModal', 'formUtils', 'locationUtils', 'serverService', 'cacheGroupService', 'cdnService', 'physLocationService', 'profileService', 'statusService', 'typeService', 'messageModel'];
module.exports = FormServerController;
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/15177cc4/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html b/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
index c075944..2bc9dd2 100644
--- a/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
+++ b/traffic_ops/experimental/ui/app/src/common/modules/form/server/form.server.tpl.html
@@ -55,6 +55,12 @@ under the License.
<select id="status" name="status" class="form-control" ng-model="server.statusId" ng-options="status.id as status.name for status in statuses" ng-disabled="true"></select>
</div>
</div>
+ <div class="form-group" ng-show="server.offlineReason.length > 0">
+ <label class="control-label col-md-2 col-sm-2 col-xs-12">Offline Reason</label>
+ <div class="col-md-10 col-sm-10 col-xs-12">
+ <input id="offlineReason" name="offlineReason" type="text" class="form-control" ng-model="server.offlineReason" ng-maxlength="256" ng-readonly="true">
+ </div>
+ </div>
<div class="form-group" ng-class="{'has-error': hasError(serverForm.updPending), 'has-feedback': hasError(serverForm.updPending)}">
<label class="control-label col-md-2 col-sm-2 col-xs-12">Update Pending *</label>
<div class="col-md-10 col-sm-10 col-xs-12">
@@ -179,14 +185,6 @@ under the License.
<span ng-show="hasError(serverForm.rack)" class="form-control-feedback"><i class="fa fa-times"></i></span>
</div>
</div>
- <div class="form-group" ng-class="{'has-error': hasError(serverForm.offlineReason), 'has-feedback': hasError(serverForm.offlineReason)}">
- <label class="control-label col-md-2 col-sm-2 col-xs-12">Offline Reason</label>
- <div class="col-md-10 col-sm-10 col-xs-12">
- <input id="offlineReason" name="offlineReason" type="text" class="form-control" ng-model="server.offlineReason" ng-maxlength="256" autofocus>
- <small class="input-error" ng-show="hasPropertyError(serverForm.offlineReason, 'maxlength')">Too Long</small>
- <span ng-show="hasError(serverForm.offlineReason)" class="form-control-feedback"><i class="fa fa-times"></i></span>
- </div>
- </div>
<div class="form-group" ng-class="{'has-error': hasError(serverForm.mgmtIpAddress), 'has-feedback': hasError(serverForm.mgmtIpAddress)}">
<label class="control-label col-md-2 col-sm-2 col-xs-12">Management IP Address</label>
<div class="col-md-10 col-sm-10 col-xs-12">
[2/2] incubator-trafficcontrol git commit: This closes #639
Posted by de...@apache.org.
This closes #639
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/68ad8ac0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/68ad8ac0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/68ad8ac0
Branch: refs/heads/master
Commit: 68ad8ac082acfb2ca6136fe30b6af6db78c416ab
Parents: 15177cc
Author: Dewayne Richardson <de...@apache.org>
Authored: Fri Jun 2 08:41:11 2017 -0600
Committer: Dewayne Richardson <de...@apache.org>
Committed: Fri Jun 2 08:41:11 2017 -0600
----------------------------------------------------------------------
----------------------------------------------------------------------