Button to remove DNS server

Added button to remove DNS server from
Nameservers list.

Resolves openbmc/phosphor-webui#11

Tested: Added and was able to remove DNS servers
  from list. Page updated appropriately.

Change-Id: I64e9d2499465f1aa5f9f34c831961578abf32b2b
Signed-off-by: beccabroek <beccabroek@gmail.com>
diff --git a/app/configuration/controllers/network-controller.html b/app/configuration/controllers/network-controller.html
index 4bc210a..39a708a 100644
--- a/app/configuration/controllers/network-controller.html
+++ b/app/configuration/controllers/network-controller.html
@@ -73,13 +73,16 @@
 				<h2 class="inline h4">DNS settings</h2>
 			</div>
 			<fieldset>
-				<div class="column small-12 large-4">
-						<!-- Call Nameservers "DNS Servers" on the GUI -->
-						<fieldset class="net-config__static-ip-wrap" ng-repeat="dns in interface.Nameservers track by $index">
-							<label for="net-config__prime-dns{{$index+1}}">DNS Server {{$index+1}}</label>
-							<input id="net-config__prime-dns{{$index+1}}" type="text" ng-model="dns" ng-blur="interface.Nameservers[$index] = dns" set-focus-on-new-input//>
-						</fieldset>
-						<button type="button" class="btn-primary inline" ng-click="addDNSField()">Add new DNS server</button>
+				<!-- Call Nameservers "DNS Servers" on the GUI -->
+				<fieldset class="net-config__static-ip-wrap" ng-repeat="dns in interface.Nameservers track by $index">
+					<div class="column small-12">
+						<label for="net-config__prime-dns{{$index+1}}">DNS Server {{$index+1}}</label>
+						<input id="net-config__prime-dns{{$index+1}}" class="network-input column small-6 large-4 inline" type="text" ng-model="dns" ng-blur="interface.Nameservers[$index] = dns" set-focus-on-new-input//>
+						<button class="dns__server-remove inline" ng-click="removeDNSField($index)">Remove</button>
+					</div>
+				</fieldset>
+				<div class="column small-12">
+					<button type="button" class="btn-primary inline dns_add" ng-click="addDNSField()">Add new DNS server</button>
 				</div>
 			</fieldset>
 			<div class="network-config__submit-wrapper">
diff --git a/app/configuration/controllers/network-controller.js b/app/configuration/controllers/network-controller.js
index 9bec746..4d11ae5 100644
--- a/app/configuration/controllers/network-controller.js
+++ b/app/configuration/controllers/network-controller.js
@@ -39,6 +39,10 @@
         $scope.interface.Nameservers.push('');
       };
 
+      $scope.removeDNSField = function(index) {
+        $scope.interface.Nameservers.splice(index, 1);
+      };
+
       $scope.setNetworkSettings = function() {
         // Hides the confirm network settings modal
         $scope.confirm_settings = false;
diff --git a/app/configuration/styles/network.scss b/app/configuration/styles/network.scss
index 26653fd..db32e98 100644
--- a/app/configuration/styles/network.scss
+++ b/app/configuration/styles/network.scss
@@ -47,4 +47,13 @@
   {
     margin-left: 3em;
   }
+  .dns__server-remove {
+    color: $medblue;
+    height: 2.1em;
+    opacity: 1;
+    margin-left: 1em;
+    &:hover {
+      cursor: pointer;
+    }
+  }
 }