moblab: change suite runner UI to dropdown and fix bugs.

Fixed bug in the manage DUT page that caused extra whitespace on
every refresh.

Fixed issue where pool label was being applied by UI but not required
by the backend test runner.

Added RPC to get the list of pools and changed the suite running UI
to a drop down and use these pool labels.

TEST=manually deployed to local moblab on 56 and tested.
BUG=chromium:659416

Change-Id: Iedeafa522b192e8c22c0c7e6361f8236eec48308
Reviewed-on: https://chromium-review.googlesource.com/411368
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Michael Tang <ntang@chromium.org>
diff --git a/frontend/afe/moblab_rpc_interface.py b/frontend/afe/moblab_rpc_interface.py
index 19007aa..e37c982 100644
--- a/frontend/afe/moblab_rpc_interface.py
+++ b/frontend/afe/moblab_rpc_interface.py
@@ -595,29 +595,53 @@
     return (True, 'Removed label %s from DUT %s' % (label_name, ipaddress))
 
 
-@rpc_utils.moblab_only
-def get_connected_boards():
-    """ RPC handler to get a list of the boards connected to the moblab.
+def _get_connected_dut_labels(requested_label, only_first_label=True):
+    """ Query the DUT's attached to the moblab and return a filtered list of labels.
+    
+    @param requested_label:  the label name you are requesting.
+    @param only_first_label:  if the device has the same label name multiple times only
+                              return the first label value in the list.
 
-    @return: A de-duped list of board types attached to the moblab.
+    @return: A de-duped list of requested dut labels attached to the moblab.
     """
     hosts = list(rpc_utils.get_host_query((), False, False, True, {}))
     if not hosts:
         return []
     models.Host.objects.populate_relationships(hosts, models.Label,
                                                'label_list')
-    boards = set()
+    labels = set()
     for host in hosts:
         for label in host.label_list:
-            if 'board:' in label.name:
-                boards.add(label.name.replace('board:', ''))
-                break
-    boards = list(boards)
+            if requested_label in label.name:
+                labels.add(label.name.replace(requested_label, ''))
+                if only_first_label:
+                    break
+    return list(labels)
+
+
+@rpc_utils.moblab_only
+def get_connected_boards():
+    """ RPC handler to get a list of the boards connected to the moblab.
+
+    @return: A de-duped list of board types attached to the moblab.
+    """
+    boards = _get_connected_dut_labels("board:")
     boards.sort()
     return boards
 
 
 @rpc_utils.moblab_only
+def get_connected_pools():
+    """ RPC handler to get a list of the pools labels on the DUT's connected.
+
+    @return: A de-duped list of pool labels.
+    """
+    pools = _get_connected_dut_labels("pool:", False)
+    pools.sort()
+    return pools
+
+
+@rpc_utils.moblab_only
 def get_builds_for_board(board_name):
     """ RPC handler to find the most recent builds for a board.