Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13735


Ignore:
Timestamp:
03/25/16 12:47:31 (8 years ago)
Author:
jlodewyc
Message:

#2582 finish Job manager functionality. Start overhaul client connections (login, hiveclient and fileopening)

Location:
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager
Files:
1 added
11 deleted
15 edited

Legend:

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

    r13733 r13735  
    258258                }
    259259                serve.setTasks();
     260                ViewBag.JobsCount = serve.Job.Job.JobCount;
    260261                ViewBag.Title = serve.vm.SelectedTask.ItemTask.Name + " - Open file";
    261262
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/JobUpdaterHub.cs

    r13733 r13735  
    3939                looperTasks(t);//starts recursive loop
    4040            }
    41             Clients.All.requestDone();//Final note from server when all tasks are checked.
     41            Clients.Caller.requestDone();//Final note from server when all tasks are checked.
    4242            //Client starts countdown and resends the updateAll when done
    4343            GC.Collect();
     
    4747        public void updateJob()
    4848        {
    49             Clients.All.processJobData(Job.Job.CalculatingCount, Job.Job.FinishedCount);
     49            Clients.Caller.processJobData(Job.Job.CalculatingCount, Job.Job.FinishedCount);
    5050        }
    5151        /// <summary>
     
    7878                    //limits loaded data
    7979                    var json = JsonConvert.SerializeObject(task.Task, settings);
    80                     Clients.All.processData(task.Task.Id, json, task.ItemTask.Name.ToString());
     80                    Clients.Caller.processData(task.Task.Id, json, task.ItemTask.Name.ToString());
    8181                    //data sent to user
    8282                }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/ProgressHub.cs

    r13733 r13735  
    2323        {
    2424
    25             Clients.All.processMessage("Connection Established");
     25            Clients.Caller.processMessage("Connection Established");
    2626            Job = FileOpeningService.Instance.Job;
    2727            Job.Progress.StatusChanged += runHub;
     
    3131        /// </summary>
    3232        /// <param name="name">Job name</param>
    33         public void ChangeName(string name)
     33        public void ChangeNameResource(string name, string resource)
    3434        {
    3535            if (name != null)
    3636                FileOpeningService.Instance.Job.Job.Name = name;
     37            if(resource != null && resource != "")
     38            {
     39                FileOpeningService.Instance.Job.Job.ResourceNames += "/" + resource;
     40            }
    3741        }
    3842        /// <summary>
     
    153157            }
    154158            //send info to client
    155             Clients.All.processMessage(Job.Progress.Status, value);
     159            Clients.Caller.processMessage(Job.Progress.Status, value);
    156160
    157161        }
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml

    r13733 r13735  
    142142                            <script src="~/js/scripts/graphs/graphhubber.js"></script>
    143143                            <div class="row" style="text-align:center">
    144 
     144                                @Html.Partial("_Graphlegend")
    145145                                <div id="graphMain" style="width:100%;height:0px">
    146146
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml

    r13733 r13735  
    22
    33
    4 <body class="row"
     4<body id="top"
     5      class="row"
    56      data-spy="scroll"
    67      data-target="#scrolly"
     
    9697                            <input type="text"
    9798                                   class="form-control"
    98                                    name="resource"
    99                                    id="resource"
    100                                    placeholder="Resource (default: HEAL)">
     99                                   name="jresource"
     100                                   id="jresource"
     101                                   placeholder="Resource (optional)">
    101102                        </div>
    102103                    </div>
     
    164165            data-offset-top="0">
    165166
    166             <li><a href="#top">Top</a></li>
     167            <li><a href="#top"><i class="fa fa-angle-up"></i> Top</a></li>
    167168            @if (Model.SelectedAlgorithm != null)
    168169            {
     
    172173            else
    173174            {
    174                 <li><a href="#tasks">Child tasks</a></li>
    175 
     175                <li><a id="ctasks" href="#tasks">Child tasks </a></li>
     176                <li><a onclick="shower()"><i class="fa fa-eye"></i> Show all tasks</a></li>
     177                <li><a onclick="collapser()"><i class="fa fa-eye-slash"></i> Hide all tasks</a></li>
     178               
    176179            }
    177             <li><a href="#finish">Job info and upload</a></li>
     180            <li><a href="#finish"><i class="fa fa-flag-checkered"></i> Job info and upload</a></li>
    178181        </ul>
    179182    </nav>
     
    197200                }
    198201            });
     202            $('body').click(function () {
     203                if ($("#ctasks").length > 0)
     204                    $("#ctasks").html("<i class='fa fa-sitemap'></i> Tasks (" + $('a[href^="#collapseExample"]').length + ")");
     205            });
     206            $('body').click();
     207           
    199208        });
     209        collapser = function () {
     210            $('.collapse').collapse('hide');
     211
     212        }
     213        shower = function () {
     214            $('.collapse').collapse('show');
     215
     216        }
    200217    </script>
    201218</body>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Algorithm.cshtml

    r13733 r13735  
    99    </div>
    1010    <div class="row" style="text-align:center">
    11         <h1 id="top" data-toggle="tooltip" title="@Model.SelectedTask.ItemTask.ItemName
     11        <h1 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>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRun.cshtml

    r13733 r13735  
    88    <div class="row"
    99         style="text-align:center">
    10         <h1 id="top"
     10        <h1
    1111            data-toggle="tooltip"
    1212            title="@Model.SelectedTask.ItemTask.ItemName
     
    2323    </h4>
    2424    <p class="text-center">
     25        Distribute child tasks
    2526        <input type="checkbox"
    2627               checked
     
    2829               data-onstyle="warning"
    2930               onchange="toggleChild([], @randy)" />
    30         Distribute child tasks
     31       
    3132    </p>
    3233    <div id="childs@(randy)">
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_BatchRunSmall.cshtml

    r13733 r13735  
    4141            <p>
    4242
    43 
     43                Distribute child tasks
    4444                <input type="checkbox"
    4545                       checked
     
    4747                       data-onstyle="warning"
    4848                       onchange="toggleChild(@builder, @randombr)" />
    49                 Distribute child tasks
     49               
    5050
    5151            </p>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Experiment.cshtml

    r13733 r13735  
    99    </div>
    1010    <div class="row" style="text-align:center">
    11         <h1 id="top"
     11        <h1
    1212            data-toggle="tooltip"
    1313            title=" @Model.SelectedTask.ItemTask.ItemName
     
    2424    </h4>
    2525    <p class="text-center">
     26        Distribute child tasks
    2627        <input type="checkbox" checked data-toggle="toggle" data-onstyle="danger"
    2728               onchange="toggleChild([], @randy)" />
    28         Distribute child tasks
     29       
    2930    </p>
    3031    <div id="childs@(randy)">
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_ExperimentSmall.cshtml

    r13733 r13735  
    3737            </p>
    3838            <p>
    39                 <label>
    40 
     39                Distribute child tasks
    4140                    <input type="checkbox"
    4241                           checked
     
    4443                           data-onstyle="danger"
    4544                           onchange="toggleChild(@builder, @randomex)" />
    46                     Distribute child tasks
    47                 </label>
     45                   
     46
    4847            </p>
    4948            <div class="btn-group"
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_AlgTask.cshtml

    r13733 r13735  
    9696            </h4>
    9797            <div id="graph@(Model.hiveTask.Task.Id)"></div>
     98            <div id="legend@(Model.hiveTask.Task.Id)" style="display:none">
     99                @Html.Partial("_Graphlegend")
     100            </div>
    98101        </div>
    99102    </div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_BatchTask.cshtml

    r13733 r13735  
    106106            </h4>
    107107            <div style="text-shadow:none" id="graph@(Model.hiveTask.Task.Id)"></div>
     108            <div id="legend@(Model.hiveTask.Task.Id)" style="display:none">
     109                @Html.Partial("_Graphlegend")
     110            </div>
    108111        </div>
    109112    </div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/SelectedJobPartials/_ExpTask.cshtml

    r13733 r13735  
    107107            </h4>
    108108            <div style="text-shadow:none" id="graph@(Model.hiveTask.Task.Id)"></div>
     109            <div id="legend@(Model.hiveTask.Task.Id)" style="display:none">
     110                @Html.Partial("_Graphlegend")
     111            </div>
    109112        </div>
    110113    </div>
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/Scripts/Graphs/GraphDataCollector.js

    r13733 r13735  
    5151}
    5252function dataConversion(coll, name) {
    53     var line = dataConversionLine(coll, name);
     53    var line = null;//dataConversionLine(coll, name);
    5454    var pie = dataConversionPie(coll);
    5555    var gantt = dataConversionGantt(coll, name);
     
    9393    return [tasks, nam];
    9494}
     95/*
    9596function dataConversionLine(coll, nam) {
    9697    var xarr = [];
     
    140141
    141142    return [data, layout];
    142 }
     143}*/
    143144
    144145function dataConversionPie(coll) {
     
    163164            'Minutes transferring',
    164165            'Minutes calculating'],
    165         type: 'pie'
     166        type: 'pie',
     167        marker: {
     168            colors: ['#f0a742', '#80d4ff', '#2f6fa6']
     169        }
    166170    }];
    167171    return datap;
     
    178182            var temp = getDataGantt(val);
    179183            var w = $("#graph" + val).parent().width() - 30;
    180             document.getElementById("graph" + val).style.height = "200px";
     184            document.getElementById("graph" + val).style.height = "300px";
    181185            var gantt = d3.gantt().selector('#graph' + val).height('200').width(w).margin({
    182186                top: 20,
     
    185189                left: 20
    186190            }).drawytitles(false).taskTypes([temp[1]]).taskStatus(taskStatus);
    187             //    document.getElementById("graph" + val).style.marginLeft = "-40px";
    188191            gantt(temp[0]);
     192           document.getElementById("legend" + val).style.display = "";
    189193        }, 100);
    190194
     
    195199        // console.log("#REDRAWN LINE: " + val);
    196200    } else {
     201        document.getElementById("legend" + val).style.display = "none";
    197202        setTimeout(function () {
    198203            Plotly.newPlot('graph' + val, getDataPie(val));
     
    226231    document.getElementById("graphMain").style.marginLeft = "20px";
    227232    gantt(tempdata);
     233
     234
    228235    /* LINE VERSION
    229236    var temp = [];
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/Scripts/hubber.js

    r13733 r13735  
    2323
    2424    var jobname = document.getElementById("jname").value;
     25    var resource = document.getElementById("jresource").value;
    2526    if (jobname && jobname != "" && jobname != null) {
    26         hubber.server.changeName(jobname);
     27        hubber.server.changeNameResource(jobname, resource);
    2728        document.getElementById("fakehiveadd").style.display = "none";
    2829        document.getElementById("progdiv").style.display = "";
     
    4041    else
    4142        $("#childs" + idchilds).css("display", "none");
     43    $('body').click();
    4244}
    4345function changePriority(arr, prior, idprior) {
Note: See TracChangeset for help on using the changeset viewer.