public void changeCurrentOutput(String jobId, boolean resetIfNotComplete) { if (jobId == null) { this.model.setCurrentOutput(null); } else { JobOutput jobOutput = this.model.getJobOutput(jobId, true); if (resetIfNotComplete && !jobOutput.isLive() && !jobOutput.isComplete()) { jobOutput.resetLines(); } this.model.setCurrentOutput(jobOutput); } }
public void toggleLive(boolean live) { if (live) { this.cancelCurrentRequests(); this.startLiveOutput(); } else { this.stopLiveOutput(); JobOutput jobOutput = this.model.getCurrentOutput(); if (!jobOutput.isComplete()) { jobOutput.resetLines(); } } this.model.setLive(live, true); }