Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/18 11:47:37 (6 years ago)
Author:
abeham
Message:

#2817: updated to trunk r16140

Location:
branches/2817-BinPackingSpeedup
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup

  • branches/2817-BinPackingSpeedup/HeuristicLab.Clients.Hive.JobManager

    • Property svn:mergeinfo set to (toggle deleted branches)
      /branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.JobManagermergedeligible
      /stable/HeuristicLab.Clients.Hive.JobManagermergedeligible
      /trunk/HeuristicLab.Clients.Hive.JobManagermergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.Clients.Hive.JobManager10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.Clients.Hive.JobManager5516-5520
      /branches/Async/HeuristicLab.Clients.Hive.JobManager13329-15286
      /branches/Benchmarking/sources/HeuristicLab.Clients.Hive.JobManager6917-7005
      /branches/CloningRefactoring/HeuristicLab.Clients.Hive.JobManager4656-4721
      /branches/CodeEditor/HeuristicLab.Clients.Hive.JobManager11700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.Clients.Hive.JobManager5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Clients.Hive.JobManager5815-6180
      /branches/DataAnalysis/HeuristicLab.Clients.Hive.JobManager4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.Clients.Hive.JobManager10085-11101
      /branches/GP.Grammar.Editor/HeuristicLab.Clients.Hive.JobManager6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Clients.Hive.JobManager5060
      /branches/HLScript/HeuristicLab.Clients.Hive.JobManager10331-10358
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Clients.Hive.JobManager11570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Clients.Hive.JobManager6123-9799
      /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Clients.Hive.JobManager11130-12721
      /branches/HiveProjectManagement/HeuristicLab.Clients.Hive.JobManager15377-15760
      /branches/HiveStatistics/sources/HeuristicLab.Clients.Hive.JobManager12440-12877
      /branches/LogResidualEvaluator/HeuristicLab.Clients.Hive.JobManager10202-10483
      /branches/NET40/sources/HeuristicLab.Clients.Hive.JobManager5138-5162
      /branches/NSGA-II Changes/HeuristicLab.Clients.Hive.JobManager12033-12122
      /branches/ParallelEngine/HeuristicLab.Clients.Hive.JobManager5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Clients.Hive.JobManager7568-7810
      /branches/QAPAlgorithms/HeuristicLab.Clients.Hive.JobManager6350-6627
      /branches/Restructure trunk solution/HeuristicLab.Clients.Hive.JobManager6828
      /branches/RuntimeOptimizer/HeuristicLab.Clients.Hive.JobManager8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Clients.Hive.JobManager7787-8333
      /branches/SlaveShutdown/HeuristicLab.Clients.Hive.JobManager8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Clients.Hive.JobManager10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.Clients.Hive.JobManager5370-5682
      /branches/Trunk/HeuristicLab.Clients.Hive.JobManager6829-6865
      /branches/UnloadJobs/HeuristicLab.Clients.Hive.JobManager9168-9215
      /branches/VNS/HeuristicLab.Clients.Hive.JobManager5594-5752
      /branches/crossvalidation-2434/HeuristicLab.Clients.Hive.JobManager12948-12950
      /branches/histogram/HeuristicLab.Clients.Hive.JobManager5959-6341
      /branches/symbreg-factors-2650/HeuristicLab.Clients.Hive.JobManager14232-14825
  • branches/2817-BinPackingSpeedup/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/JobManagerMenuItem.cs

    r16140 r16141  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Windows.Forms;
     25using HeuristicLab.Clients.Access;
    2426using HeuristicLab.MainForm;
    2527using HeuristicLab.Optimizer;
    2628
    2729namespace HeuristicLab.Clients.Hive.JobManager {
    28   public class JobManagerMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
     30  public class JobManagerMenuItem : MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    2931    public override string Name {
    3032      get { return "&Job Manager"; }
    3133    }
     34
    3235    public override IEnumerable<string> Structure {
    3336      get { return new string[] { "&Services", "&Hive" }; }
    3437    }
     38
    3539    public override void Execute() {
    36       MainFormManager.MainForm.ShowContent(HiveClient.Instance);
     40      if (HiveRoles.CheckHiveUserPermissions()) {
     41        MainFormManager.MainForm.ShowContent(HiveClient.Instance);
     42      } else if (!UserInformation.Instance.UserExists) {
     43        MessageBox.Show(
     44          "Couldn't fetch user information from the server." + Environment.NewLine +
     45          "Please verify that you have an existing user and that your user name and password is correct.",
     46          "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
     47      } else {
     48        MessageBox.Show(
     49          "You do not seem to have the permissions to use the Hive Job Manager." + Environment.NewLine +
     50          "If that's not the case or you have any questions please write an email to support@heuristiclab.com",
     51          "HeuristicLab Hive Job Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
     52      }
    3753    }
     54
    3855    public override int Position {
    3956      get { return 10000; }
    4057    }
     58
    4159    public override Keys ShortCutKeys {
    4260      get { return Keys.Control | Keys.H; }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/RunInHiveMenuItem.cs

    r16140 r16141  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using System.Threading;
     26using System.Windows.Forms;
     27using HeuristicLab.Clients.Hive.JobManager.Views;
    2528using HeuristicLab.Core;
    2629using HeuristicLab.MainForm;
     
    8285      task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun;
    8386
    84       progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive...");
    85       rJob.Progress = progress;
    86       progress.ProgressStateChanged += progress_ProgressStateChanged;
     87      var hiveResourceSelectorDialog = new HiveResourceSelectorDialog(rJob.Job.Id, rJob.Job.ProjectId);
    8788
    88       HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken());
     89      if (HiveClient.Instance.Projects.Count == 1) {
     90        var project = HiveClient.Instance.Projects.FirstOrDefault();
     91        if (project != null && project.Id != Guid.Empty)
     92          hiveResourceSelectorDialog.SelectedProjectId = project.Id;
     93      }
     94
     95      if (hiveResourceSelectorDialog.ShowDialog((UserControl)activeView) == DialogResult.OK) {
     96        var selectedProject = hiveResourceSelectorDialog.SelectedProject;
     97        if (selectedProject != null) {
     98          rJob.Job.ProjectId = selectedProject.Id;
     99          rJob.Job.ResourceIds = hiveResourceSelectorDialog.SelectedResources.Select(x => x.Id).ToList();
     100
     101          progress = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToContent(this.content, "Uploading to Hive...");
     102          rJob.Progress = progress;
     103          progress.ProgressStateChanged += progress_ProgressStateChanged;
     104
     105          HiveClient.StartJob(new Action<Exception>(HandleEx), rJob, new CancellationToken());
     106        }
     107      }
    89108    }
    90109
Note: See TracChangeset for help on using the changeset viewer.