}
});
}
protected void cloneJob() {
ContextMenu menu = new ContextMenu();
menu.addItem("Reuse any similar hosts (default)", new Command() {
public void execute() {
cloneJob(false);
}
});
menu.addItem("Reuse same specific hosts", new Command() {
public void execute() {
cloneJob(true);
}
});
menu.addItem("Use failed and aborted hosts", new Command() {
public void execute() {
JSONObject queueEntryFilterData = new JSONObject();
String sql = "(status = 'Failed' OR aborted = TRUE OR " +
"(host_id IS NULL AND meta_host IS NULL))";
queueEntryFilterData.put("extra_where", new JSONString(sql));
cloneJob(true, queueEntryFilterData);
}
});
menu.showAt(cloneButton.getAbsoluteLeft(),
cloneButton.getAbsoluteTop() + cloneButton.getOffsetHeight());
}