/// <summary> /// Start the job browser from a job summary. /// </summary> /// <param name="js">Job summary to browse.</param> private void browseFromJobSummary(DryadLinqJobSummary js) { if (js == null) return; // TODO: this should run in the background CommManager manager = new CommManager(this.Status, delegate { }, new System.Threading.CancellationTokenSource().Token); DryadLinqJobInfo job = DryadLinqJobInfo.CreateDryadLinqJobInfo(this.clusterStatus.Config, js, false, manager); if (job != null) { JobBrowser browser = new JobBrowser(job); browser.Show(); this.Status("OK", StatusKind.OK); } else { this.Status("Could not find information about job", StatusKind.Error); } }
/// <summary> /// Start a job browser on the specified job. /// </summary> /// <param name="sender">Unused.</param> /// <param name="e">Unused.</param> private void jobBrowserToolStripMenuItem_Click(object sender, EventArgs e) { IEnumerable<ClusterJobInformation> ti = this.SelectedJobs(); this.Status("Starting job browser...", StatusKind.LongOp); IEnumerable<DryadLinqJobSummary> jobs = ti.Select(t => t.DiscoverDryadLinqJob(this.clusterStatus, this.Status)).ToList(); CommManager manager = new CommManager(this.Status, delegate { }, new System.Threading.CancellationTokenSource().Token); IEnumerable<DryadLinqJobInfo> detailed = jobs.Select(j => DryadLinqJobInfo.CreateDryadLinqJobInfo(this.clusterStatus.Config, j, false, manager)); foreach (DryadLinqJobInfo j in detailed) { if (j == null) continue; JobBrowser jb = new JobBrowser(j); jb.Show(); } this.Status("OK", StatusKind.OK); }
/// <summary> /// User pressed the 'job' button. /// </summary> /// <param name="sender">Unused.</param> /// <param name="e">Unused.</param> private void button_job_Click(object sender, EventArgs e) { JobBrowser jb = new JobBrowser(this.job); jb.Show(); }