Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13733


Ignore:
Timestamp:
03/24/16 17:19:13 (8 years ago)
Author:
jlodewyc
Message:

#2582 Last fixes Job Manager

Location:
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager
Files:
28 added
34 edited

Legend:

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

    r13689 r13733  
    88namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
    99{
     10    /// <summary>
     11    /// Controller for initial landing page
     12    /// </summary>
    1013    public class HomeController : Controller
    1114    {
    12         private ILoginViewModelService loginViewModelService;
     15        private LoginViewModelService loginViewModelService;
    1316        private HiveServiceClient client;
    1417        public HomeController(ILoginViewModelService loginViewModelService)
    1518        {
    16             this.loginViewModelService = loginViewModelService;
     19            this.loginViewModelService = (LoginViewModelService)loginViewModelService;
    1720        }
     21        #region Login
     22        /// <summary>
     23        /// Opens initial home page
     24        /// </summary>
     25        /// <returns>View from home page</returns>
    1826        public IActionResult Index()
    1927        {
    2028            ViewBag.Title = "Login";
     29            loginViewModelService.clear();
    2130            return View(loginViewModelService.GetLoginViewModel());
    2231        }
    23         public IActionResult Login(string loginName, string password)
     32        /// <summary>
     33        /// Checks login
     34        /// </summary>
     35        /// <param name="loginName">Login name</param>
     36        /// <param name="password">Login password</param>
     37        /// <returns>Logged in view if correct or shows error</returns>
     38        public IActionResult Login(string loginName, string password)//Checks login
    2439        {
    2540            if (!string.IsNullOrEmpty(loginName) && !string.IsNullOrEmpty(password))
    2641            {
    2742                var model = loginViewModelService.GetLoginViewModel();
    28                 HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance;
     43                HiveServiceLocatorWeb hiveServiceLocator = (HiveServiceLocatorWeb)HiveServiceLocatorWeb.Instance;
    2944                HeuristicLab.Clients.Common.Properties.Settings.Default.UserName = loginName;
    3045                HeuristicLab.Clients.Common.Properties.Settings.Default.Password = Common.CryptoService.EncryptString(password);
     
    3752                    var test = client.GetJobs();//Throws messageSecurityException if login failss
    3853                    ViewBag.Title = "Login succesful";
    39                     return View("LoginHome");
     54                   
     55                    return RedirectToAction("Index","Job");
    4056                }
    4157                catch(MessageSecurityException e)
     
    5571            }
    5672        }
     73        public IActionResult Logout()
     74        {
     75            return RedirectToAction("Index","Home");
     76        }
     77        #endregion
    5778    }
    5879}
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs

    r13714 r13733  
    1818namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
    1919{
     20    /// <summary>
     21    /// Controller for everything Job related (includes uploads and uploader)
     22    /// </summary>
    2023    public class JobController : Controller
    2124    {
     
    2629        public JobController(IHostingEnvironment env)
    2730        {
    28             HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance;
     31            HiveServiceLocatorWeb hiveServiceLocator = (HiveServiceLocatorWeb)HiveServiceLocatorWeb.Instance;
    2932            client = hiveServiceLocator.getHiveServiceClient();
    3033            vm = new JobViewModel();
     
    3437        }
    3538        #region Jobs
     39        /// <summary>
     40        /// initial job page, shows all jobs
     41        /// </summary>
     42        /// <returns></returns>
    3643        public IActionResult Index()
    3744        {
     
    4653                if (e is MessageSecurityException || e is InvalidOperationException)
    4754                {
    48                     HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
     55                    HiveServiceLocatorWeb.SetLoginErrorMessage();
    4956                    return RedirectToAction("Index", "Home");
    5057                }
     
    5461            return View(vm);
    5562        }
     63        /// <summary>
     64        /// Initial page and a selected job
     65        /// </summary>
     66        /// <param name="id">Job id selected</param>
     67        /// <returns></returns>
    5668        public IActionResult Selected(Guid id)
    5769        {
    58             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     70            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    5971            {
    6072                HiveClientWeb.Instance.Refresh();
     
    7789            else
    7890            {
    79                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
    80                 return RedirectToAction("Index", "Home");
    81             }
    82         }
    83         public IActionResult Delete(Guid id)// delete a job
    84         {
    85             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     91                HiveServiceLocatorWeb.SetLoginErrorMessage();
     92                return RedirectToAction("Index", "Home");
     93            }
     94        }
     95        /// <summary>
     96        /// Deletes a job
     97        /// </summary>
     98        /// <param name="id">Job id</param>
     99        /// <returns></returns>
     100        public IActionResult Delete(Guid id)
     101        {
     102            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    86103            {
    87104
     
    96113            else
    97114            {
    98                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
     115                HiveServiceLocatorWeb.SetLoginErrorMessage();
    99116                return RedirectToAction("Index", "Home");
    100117            }
     
    103120
    104121        #region Uploads
     122        /// <summary>
     123        /// Shows the uploaded directories
     124        /// </summary>
     125        /// <returns></returns>
    105126        public IActionResult Uploads()
    106127        {
    107             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     128            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    108129            {
    109130                UploadedJobViewModel upper = new UploadedJobViewModel();
    110131                fillUploadsPaths(upper, -1);
    111 
     132                ViewBag.Name = client.ClientCredentials.UserName.UserName;
    112133                ViewBag.Title = "Uploaded files";
    113134                return View("Uploads", upper);
     
    115136            else
    116137            {
    117                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
    118                 return RedirectToAction("Index", "Home");
    119             }
    120         }
     138                HiveServiceLocatorWeb.SetLoginErrorMessage();
     139                return RedirectToAction("Index", "Home");
     140            }
     141        }
     142        /// <summary>
     143        /// //Shows content of selected dir
     144        /// </summary>
     145        /// <param name="index">Array index selected directory</param>
     146        /// <returns></returns>
    121147        public IActionResult UploadDir(int index)
    122148        {
    123             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     149            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    124150            {
    125151                UploadedJobViewModel upper = new UploadedJobViewModel();
     
    131157            else
    132158            {
    133                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
    134                 return RedirectToAction("Index", "Home");
    135             }
    136         }
     159                HiveServiceLocatorWeb.SetLoginErrorMessage();
     160                return RedirectToAction("Index", "Home");
     161            }
     162        }
     163        /// <summary>
     164        /// Loads all the paths from the selected uploads folder
     165        /// </summary>
     166        /// <param name="vm">Viewmodel to save every directory path</param>
     167        /// <param name="index">Index selected directory</param>
    137168        private void fillUploadsPaths(UploadedJobViewModel vm, int index)
     169           
    138170        {
    139171            var tempdex = index; //Fix when maps gets deleted
     
    165197            }
    166198        }
     199        /// <summary>
     200        /// Deletes a file
     201        /// </summary>
     202        /// <param name="index">Index directory</param>
     203        /// <param name="filedex">Index file to delete</param>
     204        /// <returns></returns>
    167205        public IActionResult DeleteFile(int index, int filedex)
    168206        {
    169             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     207            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    170208            {
    171209                UploadedJobViewModel upper = new UploadedJobViewModel();
     
    183221            else
    184222            {
    185                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
    186                 return RedirectToAction("Index", "Home");
    187             }
    188         }
    189 
     223                HiveServiceLocatorWeb.SetLoginErrorMessage();
     224                return RedirectToAction("Index", "Home");
     225            }
     226        }
     227        /// <summary>
     228        /// Opens a selected file
     229        /// </summary>
     230        /// <param name="index">Index directory</param>
     231        /// <param name="filedex">Index selected file</param>
     232        /// <returns></returns>
    190233        public IActionResult OpenFile(int index, int filedex)
    191234        {
    192             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     235            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    193236            {
    194237                UploadedJobViewModel upper = new UploadedJobViewModel();
     
    221264            else
    222265            {
    223                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
    224                 return RedirectToAction("Index", "Home");
    225             }
    226         }
    227 
     266                HiveServiceLocatorWeb.SetLoginErrorMessage();
     267                return RedirectToAction("Index", "Home");
     268            }
     269        }
     270        /// <summary>
     271        /// Adds current opened file to hive, uses FileOpeningService singleton
     272        /// </summary>
     273        /// <returns></returns>
    228274        public IActionResult AddToHive()
    229275        {
    230             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     276            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    231277            {
    232278                    var job = FileOpeningService.Instance.AddCurrentModelToHive();
     
    241287            else
    242288            {
    243                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
     289                HiveServiceLocatorWeb.SetLoginErrorMessage();
    244290                return RedirectToAction("Index", "Home");
    245291            }
     
    248294        /* public async Task<IActionResult> DownloadFile(int index, int filedex)
    249295         {
    250              if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     296             if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    251297             {
    252298                 UploadedJobViewModel upper = new UploadedJobViewModel();
     
    269315             else
    270316             {
    271                  HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
     317                 HiveServiceLocatorWeb.SetLoginErrorMessage();
    272318                 return RedirectToAction("Index", "Home");
    273319             }
     
    277323
    278324        #region Uploader
    279         public IActionResult Uploader()
    280         {
    281             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
    282             {
    283                 ViewBag.Title = "Upload Jobs";
    284                 ViewBag.Name = client.ClientCredentials.UserName.UserName;
    285                 return View("Uploader");
    286             }
    287             else
    288             {
    289                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
    290                 return RedirectToAction("Index", "Home");
    291             }
    292         }
     325
     326        /// <summary>
     327        /// Uploads file onto server directory
     328        /// </summary>
     329        /// <param name="files">Files</param>
     330        /// <param name="directory">Directory path for server</param>
     331        /// <returns></returns>
    293332        [HttpPost]
    294333        public async Task<IActionResult> Uploader(ICollection<IFormFile> files, string directory)
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs

    r13689 r13733  
    1717        public ResourceController(IHostingEnvironment env)
    1818        {
    19             HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance;
     19            HiveServiceLocatorWeb hiveServiceLocator = (HiveServiceLocatorWeb)HiveServiceLocatorWeb.Instance;
    2020            client = hiveServiceLocator.getHiveServiceClient();
    2121
     
    2424        public IActionResult Index()
    2525        {
    26             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     26            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    2727            {
    2828
     
    3232            else
    3333            {
    34                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
     34                HiveServiceLocatorWeb.SetLoginErrorMessage();
    3535                return RedirectToAction("Index", "Home");
    3636            }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs

    r13689 r13733  
    1717        public UserController(IHostingEnvironment env)
    1818        {
    19             HiveServiceLocatorWebManagerService hiveServiceLocator = (HiveServiceLocatorWebManagerService)HiveServiceLocatorWebManagerService.Instance;
     19            HiveServiceLocatorWeb hiveServiceLocator = (HiveServiceLocatorWeb)HiveServiceLocatorWeb.Instance;
    2020            client = hiveServiceLocator.getHiveServiceClient();
    2121
     
    2424        public IActionResult Index()
    2525        {
    26             if (((HiveServiceLocatorWebManagerService)(HiveServiceLocatorWebManagerService.Instance)).CheckLogin())
     26            if (((HiveServiceLocatorWeb)(HiveServiceLocatorWeb.Instance)).CheckLogin())
    2727            {
    2828               
     
    3232            else
    3333            {
    34                 HiveServiceLocatorWebManagerService.SetLoginErrorMessage();
     34                HiveServiceLocatorWeb.SetLoginErrorMessage();
    3535                return RedirectToAction("Index", "Home");
    3636            }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/AlgorithmContainer.cs

    r13712 r13733  
    77namespace HeuristicLab.Clients.Hive.WebJobManager.Models
    88{
     9    /// <summary>
     10    /// Used for file opening, contains algorithm, depth and random
     11    /// </summary>
    912    public class AlgorithmContainer
    1013    {
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/BatchRunContainer.cs

    r13696 r13733  
    77namespace HeuristicLab.Clients.Hive.WebJobManager.Models
    88{
     9    /// <summary>
     10    /// Used for file opening, contains batch run, depth and random
     11    /// </summary>
    912    public class BatchRunContainer
    10     {
     13    {//used by file opening
    1114        public BatchRun batch { get; set; }
    1215        public List<int[]> depth { get; set; }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/ExperimentContainer.cs

    r13696 r13733  
    77namespace HeuristicLab.Clients.Hive.WebJobManager.Models
    88{
     9    /// <summary>
     10    /// Used for file opening, contains experiment, depth and random
     11    /// </summary>
    912    public class ExperimentContainer
    1013    {
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/HiveTaskContainer.cs

    r13712 r13733  
    66namespace HeuristicLab.Clients.Hive.WebJobManager.Models
    77{
     8    /// <summary>
     9    /// Used by SelectedJob, contains current hivetask
     10    /// </summary>
    811    public class HiveTaskContainer
    912    {
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/ConcurrentTaskDownloaderWeb.cs

    r13712 r13733  
    2828namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
    2929{
     30
     31    //
    3032  /// <summary>
    31   /// Downloads and deserializes jobs. It avoids too many jobs beeing downloaded or deserialized at the same time to avoid memory problems
     33  /// Rewritten to use HiveServiceLocatorWeb and HiveClientWeb
    3234  /// </summary>
    3335  public class ConcurrentTaskDownloaderWeb<T> : IDisposable where T : class, ITask {
     
    7072      Task t = null;
    7173      HiveClientWeb.TryAndRepeat(() => {
    72         t = HiveServiceLocatorWebManagerService.Instance.CallHiveService(s => s.GetTask((Guid)taskId));
     74        t = HiveServiceLocatorWeb.Instance.CallHiveService(s => s.GetTask((Guid)taskId));
    7375      }, Settings.Default.MaxRepeatServiceCalls, "Failed to download task.");
    7476      return t;
     
    8587        if (abort) return null;
    8688        HiveClientWeb.TryAndRepeat(() => {
    87           result = HiveServiceLocatorWebManagerService.Instance.CallHiveService(s => s.GetTaskData(task.Id));
     89          result = HiveServiceLocatorWeb.Instance.CallHiveService(s => s.GetTaskData(task.Id));
    8890        }, Settings.Default.MaxRepeatServiceCalls, "Failed to download task data.");
    8991      }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/TaskDownloaderWeb.cs

    r13712 r13733  
    2727
    2828namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports {
     29
     30    /// <summary>
     31    /// Rewritten to use HiveClientWeb and HiveServiceLocatorWeb
     32    /// </summary>
    2933  public class TaskDownloaderWeb : IDisposable {
    3034    private IEnumerable<Guid> taskIds;
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/LoginViewModelService.cs

    r13656 r13733  
    3333        }
    3434
    35         public void destroy()
     35        public void clear()
    3636        {
    37             instance = null;
    3837            vm = null;
     38            HiveServiceLocatorWeb.clear();
    3939        }
    4040    }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Startup.cs

    r13689 r13733  
    2929            this.hostingEnvironment = hostingEnvironment;
    3030        }
    31         // This method gets called by the runtime. Use this method to add services to the container.
    32         // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
    33         public void ConfigureServices(IServiceCollection services)
     31         public void ConfigureServices(IServiceCollection services)
    3432        {
    3533
    3634            services.AddMvc();
    3735            services.AddSingleton<ILoginViewModelService, LoginViewModelService>();
    38             services.AddSingleton<IHiveServiceLocator, HiveServiceLocatorWebManagerService>();
     36            services.AddSingleton<IHiveServiceLocator, HiveServiceLocatorWeb>();
    3937            services.AddSignalR();
    4038        }
    4139
    42         // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
    43         public void Configure(IApplicationBuilder app)
     40       public void Configure(IApplicationBuilder app)
    4441        {
    4542           
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/LoginViewModel.cs

    r13656 r13733  
    77namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
    88{
     9    /// <summary>
     10    /// Used for login
     11    /// </summary>
    912    public class LoginViewModel
    1013    {
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Home/Index.cshtml

    r13689 r13733  
    66        <div class="col-xs-offset-4 col-sm-4" >
    77            <div class="form-login">
    8                 <h4>Welcome to Heuristic Lab Hive</h4>
     8                <h4>Welcome to HeuristicLab Hive</h4>
    99                <form asp-controller="Home" asp-action="Login" method="POST">
    10                     <label asp-for="loginName"></label>
    11                     <input type="text" asp-for="loginName" class="form-control input-sm chat-input" />
    12                     <label asp-for="password"></label>
    13                     <input type="password" asp-for="password" class="form-control input-sm chat-input" />
     10                    <i class="fa fa-user"></i>
     11                    <label asp-for="loginName">
     12
     13                    </label>
     14                    <input
     15                           type="text"
     16                           asp-for="loginName"
     17                           class="form-control input-sm chat-input" />
     18                    <i class="fa fa-key"></i>
     19                    <label
     20                           asp-for="password">
     21
     22                    </label>
     23                    <input
     24                           type="password"
     25                           asp-for="password"
     26                           class="form-control input-sm chat-input" />
    1427                    <br/>
    1528                    <div class="wrapper">
    1629                        <span class="group-btn">
    17                             <button type="submit" class="btn btn-primary btn-md"
    18                                     style="width: 100%">
    19                                 Login
     30                            <button
     31                                    type="submit"
     32                                    class="btn btn-primary btn-md"
     33                                    style="width: 100%;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     34                            text-shadow:2px 2px black;">
     35                                 Login <i class="fa fa-sign-in"></i>
    2036                            </button>
    2137                        </span>
    22                         <span style="color:red"><br/>@Model.errorMessage</span>
     38                        <span style="color:red">
     39                        <br/>@Model.errorMessage
     40                        </span>
    2341                    </div>
    2442                </form>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml

    r13719 r13733  
    1 @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.JobViewModel
     1@using HeuristicLab.Clients.Hive.WebJobManager.ViewModels
     2@model JobViewModel
    23
    34<div>
     5    @Html.Partial("Navbar", new NavbarViewModel("Job"))
    46
    5     <ul class="nav nav-tabs">
    6         <li role="presentation" class="active"><a asp-controller="Job" asp-action="Index">Jobs <span class="badge">@Model.userJobs.Count</span></a></li>
    7         <li role="presentation"><a asp-controller="User" asp-action="Index">User management</a></li>
    8         <li role="presentation"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
     7    <ul class="nav nav-pills nav-justified">
     8        <li role="presentation"
     9            class="active">
     10            <a asp-controller="Job"
     11               asp-action="Index">
     12                Jobs
     13            </a>
     14        </li>
     15        <li role="presentation"
     16            class="">
     17            <a asp-controller="Job"
     18               asp-action="Uploads">
     19                Uploads
     20            </a>
     21        </li>
    922    </ul>
    10     <div class="row" style="text-align:center">
     23
     24    <div class="row"
     25         style="text-align:center">
    1126        @Model.message
    1227    </div>
    13     <div class="row" style="margin:10px">
    14         <a class="btn btn-info btn-lg btn-block"
    15            asp-controller="Job"
    16            asp-action="Uploads">
    17             Uploads
    18         </a>
     28    <div class="row"
     29         style="margin:10px">
     30
    1931    </div>
    20     <div class="row" style="padding:10px; margin-right:0px!important">
     32    <div class="row"
     33         style="padding:10px; margin-right:0px!important">
    2134        @if (Model.userJobs.Count == 0)
    22         {
     35            {
    2336            <div>
    24                 <p style="text-align:center">No jobs found</p>
     37                <p style="text-align:center">
     38                    No jobs found
     39                </p>
    2540            </div>
    2641
     
    2944            <div class="col-sm-4">
    3045                <div class="btn-group-vertical btn-block">
     46                    <a class="btn btn-info btn-lg btn-block disabled"
     47                       style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     48                            text-shadow:2px 2px black;">
     49                        <i class="fa fa-cog"></i> Hive jobs
     50                    </a>
    3151                    @foreach (var job in Model.userJobs)
    3252                {
    33                         <a class="btn  btn-default @(Model.selectedJob != null && job.Id == Model.selectedJob.Id ? "active" : "" )"
     53                        <a class="btn btn-default
     54                           @(Model.selectedJob != null && job.Id == Model.selectedJob.Id ? "active" : "" )
     55                           "
    3456                           asp-controller="Job"
    3557                           asp-action="Selected"
    3658                           asp-route-id="@job.Id"
     59                           style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     60                                text-align:left;"
    3761                           onclick="showLoader()">
    3862                            @job.Job.Name - @job.Job.DateCreated
    39                             <span class="badge">@job.Job.JobCount</span>
     63                            <span class="label
     64                                   @(job.Job.FinishedCount == @job.Job.JobCount ? "label-success" : "label-default")
     65                                   label-as-badge pull-right">
     66                                <strong>@job.Job.FinishedCount / @job.Job.JobCount</strong>
     67                            </span>
    4068                        </a>
    4169                    }
     
    4876                </i>
    4977            </p>
    50             @if (Model.selectedJob != null)
    51             {
    52                 <div class="col-sm-8" id="content" style="padding:5px; padding-left:10px;">
    53                     <div class="row">
    54                         <h2 style="padding-left:20px">
    55                             @Model.selectedJob.Job.Name
    56                             <a onclick="popUpDelete()"
    57                                style="margin-bottom:10px;"
    58                                class='btn btn-danger'>
    59                                 <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
    60                             </a>
    61                             <a style="display:none"
    62                                asp-action="Delete"
    63                                asp-route-id="@Model.selectedJob.Id"
    64                                asp-controller="Job" id="del"
    65                                onclick="showDeleter()"></a>
    6678
    67                             <script type="text/javascript">
    68                                 function popUpDelete() {
    69                                     if (confirm("Are you sure you want to delete this job?") == true) {
    70                                         document.getElementById("del").click();
    71                                     }
     79                <div class="col-sm-8"
     80                     id="content"
     81                     style="padding:5px; padding-left:10px;">
     82                    @if (Model.selectedJob != null)
     83                {
     84                        <div class="panel panel-default"
     85                             style="border-width:2px!important;padding:17px;
     86                        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
     87                            <div class="row">
     88                                <h2 style="padding-left:20px">
     89                                    @Model.selectedJob.Job.Name
     90                                    <a onclick="popUpDelete()"
     91                                       style="margin-bottom:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     92                                    text-shadow:2px 2px black;"
     93                                       class='btn btn-danger'>
     94                                        <span class="glyphicon glyphicon-trash"
     95                                              aria-hidden="true"></span>
     96                                        Delete job
     97                                    </a>
     98                                    <a style="display:none; "
     99                                       asp-action="Delete"
     100                                       asp-route-id="@Model.selectedJob.Id"
     101                                       asp-controller="Job" id="del"
     102                                       onclick="showDeleter()"></a>
     103
     104                                    <script type="text/javascript">
     105                                        function popUpDelete() {
     106                                            if (confirm("Are you sure you want to delete this job?") == true) {
     107                                                document.getElementById("del").click();
     108                                            }
     109
     110                                        }
     111                                    </script>
     112
     113                                </h2>
     114                                <div class="col-sm-6" style="padding-left:30px">
     115                                    <p>Description: @Model.selectedJob.Job.Description</p>
     116                                    <p>Resources: @Model.selectedJob.Job.ResourceNames</p>
     117                                    <p>Created: @Model.selectedJob.Job.DateCreated</p>
     118                                    <p>Owned by: @Model.selectedJob.Job.OwnerUsername</p>
     119
     120                                </div>
     121                                <div class="col-sm-6" style="padding-left:30px">
     122                                    <p id="jobcalculating">
     123                                        Calculating: @Model.selectedJob.Job.CalculatingCount
     124                                    </p>
     125                                    <p id="jobfinished">
     126                                        Finished: @Model.selectedJob.Job.FinishedCount
     127                                    </p>
     128                                    <p>
     129                                        Automatic refresh:
     130                                        <input type="checkbox"
     131                                               checked
     132                                               data-toggle="toggle"
     133                                               data-onstyle="success"
     134                                               id="refreshtogg"
     135                                               onchange="autoRefresh()" />
     136                                    </p>
     137                                </div>
     138
     139                            </div>
     140
     141                            <script src="~/js/scripts/graphs/graphdatacollector.js"></script>
     142                            <script src="~/js/scripts/graphs/graphhubber.js"></script>
     143                            <div class="row" style="text-align:center">
     144
     145                                <div id="graphMain" style="width:100%;height:0px">
     146
     147                                </div>
     148                                <div class="btn btn-lg btn-info"
     149                                     onclick="redrawMain()"
     150                                     style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     151                            text-shadow:2px 2px black;">Refresh main graph</div>
     152                            </div>
     153                            <div class="row">
     154                                <h3 style="padding-left:20px; ">
     155                                    @Model.selectedJob.Job.JobCount Tasks
     156                                </h3>
     157                                @foreach (var task in Model.selectedJob.HiveTasks)
     158                                {
     159                                    @Html.Partial("SelectedJobPartials/_TaskPartial",
     160                           new HeuristicLab.Clients.Hive.WebJobManager.Models.HiveTaskContainer(task))
    72161
    73162                                }
    74                             </script>
     163                            </div>
     164                        </div>
     165                    }
     166                </div>
    75167
    76                         </h2>
    77                         <div class="col-sm-6" style="padding-left:30px">
    78                             <p>Description: @Model.selectedJob.Job.Description</p>
    79                             <p>Resources: @Model.selectedJob.Job.ResourceNames</p>
    80                             <p>Created: @Model.selectedJob.Job.DateCreated</p>
    81                             <p>Owned by: @Model.selectedJob.Job.OwnerUsername</p>
    82 
    83                         </div>
    84                         <div class="col-sm-6" style="padding-left:30px">
    85                             <p>Calculating: @Model.selectedJob.Job.CalculatingCount</p>
    86                             <p>Finished: @Model.selectedJob.Job.FinishedCount</p>
    87                         </div>
    88 
    89                     </div>
    90 
    91                     <script src="~/js/scripts/graphs/graphdatacollector.js"></script>
    92                     <script src="~/js/scripts/graphs/graphhubber.js"></script>
    93                     <div class="row">
    94                         <div class="btn btn-lg btn-info" onclick="redrawMain()">Refresh main graph</div>
    95                         <div id="graphMain" style="width:100%;height:400px">
    96 
    97                         </div>
    98                     </div>
    99                     <div class="row" >
    100                         <h3 style="padding-left:20px; ">Tasks</h3>
    101                         @foreach (var task in Model.selectedJob.HiveTasks)
    102                         {
    103                             @Html.Partial("SelectedJobPartials/_TaskPartial",
    104                            new HeuristicLab.Clients.Hive.WebJobManager.Models.HiveTaskContainer(task))
    105 
    106                         }
    107                     </div>
    108                 </div>
    109             }
    110168        }
    111169        <script type="text/javascript">
    112170            function showLoader() {
     171                document.getElementById("content").style.display = "none";
    113172                document.getElementById("loader").style.display = "";
    114                 document.getElementById("content").style.display = "none";
     173
    115174            }
    116175            function showDeleter() {
     176                document.getElementById("content").style.display = "none";
    117177                document.getElementById("loader").style.display = "";
    118                 document.getElementById("content").style.display = "none";
     178
    119179                document.getElementById("spinner").className = "fa fa-trash-o fa-spin fa-5x";
    120180            }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml

    r13689 r13733  
    11@model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel
    22
    3 <div>
    4 
    5     <ul class="nav nav-tabs">
    6         <li role="presentation" class="active"><a asp-controller="Job" asp-action="Uploads">Jobs -> Uploads -> @Model.SelectedTask.ItemTask.Name</a></li>
    7         <li role="presentation"><a asp-controller="User" asp-action="Index">User management</a></li>
    8         <li role="presentation"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
     3
     4<body class="row"
     5      data-spy="scroll"
     6      data-target="#scrolly"
     7      data-offset-top="500"
     8      onscroll="showScrolly()"
     9      style="margin-bottom:500px;margin-left:1px;margin-right:1px;">
     10
     11    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job"))
     12
     13    <ul class="nav nav-pills nav-justified">
     14        <li role="presentation"
     15            class="">
     16            <a asp-controller="Job"
     17               asp-action="Index">
     18                Jobs
     19            </a>
     20        </li>
     21        <li role="presentation"
     22            class="active">
     23            <a asp-controller="Job"
     24               asp-action="Uploads">
     25                Uploads
     26            </a>
     27        </li>
    928    </ul>
    10     @if (Model.SelectedAlgorithm != null)
    11     {
    12         @Html.Partial("OpenFilePartials/_Algorithm", Model);
    13 
    14     }
    15     else if(Model.SelectedBatchRun != null)
    16     {
    17         @Html.Partial("OpenFilePartials/_BatchRun", Model);
    18 
    19     }
    20     else if(Model.SelectedExperiment != null)
    21     {
    22         @Html.Partial("OpenFilePartials/_Experiment", Model);
    23 
    24     }
    25 
     29    <div class="row"
     30         style="margin-left:20px">
     31        <a class="btn btn-default"
     32           asp-controller="Job"
     33           asp-action="Uploads">
     34            <i class="fa fa-angle-double-left"></i> Back to uploads
     35        </a>
     36    </div>
     37
     38    <div class="col-md-9">
     39        @if (Model.SelectedAlgorithm != null)
     40        {
     41            @Html.Partial("OpenFilePartials/_Algorithm", Model);
     42
     43        }
     44        else if (Model.SelectedBatchRun != null)
     45        {
     46            @Html.Partial("OpenFilePartials/_BatchRun", Model);
     47
     48        }
     49        else if (Model.SelectedExperiment != null)
     50        {
     51            @Html.Partial("OpenFilePartials/_Experiment", Model);
     52
     53        }
     54
     55        <hr style="border-color:gray; margin-top:50px" />
     56        <div id="finish"
     57             style="text-align:center">
     58            <h2>
     59                Hive job information
     60            </h2>
     61            <div class="row"
     62                 style="margin-bottom:20px">
     63
     64                <div class="col-sm-6"
     65                     style="text-align:right">
     66                    <h5>Job name</h5>
     67                </div>
     68                <div class="col-sm-6"
     69                     style="text-align:left">
     70                    <div class="form-group">
     71                        <div class="input-group">
     72                            <input type="text"
     73                                   class="form-control"
     74                                   name="jname"
     75                                   id="jname"
     76                                   placeholder="Job name">
     77                        </div>
     78                    </div>
     79                </div>
     80            </div>
     81            <div class="row"
     82                 style="margin-bottom:20px">
     83                <div class="col-sm-6"
     84                     style="text-align:right">
     85                    <h5>
     86                        Resource
     87                    </h5>
     88                </div>
     89                <div class="col-sm-6"
     90                     style="text-align:left">
     91                    <div class="form-group">
     92                        <div class="input-group">
     93                            <div class="input-group-addon">
     94                                HEAL/
     95                            </div>
     96                            <input type="text"
     97                                   class="form-control"
     98                                   name="resource"
     99                                   id="resource"
     100                                   placeholder="Resource (default: HEAL)">
     101                        </div>
     102                    </div>
     103                </div>
     104            </div>
     105
     106            <div class="row">
     107                <h5 class="col-sm-6"
     108                    style="text-align:right;margin-top:20px">
     109                    Set global job priority
     110                </h5>
     111                <div class="col-sm-6">
     112                    <div class="btn-group pull-left"
     113                         style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     114                            text-shadow:2px 2px black;">
     115                        <button type="button"
     116                                id="prior"
     117                                class="btn btn-info dropdown-toggle"
     118                                data-toggle="dropdown"
     119                                aria-haspopup="true" aria-expanded="false">
     120                            Normal <span class="caret"></span>
     121                        </button>
     122                        <ul class="dropdown-menu"
     123                            style="text-shadow:none">
     124                            <li><a onclick="changePriority([],0,'')">Low</a></li>
     125                            <li><a onclick="changePriority([],1,'')">Normal</a></li>
     126                            <li><a onclick="changePriority([],2,'')">Urgent</a></li>
     127                            <li><a onclick="changePriority([],3,'')">Critical</a></li>
     128                        </ul>
     129                    </div>
     130                </div>
     131            </div>
     132
     133
     134            <a class="btn btn-lg btn-success"
     135               id="fakehiveadd"
     136               onclick="addtoHive()"
     137               style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     138                            text-shadow:2px 2px black;">
     139                Add this job to Hive
     140            </a>
     141
     142
     143
     144            <a class="btn btn-success " id="realhiveadd" asp-controller="Job" asp-action="AddToHive" style="display:none"></a>
     145            <h4 id="result" style="display:none">Start uploading experiment...</h4>
     146            <div class="progress" id="progdiv" style="display:none">
     147
     148                <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"
     149                     id="progress"
     150                     aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%">
     151
     152                </div>
     153            </div>
     154        </div>
     155
     156
     157
     158
     159    </div>
     160    <nav style="margin-top:50px; "
     161         class="col-md-2" id="scrolly">
     162        <ul class="nav nav-pills nav-stacked"
     163            data-spy="affix"
     164            data-offset-top="0">
     165
     166            <li><a href="#top">Top</a></li>
     167            @if (Model.SelectedAlgorithm != null)
     168            {
     169                <li><a href="#algorithm">Algorithm parameters</a></li>
     170                <li><a href="#problem">Problem parameters</a></li>
     171            }
     172            else
     173            {
     174                <li><a href="#tasks">Child tasks</a></li>
     175
     176            }
     177            <li><a href="#finish">Job info and upload</a></li>
     178        </ul>
     179    </nav>
    26180    <script src="~/js/scripts/hubber.js"></script>
    27 </div>
     181    <script>
     182        showScrolly = function () {
     183            document.getElementById("scrolly").style.display = "";
     184
     185        }
     186        $(function () {
     187            $('nav > ul > li > a').click(function () {
     188                if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
     189                    var target = $(this.hash);
     190                    target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
     191                    if (target.length) {
     192                        $('html, body').animate({
     193                            scrollTop: target.offset().top
     194                        }, 1000);
     195                        return false;
     196                    }
     197                }
     198            });
     199        });
     200    </script>
     201</body>
     202
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Algorithm.cshtml

    r13712 r13733  
    88        @Model.message
    99    </div>
    10     <div class="row" style="text-align:left">
    11         <h1 data-toggle="tooltip" title="@Model.SelectedTask.ItemTask.ItemName
     10    <div class="row" style="text-align:center">
     11        <h1 id="top" data-toggle="tooltip" title="@Model.SelectedTask.ItemTask.ItemName
    1212            @Model.SelectedTask.ItemTask.Description">
    1313            <span class="label label-primary">Algorithm: @Model.SelectedTask.ItemTask.Name</span>
    1414        </h1>
    15         <a class="btn btn-success" id="fakehiveadd" onclick="addtoHive()">Add to Hive</a>
    16 
    17         <div class="btn-group">
    18             <button
    19                     type="button"
    20                     id="prior@(randy)"
    21                     class="btn btn-info dropdown-toggle"
    22                     data-toggle="dropdown"
    23                     aria-haspopup="true" aria-expanded="false">
    24                 Normal <span class="caret"></span>
    25             </button>
    26             <ul class="dropdown-menu">
    27                 <li><a onclick="changePriority([],0,@randy)">Low</a></li>
    28                 <li><a onclick="changePriority([],1,@randy)">Normal</a></li>
    29                 <li><a onclick="changePriority([],2,@randy)">Urgent</a></li>
    30                 <li><a onclick="changePriority([],3,@randy)">Critical</a></li>
    31             </ul>
    32         </div>
    33 
    34 
    35         <a class="btn btn-success" id="realhiveadd" asp-controller="Job" asp-action="AddToHive" style="display:none"></a>
    36         <h4 id="result" style="display:none">Start uploading algorithm...</h4>
    37         <div class="progress" id="progdiv" style="display:none">
    38            
    39             <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"
    40                  id="progress"
    41                  aria-valuenow="00" aria-valuemin="0" aria-valuemax="100" style="width:10%">
    42                 40%
    43             </div>
    44         </div>
     15       
    4516    </div>
    4617
    47     <div class="row">
    48         <div class="btn-group-justified">
    49             <a class="btn btn-default active" id="btnprob" onclick="setProb()">Problems</a>
    50             <a class="btn btn-default" id="btnalg" onclick="setAlgo()">Algorithm</a>
    51         </div>
    52     </div>
    53     <div class="row" id="problem">
    54         <div class="col">
    55             <table class="table table-condensed">
    56                 <thead>
    57                     <tr>
    58                         <th>Parameter</th>
    59                         <th>Value</th>
    60                     </tr>
    61                 </thead>
    62                 <tbody>
    63                     @foreach (var prob in Model.SelectedAlgorithm.Problem.Parameters.OrderBy(x => x.Name))
    64                     {
    65                         <tr>
    66                             <td>@prob.Name</td>
    67 
    68                             <td>@prob.ActualValue</td>
    69                         </tr>
    70 
    71                     }
    72                 </tbody>
    73             </table>
    74         </div>
    75     </div>
    76     <div class="row" id="algorithm" style="display:none">
     18    <div class="row" id="algorithm">
    7719
    7820        <div class="col">
    79             <table class="table table-condensed">
     21            <h4>Algorithm parameters</h4>
     22            <table class="table table-condensed"
     23                   style="table-layout:fixed;overflow-wrap:break-word">
    8024                <thead>
    8125                    <tr>
     
    9943
    10044    </div>
     45    <hr style="border-color:gray" />
     46
     47    <div class="row" id="problem">
     48        <div class="col">
     49            <h4>Problem parameters</h4>
     50            <table class="table table-condensed"
     51                   style="table-layout:fixed;overflow-wrap:break-word">
     52                <thead>
     53                    <tr>
     54                        <th>Parameter</th>
     55                        <th>Value</th>
     56                    </tr>
     57                </thead>
     58                <tbody>
     59                    @foreach (var prob in Model.SelectedAlgorithm.Problem.Parameters.OrderBy(x => x.Name))
     60                    {
     61                        <tr>
     62                            <td>@prob.Name</td>
     63
     64                            <td>@prob.ActualValue</td>
     65                        </tr>
     66
     67                    }
     68                </tbody>
     69            </table>
     70        </div>
     71    </div>
     72   
     73   
    10174    <script type="text/javascript">
    102        
    103         function setProb() {
    104             resetAll();
    105             document.getElementById("problem").style.display = "";
    106             document.getElementById("btnprob").className += " active";
    107 
    108         }
    109         function setAlgo() {
    110             resetAll();
    111             document.getElementById("algorithm").style.display = "";
    112             document.getElementById("btnalg").className += " active";
    113         }
    114 
    115 
    116         function resetAll() {
    117             document.getElementById("problem").style.display = "none";
    118             document.getElementById("algorithm").style.display = "none";
    119             document.getElementById("btnprob").className = document.getElementById("btnprob").className.replace(/(?:^|\s)active(?!\S)/g, '');
    120             document.getElementById("btnalg").className = document.getElementById("btnalg").className.replace(/(?:^|\s)active(?!\S)/g, '');
    121         }
    12275        $(document).ready(function () {
    12376            $('[data-toggle="tooltip"]').tooltip();
    12477        });
    12578    </script>
     79
    12680</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_AlgorithmSmall.cshtml

    r13714 r13733  
    1313       href="#collapseExample@(randomal)"
    1414       aria-expanded="false"
    15        aria-controls="collapseExample@(randomal)">
     15       aria-controls="collapseExample@(randomal)"
     16       style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     17                            text-shadow:2px 2px black;">
    1618        @Model.algo.Name
    1719    </a>
    18    
     20
    1921</p>
    20 <div class="collapse" id="collapseExample@(randomal)" style="margin-left:10px;margin-right:10px;margin-top:-10px">
     22<div class="collapse"
     23     id="collapseExample@(randomal)"
     24     style="margin-left:10px;margin-right:10px;margin-top:-10px">
     25
    2126    <img src="~/img/accoladealg.png" style="width:100%;" />
    22     <div class="panel panel-primary" style="border-width:2px!important;
    23 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    24 text-shadow:none">
     27
     28    <div class="panel panel-primary"
     29         style="border-width:2px!important;
     30        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     31        text-shadow:none">
    2532        <div class="panel-heading panel-primary text-center">
    2633            <p>@Model.algo.Description</p>
    2734
    28             <div class="btn-group">
     35            <div class="btn-group"
     36                 style="text-shadow:none">
    2937                <button type="button"
    3038                        id="prior@(randomal)"
     
    4250            </div>
    4351        </div>
    44         <table class="table table-responsive card-block" style="table-layout:fixed;overflow-wrap:break-word">
     52        <h4>Algorithm parameters</h4>
     53        <table class="table table-condensed"
     54               style="table-layout:fixed;overflow-wrap:break-word">
     55            <thead>
     56                <tr>
     57                    <th>Parameter</th>
     58                    <th>Value</th>
     59                </tr>
     60            </thead>
     61            <tbody>
     62                @foreach (var par in Model.algo.Parameters.OrderBy(x => x.Name))
     63                {
     64                    <tr>
     65                        <td>@par.Name</td>
     66
     67                        <td>@par.ActualValue</td>
     68                    </tr>
     69
     70                }
     71            </tbody>
     72        </table>
     73        <hr style="border-color:gray" />
     74        <h4>Problem parameters</h4>
     75        <table class="table table-responsive card-block"
     76               style="table-layout:fixed;overflow-wrap:break-word">
    4577            <thead>
    4678                <tr>
     
    6193            </tbody>
    6294        </table>
    63         <table class="table table-condensed" style="table-layout:fixed;overflow-wrap:break-word">
    64             <thead>
    65                 <tr>
    66                     <th>Parameter</th>
    67                     <th>Value</th>
    68                 </tr>
    69             </thead>
    70             <tbody>
    71                 @foreach (var par in Model.algo.Parameters.OrderBy(x => x.Name))
    72                 {
    73                     <tr>
    74                         <td>@par.Name</td>
    7595
    76                         <td>@par.ActualValue</td>
    77                     </tr>
    7896
    79                 }
    80             </tbody>
    81         </table>
    8297    </div>
    8398</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRun.cshtml

    r13712 r13733  
    66        @Model.message
    77    </div>
    8     <div class="row" style="text-align:left">
    9         <h1 data-toggle="tooltip" title="@Model.SelectedTask.ItemTask.ItemName
     8    <div class="row"
     9         style="text-align:center">
     10        <h1 id="top"
     11            data-toggle="tooltip"
     12            title="@Model.SelectedTask.ItemTask.ItemName
    1013            @Model.SelectedTask.ItemTask.Description ">
    11             <span class="label label-warning ">Batch: @Model.SelectedBatchRun.Name</span>
     14            <span class="label label-warning "
     15                  style="text-shadow:2px 2px black;">
     16                Batch: @Model.SelectedBatchRun.Name
     17            </span>
    1218        </h1>
    13         <a class="btn btn-success" id="fakehiveadd" onclick="addtoHive()">Add to Hive</a>
    14 
    15         <div class="btn-group">
    16             <button type="button"
    17                     id="prior@(randy)"
    18                     class="btn btn-info dropdown-toggle"
    19                     data-toggle="dropdown"
    20                     aria-haspopup="true" aria-expanded="false">
    21                 Normal <span class="caret"></span>
    22             </button>
    23             <ul class="dropdown-menu">
    24                 <li><a onclick="changePriority([],0,@randy)">Low</a></li>
    25                 <li><a onclick="changePriority([],1,@randy)">Normal</a></li>
    26                 <li><a onclick="changePriority([],2,@randy)">Urgent</a></li>
    27                 <li><a onclick="changePriority([],3,@randy)">Critical</a></li>
    28             </ul>
    29         </div>
    30 
    31         <a class="btn btn-success" id="realhiveadd" asp-controller="Job" asp-action="AddToHive" style="display:none"></a>
    32         <h4 id="result" style="display:none">Start uploading batch run...</h4>
    33         <div class="progress" id="progdiv" style="display:none">
    34 
    35             <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"
    36                  id="progress"
    37                  aria-valuenow="00" aria-valuemin="0" aria-valuemax="100" style="width:10%">
    38                 40%
    39             </div>
    40         </div>
    4119    </div>
    42     <h4>
     20    <h4 id="tasks">
    4321        Repeats: @Model.SelectedBatchRun.Repetitions x
    4422
    4523    </h4>
    4624    <p class="text-center">
    47         <input type="checkbox" checked data-toggle="toggle" data-onstyle="warning"
     25        <input type="checkbox"
     26               checked
     27               data-toggle="toggle"
     28               data-onstyle="warning"
    4829               onchange="toggleChild([], @randy)" />
    4930        Distribute child tasks
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRunSmall.cshtml

    r13714 r13733  
    1616       href="#collapseExample@(randombr)"
    1717       aria-expanded="false"
    18        aria-controls="collapseExample@(randombr)">
     18       aria-controls="collapseExample@(randombr)"
     19        style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     20                            text-shadow:2px 2px black;">
    1921        @Model.batch.Name
    2022    </a>
     
    2628     
    2729     >
    28     <img src="~/img/accoladebatch.png" style="width:100%" />
     30    <img src="~/img/accoladebatch.png"
     31         style="width:100%" />
     32
    2933    <div class="panel panel-warning"
    3034         style="border-color:#f6cd94!important; border-width:2px!important;
    31 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    32 text-shadow:2px 2px black">
     35            box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     36            text-shadow:2px 2px black">
    3337        <div class="panel-heading  text-center">
    3438            <p class="panel-title">
     
    3842
    3943
    40                 <input type="checkbox" checked data-toggle="toggle" data-onstyle="warning"
     44                <input type="checkbox"
     45                       checked
     46                       data-toggle="toggle"
     47                       data-onstyle="warning"
    4148                       onchange="toggleChild(@builder, @randombr)" />
    4249                Distribute child tasks
    4350
    4451            </p>
    45             <div class="btn-group">
     52            <div class="btn-group"
     53                 style="text-shadow:none">
     54
    4655                <button type="button"
    4756                        id="prior@(randombr)"
    4857                        class="btn btn-info dropdown-toggle"
    4958                        data-toggle="dropdown"
    50                         aria-haspopup="true" aria-expanded="false">
     59                        aria-haspopup="true"
     60                        aria-expanded="false">
    5161                    Normal <span class="caret"></span>
    5262                </button>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Experiment.cshtml

    r13712 r13733  
    22@{System.Random randomizer = new Random();
    33    int randy = randomizer.Next(5000); }
    4 <div style="margin-left:20px;margin-right:20px">
     4
     5
     6<div style="margin-left:20px;margin-right:20px; ">
    57    <div class="row" style="text-align:center">
    68        @Model.message
    79    </div>
    8     <div class="row" style="text-align:left">
    9         <h1 data-toggle="tooltip" title=" @Model.SelectedTask.ItemTask.ItemName
     10    <div class="row" style="text-align:center">
     11        <h1 id="top"
     12            data-toggle="tooltip"
     13            title=" @Model.SelectedTask.ItemTask.ItemName
    1014            @Model.SelectedTask.ItemTask.Description ">
    11             <span class="label label-danger">Experiment: @Model.SelectedTask.ItemTask.Name</span>
     15            <span class="label label-danger"
     16                  style="text-shadow:2px 2px black;">
     17                Experiment: @Model.SelectedTask.ItemTask.Name
     18            </span>
    1219        </h1>
    13         <a class="btn btn-success" id="fakehiveadd" onclick="addtoHive()">Add to Hive</a>
    1420
    15 
    16         <div class="btn-group">
    17             <button type="button"
    18                     id="prior@(randy)"
    19                     class="btn btn-info dropdown-toggle"
    20                     data-toggle="dropdown"
    21                     aria-haspopup="true" aria-expanded="false">
    22                 Normal <span class="caret"></span>
    23             </button>
    24             <ul class="dropdown-menu">
    25                 <li><a onclick="changePriority([],0,@randy)">Low</a></li>
    26                 <li><a onclick="changePriority([],1,@randy)">Normal</a></li>
    27                 <li><a onclick="changePriority([],2,@randy)">Urgent</a></li>
    28                 <li><a onclick="changePriority([],3,@randy)">Critical</a></li>
    29             </ul>
    30         </div>
    31         <a class="btn btn-success" id="realhiveadd" asp-controller="Job" asp-action="AddToHive" style="display:none"></a>
    32         <h4 id="result" style="display:none">Start uploading experiment...</h4>
    33         <div class="progress" id="progdiv" style="display:none">
    34 
    35             <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"
    36                  id="progress"
    37                  aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%">
    38 
    39             </div>
    40         </div>
    4121    </div>
    42     <h4>
     22    <h4 id="tasks">
    4323        Children: @Model.SelectedExperiment.Optimizers.Count
    4424    </h4>
     
    8464        }
    8565    </div>
     66
    8667    <script type="text/javascript">
    8768
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_ExperimentSmall.cshtml

    r13714 r13733  
    1313       href="#collapseExample@(randomex)"
    1414       aria-expanded="false"
    15        aria-controls="collapseExample@(randomex)">
     15       aria-controls="collapseExample@(randomex)"
     16       style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     17                            text-shadow:2px 2px black;">
    1618        @Model.exp.Name
    1719    </a>
    1820
    1921</p>
    20 <div class="collapse" id="collapseExample@(randomex)" style="margin-left:10px;margin-right:10px;margin-top:-10px">
    21     <img src="~/img/accoladeexp.png" style="width:100%" />
    22     <div class="panel panel-danger" style="border-color:#c12e2a!important; border-width:2px!important;
    23 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    24 text-shadow:2px 2px black">
     22<div class="collapse"
     23     id="collapseExample@(randomex)"
     24     style="margin-left:10px;margin-right:10px;margin-top:-10px">
     25
     26    <img src="~/img/accoladeexp.png"
     27         style="width:100%" />
     28
     29    <div class="panel panel-danger"
     30         style="border-color:#c12e2a!important; border-width:2px!important;
     31        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     32        text-shadow:2px 2px black">
     33
    2534        <div class="panel-heading panel-danger text-center">
    26             <p class="panel-title">Children: @Model.exp.Optimizers.Count</p>
     35            <p class="panel-title">
     36                Children: @Model.exp.Optimizers.Count
     37            </p>
    2738            <p>
    2839                <label>
    2940
    30                     <input type="checkbox" checked data-toggle="toggle" data-onstyle="danger"
     41                    <input type="checkbox"
     42                           checked
     43                           data-toggle="toggle"
     44                           data-onstyle="danger"
    3145                           onchange="toggleChild(@builder, @randomex)" />
    3246                    Distribute child tasks
    3347                </label>
    3448            </p>
    35             <div class="btn-group">
     49            <div class="btn-group"
     50                 style="text-shadow:none">
    3651                <button type="button"
    3752                        id="prior@(randomex)"
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_AlgTask.cshtml

    r13719 r13733  
    55box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    66text-shadow:2px 2px black">
     7
     8    <script type="text/javascript">//Has to be up front to ensure right order of javascript array
     9        initSaveData("@(Model.hiveTask.Task.Id)",
     10            @Html.Raw(JsonConvert.SerializeObject(Model.hiveTask.Task.StateLog)), "@(Model.hiveTask.ItemTask.Name)");
     11
     12    </script>
     13
     14
    715    <div class="panel-heading"
    816         data-toggle="collapse"
     
    5563                </tr>
    5664                <tr>
    57                     <td></td>
     65                    <td style="word-break:break-all" id="exceptionpar@(Model.hiveTask.Task.Id)">
     66                        <i class="fa fa-cog fa-spin fa-2x" id="spinner"></i>
     67                    </td>
    5868                    <td id="statechangespar@(Model.hiveTask.Task.Id)">
    5969                        <i class="fa fa-cog fa-spin fa-2x" id="spinner"></i>
     70                    </td>
     71                </tr>
     72                <tr style="display:none" id="restarter@(Model.hiveTask.Task.Id)">
     73                    <td><input style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     74                            text-shadow:2px 2px black;"
     75                               id="restarterbtn@(Model.hiveTask.Task.Id)"
     76                               class="btn btn-success"
     77                               type="button"
     78                               onclick="restart('@(Model.hiveTask.Task.Id)');event.cancelBubble=true;"
     79                               value="Restart task"/>
    6080                    </td>
    6181                </tr>
     
    6989                   type="checkbox"
    7090                   data-toggle="toggle"
    71                    data-on="Line"
     91                   data-on="Bar"
    7292                   data-off="Pie"
    7393                   onchange="redrawGraph('@(Model.hiveTask.Task.Id)')" />
     
    7898        </div>
    7999    </div>
    80     <script type="text/javascript">
    81         initSaveData("@(Model.hiveTask.Task.Id)",
    82             @Html.Raw(JsonConvert.SerializeObject(Model.hiveTask.Task.StateLog)));
    83 
    84         document.getElementById("graph@(Model.hiveTask.Task.Id)").style = "width: 100%; height: 400px;";
    85 
    86         Plotly.newPlot('graph@(Model.hiveTask.Task.Id)',
    87             getDataPie("@Model.hiveTask.Task.Id"));
    88     </script>
     100   
    89101</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_BatchTask.cshtml

    r13719 r13733  
    44box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    55text-shadow:2px 2px black">
     6
     7    <script type="text/javascript">        //Has to be up front to ensure right order of javascript array
     8        initSaveData("@(Model.hiveTask.Task.Id)",
     9            @Html.Raw(JsonConvert.SerializeObject(Model.hiveTask.Task.StateLog)), "@(Model.hiveTask.ItemTask.Name)");
     10
     11    </script>
     12
     13
    614    <div class="panel-heading"
    715         data-toggle="collapse"
     
    1422                <tr>
    1523                    <th>Batch run: @Model.hiveTask.ItemTask.Name</th>
    16                     <th style="font-size:large">
     24                    <th style="font-size:large; ">
    1725                        @if (Model.hiveTask.Task.Priority == 0)
    1826                        {
     
    6573                        <i class="fa fa-cog fa-spin fa-2x" id="spinner"></i>
    6674                    </td>
     75                   
     76                </tr>
     77                <tr>
     78                    <td style="word-break:break-all" id="exceptionpar@(Model.hiveTask.Task.Id)">
     79                        <i class="fa fa-cog fa-spin fa-2x" id="spinner"></i>
     80                    </td>
     81                </tr>
     82                <tr style="display:none" id="restarter@(Model.hiveTask.Task.Id)">
     83                    <td>
     84                        <input style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     85                            text-shadow:2px 2px black;"
     86                               id="restarterbtn@(Model.hiveTask.Task.Id)"
     87                               class="btn btn-success"
     88                               type="button"
     89                               onclick="restart('@(Model.hiveTask.Task.Id)');event.cancelBubble=true;"
     90                               value="Restart task"/>
     91                    </td>
    6792                </tr>
    6893            </tbody>
     
    7499                   type="checkbox"
    75100                   data-toggle="toggle"
    76                    data-on="Line"
     101                   data-on="Bar"
    77102                   data-off="Pie"
    78103                   onchange="redrawGraph('@(Model.hiveTask.Task.Id)')">
     
    94119        </div>
    95120    }
    96     <script type="text/javascript">
    97         initSaveData("@(Model.hiveTask.Task.Id)",
    98             @Html.Raw(JsonConvert.SerializeObject(Model.hiveTask.Task.StateLog)));
    99 
    100         document.getElementById("graph@(Model.hiveTask.Task.Id)").style = "width: 100%; height: 400px;";
    101 
    102         Plotly.newPlot('graph@(Model.hiveTask.Task.Id)',
    103             getData("@Model.hiveTask.Task.Id"));
    104 
    105     </script>
     121   
    106122</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_ExpTask.cshtml

    r13719 r13733  
    77text-shadow:2px 2px black"
    88     >
     9
     10   
     11    <script type="text/javascript">//Has to be up front to ensure right order of javascript array
     12        initSaveData("@(Model.hiveTask.Task.Id)",
     13            @Html.Raw(JsonConvert.SerializeObject(Model.hiveTask.Task.StateLog)), "@(Model.hiveTask.ItemTask.Name)");
     14
     15    </script>
     16
     17
    918    <div class="panel-heading"
    1019         data-toggle="collapse"
     
    6877                    </td>
    6978                </tr>
     79                <tr >
     80                    <td style="display:none" id="restarter@(Model.hiveTask.Task.Id)">
     81                        <input style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     82                            text-shadow:2px 2px black;"
     83                               id="restarterbtn@(Model.hiveTask.Task.Id)"
     84                               class="btn btn-success"
     85                               type="button"
     86                               onclick="restart('@(Model.hiveTask.Task.Id)');event.cancelBubble=true;"
     87                               value="Restart task" />
     88                    </td>
     89                    <td style="word-break:break-all" id="exceptionpar@(Model.hiveTask.Task.Id)">
     90                        <i class="fa fa-cog fa-spin fa-2x" id="spinner"></i>
     91                    </td>
     92                </tr>
    7093            </tbody>
    7194        </table>
     
    77100                   data-toggle="toggle"
    78101                   
    79                    data-on="Line"
     102                   data-on="Bar"
    80103                   data-off="Pie"
    81104                   onchange="redrawGraph('@(Model.hiveTask.Task.Id)')">
     
    97120        </div>
    98121    }
    99     <script type="text/javascript">
    100         initSaveData("@(Model.hiveTask.Task.Id)",
    101             @Html.Raw(JsonConvert.SerializeObject(Model.hiveTask.Task.StateLog)));
    102 
    103         document.getElementById("graph@(Model.hiveTask.Task.Id)").style = "width: 100%!important; height: 400px;";
    104 
    105         Plotly.newPlot('graph@(Model.hiveTask.Task.Id)',
    106             getData("@Model.hiveTask.Task.Id"));
    107     </script>
     122   
    108123</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Upload.cshtml

    r13656 r13733  
    33<div>
    44
    5     <ul class="nav nav-tabs">
    6         <li role="presentation" class="active"><a asp-controller="Job" asp-action="Index">Jobs <span class="badge"></span></a></li>
    7         <li role="presentation"><a asp-controller="User" asp-action="Index">User management</a></li>
    8         <li role="presentation"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
    9     </ul>
     5    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job"))
     6
     7
    108    <div style="margin:10px">
    11         <form method="post" asp-action="Upload" asp-controller="Job" enctype="multipart/form-data">
    12             <input onchange="printFiles()" type="file" id="files" name="files" multiple accept=".hl" style="display:none" />
    13             <div onclick="firefilebutton()" class="btn btn-info btn-lg btn-block  ">Choose file(s)</div>
    14             <div class="row" style="margin:10px">
     9
     10        <form method="post"
     11              asp-action="Upload"
     12              asp-controller="Job"
     13              enctype="multipart/form-data">
     14            <input onchange="printFiles()"
     15                   type="file"
     16                   id="files"
     17                   name="files"
     18                   multiple
     19                   accept=".hl"
     20                   style="display:none" />
     21
     22            <div onclick="firefilebutton()"
     23                 class="btn btn-info btn-lg btn-block  ">
     24                Choose file(s)
     25            </div>
     26
     27            <div class="row"
     28                 style="margin:10px">
    1529                <div id="selectedfiles"></div>
    16                    <div style="visibility:hidden;  margin-bottom:10px;" id="del" class='btn btn-danger' onclick='deletefiles()'>
    17                     <span class='glyphicon glyphicon-trash' aria-hidden='true'></span>  Remove files
     30                <div style="visibility:hidden;  margin-bottom:10px;"
     31                     id="del"
     32                     class='btn btn-danger'
     33                     onclick='deletefiles()'>
     34                    <span class='glyphicon glyphicon-trash'
     35                          aria-hidden='true'></span>  Remove files
    1836                </div>
    19                 <input style="visibility:hidden;" id="upl" class="btn btn-lg btn-block btn-success" type="submit" value="Check contents" />
     37                <input style="visibility:hidden;"
     38                       id="upl"
     39                       class="btn btn-lg btn-block btn-success"
     40                       type="submit"
     41                       value="Check contents" />
    2042            </div>
    2143
     
    3759                        "</p>";
    3860                }
    39                
     61
    4062            }
    41             else{
     63            else {
    4264                document.getElementById("upl").style.visibility = "hidden";
    4365                document.getElementById("del").style.visibility = "hidden";
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Uploads.cshtml

    r13689 r13733  
    33<div>
    44
    5     <ul class="nav nav-tabs">
    6         <li role="presentation" class="active"><a asp-controller="Job" asp-action="Index">Jobs -> Uploads</a></li>
    7         <li role="presentation"><a asp-controller="User" asp-action="Index">User management</a></li>
    8         <li role="presentation"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
     5    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job"))
     6
     7    <ul class="nav nav-pills nav-justified">
     8        <li role="presentation"
     9            class="">
     10            <a asp-controller="Job"
     11               asp-action="Index">
     12                Jobs
     13            </a>
     14        </li>
     15        <li role="presentation"
     16            class="active">
     17            <a asp-controller="Job"
     18               asp-action="Uploads">
     19                Uploads
     20            </a>
     21        </li>
    922    </ul>
    10     <div class="row" style="text-align:center">
    11         @Model.message
    12     </div>
    1323    <div class="row" style="margin:10px">
    14         <a class="btn btn-success btn-lg btn-block"
    15            asp-controller="Job"
    16            asp-action="Uploader">
    17             Upload new file(s)
    18         </a>
     24        <div style="text-align:center">@Model.message</div>
     25
    1926    </div>
    2027    <div class="row" style="padding:10px">
     
    2229        {
    2330            <div>
    24                 <p style="text-align:center">No files uploaded</p>
     31                <p style="text-align:center">
     32                    No files uploaded
     33                </p>
     34                <a class="btn btn-success btn-lg btn-block"
     35                   asp-controller="Job"
     36                   asp-action="Uploader"
     37                   style="margin:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     38                            text-shadow:2px 2px black;">
     39                    <i class="fa fa-cloud-upload"></i> Upload new file(s)
     40                </a>
    2541            </div>
    2642
     
    2945            <div class="col-sm-4">
    3046                <div class="btn-group-vertical btn-block">
     47                    <a class="btn btn-success btn-lg btn-block
     48                       @(Model.SelectedIndex == -1 ? "active" : "")
     49                       "
     50                       asp-controller="Job"
     51                       asp-action="UploadDir"
     52                       asp-route-index="-1"
     53                       onclick="showUploader()"
     54                       style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     55                            text-shadow:2px 2px black;">
     56                        <i class="fa fa-cloud-upload"></i> Upload new file(s)
     57                    </a>
    3158                    @for (int i = 0; i < Model.DisplayDatePaths.Count; i++)
    3259                    {
    3360                        <a class="btn  btn-default @(i == Model.SelectedIndex ? "active" : "" )"
     61                           style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);"
    3462                           asp-controller="Job"
    3563                           asp-action="UploadDir"
    36                            asp-route-index="@(i)">
     64                           asp-route-index="@(i)"
     65                           onclick="showDownloader()">
    3766                            @Model.DisplayDatePaths[i]
    3867                        </a>
     
    4170                </div>
    4271            </div>
    43             @if (Model.SelectedIndex != -1)
    44             {
    45                 <div class="col-sm-8">
     72            <p style="display:none"
     73               id="downloader"
     74               class="text-center">
     75                <br /><br /><br /><br /><br /><br /><br />
     76                <i class="fa fa-cloud-download fa-spin fa-5x" id="spinner">
     77                </i>
     78            </p>
     79            <p style="display:none"
     80               id="uploader"
     81               class="text-center">
     82                <br /><br /><br /><br /><br /><br /><br />
     83                <i class="fa fa-cloud-upload fa-spin fa-5x" id="spinner">
     84                </i>
     85            </p>
     86            <p style="display:none"
     87               id="deleter"
     88               class="text-center">
     89                <br /><br /><br /><br /><br /><br /><br />
     90                <i class="fa fa-trash-o fa-spin fa-5x" id="spinner">
     91                </i>
     92            </p>
     93            <div id="content">
     94                @if (Model.SelectedIndex != -1)
     95                {
     96                    <div class="col-sm-8">
    4697
    47                     @for (int i = 0; i < Model.DisplayFilesPaths.Count; i++)
     98                        @for (int i = 0; i < Model.DisplayFilesPaths.Count; i++)
    4899                    {
    49                         <div class="btn-group-justified btn-block">
     100                            <div class="btn-group-justified btn-block">
    50101
    51                             <a class="btn btn-default @(Model.DisplayFilesPaths[i].EndsWith(".hl") ? "" : "disabled" )"
    52                                asp-controller="Job"
    53                                asp-action="OpenFile"
    54                                asp-route-index="@(Model.SelectedIndex)"
    55                                asp-route-filedex="@i"
    56                                style="width:6%">
    57                                 @Model.DisplayFilesPaths[i]
    58                             </a>
    59                             <a id="del"
    60                                class='btn btn-group btn-danger'
    61                                asp-controller="Job"
    62                                asp-action="DeleteFile"
    63                                asp-route-index="@(Model.SelectedIndex)"
    64                                asp-route-filedex="@i" >
    65                                 <span class='glyphicon glyphicon-trash' aria-hidden='true'></span>
    66                             </a>
    67                         </div>
    68                     }
     102                                <a class="btn btn-default @(Model.DisplayFilesPaths[i].EndsWith(".hl") ? "" : "disabled" )"
     103                                   asp-controller="Job"
     104                                   asp-action="OpenFile"
     105                                   asp-route-index="@(Model.SelectedIndex)"
     106                                   asp-route-filedex="@i"
     107                                   style="width:6%;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
     108                                    @Model.DisplayFilesPaths[i]
     109                                </a>
     110                                <a id="del"
     111                                   style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
     112                            text-shadow:2px 2px black;"
     113                                   class='btn btn-group btn-danger'
     114                                   asp-controller="Job"
     115                                   asp-action="DeleteFile"
     116                                   asp-route-index="@(Model.SelectedIndex)"
     117                                   asp-route-filedex="@i"
     118                                   onclick="showDeleter()">
     119                                    <span class='glyphicon glyphicon-trash' aria-hidden='true'></span>
     120                                </a>
     121                            </div>
     122                        }
    69123
    70124
    71                 </div>
     125                    </div>
    72126
    73             }
     127                }
     128                else
     129                {
     130                    <div class="col-sm-8">
     131
     132                        @Html.Partial("UploaderPartial/_UploaderPartial")
     133                    </div>
     134                }
     135            </div>
    74136
    75137        }
    76138    </div>
     139    <script type="text/javascript">
     140        function showDownloader() {
     141            document.getElementById("content").style.display = "none";
     142            document.getElementById("downloader").style.display = "";
     143
     144        }
     145        function showUploader() {
     146            document.getElementById("content").style.display = "none";
     147            document.getElementById("uploader").style.display = "";
     148
     149        }
     150        function showDeleter() {
     151            document.getElementById("content").style.display = "none";
     152            document.getElementById("deleter").style.display = "";
     153        }
     154    </script>
    77155</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Resource/Index.cshtml

    r13689 r13733  
    22<div>
    33
    4     <ul class="nav nav-tabs">
    5         <li role="presentation"><a asp-controller="Job" asp-action="Index">Jobs</a></li>
    6         <li role="presentation"><a asp-controller="User" asp-action="Index">User management</a></li>
    7         <li role="presentation" class="active"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
    8     </ul>
     4    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Resource"))
     5
     6
    97</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Shared/_Layout.cshtml

    r13712 r13733  
    1212    </environment>
    1313    <link href="https://gitcdn.github.io/bootstrap-toggle/2.2.0/css/bootstrap-toggle.min.css" rel="stylesheet">
    14    
     14    <link rel="stylesheet" href="//rawgithub.com/Caged/d3-tip/master/examples/example-styles.css">
    1515</head>
    16 <body>
     16<body >
    1717    <div>
    1818        <nav class="navbar navbar-default navbar-static-top"
     
    3232        <script src="~/js/raphael.js"></script>
    3333        <script src="~/js/plotly.js"></script>
     34        <script src="~/js/moment.js"></script>
     35        <script src="~/js/moment-timezone-with-data.js"></script>
     36        <script src="~/js/d3.js"></script>
     37        <script src="~/js/d3.v3.min.js"></script>
     38        <script src="~/js/d3-gantt-jobstatus.js"></script>
     39        <script src="~/js/d3-tip.js"></script>
    3440        @RenderBody()
    3541    </div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Index.cshtml

    r13689 r13733  
    22<div>
    33
    4     <ul class="nav nav-tabs">
    5         <li role="presentation" ><a asp-controller="Job" asp-action="Index">Jobs</a></li>
    6         <li role="presentation" class="active"><a asp-controller="User" asp-action="Index">User management</a></li>
    7         <li role="presentation"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
    8     </ul>
     4    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User"))
     5
     6
    97</div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/css/StyleSheet.css

    r13712 r13733  
    4646    color:white!important;
    4747}
     48
     49.label-as-badge {
     50    border-radius: 1em;
     51}
     52
     53.bar-off{
     54    fill : #c2c2d6;
     55}
     56.bar-off:hover{
     57    fill : #e0e0eb;
     58}
     59.bar-wait{
     60   
     61    fill : #f0a742;
     62}
     63.bar-wait:hover{
     64    fill : #f4bd71;
     65}
     66.bar-trans{
     67    fill : #80d4ff;
     68}
     69.bar-trans:hover{
     70    fill : #99ddff;
     71}
     72.bar-calc{
     73    fill : #2f6fa6;
     74}
     75.bar-calc:hover{
     76    fill : #3884c7;
     77}
     78.bar-paus{
     79    fill : #47476b;
     80}
     81.bar-paus:hover{
     82    fill : #5c5c8a;
     83}
     84.bar-fin{
     85    fill : #5cb85c;
     86}
     87.bar-fin:hover{
     88    fill : #71c171;
     89}
     90.bar-abo{
     91    fill : #c2302c;
     92}
     93.bar-abo:hover{
     94    fill : #d54944;
     95}
     96.bar-fail{
     97    fill : #c2302c;
     98}
     99.bar-fail:hover{
     100    fill : #d54944;
     101}
     102
     103rect.selection {
     104    stroke          : gray;
     105    stroke-dasharray: 4px;
     106    stroke-opacity  : 0.5;
     107    fill            : transparent;
     108}
     109
     110    /* disable text selection */
     111svg *::selection {
     112    background : transparent;
     113}
     114
     115svg *::-moz-selection {
     116    background:transparent;
     117}
     118
     119svg *::-webkit-selection {
     120    background:transparent;
     121}
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/Scripts/Graphs/GraphDataCollector.js

    r13719 r13733  
    11var dataCollection = [];
    2 
    3 function initSaveData(id, coll) {//initial data save
    4     var temp = dataConversion(coll);
     2var taskStatus = {
     3    "Offline": "bar-off",
     4    "Waiting": "bar-wait",
     5    "Transferring": "bar-trans",
     6    "Calculating": "bar-calc",
     7    "Paused": "bar-paus",
     8    "Finished": "bar-fin",
     9    "Aborted": "bar-abo",
     10    "Failed": "bar-fail"
     11}
     12
     13function initSaveData(id, coll, name) {//initial data save
     14    var temp = dataConversion(coll, name);
    515    temp.unshift(id); //add ID in front of array
    616    dataCollection.push(temp);// [id,timearr, piearr]
    7     console.log("#CREATION: " + id);
    8 }
    9 function saveData(id, coll) {
    10     var temp = dataConversion(coll);
    11     for (var i = 0; i < dataCollection.length; i++) {
    12         if (dataCollection[i][0] == id) {
    13             dataCollection[i][1] = temp[0];
    14             dataCollection[i][2] = temp[1];
     17    // console.log("#CREATION: " + id);
     18}
     19function saveData(id, coll, name) {
     20    var temp = dataConversion(coll, name);
     21    for (var i = 0; i < dataCollection.length; i++) {
     22        if (dataCollection[i][0] == id) {
     23            dataCollection[i][1] = temp[0]; // [data,layout]
     24            dataCollection[i][2] = temp[1]; // data
     25            dataCollection[i][3] = temp[2]; // [tasks, name]
    1526        }
    1627    }
     
    3142        }
    3243    }
    33 
    34 }
    35 function dataConversion(coll) {
    36    
    37    
    38     return [dataConversionLine(coll),dataConversionPie(coll)];
    39 }
    40 function dataConversionLine(coll) {
     44}
     45function getDataGantt(id) {
     46    for (var i = 0; i < dataCollection.length; i++) {
     47        if (dataCollection[i][0] == id) {
     48            return dataCollection[i][3];
     49        }
     50    }
     51}
     52function dataConversion(coll, name) {
     53    var line = dataConversionLine(coll, name);
     54    var pie = dataConversionPie(coll);
     55    var gantt = dataConversionGantt(coll, name);
     56    return [line, pie, gantt];
     57}
     58function dataConversionGantt(coll, nam) {
     59    var tasks = [];
     60    for (var v = 0; v < coll.length; v++) {
     61
     62        var temp = {};
     63        temp.startDate = Date.parse(coll[v].DateTime);
     64        if (v < coll.length - 1)
     65            temp.endDate = Date.parse(coll[v + 1].DateTime);
     66        else {
     67
     68            var dat = Date.parse(coll[v].DateTime);
     69            //console.log(dat);
     70            temp.endDate = dat + 600000;
     71            temp.last = true;
     72        }
     73        temp.taskName = nam;
     74
     75        if (coll[v].State == 0)
     76            temp.status = "Offline";
     77        else if (coll[v].State == 1)
     78            temp.status = "Waiting";
     79        else if (coll[v].State == 2)
     80            temp.status = "Transferring";
     81        else if (coll[v].State == 3)
     82            temp.status = "Calculating";
     83        else if (coll[v].State == 4)
     84            temp.status = "Paused";
     85        else if (coll[v].State == 5)
     86            temp.status = "Finished";
     87        else if (coll[v].State == 6)
     88            temp.status = "Aborted";
     89        else if (coll[v].State == 7)
     90            temp.status = "Failed";
     91        tasks.push(temp);
     92    }
     93    return [tasks, nam];
     94}
     95function dataConversionLine(coll, nam) {
    4196    var xarr = [];
    4297    var yarr = [];
     98
    4399    for (var v = 0; v < coll.length; v++) {
     100
    44101        xarr.push(Date.parse(coll[v].DateTime));
     102        // console.log(xarr[v]);
     103        // xarr[v] = xarr[v] - 3600000;
    45104        if (coll[v].State == 1)
    46105            yarr.push("Waiting");
    47         else if (coll[v].State == 2) 
     106        else if (coll[v].State == 2)
    48107            yarr.push("Transferring");
    49         else if (coll[v].State == 3) 
     108        else if (coll[v].State == 3)
    50109            yarr.push("Calculating");
    51110        else if (coll[v].State == 5)
     
    54113            yarr.push("Failed");
    55114    }
     115
     116
    56117    var data = [{//Time graph
    57118        x: xarr,
     
    59120        type: 'scatter',
    60121        mode: 'lines',
    61         name: 'Task ' ,
    62         connectgaps:true,
    63         line:{shape:'hv'}
     122        name: nam,
     123        connectgaps: true,
     124        line: { shape: 'hvh' }
    64125    }];
    65     layout= {
     126    layout = {
    66127        "showlegend": true,
    67128        "width": "100%",
    68129        "xaxis": {
    69             "autorange": true, 
     130            "autorange": true,
    70131            "range": [
    71                 Date.parse(coll[0].DateTime), 
    72                 Date.parse(coll[coll.length -1].DateTime)
    73             ], 
    74             "title": "Time", 
     132                Date.parse(coll[0].DateTime),
     133                Date.parse(coll[coll.length - 1].DateTime)
     134            ],
     135            "title": "Time",
    75136            "type": "date"
    76137        }
    77138
    78139    }
    79    
    80     return [data,layout];
    81 }
    82 function dataConversionHBar(coll) {
    83     var xarr = [];
    84     var yarr = [];
    85     for (var v = 0; v < coll.length; v++) {
    86         xarr.push(coll[v].DateTime.substr(11, 8));
    87         if (coll[v].State == 1)
    88             yarr.push("Waiting");
    89         else if (coll[v].State == 2)
    90             yarr.push("Transferring");
    91         else if (coll[v].State == 3)
    92             yarr.push("Calculating");
    93         else if (coll[v].State == 5)
    94             yarr.push("Finished");
    95         else if (coll[v].State == 7)
    96             yarr.push("Failed");
    97     }
    98     var data = [{//Time graph
    99         x: xarr,
    100         y: yarr,
    101         type: 'scatter'
    102     }];
    103    
    104     return data;
    105 }
     140
     141    return [data, layout];
     142}
     143
    106144function dataConversionPie(coll) {
    107145    var waiting = 0;
    108146    var transfer = 0;
    109147    var calc = 0;
    110     for (var v = 0; v < coll.length-1; v++) {
    111         if(coll[v].State == 1)
     148    for (var v = 0; v < coll.length - 1; v++) {
     149        if (coll[v].State == 1)
    112150            waiting += Date.parse(coll[v + 1].DateTime) - Date.parse(coll[v].DateTime);
    113         else if (coll[v].State == 2) 
     151        else if (coll[v].State == 2)
    114152            transfer += Date.parse(coll[v + 1].DateTime) - Date.parse(coll[v].DateTime);
    115         else if (coll[v].State == 3) 
     153        else if (coll[v].State == 3)
    116154            calc += Date.parse(coll[v + 1].DateTime) - Date.parse(coll[v].DateTime);
    117155    }
     
    133171    document.getElementById("graph" + val).style.width = "100%";
    134172    document.getElementById("graph" + val).style.height = "400px";
     173    document.getElementById("graph" + val).innerHTML = "";
     174    document.getElementById("graph" + val).style.marginLeft = "0px";
    135175    if (document.getElementById("graphtoggle" + val).checked) {
    136176        setTimeout(function () {
     177
     178            var temp = getDataGantt(val);
     179            var w = $("#graph" + val).parent().width() - 30;
     180            document.getElementById("graph" + val).style.height = "200px";
     181            var gantt = d3.gantt().selector('#graph' + val).height('200').width(w).margin({
     182                top: 20,
     183                right: 40,
     184                bottom: 20,
     185                left: 20
     186            }).drawytitles(false).taskTypes([temp[1]]).taskStatus(taskStatus);
     187            //    document.getElementById("graph" + val).style.marginLeft = "-40px";
     188            gantt(temp[0]);
     189        }, 100);
     190
     191
     192        /* setTimeout(function () {
    137193            Plotly.newPlot('graph' + val, getData(val)[0], getData(val)[1]);
    138         }, 100);
    139         console.log("#REDRAWN LINE: " + val);
     194        }, 100);*/
     195        // console.log("#REDRAWN LINE: " + val);
    140196    } else {
    141197        setTimeout(function () {
     
    144200        //console.log("#REDRAWN PIE: " + val);
    145201    }
    146    
     202
    147203
    148204}
    149205function redrawMain() {
     206    document.getElementById("graphMain").innerHTML = "";
     207
     208    var tempdata = [];
     209    var tempnames = [];
     210    for (var i = 0; i < dataCollection.length; i++) {
     211        var t = dataCollection[i][3][0].slice();
     212        var name =  t[0].taskName.substring(0, 5) + " | " + i + ":";
     213
     214        for (var v = 0; v < t.length; v++) {
     215            t[v].taskName = name;
     216        }
     217        tempdata = tempdata.concat(t);
     218        tempnames = tempnames.concat(name)
     219    }
     220    var h = (tempnames.length * 20) + 100;
     221    document.getElementById("graphMain").style.height = h + "px";
     222
     223    var w = $("#graphMain").parent().width() - 100;
     224
     225    var gantt = d3.gantt().selector("#graphMain").height(h - 50).width(w).taskTypes(tempnames).taskStatus(taskStatus);
     226    document.getElementById("graphMain").style.marginLeft = "20px";
     227    gantt(tempdata);
     228    /* LINE VERSION
    150229    var temp = [];
    151230    var min = dataCollection[0][1][0][0].x[0];
     
    173252    }
    174253     Plotly.newPlot('graphMain', temp, layout);
    175 
    176 
    177 }
     254     */
     255
     256}
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/Scripts/Graphs/GraphHubber.js

    r13719 r13733  
    55    $.connection.hub.start().done(function () {
    66        hubber.server.initConnection();
    7         hubber.server.updateAll();
     7        // hubber.server.updateAll();
    88        redrawMain();
    99    });
    10     hubber.client.processData = function (id, data) {
     10    hubber.client.processData = function (id, data, name) {
    1111        var obj = JSON.parse(data);
     12       
    1213        editTaskData(id, obj);
    13         saveData(id, obj.StateLog);
     14        //console.log(name);
     15        saveData(id, obj.StateLog, name);
     16        console.log("#UPDATED " + id);
     17    }
     18    hubber.client.processJobData = function (calc, fin) {
     19        editJobData(calc, fin);
    1420    }
    1521    hubber.client.requestDone = function () {
    16        
    17         setTimeout(function () {
    18             hubber.server.updateAll();
    19             console.log("#REFRESH ALL");
    20            
    21         }, 5000);
     22        if (document.getElementById("refreshtogg").checked) {
     23            setTimeout(function () {
     24                hubber.server.updateAll();
     25                console.log("#REFRESH ALL");
     26
     27            }, 5000);
     28        }
    2229    }
    2330    //hubber.c
    2431})
    2532
     33function autoRefresh() {
     34    if (document.getElementById("refreshtogg").checked)
     35        hubber.server.updateAll();
     36
     37}
     38function restart(id) {
     39    document.getElementById("restarterbtn" + id).disabled = true;
     40    document.getElementById("restarterbtn" + id).value = "Sending restart request...";
     41    hubber.server.restartTask(id);
     42}
     43function editJobData(c, f) {
     44    $("#jobcalculating").html("Calculating: " + c);
     45    $("#jobfinished").html("Finished: " + f);
     46}
     47
    2648function editTaskData(id, task) {
    2749    //lastupdate
    28     var dat = new Date(task.LastHeartbeat);
    29     $("#lastupdpar" + id).html("Last update: " + dat.toUTCString());
     50    if (task.LastHeartbeat != null) {
     51        var dat = new Date(task.LastHeartbeat);
     52        $("#lastupdpar" + id).html("Last update: " + dat.toUTCString());
     53    }
     54    else
     55        $("#lastupdpar" + id).html("No updates yet");
     56    //task restarter
     57    document.getElementById("restarter" + id).style.display = "none";
    3058    //state
    31     if (task.State == "1") {
     59    if (task.State == "0") {
     60        $("#statepar" + id).css({
     61            'color': 'gray',
     62            'font-weight': 'normal'
     63        });
     64        $("#statepar" + id).html("State: Offline");
     65    }
     66    else if (task.State == "1") {
    3267        $("#statepar" + id).css({
    3368            'color': 'white',
     
    3974        $("#statepar" + id).css({
    4075            'color': 'white',
    41             'font-weight': 'normal'
     76            'font-weight': 'normal',
     77            'text-shadow': '2px 2px black'
    4278        });
    4379        $("#statepar" + id).html("State: Transferring");
     
    5086        $("#statepar" + id).html("State: Calculating");
    5187    }
     88    else if (task.State == "4") {
     89        $("#statepar" + id).css({
     90            'color': 'white',
     91            'font-weight': 'normal'
     92        });
     93        $("#statepar" + id).html("State: Paused");
     94        document.getElementById("restarter" + id).style.display = "";
     95        document.getElementById("restarterbtn" + id).disabled = false;
     96        document.getElementById("restarterbtn" + id).value = "Restart task";
     97    }
    5298    else if (task.State == "5") {
    5399        $("#statepar" + id).css({
    54100            'color': '#009900',
    55             'font-weight': '900'
     101            'font-weight': '900',
     102            'text-shadow': '1px 1px black'
    56103        });
    57104        $("#statepar" + id).html("State: Finished");
    58         var datf = new Date(task.StateLog[task.StateLog.length -1].DateTime);
     105        var datf = new Date(task.StateLog[task.StateLog.length - 1].DateTime);
    59106        $("#lastupdpar" + id).html("Finished: " + datf.toUTCString());
     107    }
     108    else if (task.State == "6") {
     109        $("#statepar" + id).css({
     110            'color': '#e60000',
     111            'font-weight': '900',
     112            'text-shadow': '1px 1px black'
     113        });
     114        $("#statepar" + id).html("State: Aborted");
     115
     116        document.getElementById("restarter" + id).style.display = "";
     117        document.getElementById("restarterbtn" + id).disabled = false;
     118        document.getElementById("restarterbtn" + id).value = "Restart task";
    60119    }
    61120    else if (task.State == "7") {
    62121        $("#statepar" + id).css({
    63             'color': '#df2020',
    64             'font-weight': '900'
     122            'color': '#e60000',
     123            'font-weight': '900',
     124            'text-shadow': '1px 1px black'
    65125        });
    66126        $("#statepar" + id).html("State: Failed");
     127
     128        document.getElementById("restarter" + id).style.display = "";
     129        document.getElementById("restarterbtn" + id).disabled = false;
     130        document.getElementById("restarterbtn" + id).value = "Restart task";
    67131    }
    68    
     132
    69133    //execution time
    70134    $("#executionpar" + id).html(task.ExecutionTime + " executed");
     135    //exception
     136    if (task.StateLog[task.StateLog.length - 1].Exception != null)
     137        if (task.StateLog[task.StateLog.length - 1].Exception != "") {
     138            $("#exceptionpar" + id).html("Exception: " + task.StateLog[task.StateLog.length - 1].Exception)
     139            $("#exceptionpar" + id).css({
     140                'color': '#e60000',
     141                'font-weight': '700',
     142                'text-shadow': '1px 1px black'
     143            });
     144        }
     145        else if (task.State == "6") {
     146            $("#exceptionpar" + id).html("Task is aborted.")
     147            $("#exceptionpar" + id).css({
     148                'color': '#e65c00',
     149                'font-weight': '700',
     150                'text-shadow': '1px 1px black'
     151            });
     152        }
     153        else {
     154            $("#exceptionpar" + id).html("No exceptions");
     155            $("#exceptionpar" + id).css({
     156                'color': 'white',
     157                'text-shadow': '2px 2px black'
     158            });
     159        }
     160    else {
     161        $("#exceptionpar" + id).html("No exceptions");
     162        $("#exceptionpar" + id).css({
     163            'color': 'white',
     164            'text-shadow': '2px 2px black'
     165        });
     166    }
    71167    //state changes
    72     $("#statechangespar" + id).html("Statelogs: "+task.StateLog.length);
     168    $("#statechangespar" + id).html("Statelogs: " + task.StateLog.length);
    73169    //graph title
    74170    var dat1 = new Date(task.StateLog[0].DateTime);
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/Scripts/hubber.js

    r13714 r13733  
    2222function addtoHive() {
    2323
    24     var jobname = prompt("Please enter a job name", "Job");
     24    var jobname = document.getElementById("jname").value;
    2525    if (jobname && jobname != "" && jobname != null) {
    2626        hubber.server.changeName(jobname);
     
    2929        document.getElementById("result").style.display = "";
    3030        document.getElementById("realhiveadd").click();
     31    } else {
     32        alert("Job name not set!");
    3133    }
    3234}
Note: See TracChangeset for help on using the changeset viewer.