Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1581


Ignore:
Timestamp:
04/16/09 17:48:26 (15 years ago)
Author:
aleitner
Message:

added last snapshotdetails (#569)

Location:
trunk/sources/HeuristicLab.Hive.Server.Console/3.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.Designer.cs

    r1530 r1581  
    4747      this.plJobDetails = new System.Windows.Forms.Panel();
    4848      this.lvSnapshots = new System.Windows.Forms.ListView();
    49       this.chJobId = new System.Windows.Forms.ColumnHeader();
    50       this.chTimeCalculated = new System.Windows.Forms.ColumnHeader();
     49      this.chClientCalculated = new System.Windows.Forms.ColumnHeader();
    5150      this.chProgress = new System.Windows.Forms.ColumnHeader();
     51      this.chSnapshotTime = new System.Windows.Forms.ColumnHeader();
    5252      this.lblPriorityJob = new System.Windows.Forms.Label();
    5353      this.lblParentJob = new System.Windows.Forms.Label();
     
    289289      //
    290290      this.lvSnapshots.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
    291             this.chJobId,
    292             this.chTimeCalculated,
    293             this.chProgress});
     291            this.chClientCalculated,
     292            this.chProgress,
     293            this.chSnapshotTime});
    294294      this.lvSnapshots.Enabled = false;
    295295      this.lvSnapshots.FullRowSelect = true;
     
    302302      this.lvSnapshots.View = System.Windows.Forms.View.Details;
    303303      //
    304       // chJobId
    305       //
    306       this.chJobId.Text = "Job-ID";
    307       //
    308       // chTimeCalculated
    309       //
    310       this.chTimeCalculated.Text = "Calculated At";
     304      // chClientCalculated
     305      //
     306      this.chClientCalculated.Text = "Client Calculated";
     307      this.chClientCalculated.Width = 88;
    311308      //
    312309      // chProgress
    313310      //
    314311      this.chProgress.Text = "Progress";
     312      this.chProgress.Width = 67;
     313      //
     314      // chSnapshotTime
     315      //
     316      this.chSnapshotTime.Text = "Snapshot request";
     317      this.chSnapshotTime.Width = 166;
    315318      //
    316319      // lblPriorityJob
     
    636639    private System.Windows.Forms.Label lblParentJob;
    637640    private System.Windows.Forms.ListView lvSnapshots;
    638     private System.Windows.Forms.ColumnHeader chJobId;
    639     private System.Windows.Forms.ColumnHeader chTimeCalculated;
     641    private System.Windows.Forms.ColumnHeader chClientCalculated;
    640642    private System.Windows.Forms.ColumnHeader chProgress;
    641643    private System.Windows.Forms.Label lblStateClient;
     
    650652    private System.Windows.Forms.ListView lvJobControl;
    651653    private System.Windows.Forms.CheckBox checkBox1;
     654    private System.Windows.Forms.ColumnHeader chSnapshotTime;
    652655  }
    653656}
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs

    r1530 r1581  
    7979    }
    8080
     81    private void updaterWoker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
     82      Refresh();
     83    }
    8184
    8285    private int CapacityRam(int noCores, int freeCores) {
     
    231234
    232235    /// <summary>
    233     /// if one client is clicked, a panel is opened with the details
     236    /// if one client is clicked, the details for the clicked client are shown
     237    /// in the second panel
    234238    /// </summary>
    235239    private void ClientClicked() {
     
    258262
    259263    /// <summary>
    260     /// if one job is clicked, a panel is opened with the details
     264    /// if one job is clicked, the details for the clicked job are shown
     265    /// in the second panel
    261266    /// </summary>
    262267    private void JobClicked() {
     
    296301      }
    297302      if (currentJob.State != State.offline) {
     303        GetSnapshotList();
    298304        lvSnapshots.Visible = true;
    299305      } else {
     
    307313          RefreshJob(change);
    308314        } else if (change.Types == Type.Client) {
    309           RefreshClient(change);
     315         RefreshClient(change);
    310316        } else if (change.Types == Type.ClientGroup) {
    311317          RefreshClientGroup(change);
     
    426432      AddJobForm newForm = new AddJobForm();
    427433      newForm.Show();
    428       //newForm.addJobEvent += new addDelegate(updaterWoker.RunWorkerAsync);
     434      newForm.addJobEvent += new addDelegate(updaterWoker.RunWorkerAsync);
    429435    }
    430436
     
    649655    }
    650656
     657    private void GetSnapshotList() {
     658
     659      lvSnapshots.Items.Clear();
     660      IJobManager jobManager =
     661        ServiceLocator.GetJobManager();
     662      ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id, false);
     663      ListViewItem curSnapshot = new ListViewItem(jobRes.Obj.Client.Name);
     664      double percentage = jobRes.Obj.Percentage * 100;
     665      curSnapshot.SubItems.Add(percentage.ToString() + " %");
     666      curSnapshot.SubItems.Add(jobRes.Obj.timestamp.ToString());
     667      lvSnapshots.Items.Add(curSnapshot);
     668
     669
     670    }
    651671
    652672    #endregion
    653673
    654     private void updaterWoker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
    655       Refresh();
    656     }
    657674
    658675
Note: See TracChangeset for help on using the changeset viewer.