Changeset 1723


Ignore:
Timestamp:
04/30/09 14:44:00 (12 years ago)
Author:
aleitner
Message:

update process with jobs and users are now with correct pictures and problems with update fixed (#600)

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

Legend:

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

    r1657 r1723  
    117117      if (cf) {
    118118        this.Visible = true;
     119        ServiceLocator.ShutDownFacade();
    119120        if (error == true) {
    120121          lblError.Text = "Something went wrong with the server";
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerManagementConsole.cs

    r1717 r1723  
    5757    private Job currentJob = null;
    5858    private ClientInfo currentClient = null;
     59    TreeNode currentNode = null;
    5960
    6061    //TODO delete
     
    6263    private string nameCurrentClient = "";
    6364    private bool flagJob = false;
    64     private bool flagClient = false;
    6565
    6666    private List<Changes> changes = new List<Changes>();
     
    248248      }
    249249
     250      if (currentNode != null) {
     251        lvClientControl.Items.Clear();
     252        lvClientControl.Groups.Clear();
     253        AddGroupsToListView(currentNode);
     254      }
    250255      tvClientControl.ExpandAll();
    251256    }
     
    263268      foreach (Resource resource in clientGroup.Resources) {
    264269        if (resource is ClientInfo) {
    265           ListViewItem lvi = new ListViewItem(resource.Name, 0, lvg);
     270          int percentageUsage = CapacityRam(((ClientInfo)resource).NrOfCores, ((ClientInfo)resource).NrOfFreeCores);
     271          int usage = 3;
     272          if ((((ClientInfo)resource).State != State.offline) &&
     273            (((ClientInfo)resource).State != State.nullState)) {
     274            if ((percentageUsage >= 0) && (percentageUsage <= 25)) {
     275              usage = 0;
     276            } else if ((percentageUsage > 25) && (percentageUsage <= 75)) {
     277              usage = 1;
     278            } else if ((percentageUsage > 75) && (percentageUsage <= 100)) {
     279              usage = 2;
     280            }
     281          }
     282          ListViewItem lvi = new ListViewItem(resource.Name, usage, lvg);
    266283          lvi.Tag = resource as ClientInfo;
    267284          clientGroupList.Add(lvi);
     
    457474              JobClicked();
    458475            }
     476            foreach (Job job in jobs.List) {
     477              if (job.Id == change.ID) {
     478                lvJobControl.Items[i].Tag = job;
     479                break;
     480              }
     481            }
    459482            State state = jobs.List[change.Position].State;
    460483            System.Diagnostics.Debug.WriteLine(lvJobControl.Items[i].Text.ToString());
     
    579602    private void OnLVClientClicked(object sender, EventArgs e) {
    580603      nameCurrentClient = lvClientControl.SelectedItems[0].Tag.ToString();
    581       flagClient = true;
    582604      ClientClicked();
    583605    }
     
    864886      lvClientControl.Items.Clear();
    865887      lvClientControl.Groups.Clear();
     888      currentNode = e.Node;
    866889      AddGroupsToListView(e.Node);
    867890    }
  • trunk/sources/HeuristicLab.Hive.Server.Console/3.2/ServiceLocator.cs

    r1579 r1723  
    4040      return serverConsoleFacade;
    4141    }
     42
     43    internal static void ShutDownFacade() {
     44      serverConsoleFacade = null;
     45    }
    4246  }
    4347}
Note: See TracChangeset for help on using the changeset viewer.