Similar to meta-hosts, populate the one-time host object, but use a "N/A" profile only, as there's no guarantee the host exists in the install server. Also add entries for the other fields needed for table sorting to work.
Signed-off-by: Nishanth Aravamudan <[email protected]> --- We *could* add support for looking up the hostname in the install-server then deciding what to show. But that seems more feature creep than anything and the intention of "one-time-hosts" seems to be hosts that already exist and are configured, but only available for a short-time (or not explicitly in an automated pool). diff --git a/frontend/client/src/autotest/afe/HostSelector.java b/frontend/client/src/autotest/afe/HostSelector.java index e088b4e..72ddc86 100644 --- a/frontend/client/src/autotest/afe/HostSelector.java +++ b/frontend/client/src/autotest/afe/HostSelector.java @@ -261,8 +261,15 @@ public class HostSelector implements ClickHandler { // add one-time hosts for (String hostname : oneTimeHostnames) { JSONObject oneTimeObject = new JSONObject(); + JSONArray profiles = new JSONArray(); + profiles.set(0, new JSONString("N/A")); oneTimeObject.put("hostname", new JSONString(hostname)); oneTimeObject.put("platform", new JSONString(ONE_TIME)); + oneTimeObject.put("profiles", profiles); + oneTimeObject.put("other_labels", new JSONString("")); + oneTimeObject.put("status", new JSONString("")); + oneTimeObject.put("locked_text", new JSONString("")); + oneTimeObject.put("id", new JSONNumber(--META_INDEX)); // need to add profiles here too, I think selectRow(oneTimeObject); } _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
