Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFilePartials/_Experiment.cshtml @ 13712

Last change on this file since 13712 was 13712, checked in by jlodewyc, 8 years ago

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

File size: 4.0 KB
Line 
1@model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel
2@{System.Random randomizer = new Random();
3    int randy = randomizer.Next(5000); }
4<div style="margin-left:20px;margin-right:20px">
5    <div class="row" style="text-align:center">
6        @Model.message
7    </div>
8    <div class="row" style="text-align:left">
9        <h1 data-toggle="tooltip" title=" @Model.SelectedTask.ItemTask.ItemName
10            @Model.SelectedTask.ItemTask.Description ">
11            <span class="label label-danger">Experiment: @Model.SelectedTask.ItemTask.Name</span>
12        </h1>
13        <a class="btn btn-success" id="fakehiveadd" onclick="addtoHive()">Add to Hive</a>
14
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>
41    </div>
42    <h4>
43        Children: @Model.SelectedExperiment.Optimizers.Count
44    </h4>
45    <p class="text-center">
46        <input type="checkbox" checked data-toggle="toggle" data-onstyle="danger"
47               onchange="toggleChild([], @randy)" />
48        Distribute child tasks
49    </p>
50    <div id="childs@(randy)">
51        @for (var i = 0; i < Model.SelectedExperiment.Optimizers.Count; i++)
52        {
53            @if (Model.SelectedExperiment.Optimizers[i] is HeuristicLab.Optimization.IAlgorithm)
54            {
55                @Html.Partial("OpenFilePartials/_AlgorithmSmall",
56                    new HeuristicLab.Clients.Hive.WebJobManager.Models.AlgorithmContainer(
57                    ((HeuristicLab.Optimization.IAlgorithm)Model.SelectedExperiment.Optimizers[i]),
58                    new List<int[]>(),
59                    new int[] { i, 0 },
60                    randomizer));
61
62            }
63            else if (Model.SelectedExperiment.Optimizers[i] is HeuristicLab.Optimization.BatchRun)
64            {
65                @Html.Partial("OpenFilePartials/_BatchRunSmall",
66                    new HeuristicLab.Clients.Hive.WebJobManager.Models.BatchRunContainer(
67                    ((HeuristicLab.Optimization.BatchRun)Model.SelectedExperiment.Optimizers[i]),
68                    new List<int[]>(),
69                    new int[] { i, 0 },
70                    randomizer)) ;
71
72            }
73            else if (Model.SelectedExperiment.Optimizers[i] is HeuristicLab.Optimization.Experiment)
74            {
75                @Html.Partial("OpenFilePartials/_ExperimentSmall",
76                    new HeuristicLab.Clients.Hive.WebJobManager.Models.ExperimentContainer(
77                    ((HeuristicLab.Optimization.Experiment)Model.SelectedExperiment.Optimizers[i]),
78                    new List<int[]>(),
79                    new int[] { i, 0 },
80                    randomizer)) ;
81
82            }
83
84        }
85    </div>
86    <script type="text/javascript">
87
88        $(document).ready(function () {
89            $('[data-toggle="tooltip"]').tooltip();
90        });
91    </script>
92</div>
Note: See TracBrowser for help on using the repository browser.