Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/16/16 16:57:46 (8 years ago)
Author:
jlodewyc
Message:

#2582 Distribution childs and priority done. Display current jobs and start graphs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs

    r13696 r13712  
    3838            try
    3939            {
    40 
    41                 vm.userJobs = client.GetJobs();
     40                HiveClientWeb.Instance.Refresh();
     41
     42                vm.userJobs = HiveClientWeb.Instance.Jobs.ToList();
    4243            }
    4344            catch (Exception e)
     
    5758            if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
    5859            {
    59                 vm.userJobs = client.GetJobs();
    60                 vm.selectedJob = client.GetJob(id);
    61 
    62                 vm.lightJobTasks = client.GetLightweightJobTasks(id);
    63                 foreach (var light in vm.lightJobTasks)
    64                 {
    65                     vm.filledJobTasks.Add(client.GetTask(light.Id));
    66                 }
    67                 ViewBag.Title = vm.selectedJob.Name + " - Jobs";
     60                HiveClientWeb.Instance.Refresh();
     61
     62                vm.userJobs = HiveClientWeb.Instance.Jobs.ToList();
     63                foreach(var j in vm.userJobs)
     64                {
     65                    if(j.Id == id)
     66                    {
     67                        vm.selectedJob = j;
     68                    }
     69                }
     70                vm.selectedJob.RefreshAutomatically = true;
     71                HiveClientWeb.LoadJob(vm.selectedJob);
     72                ViewBag.Title = vm.selectedJob.Job.Name + " - Jobs";
    6873                return View("Index", vm);
    6974            }
     
    8186                vm.message = client.GetJob(id).Name + " deleted";
    8287                client.DeleteJob(id);
    83                 vm.userJobs = client.GetJobs();
     88                HiveClientWeb.Instance.Refresh();
     89
     90                vm.userJobs = HiveClientWeb.Instance.Jobs.ToList();
    8491                ViewBag.Title = "Jobs";
    8592                return View("Index", vm);
Note: See TracChangeset for help on using the changeset viewer.