A following change will rely on all objects in the selectedHostData to
have an "id" property to guarantee a way to identify them when rows are
clicked.  Meta-host objects don't have one, so add one that starts
(effectively) at -1 and decrements. This should avoid collisions with
the actual host objects, which all have positive ids.
    
Signed-off-by: Nishanth Aravamudan <[email protected]>

diff --git a/frontend/client/src/autotest/afe/HostSelector.java 
b/frontend/client/src/autotest/afe/HostSelector.java
index 5d42bf1..8b75056 100644
--- a/frontend/client/src/autotest/afe/HostSelector.java
+++ b/frontend/client/src/autotest/afe/HostSelector.java
@@ -41,6 +41,7 @@ import java.util.Set;
 public class HostSelector implements ClickHandler {
     private static final int TABLE_SIZE = 10;
     public static final String META_PREFIX = "Any ";
+    public static int META_INDEX = 0;
     public static final String ONE_TIME = "(one-time host)";
 
     public static class HostSelection {
@@ -279,6 +280,7 @@ public class HostSelector implements ClickHandler {
         metaObject.put("other_labels", new JSONString(""));
         metaObject.put("status", new JSONString(""));
         metaObject.put("locked_text", new JSONString(""));
+        metaObject.put("id", new JSONNumber(--META_INDEX));
         selectRow(metaObject);
     }
 

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to