Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/16/11 16:01:39 (13 years ago)
Author:
ascheibe
Message:

#1233
Admin UI:

  • some bugfixes
  • removed dummy stuff
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/HiveAdministrationClient.cs

    r6373 r6437  
    2929    public List<SlaveGroup> SlaveGroups;
    3030    public List<Slave> Slaves;
    31     public List<string> Users;
    32     public List<HiveExperiment> Experiments;
    3331
    3432
    3533    public HiveAdministrationClient() {
    3634      UpdateSlaveGroups();
    37       Users = new List<string>();
    38       Users.Add("Mr. White");
    39       Users.Add("Mr. Pink");
    40       Users.Add("Mr. Blue");
    4135    }
    4236
     
    5347        SlaveGroups = new List<SlaveGroup>(service.GetSlaveGroups());
    5448        Slaves = new List<Slave>(service.GetSlaves());
    55         Experiments = new List<HiveExperiment>(service.GetAllHiveExperiments());
    5649      });
    5750    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/HiveAdministrationView.Designer.cs

    r6373 r6437  
    2020#endregion
    2121
    22 using HeuristicLab.Clients.Hive.Administration.Views.Common;
    23 using HeuristicLab.Clients.Hive.ExperimentManager.Views;
    2422namespace HeuristicLab.Clients.Hive.Administration.Views {
    2523  partial class HiveAdministrationView {
    2624    private System.Windows.Forms.TabControl tabAdmin;
    27     private System.Windows.Forms.TabPage tabUsers;
     25    private HeuristicLab.Clients.Hive.Administration.Views.ResourcesView resourcesView;
    2826
    2927    #region Component Designer generated code
     
    3230      this.tabAdmin = new System.Windows.Forms.TabControl();
    3331      this.tabSlaves = new System.Windows.Forms.TabPage();
    34       this.resourcesView = new ResourcesView();
    35       this.tabUsers = new System.Windows.Forms.TabPage();
    36       this.splitUsers = new System.Windows.Forms.SplitContainer();
    37       this.lstUsers = new System.Windows.Forms.ListView();
    3832      this.imageListUsers = new System.Windows.Forms.ImageList(this.components);
    39       this.tabUserDetails = new System.Windows.Forms.TabControl();
    40       this.tabUserInformation = new System.Windows.Forms.TabPage();
    41       this.txtUserName = new System.Windows.Forms.TextBox();
    42       this.txtUserLastActivity = new System.Windows.Forms.TextBox();
    43       this.txtUserRole = new System.Windows.Forms.TextBox();
    44       this.label1 = new System.Windows.Forms.Label();
    45       this.txtUserEmail = new System.Windows.Forms.TextBox();
    46       this.label2 = new System.Windows.Forms.Label();
    47       this.txtUserPriority = new System.Windows.Forms.TextBox();
    48       this.label3 = new System.Windows.Forms.Label();
    49       this.txtUserCalculatedJobs = new System.Windows.Forms.TextBox();
    50       this.label4 = new System.Windows.Forms.Label();
    51       this.txtUserExecutionTime = new System.Windows.Forms.TextBox();
    52       this.label6 = new System.Windows.Forms.Label();
    53       this.label8 = new System.Windows.Forms.Label();
    54       this.label7 = new System.Windows.Forms.Label();
    55       this.tabUserJobs = new System.Windows.Forms.TabPage();
    56       this.updateControl2 = new UpdateControl();
    57       this.hiveExperimentManagerView = new HiveExperimentManagerView();
    58       this.tabStatistics = new System.Windows.Forms.TabPage();
    59       this.label5 = new System.Windows.Forms.Label();
     33      this.resourcesView = new HeuristicLab.Clients.Hive.Administration.Views.ResourcesView();
    6034      this.tabAdmin.SuspendLayout();
    6135      this.tabSlaves.SuspendLayout();
    62       this.tabUsers.SuspendLayout();
    63       ((System.ComponentModel.ISupportInitialize)(this.splitUsers)).BeginInit();
    64       this.splitUsers.Panel1.SuspendLayout();
    65       this.splitUsers.Panel2.SuspendLayout();
    66       this.splitUsers.SuspendLayout();
    67       this.tabUserDetails.SuspendLayout();
    68       this.tabUserInformation.SuspendLayout();
    69       this.tabUserJobs.SuspendLayout();
    70       this.tabStatistics.SuspendLayout();
    7136      this.SuspendLayout();
    7237      //
     
    7742                  | System.Windows.Forms.AnchorStyles.Right)));
    7843      this.tabAdmin.Controls.Add(this.tabSlaves);
    79       this.tabAdmin.Controls.Add(this.tabUsers);
    80       this.tabAdmin.Controls.Add(this.tabStatistics);
    8144      this.tabAdmin.Location = new System.Drawing.Point(3, 0);
    8245      this.tabAdmin.Name = "tabAdmin";
     
    9659      this.tabSlaves.UseVisualStyleBackColor = true;
    9760      //
     61      // imageListUsers
     62      //
     63      this.imageListUsers.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
     64      this.imageListUsers.ImageSize = new System.Drawing.Size(16, 16);
     65      this.imageListUsers.TransparentColor = System.Drawing.Color.Transparent;
     66      //
    9867      // resourcesView
    9968      //
     
    10978      this.resourcesView.TabIndex = 0;
    11079      //
    111       // tabUsers
    112       //
    113       this.tabUsers.Controls.Add(this.splitUsers);
    114       this.tabUsers.Location = new System.Drawing.Point(4, 22);
    115       this.tabUsers.Name = "tabUsers";
    116       this.tabUsers.Padding = new System.Windows.Forms.Padding(3);
    117       this.tabUsers.Size = new System.Drawing.Size(734, 520);
    118       this.tabUsers.TabIndex = 1;
    119       this.tabUsers.Text = "Users";
    120       this.tabUsers.UseVisualStyleBackColor = true;
    121       //
    122       // splitUsers
    123       //
    124       this.splitUsers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    125                   | System.Windows.Forms.AnchorStyles.Left)
    126                   | System.Windows.Forms.AnchorStyles.Right)));
    127       this.splitUsers.Location = new System.Drawing.Point(3, 6);
    128       this.splitUsers.Name = "splitUsers";
    129       //
    130       // splitUsers.Panel1
    131       //
    132       this.splitUsers.Panel1.Controls.Add(this.lstUsers);
    133       //
    134       // splitUsers.Panel2
    135       //
    136       this.splitUsers.Panel2.Controls.Add(this.tabUserDetails);
    137       this.splitUsers.Size = new System.Drawing.Size(722, 508);
    138       this.splitUsers.SplitterDistance = 215;
    139       this.splitUsers.TabIndex = 0;
    140       //
    141       // lstUsers
    142       //
    143       this.lstUsers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    144                   | System.Windows.Forms.AnchorStyles.Left)
    145                   | System.Windows.Forms.AnchorStyles.Right)));
    146       this.lstUsers.Location = new System.Drawing.Point(3, 4);
    147       this.lstUsers.Name = "lstUsers";
    148       this.lstUsers.Size = new System.Drawing.Size(209, 501);
    149       this.lstUsers.SmallImageList = this.imageListUsers;
    150       this.lstUsers.TabIndex = 0;
    151       this.lstUsers.UseCompatibleStateImageBehavior = false;
    152       this.lstUsers.View = System.Windows.Forms.View.List;
    153       //
    154       // imageListUsers
    155       //
    156       this.imageListUsers.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
    157       this.imageListUsers.ImageSize = new System.Drawing.Size(16, 16);
    158       this.imageListUsers.TransparentColor = System.Drawing.Color.Transparent;
    159       //
    160       // tabUserDetails
    161       //
    162       this.tabUserDetails.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    163                   | System.Windows.Forms.AnchorStyles.Left)
    164                   | System.Windows.Forms.AnchorStyles.Right)));
    165       this.tabUserDetails.Controls.Add(this.tabUserInformation);
    166       this.tabUserDetails.Controls.Add(this.tabUserJobs);
    167       this.tabUserDetails.Location = new System.Drawing.Point(3, 3);
    168       this.tabUserDetails.Name = "tabUserDetails";
    169       this.tabUserDetails.SelectedIndex = 0;
    170       this.tabUserDetails.Size = new System.Drawing.Size(496, 501);
    171       this.tabUserDetails.TabIndex = 1;
    172       //
    173       // tabUserInformation
    174       //
    175       this.tabUserInformation.Controls.Add(this.txtUserName);
    176       this.tabUserInformation.Controls.Add(this.txtUserLastActivity);
    177       this.tabUserInformation.Controls.Add(this.txtUserRole);
    178       this.tabUserInformation.Controls.Add(this.label1);
    179       this.tabUserInformation.Controls.Add(this.txtUserEmail);
    180       this.tabUserInformation.Controls.Add(this.label2);
    181       this.tabUserInformation.Controls.Add(this.txtUserPriority);
    182       this.tabUserInformation.Controls.Add(this.label3);
    183       this.tabUserInformation.Controls.Add(this.txtUserCalculatedJobs);
    184       this.tabUserInformation.Controls.Add(this.label4);
    185       this.tabUserInformation.Controls.Add(this.txtUserExecutionTime);
    186       this.tabUserInformation.Controls.Add(this.label6);
    187       this.tabUserInformation.Controls.Add(this.label8);
    188       this.tabUserInformation.Controls.Add(this.label7);
    189       this.tabUserInformation.Location = new System.Drawing.Point(4, 22);
    190       this.tabUserInformation.Name = "tabUserInformation";
    191       this.tabUserInformation.Padding = new System.Windows.Forms.Padding(3);
    192       this.tabUserInformation.Size = new System.Drawing.Size(488, 475);
    193       this.tabUserInformation.TabIndex = 0;
    194       this.tabUserInformation.Text = "User Information";
    195       this.tabUserInformation.UseVisualStyleBackColor = true;
    196       //
    197       // txtUserName
    198       //
    199       this.txtUserName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    200                   | System.Windows.Forms.AnchorStyles.Right)));
    201       this.txtUserName.Location = new System.Drawing.Point(163, 14);
    202       this.txtUserName.Name = "txtUserName";
    203       this.txtUserName.Size = new System.Drawing.Size(319, 20);
    204       this.txtUserName.TabIndex = 17;
    205       this.txtUserName.Text = "ascheibe";
    206       //
    207       // txtUserLastActivity
    208       //
    209       this.txtUserLastActivity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    210                   | System.Windows.Forms.AnchorStyles.Right)));
    211       this.txtUserLastActivity.Location = new System.Drawing.Point(163, 40);
    212       this.txtUserLastActivity.Name = "txtUserLastActivity";
    213       this.txtUserLastActivity.Size = new System.Drawing.Size(319, 20);
    214       this.txtUserLastActivity.TabIndex = 16;
    215       this.txtUserLastActivity.Text = "11.1.2010";
    216       //
    217       // txtUserRole
    218       //
    219       this.txtUserRole.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    220                   | System.Windows.Forms.AnchorStyles.Right)));
    221       this.txtUserRole.Location = new System.Drawing.Point(163, 66);
    222       this.txtUserRole.Name = "txtUserRole";
    223       this.txtUserRole.Size = new System.Drawing.Size(319, 20);
    224       this.txtUserRole.TabIndex = 15;
    225       this.txtUserRole.Text = "Hive Slave";
    226       //
    227       // label1
    228       //
    229       this.label1.AutoSize = true;
    230       this.label1.Location = new System.Drawing.Point(15, 21);
    231       this.label1.Name = "label1";
    232       this.label1.Size = new System.Drawing.Size(58, 13);
    233       this.label1.TabIndex = 0;
    234       this.label1.Text = "User name";
    235       //
    236       // txtUserEmail
    237       //
    238       this.txtUserEmail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    239                   | System.Windows.Forms.AnchorStyles.Right)));
    240       this.txtUserEmail.Location = new System.Drawing.Point(163, 92);
    241       this.txtUserEmail.Name = "txtUserEmail";
    242       this.txtUserEmail.Size = new System.Drawing.Size(319, 20);
    243       this.txtUserEmail.TabIndex = 14;
    244       this.txtUserEmail.Text = "ascheibe@mail.com";
    245       //
    246       // label2
    247       //
    248       this.label2.AutoSize = true;
    249       this.label2.Location = new System.Drawing.Point(15, 47);
    250       this.label2.Name = "label2";
    251       this.label2.Size = new System.Drawing.Size(64, 13);
    252       this.label2.TabIndex = 1;
    253       this.label2.Text = "Last Activity";
    254       //
    255       // txtUserPriority
    256       //
    257       this.txtUserPriority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    258                   | System.Windows.Forms.AnchorStyles.Right)));
    259       this.txtUserPriority.Location = new System.Drawing.Point(163, 118);
    260       this.txtUserPriority.Name = "txtUserPriority";
    261       this.txtUserPriority.Size = new System.Drawing.Size(319, 20);
    262       this.txtUserPriority.TabIndex = 13;
    263       this.txtUserPriority.Text = "10";
    264       //
    265       // label3
    266       //
    267       this.label3.AutoSize = true;
    268       this.label3.Location = new System.Drawing.Point(15, 73);
    269       this.label3.Name = "label3";
    270       this.label3.Size = new System.Drawing.Size(29, 13);
    271       this.label3.TabIndex = 2;
    272       this.label3.Text = "Role";
    273       //
    274       // txtUserCalculatedJobs
    275       //
    276       this.txtUserCalculatedJobs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    277                   | System.Windows.Forms.AnchorStyles.Right)));
    278       this.txtUserCalculatedJobs.Location = new System.Drawing.Point(163, 144);
    279       this.txtUserCalculatedJobs.Name = "txtUserCalculatedJobs";
    280       this.txtUserCalculatedJobs.Size = new System.Drawing.Size(319, 20);
    281       this.txtUserCalculatedJobs.TabIndex = 12;
    282       this.txtUserCalculatedJobs.Text = "125";
    283       //
    284       // label4
    285       //
    286       this.label4.AutoSize = true;
    287       this.label4.Location = new System.Drawing.Point(15, 99);
    288       this.label4.Name = "label4";
    289       this.label4.Size = new System.Drawing.Size(32, 13);
    290       this.label4.TabIndex = 3;
    291       this.label4.Text = "Email";
    292       //
    293       // txtUserExecutionTime
    294       //
    295       this.txtUserExecutionTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    296                   | System.Windows.Forms.AnchorStyles.Right)));
    297       this.txtUserExecutionTime.Location = new System.Drawing.Point(163, 170);
    298       this.txtUserExecutionTime.Name = "txtUserExecutionTime";
    299       this.txtUserExecutionTime.Size = new System.Drawing.Size(319, 20);
    300       this.txtUserExecutionTime.TabIndex = 11;
    301       this.txtUserExecutionTime.Text = "15d 3h 5m";
    302       //
    303       // label6
    304       //
    305       this.label6.AutoSize = true;
    306       this.label6.Location = new System.Drawing.Point(15, 125);
    307       this.label6.Name = "label6";
    308       this.label6.Size = new System.Drawing.Size(63, 13);
    309       this.label6.TabIndex = 8;
    310       this.label6.Text = "User Priority";
    311       //
    312       // label8
    313       //
    314       this.label8.AutoSize = true;
    315       this.label8.Location = new System.Drawing.Point(15, 177);
    316       this.label8.Name = "label8";
    317       this.label8.Size = new System.Drawing.Size(116, 13);
    318       this.label8.TabIndex = 10;
    319       this.label8.Text = "Overall Execution Time";
    320       //
    321       // label7
    322       //
    323       this.label7.AutoSize = true;
    324       this.label7.Location = new System.Drawing.Point(15, 151);
    325       this.label7.Name = "label7";
    326       this.label7.Size = new System.Drawing.Size(82, 13);
    327       this.label7.TabIndex = 9;
    328       this.label7.Text = "Calculated Jobs";
    329       //
    330       // tabUserJobs
    331       //
    332       this.tabUserJobs.Controls.Add(this.updateControl2);
    333       this.tabUserJobs.Controls.Add(this.hiveExperimentManagerView);
    334       this.tabUserJobs.Location = new System.Drawing.Point(4, 22);
    335       this.tabUserJobs.Name = "tabUserJobs";
    336       this.tabUserJobs.Padding = new System.Windows.Forms.Padding(3);
    337       this.tabUserJobs.Size = new System.Drawing.Size(488, 475);
    338       this.tabUserJobs.TabIndex = 1;
    339       this.tabUserJobs.Text = "Experiments";
    340       this.tabUserJobs.UseVisualStyleBackColor = true;
    341       //
    342       // updateControl2
    343       //
    344       this.updateControl2.Location = new System.Drawing.Point(7, 4);
    345       this.updateControl2.Name = "updateControl2";
    346       this.updateControl2.Size = new System.Drawing.Size(75, 24);
    347       this.updateControl2.TabIndex = 1;
    348       this.updateControl2.UpdateAction = null;
    349       //
    350       // hiveExperimentManagerView
    351       //
    352       this.hiveExperimentManagerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    353                   | System.Windows.Forms.AnchorStyles.Left)
    354                   | System.Windows.Forms.AnchorStyles.Right)));
    355       this.hiveExperimentManagerView.Caption = "HiveExperimentManagerBaseView";
    356       this.hiveExperimentManagerView.Content = null;
    357       this.hiveExperimentManagerView.Location = new System.Drawing.Point(4, 26);
    358       this.hiveExperimentManagerView.Name = "hiveExperimentManagerView";
    359       this.hiveExperimentManagerView.ReadOnly = false;
    360       this.hiveExperimentManagerView.Size = new System.Drawing.Size(484, 449);
    361       this.hiveExperimentManagerView.TabIndex = 0;
    362       //
    363       // tabStatistics
    364       //
    365       this.tabStatistics.Controls.Add(this.label5);
    366       this.tabStatistics.Location = new System.Drawing.Point(4, 22);
    367       this.tabStatistics.Name = "tabStatistics";
    368       this.tabStatistics.Padding = new System.Windows.Forms.Padding(3);
    369       this.tabStatistics.Size = new System.Drawing.Size(734, 520);
    370       this.tabStatistics.TabIndex = 2;
    371       this.tabStatistics.Text = "Statistics";
    372       this.tabStatistics.UseVisualStyleBackColor = true;
    373       //
    374       // label5
    375       //
    376       this.label5.AutoSize = true;
    377       this.label5.Location = new System.Drawing.Point(141, 221);
    378       this.label5.Name = "label5";
    379       this.label5.Size = new System.Drawing.Size(386, 13);
    380       this.label5.TabIndex = 0;
    381       this.label5.Text = "Show some global statistics, e.g. Overall execution time, nr of calculated jobs, " +
    382           "....";
    383       //
    38480      // HiveAdministrationView
    38581      //
     
    39288      this.tabAdmin.ResumeLayout(false);
    39389      this.tabSlaves.ResumeLayout(false);
    394       this.tabUsers.ResumeLayout(false);
    395       this.splitUsers.Panel1.ResumeLayout(false);
    396       this.splitUsers.Panel2.ResumeLayout(false);
    397       ((System.ComponentModel.ISupportInitialize)(this.splitUsers)).EndInit();
    398       this.splitUsers.ResumeLayout(false);
    399       this.tabUserDetails.ResumeLayout(false);
    400       this.tabUserInformation.ResumeLayout(false);
    401       this.tabUserInformation.PerformLayout();
    402       this.tabUserJobs.ResumeLayout(false);
    403       this.tabStatistics.ResumeLayout(false);
    404       this.tabStatistics.PerformLayout();
    40590      this.ResumeLayout(false);
    40691
     
    40994    #endregion
    41095
    411     private System.Windows.Forms.SplitContainer splitUsers;
    412     private System.Windows.Forms.ListView lstUsers;
    413     private System.Windows.Forms.Label label3;
    414     private System.Windows.Forms.Label label2;
    415     private System.Windows.Forms.Label label1;
    416     private System.Windows.Forms.Label label4;
    417     private System.Windows.Forms.TabPage tabStatistics;
    418     private System.Windows.Forms.Label label5;
    419     private System.Windows.Forms.Label label8;
    420     private System.Windows.Forms.Label label7;
    421     private System.Windows.Forms.Label label6;
    422     private System.Windows.Forms.TextBox txtUserName;
    423     private System.Windows.Forms.TextBox txtUserLastActivity;
    424     private System.Windows.Forms.TextBox txtUserRole;
    425     private System.Windows.Forms.TextBox txtUserEmail;
    426     private System.Windows.Forms.TextBox txtUserPriority;
    427     private System.Windows.Forms.TextBox txtUserCalculatedJobs;
    428     private System.Windows.Forms.TextBox txtUserExecutionTime;
    429     private System.Windows.Forms.TabControl tabUserDetails;
    430     private System.Windows.Forms.TabPage tabUserInformation;
    431     private System.Windows.Forms.TabPage tabUserJobs;
    432     private HiveExperimentManagerView hiveExperimentManagerView;
    43396    private System.ComponentModel.IContainer components;
    43497    private System.Windows.Forms.ImageList imageListUsers;
    435     private UpdateControl updateControl2;
    43698    private System.Windows.Forms.TabPage tabSlaves;
    437     private ResourcesView resourcesView;
     99
    438100  }
    439101}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/HiveAdministrationView.cs

    r6373 r6437  
    6969        //updateSlaveGroups.UpdateAction = new Action(Content.UpdateSlaveGroups);  //??
    7070        UpdateResources();
    71 
    72         ShowUsers();
    73       }
    74     }
    75 
    76     private void ShowUsers() {
    77       lstUsers.SmallImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.User);
    78 
    79       foreach (string user in Content.Users) {
    80         ListViewItem lvi = new ListViewItem();
    81         lvi.Tag = user;
    82         lvi.Text = user;
    83         lvi.ImageIndex = 0;
    84         lstUsers.Items.Add(lvi);
    8571      }
    8672    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ResourcesView.Designer.cs

    r6373 r6437  
    5050      this.imageListSlaveGroups = new System.Windows.Forms.ImageList(this.components);
    5151      this.splitSlaves = new System.Windows.Forms.SplitContainer();
     52      this.updateSlaveGroup = new HeuristicLab.Clients.Hive.Administration.Views.Common.UpdateControl();
    5253      this.btnSave = new System.Windows.Forms.Button();
    5354      this.btnRemoveGroup = new System.Windows.Forms.Button();
     
    5657      this.tabSlaveGroup = new System.Windows.Forms.TabControl();
    5758      this.tabDetails = new System.Windows.Forms.TabPage();
     59      this.slaveView = new HeuristicLab.Clients.Hive.Administration.Views.SlaveView();
    5860      this.tabSchedule = new System.Windows.Forms.TabPage();
    59       this.tabJobs = new System.Windows.Forms.TabPage();
    60       this.updateSlaveGroup = new UpdateControl();
    61       this.slaveView = new SlaveView();
    62       this.updateScheduleControl = new UpdateControl();
    63       this.scheduleView = new ScheduleView();
    64       this.updateJobs = new UpdateControl();
    65       this.hiveJobListViewSlaves = new HeuristicLab.Clients.Hive.Views.HiveJobListView();
     61      this.updateScheduleControl = new HeuristicLab.Clients.Hive.Administration.Views.Common.UpdateControl();
     62      this.scheduleView = new HeuristicLab.Clients.Hive.Administration.Views.ScheduleView();
    6663      ((System.ComponentModel.ISupportInitialize)(this.splitSlaves)).BeginInit();
    6764      this.splitSlaves.Panel1.SuspendLayout();
     
    7168      this.tabDetails.SuspendLayout();
    7269      this.tabSchedule.SuspendLayout();
    73       this.tabJobs.SuspendLayout();
    7470      this.SuspendLayout();
    7571      //
     
    10298      this.splitSlaves.SplitterDistance = 249;
    10399      this.splitSlaves.TabIndex = 3;
     100      //
     101      // updateSlaveGroup
     102      //
     103      this.updateSlaveGroup.Location = new System.Drawing.Point(94, 3);
     104      this.updateSlaveGroup.Name = "updateSlaveGroup";
     105      this.updateSlaveGroup.Size = new System.Drawing.Size(75, 24);
     106      this.updateSlaveGroup.TabIndex = 6;
     107      this.updateSlaveGroup.UpdateAction = null;
    104108      //
    105109      // btnSave
     
    160164      this.tabSlaveGroup.Controls.Add(this.tabDetails);
    161165      this.tabSlaveGroup.Controls.Add(this.tabSchedule);
    162       this.tabSlaveGroup.Controls.Add(this.tabJobs);
    163166      this.tabSlaveGroup.Location = new System.Drawing.Point(3, 3);
    164167      this.tabSlaveGroup.Name = "tabSlaveGroup";
     
    166169      this.tabSlaveGroup.Size = new System.Drawing.Size(585, 541);
    167170      this.tabSlaveGroup.TabIndex = 1;
     171      this.tabSlaveGroup.SelectedIndexChanged += new System.EventHandler(this.tabSlaveGroup_SelectedIndexChanged);
    168172      //
    169173      // tabDetails
     
    177181      this.tabDetails.Text = "Details";
    178182      this.tabDetails.UseVisualStyleBackColor = true;
     183      //
     184      // slaveView
     185      //
     186      this.slaveView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     187                  | System.Windows.Forms.AnchorStyles.Right)));
     188      this.slaveView.Caption = "SlaveView";
     189      this.slaveView.Content = null;
     190      this.slaveView.Location = new System.Drawing.Point(7, 7);
     191      this.slaveView.Name = "slaveView";
     192      this.slaveView.ReadOnly = false;
     193      this.slaveView.Size = new System.Drawing.Size(564, 210);
     194      this.slaveView.TabIndex = 0;
    179195      //
    180196      // tabSchedule
     
    190206      this.tabSchedule.UseVisualStyleBackColor = true;
    191207      //
    192       // tabJobs
    193       //
    194       this.tabJobs.Controls.Add(this.updateJobs);
    195       this.tabJobs.Controls.Add(this.hiveJobListViewSlaves);
    196       this.tabJobs.Location = new System.Drawing.Point(4, 22);
    197       this.tabJobs.Name = "tabJobs";
    198       this.tabJobs.Padding = new System.Windows.Forms.Padding(3);
    199       this.tabJobs.Size = new System.Drawing.Size(577, 515);
    200       this.tabJobs.TabIndex = 2;
    201       this.tabJobs.Text = "Jobs";
    202       this.tabJobs.UseVisualStyleBackColor = true;
    203       //
    204       // updateSlaveGroup
    205       //
    206       this.updateSlaveGroup.Location = new System.Drawing.Point(94, 3);
    207       this.updateSlaveGroup.Name = "updateSlaveGroup";
    208       this.updateSlaveGroup.Size = new System.Drawing.Size(75, 24);
    209       this.updateSlaveGroup.TabIndex = 6;
    210       this.updateSlaveGroup.UpdateAction = null;
    211       //
    212       // slaveView
    213       //
    214       this.slaveView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    215                   | System.Windows.Forms.AnchorStyles.Right)));
    216       this.slaveView.Caption = "SlaveView";
    217       this.slaveView.Content = null;
    218       this.slaveView.Location = new System.Drawing.Point(7, 7);
    219       this.slaveView.Name = "slaveView";
    220       this.slaveView.ReadOnly = false;
    221       this.slaveView.Size = new System.Drawing.Size(564, 210);
    222       this.slaveView.TabIndex = 0;
    223       //
    224208      // updateScheduleControl
    225209      //
     
    243227      this.scheduleView.Size = new System.Drawing.Size(568, 473);
    244228      this.scheduleView.TabIndex = 0;
    245       //
    246       // updateJobs
    247       //
    248       this.updateJobs.Location = new System.Drawing.Point(7, 3);
    249       this.updateJobs.Name = "updateJobs";
    250       this.updateJobs.Size = new System.Drawing.Size(75, 24);
    251       this.updateJobs.TabIndex = 1;
    252       this.updateJobs.UpdateAction = null;
    253       //
    254       // hiveJobListViewSlaves
    255       //
    256       this.hiveJobListViewSlaves.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    257                   | System.Windows.Forms.AnchorStyles.Left)
    258                   | System.Windows.Forms.AnchorStyles.Right)));
    259       this.hiveJobListViewSlaves.Caption = "JobItemList View";
    260       this.hiveJobListViewSlaves.Content = null;
    261       this.hiveJobListViewSlaves.Location = new System.Drawing.Point(7, 26);
    262       this.hiveJobListViewSlaves.Name = "hiveJobListViewSlaves";
    263       this.hiveJobListViewSlaves.ReadOnly = false;
    264       this.hiveJobListViewSlaves.Size = new System.Drawing.Size(573, 557);
    265       this.hiveJobListViewSlaves.TabIndex = 0;
    266229      //
    267230      // ResourcesView
     
    279242      this.tabDetails.ResumeLayout(false);
    280243      this.tabSchedule.ResumeLayout(false);
    281       this.tabJobs.ResumeLayout(false);
    282244      this.ResumeLayout(false);
    283245
     
    293255    private System.Windows.Forms.TabPage tabDetails;
    294256    private System.Windows.Forms.TabPage tabSchedule;
    295     private System.Windows.Forms.TabPage tabJobs;
    296     private UpdateControl updateJobs;
    297     private HeuristicLab.Clients.Hive.Views.HiveJobListView hiveJobListViewSlaves;
    298257    private SlaveView slaveView;
    299258    private System.Windows.Forms.ImageList imageListSlaveGroups;
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ResourcesView.cs

    r6373 r6437  
    2424using System.Linq;
    2525using System.Windows.Forms;
     26using HeuristicLab.Clients.Hive.Views;
    2627using HeuristicLab.Core;
    2728using HeuristicLab.Core.Views;
    2829using HeuristicLab.MainForm;
    29 using HeuristicLab.Clients.Hive.Views;
    3030
    3131namespace HeuristicLab.Clients.Hive.Administration.Views {
     
    122122      if (e.Node.Tag.GetType() == typeof(Slave)) {
    123123        scheduleView.ResourceId = ((Slave)e.Node.Tag).Id;
     124        if (tabSlaveGroup.SelectedIndex == 1) {
     125          UpdateSchedule();
     126        }
    124127      } else if (e.Node.Tag is SlaveGroup) {
    125128        slaveView.Content.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(SlaveViewContent_PropertyChanged);
     
    149152      if (treeSlaveGroup.SelectedNode != null && treeSlaveGroup.SelectedNode.Tag != null) {
    150153        Resource res = (Resource)treeSlaveGroup.SelectedNode.Tag;
    151         Content.Remove(res);
    152154
    153155        if (res is Slave) {
     156          Content.Remove(res);
    154157          ServiceLocator.Instance.CallHiveService(service => service.DeleteSlave(res.Id));
    155158        } else if (res is SlaveGroup) {
    156159          //only delete empty groups
    157           if (Content.Where(s => s.ParentResourceId == res.Id).Count() < 0) {
     160          if (Content.Where(s => s.ParentResourceId == res.Id).Count() < 1) {
     161            Content.Remove(res);
    158162            ServiceLocator.Instance.CallHiveService(service => service.DeleteSlaveGroup(res.Id));
    159163          } else {
    160             MessageBox.Show("Only empty groups can be deleted.");
     164            MessageBox.Show("Only empty groups can be deleted.", "HeuristicLab Hive Administration", MessageBoxButtons.OK, MessageBoxIcon.Error);
    161165          }
    162166        }
     
    168172        if (res is SlaveGroup && res.Id == Guid.Empty) {
    169173          SlaveGroup slaveGroup = (SlaveGroup)res;
    170           ServiceLocator.Instance.CallHiveService(service => service.AddSlaveGroup(slaveGroup));
     174          ServiceLocator.Instance.CallHiveService(service => slaveGroup.Id = service.AddSlaveGroup(slaveGroup));
    171175        }
    172176        if (res.Id != Guid.Empty && res.Modified) {
     
    198202            if (newNode.Tag != null && newNode.Tag is Slave) {
    199203              Slave slave = (Slave)newNode.Tag;
    200               if (slave.ParentResourceId != sgrp.Id) {
     204
     205              if (sgrp.Id == Guid.Empty) {
     206                ServiceLocator.Instance.CallHiveService(service => sgrp.Id = service.AddSlaveGroup(sgrp));
     207              }
     208
     209              if (slave.ParentResourceId == null || (slave.ParentResourceId != null && slave.ParentResourceId != sgrp.Id)) {
    201210                slave.ParentResourceId = sgrp.Id;
    202211                OnContentChanged();
     
    257266      }
    258267    }
     268
     269    private void tabSlaveGroup_SelectedIndexChanged(object sender, EventArgs e) {
     270      if (tabSlaveGroup.SelectedIndex == 1) {
     271        UpdateSchedule();
     272      }
     273    }
    259274  }
    260275}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ScheduleView.cs

    r6373 r6437  
    4444    public List<HiveAppointment> offlineTimes = new List<HiveAppointment>();
    4545
    46 
    4746    //delegate fired, if a dialog is being closed
    4847    public delegate void OnDialogClosedDelegate(RecurrentEvent e);
    4948
    50     public Guid ResourceId { get; set; }
     49    private Guid resourceId;
     50    public Guid ResourceId {
     51      get {
     52        return resourceId;
     53      }
     54      set {
     55        resourceId = value;
     56      }
     57    }
    5158
    5259    public ScheduleView() {
     
    319326            RecurringId = app.RecurringId,
    320327            StartDate = app.StartDate,
    321             ResourceId = ResourceId
     328            ResourceId = resourceId
    322329          };
    323330          appointments.Add(apdto);
     
    336343      }
    337344    }
    338 
    339     #region Event Handlers
    340     // TODO: Put event handlers here
    341     #endregion
    342345  }
    343346}
Note: See TracChangeset for help on using the changeset viewer.