Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml @ 13841

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

#2582 More parameter datatypes, splitting fileopening service, approving users, reopen last file, change name tasks and repetitions

File size: 10.9 KB
Line 
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    @Html.Partial("OpenFilePartials/_Help", Model);
45    <!-- Check model to select right partial, partial handles all subloading -->
46    <div class="col-md-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="col-sm-6"
173                         style="text-align:right">
174                        <h5>File name</h5>
175                    </div>
176                    <div class="col-sm-6"
177                         style="text-align:left">
178                        <div class="form-group">
179                            <div class="input-group">
180                                <input type="text"
181                                       class="form-control"
182                                       name="fname"
183                                       id="fname"
184                                       required
185                                       placeholder="File name">
186                            </div>
187                        </div>
188                    </div>
189                    <div class="row"
190                         style="text-align:center">
191                        <h5>Directory: /HiveChanged</h5>
192                    </div>
193                    <button class="btn btn-success btn-block" type="submit"
194                            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);
195                            text-shadow:2px 2px black;">
196                    Save to file</button>
197                </form>
198            </div>
199        </div>
200
201
202    </div>
203    <!-- Side scrolling menu-->
204    <nav
205         class="col-md-2" id="scrolly">
206        <ul class="nav nav-pills nav-stacked"
207            data-spy="affix"
208            data-offset-top="0">
209
210            <li><a href="#top"><i class="fa fa-angle-up"></i> Top</a></li>
211            @if (Model.SelectedAlgorithm != null)
212            {//Algortihm loaded
213                <li><a href="#algorithm">Algorithm parameters</a></li>
214                <li><a href="#problem">Problem parameters</a></li>
215            }
216            else
217            {//batch run or experiment
218                <li><a id="ctasks" href="#tasks">Child tasks </a></li>
219                <li><a onclick="shower()" href="#tasks"><i class="fa fa-eye"></i> Show all tasks</a></li>
220                <li><a onclick="collapser()" href="#tasks"><i class="fa fa-eye-slash"></i> Hide all tasks</a></li>
221               
222            }
223            <li><a href="#finish"><i class="fa fa-flag-checkered"></i> Add to Hive or save to file</a></li>
224        </ul>
225    </nav>
226
227    <script src="~/js/hubs/progresshubber.js"></script>
228   
229    <script>
230        showScrolly = function () {
231            document.getElementById("scrolly").style.display = "";
232
233        }
234        $(function () {
235            $('nav > ul > li > a').click(function () {
236                if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
237                    var target = $(this.hash);
238                    target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
239                    if (target.length) {
240                        $('html, body').animate({
241                            scrollTop: target.offset().top
242                        }, 700);
243                        return false;
244                    }
245                }
246            });
247            $('body').click(function () {
248                if ($("#ctasks").length > 0)
249                    $("#ctasks").html("<i class='fa fa-sitemap'></i> Tasks (" + $('a[href^="#collapseExample"]').length + ")");
250            });
251            $('body').click();
252           
253        });
254        collapser = function () {
255            $('.collapse').collapse('hide');
256            //closes every collapse
257        }
258        shower = function () {
259            $('.collapse').collapse('show');
260            //opens every collapse
261        }
262    </script>
263</body>
264
Note: See TracBrowser for help on using the repository browser.