Fix display of hostless jobs on AFE View Job tab
Signed-off-by: James Ren <[email protected]>
--- autotest/frontend/client/src/autotest/afe/JobStatusDataSource.java
2010-04-07 13:27:48.000000000 -0700
+++ autotest/frontend/client/src/autotest/afe/JobStatusDataSource.java
2010-04-07 13:27:48.000000000 -0700
@@ -53,16 +53,21 @@
String translation = translateStatus(status);
queueEntry.put("status", new JSONString(translation));
- JSONValue host = queueEntry.get("host");
- if (host.isNull() != null) {
+ boolean hasHost = (queueEntry.get("host").isNull() == null);
+ boolean hasMetaHost = (queueEntry.get("meta_host") == null);
+
+ if (!hasHost && !hasMetaHost) {
+ queueEntry.put("hostname", new JSONString("(hostless)"));
+ rows.add(queueEntry);
+
+ } else if (!hasHost && hasMetaHost) {
// metahost
incrementMetaHostCount(metaHostEntries, queueEntry);
- continue;
+ } else {
+ // non-metahost
+ processHostData(queueEntry);
+ rows.add(queueEntry);
}
-
- // non-metahost
- processHostData(queueEntry);
- rows.add(queueEntry);
}
addMetaHostRows(metaHostEntries, rows);
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest