1 | @using Microsoft.AspNet.Http;
|
---|
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"))
|
---|
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 | <!-- Check model to select right partial, partial handles all subloading -->
|
---|
45 | <div class="col-md-9">
|
---|
46 | @if (Model.SelectedAlgorithm != null)
|
---|
47 | {
|
---|
48 | @Html.Partial("OpenFilePartials/_Algorithm", Model);
|
---|
49 |
|
---|
50 | }
|
---|
51 | else if (Model.SelectedBatchRun != null)
|
---|
52 | {
|
---|
53 | @Html.Partial("OpenFilePartials/_BatchRun", Model);
|
---|
54 |
|
---|
55 | }
|
---|
56 | else if (Model.SelectedExperiment != null)
|
---|
57 | {
|
---|
58 | @Html.Partial("OpenFilePartials/_Experiment", Model);
|
---|
59 |
|
---|
60 | }
|
---|
61 | <!-- Main menu for job creation -->
|
---|
62 | <hr style="border-color:gray; margin-top:50px" />
|
---|
63 | <div class="row">
|
---|
64 | <div id="finish" class="col-sm-8"
|
---|
65 | style="text-align:center; border-right:1px solid">
|
---|
66 | <h2>
|
---|
67 | Hive job information
|
---|
68 | </h2>
|
---|
69 | <div class="row"
|
---|
70 | style="margin-bottom:20px">
|
---|
71 |
|
---|
72 | <div class="col-sm-6"
|
---|
73 | style="text-align:right">
|
---|
74 | <h5>Job name</h5>
|
---|
75 | </div>
|
---|
76 | <div class="col-sm-6"
|
---|
77 | style="text-align:left">
|
---|
78 | <div class="form-group">
|
---|
79 | <div class="input-group">
|
---|
80 | <input type="text"
|
---|
81 | class="form-control"
|
---|
82 | name="jname"
|
---|
83 | id="jname"
|
---|
84 | placeholder="Job name">
|
---|
85 | </div>
|
---|
86 | </div>
|
---|
87 | </div>
|
---|
88 | </div>
|
---|
89 | <div class="row"
|
---|
90 | style="margin-bottom:20px">
|
---|
91 | <div class="col-sm-6"
|
---|
92 | style="text-align:right">
|
---|
93 | <h5>
|
---|
94 | Resources (optional)
|
---|
95 | </h5>
|
---|
96 | </div>
|
---|
97 | <div class="col-sm-6"
|
---|
98 | style="text-align:left">
|
---|
99 | <div class="form-group">
|
---|
100 | <div class="input-group">
|
---|
101 | <input type="text"
|
---|
102 | class="form-control"
|
---|
103 | name="jresource"
|
---|
104 | id="jresource"
|
---|
105 | placeholder="(seperate with ;)">
|
---|
106 | </div>
|
---|
107 | </div>
|
---|
108 | </div>
|
---|
109 | </div>
|
---|
110 |
|
---|
111 | <div class="row">
|
---|
112 | <h5 class="col-sm-6"
|
---|
113 | style="text-align:right;margin-top:20px">
|
---|
114 | Set global job priority
|
---|
115 | </h5>
|
---|
116 | <div class="col-sm-6">
|
---|
117 | <div class="btn-group pull-left"
|
---|
118 | 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);
|
---|
119 | text-shadow:2px 2px black;">
|
---|
120 | <button type="button"
|
---|
121 | id="prior"
|
---|
122 | class="btn btn-info dropdown-toggle"
|
---|
123 | data-toggle="dropdown"
|
---|
124 | aria-haspopup="true" aria-expanded="false">
|
---|
125 | Normal <span class="caret"></span>
|
---|
126 | </button>
|
---|
127 | <ul class="dropdown-menu"
|
---|
128 | style="text-shadow:none">
|
---|
129 | <li><a onclick="changePriority([],0,'')">Low</a></li>
|
---|
130 | <li><a onclick="changePriority([],1,'')">Normal</a></li>
|
---|
131 | <li><a onclick="changePriority([],2,'')">Urgent</a></li>
|
---|
132 | <li><a onclick="changePriority([],3,'')">Critical</a></li>
|
---|
133 | </ul>
|
---|
134 | </div>
|
---|
135 | </div>
|
---|
136 | </div>
|
---|
137 |
|
---|
138 | <!-- adding the job to hive and show progress bar -->
|
---|
139 | <a class="btn btn-lg btn-success"
|
---|
140 | id="fakehiveadd"
|
---|
141 | onclick="addtoHive()"
|
---|
142 | 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);
|
---|
143 | text-shadow:2px 2px black;">
|
---|
144 | Add this job to Hive
|
---|
145 | </a>
|
---|
146 | <!-- HIDDEN BUTTON FOR ASP ACTION -->
|
---|
147 | <a class="btn btn-success "
|
---|
148 | id="realhiveadd"
|
---|
149 | asp-controller="Job"
|
---|
150 | asp-action="AddToHive"
|
---|
151 | style="display:none"></a>
|
---|
152 |
|
---|
153 | <!-- Progress-->
|
---|
154 |
|
---|
155 | <h4 id="result" style="display:none">Start uploading experiment...</h4>
|
---|
156 | <div class="progress" id="progdiv" style="display:none">
|
---|
157 |
|
---|
158 | <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar"
|
---|
159 | id="progress"
|
---|
160 | aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width:10%">
|
---|
161 |
|
---|
162 | </div>
|
---|
163 | </div>
|
---|
164 | </div>
|
---|
165 | <div class="col-sm-4">
|
---|
166 | <h4>Save to file</h4>
|
---|
167 | <form asp-controller="Job"
|
---|
168 | asp-action="saveToFile"
|
---|
169 | method="post">
|
---|
170 | <div class="col-sm-6"
|
---|
171 | style="text-align:right">
|
---|
172 | <h5>File name</h5>
|
---|
173 | </div>
|
---|
174 | <div class="col-sm-6"
|
---|
175 | style="text-align:left">
|
---|
176 | <div class="form-group">
|
---|
177 | <div class="input-group">
|
---|
178 | <input type="text"
|
---|
179 | class="form-control"
|
---|
180 | name="fname"
|
---|
181 | id="fname"
|
---|
182 | required
|
---|
183 | placeholder="File name">
|
---|
184 | </div>
|
---|
185 | </div>
|
---|
186 | </div>
|
---|
187 | <div class="row"
|
---|
188 | style="text-align:center">
|
---|
189 | <h5>Directory: /HiveChanged</h5>
|
---|
190 | </div>
|
---|
191 | <button class="btn btn-success btn-block" type="submit"
|
---|
192 | 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);
|
---|
193 | text-shadow:2px 2px black;">
|
---|
194 | Save to file</button>
|
---|
195 | </form>
|
---|
196 | </div>
|
---|
197 | </div>
|
---|
198 |
|
---|
199 |
|
---|
200 | </div>
|
---|
201 | <!-- Side scrolling menu-->
|
---|
202 | <nav style="margin-top:50px; "
|
---|
203 | class="col-md-2" id="scrolly">
|
---|
204 | <ul class="nav nav-pills nav-stacked"
|
---|
205 | data-spy="affix"
|
---|
206 | data-offset-top="0">
|
---|
207 |
|
---|
208 | <li><a href="#top"><i class="fa fa-angle-up"></i> Top</a></li>
|
---|
209 | @if (Model.SelectedAlgorithm != null)
|
---|
210 | {//Algortihm loaded
|
---|
211 | <li><a href="#algorithm">Algorithm parameters</a></li>
|
---|
212 | <li><a href="#problem">Problem parameters</a></li>
|
---|
213 | }
|
---|
214 | else
|
---|
215 | {//batch run or experiment
|
---|
216 | <li><a id="ctasks" href="#tasks">Child tasks </a></li>
|
---|
217 | <li><a onclick="shower()" href="#tasks"><i class="fa fa-eye"></i> Show all tasks</a></li>
|
---|
218 | <li><a onclick="collapser()" href="#tasks"><i class="fa fa-eye-slash"></i> Hide all tasks</a></li>
|
---|
219 |
|
---|
220 | }
|
---|
221 | <li><a href="#finish"><i class="fa fa-flag-checkered"></i> Job info and upload</a></li>
|
---|
222 | </ul>
|
---|
223 | </nav>
|
---|
224 |
|
---|
225 | <script src="~/js/hubs/progresshubber.js"></script>
|
---|
226 |
|
---|
227 | <script>
|
---|
228 | showScrolly = function () {
|
---|
229 | document.getElementById("scrolly").style.display = "";
|
---|
230 |
|
---|
231 | }
|
---|
232 | $(function () {
|
---|
233 | $('nav > ul > li > a').click(function () {
|
---|
234 | if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
|
---|
235 | var target = $(this.hash);
|
---|
236 | target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
|
---|
237 | if (target.length) {
|
---|
238 | $('html, body').animate({
|
---|
239 | scrollTop: target.offset().top
|
---|
240 | }, 1000);
|
---|
241 | return false;
|
---|
242 | }
|
---|
243 | }
|
---|
244 | });
|
---|
245 | $('body').click(function () {
|
---|
246 | if ($("#ctasks").length > 0)
|
---|
247 | $("#ctasks").html("<i class='fa fa-sitemap'></i> Tasks (" + $('a[href^="#collapseExample"]').length + ")");
|
---|
248 | });
|
---|
249 | $('body').click();
|
---|
250 |
|
---|
251 | });
|
---|
252 | collapser = function () {
|
---|
253 | $('.collapse').collapse('hide');
|
---|
254 | //closes every collapse
|
---|
255 | }
|
---|
256 | shower = function () {
|
---|
257 | $('.collapse').collapse('show');
|
---|
258 | //opens every collapse
|
---|
259 | }
|
---|
260 | </script>
|
---|
261 | </body>
|
---|
262 |
|
---|