1 |
|
---|
2 |
|
---|
3 | @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.FileOpeningViewModel
|
---|
4 |
|
---|
5 | <!-- Displays the contents of a file -->
|
---|
6 | <!-- Another body used for the side scroller menu-->
|
---|
7 | <body id="top"
|
---|
8 | class="row "
|
---|
9 | data-spy="scroll"
|
---|
10 | data-target="#scrolly"
|
---|
11 | data-offset-top="500"
|
---|
12 | onscroll="showScrolly()"
|
---|
13 | style="margin-bottom:500px;margin-left:1px;margin-right:1px;">
|
---|
14 | <div id="userId" style="display:none">@ViewBag.SessionId</div>
|
---|
15 | <!-- Main nav menu -->
|
---|
16 | @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job", Model.User))
|
---|
17 |
|
---|
18 | <!-- Job menu-->
|
---|
19 | <ul class="nav nav-pills nav-justified">
|
---|
20 | <li role="presentation"
|
---|
21 | class="">
|
---|
22 | <a asp-controller="Job"
|
---|
23 | asp-action="Index">
|
---|
24 | <i class="fa fa-tasks"></i> Jobs
|
---|
25 | </a>
|
---|
26 | </li>
|
---|
27 | <li role="presentation"
|
---|
28 | class="active">
|
---|
29 | <a asp-controller="Job"
|
---|
30 | asp-action="Uploads">
|
---|
31 | <i class="fa fa-cloud"></i> Uploads
|
---|
32 | </a>
|
---|
33 | </li>
|
---|
34 | </ul>
|
---|
35 | <!-- Back button -->
|
---|
36 | <div class="row"
|
---|
37 | style="margin-left:20px">
|
---|
38 | <a class="btn btn-default"
|
---|
39 | asp-controller="Job"
|
---|
40 | asp-action="Uploads">
|
---|
41 | <i class="fa fa-angle-double-left"></i> Back to uploads
|
---|
42 | </a>
|
---|
43 | </div>
|
---|
44 | @Html.Partial("OpenFilePartials/_Help", Model)
|
---|
45 | <!-- Check model to select right partial, partial handles all subloading -->
|
---|
46 | <div class="col-sm-9">
|
---|
47 | @if (Model.SelectedAlgorithm != null)
|
---|
48 | {
|
---|
49 | @Html.Partial("OpenFilePartials/_Algorithm", Model);
|
---|
50 |
|
---|
51 | }
|
---|
52 | else if (Model.SelectedBatchRun != null)
|
---|
53 | {
|
---|
54 | @Html.Partial("OpenFilePartials/_BatchRun", Model);
|
---|
55 |
|
---|
56 | }
|
---|
57 | else if (Model.SelectedExperiment != null)
|
---|
58 | {
|
---|
59 | @Html.Partial("OpenFilePartials/_Experiment", Model);
|
---|
60 |
|
---|
61 | }
|
---|
62 | <!-- Main menu for job creation -->
|
---|
63 | <hr style="border-color:gray; margin-top:50px" />
|
---|
64 | <div class="row">
|
---|
65 | <div id="finish" class="col-sm-8"
|
---|
66 | style="text-align:center; border-right:1px solid">
|
---|
67 | <h2>
|
---|
68 | Hive job information
|
---|
69 | </h2>
|
---|
70 | <div class="row"
|
---|
71 | style="margin-bottom:20px">
|
---|
72 |
|
---|
73 | <div class="col-sm-6"
|
---|
74 | style="text-align:right">
|
---|
75 | <h5>Job name</h5>
|
---|
76 | </div>
|
---|
77 | <div class="col-sm-6"
|
---|
78 | style="text-align:left">
|
---|
79 | <div class="form-group">
|
---|
80 | <div class="input-group">
|
---|
81 | <input type="text"
|
---|
82 | class="form-control"
|
---|
83 | name="jname"
|
---|
84 | id="jname"
|
---|
85 | placeholder="Job name">
|
---|
86 | </div>
|
---|
87 | </div>
|
---|
88 | </div>
|
---|
89 | </div>
|
---|
90 | <div class="row"
|
---|
91 | style="margin-bottom:20px">
|
---|
92 | <div class="col-sm-6"
|
---|
93 | style="text-align:right">
|
---|
94 | <h5>
|
---|
95 | Resources (optional)
|
---|
96 | </h5>
|
---|
97 | </div>
|
---|
98 | <div class="col-sm-6"
|
---|
99 | style="text-align:left">
|
---|
100 | <div class="form-group">
|
---|
101 | <div class="input-group">
|
---|
102 | <input type="text"
|
---|
103 | class="form-control"
|
---|
104 | name="jresource"
|
---|
105 | id="jresource"
|
---|
106 | placeholder="(seperate with ;)">
|
---|
107 | </div>
|
---|
108 | </div>
|
---|
109 | </div>
|
---|
110 | </div>
|
---|
111 |
|
---|
112 | <div class="row">
|
---|
113 | <h5 class="col-sm-6"
|
---|
114 | style="text-align:right;margin-top:20px">
|
---|
115 | Set global job priority
|
---|
116 | </h5>
|
---|
117 | <div class="col-sm-6">
|
---|
118 | <div class="btn-group pull-left"
|
---|
119 | 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);
|
---|
120 | text-shadow:2px 2px black;">
|
---|
121 | <button type="button"
|
---|
122 | id="prior"
|
---|
123 | class="btn btn-info dropdown-toggle"
|
---|
124 | data-toggle="dropdown"
|
---|
125 | aria-haspopup="true" aria-expanded="false">
|
---|
126 | Normal <span class="caret"></span>
|
---|
127 | </button>
|
---|
128 | <ul class="dropdown-menu"
|
---|
129 | style="text-shadow:none">
|
---|
130 | <li><a onclick="changePriority([],0,'')">Low</a></li>
|
---|
131 | <li><a onclick="changePriority([],1,'')">Normal</a></li>
|
---|
132 | <li><a onclick="changePriority([],2,'')">Urgent</a></li>
|
---|
133 | <li><a onclick="changePriority([],3,'')">Critical</a></li>
|
---|
134 | </ul>
|
---|
135 | </div>
|
---|
136 | </div>
|
---|
137 | </div>
|
---|
138 |
|
---|
139 | <!-- adding the job to hive and show progress bar -->
|
---|
140 | <a class="btn btn-lg btn-success"
|
---|
141 | id="fakehiveadd"
|
---|
142 | onclick="addtoHive()"
|
---|
143 | 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);
|
---|
144 | text-shadow:2px 2px black;">
|
---|
145 | Add this job to Hive
|
---|
146 | </a>
|
---|
147 | <!-- HIDDEN BUTTON FOR ASP ACTION -->
|
---|
148 | <a class="btn btn-success "
|
---|
149 | id="realhiveadd"
|
---|
150 | asp-controller="Job"
|
---|
151 | asp-action="AddToHive"
|
---|
152 | style="display:none"></a>
|
---|
153 |
|
---|
154 | <!-- Progress-->
|
---|
155 |
|
---|
156 | <h4 id="result" style="display:none">Start uploading experiment...</h4>
|
---|
157 | <div class="progress" id="progdiv" style="display:none">
|
---|
158 |
|
---|
159 | <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"
|
---|
160 | id="progress"
|
---|
161 | aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%">
|
---|
162 |
|
---|
163 | </div>
|
---|
164 | </div>
|
---|
165 | </div>
|
---|
166 | <div class="col-sm-4">
|
---|
167 | <h3 style="text-align:center">Save to file</h3>
|
---|
168 | <p style="text-align:center;font-style:italic">Changed parameters get saved but child distribution and task priority get lost in the process.</p>
|
---|
169 | <form asp-controller="Job"
|
---|
170 | asp-action="saveToFile"
|
---|
171 | method="post">
|
---|
172 | <div class="row">
|
---|
173 | <div class="col-sm-3"
|
---|
174 | style="text-align:right">
|
---|
175 | <h5>File name</h5>
|
---|
176 | </div>
|
---|
177 | <div class="col-sm-9"
|
---|
178 | style="text-align:left">
|
---|
179 | <div class="form-group">
|
---|
180 | <div class="input-group">
|
---|
181 | <input type="text"
|
---|
182 | class="form-control"
|
---|
183 | name="fname"
|
---|
184 | id="fname"
|
---|
185 | required
|
---|
186 | placeholder="File name">
|
---|
187 | </div>
|
---|
188 | </div>
|
---|
189 | </div>
|
---|
190 | </div>
|
---|
191 | <div class="row">
|
---|
192 | <div class="col-sm-3"
|
---|
193 | style="text-align:right">
|
---|
194 | <h5>Directory name</h5>
|
---|
195 | </div>
|
---|
196 | <div class="col-sm-9"
|
---|
197 | style="text-align:left">
|
---|
198 | <div class="form-group">
|
---|
199 | <div class="input-group">
|
---|
200 | <input type="text"
|
---|
201 | class="form-control"
|
---|
202 | name="dname"
|
---|
203 | id="dname"
|
---|
204 | required
|
---|
205 | placeholder="Directory name"
|
---|
206 | list="dirnames">
|
---|
207 | </div>
|
---|
208 | <datalist id="dirnames">
|
---|
209 | @if (!Model.directories.Contains(DateTime.Now.ToString("yyyy.MM.dd")))
|
---|
210 | {
|
---|
211 | <option value="@(DateTime.Now.ToString("yyyy.MM.dd"))">Creates new directory for today</option>
|
---|
212 | }
|
---|
213 | @foreach (var d in Model.directories)
|
---|
214 | {
|
---|
215 | <option value="@d"></option>
|
---|
216 | }
|
---|
217 | </datalist>
|
---|
218 | </div>
|
---|
219 | </div>
|
---|
220 | </div>
|
---|
221 | <button class="btn btn-success btn-block" type="submit"
|
---|
222 | 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);
|
---|
223 | text-shadow:2px 2px black;">
|
---|
224 | Save to file
|
---|
225 | </button>
|
---|
226 | </form>
|
---|
227 | </div>
|
---|
228 | </div>
|
---|
229 |
|
---|
230 |
|
---|
231 | </div>
|
---|
232 | <!-- Side scrolling menu-->
|
---|
233 | <nav class="col-sm-2" id="scrolly">
|
---|
234 | <ul class="nav nav-pills nav-stacked"
|
---|
235 | style="position:fixed"
|
---|
236 | data-spy="affix"
|
---|
237 | data-offset-top="0">
|
---|
238 |
|
---|
239 | <li><a href="#top"><i class="fa fa-angle-up"></i> Top</a></li>
|
---|
240 | @if (Model.SelectedAlgorithm != null)
|
---|
241 | {//Algortihm loaded
|
---|
242 | <li><a href="#algorithm">Algorithm parameters</a></li>
|
---|
243 | <li><a href="#problem">Problem parameters</a></li>
|
---|
244 | }
|
---|
245 | else
|
---|
246 | {//batch run or experiment
|
---|
247 | <li><a id="ctasks" href="#tasks">Child tasks </a></li>
|
---|
248 | <li><a onclick="shower()" href="#tasks"><i class="fa fa-eye"></i> Show all tasks</a></li>
|
---|
249 | <li><a onclick="collapser()" href="#tasks"><i class="fa fa-eye-slash"></i> Hide all tasks</a></li>
|
---|
250 |
|
---|
251 | }
|
---|
252 | <li><a href="#finish"><i class="fa fa-flag-checkered"></i> Add to Hive or save to file</a></li>
|
---|
253 | <li style="position:fixed">
|
---|
254 | <div class="alert alert-success" id="success-alert" style="display:flex">
|
---|
255 | <span id="succText"></span>
|
---|
256 | </div>
|
---|
257 | <p id="logs">
|
---|
258 |
|
---|
259 | </p>
|
---|
260 | </li>
|
---|
261 | </ul>
|
---|
262 |
|
---|
263 | </nav>
|
---|
264 |
|
---|
265 | <script src="~/js/hubs/progresshubber.js"></script>
|
---|
266 |
|
---|
267 | <script>
|
---|
268 | showScrolly = function () {
|
---|
269 | document.getElementById("scrolly").style.display = "";
|
---|
270 |
|
---|
271 | }
|
---|
272 | $(function () {
|
---|
273 | $('nav > ul > li > a').click(function () {
|
---|
274 | if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
|
---|
275 | var target = $(this.hash);
|
---|
276 | target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
---|
277 | if (target.length) {
|
---|
278 | $('html, body').animate({
|
---|
279 | scrollTop: target.offset().top
|
---|
280 | }, 700);
|
---|
281 | return false;
|
---|
282 | }
|
---|
283 | }
|
---|
284 | });
|
---|
285 | $('body').click(function () {
|
---|
286 | if ($("#ctasks").length > 0)
|
---|
287 | $("#ctasks").html("<i class='fa fa-sitemap'></i> Tasks (" + $('a[href^="#collapseExample"]').length + ")");
|
---|
288 | });
|
---|
289 | $('body').click();
|
---|
290 |
|
---|
291 | });
|
---|
292 | collapser = function () {
|
---|
293 | $('.collapse').not('#helperCol').collapse('hide');
|
---|
294 | //closes every collapse
|
---|
295 | }
|
---|
296 | shower = function () {
|
---|
297 | $('.collapse').not('#helperCol').collapse('show');
|
---|
298 |
|
---|
299 | //opens every collapse
|
---|
300 | }
|
---|
301 | </script>
|
---|
302 | </body>
|
---|
303 |
|
---|