1 | @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.UploadedJobViewModel
|
---|
2 |
|
---|
3 |
|
---|
4 | <!-- Shows uploaded files and the uploader -->
|
---|
5 | <div class="animated fadeIn">
|
---|
6 |
|
---|
7 | @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job", Model.User))
|
---|
8 |
|
---|
9 | <ul class="nav nav-pills nav-justified">
|
---|
10 | <li role="presentation"
|
---|
11 | class="">
|
---|
12 | <a asp-controller="Job"
|
---|
13 | asp-action="Index">
|
---|
14 | <i class="fa fa-tasks"></i> Jobs
|
---|
15 | </a>
|
---|
16 | </li>
|
---|
17 | <li role="presentation"
|
---|
18 | class="active">
|
---|
19 | <a asp-controller="Job"
|
---|
20 | asp-action="Uploads">
|
---|
21 | <i class="fa fa-cloud"></i> Uploads
|
---|
22 | </a>
|
---|
23 | </li>
|
---|
24 | </ul>
|
---|
25 |
|
---|
26 | @Html.Partial("_ErrorMessage", Model.message)
|
---|
27 |
|
---|
28 | <div class="row" style="padding:10px">
|
---|
29 | <div class="col-sm-4">
|
---|
30 | <div class="btn-group btn-group-justified btn-block"
|
---|
31 | role="group" style="margin-bottom:-4px">
|
---|
32 |
|
---|
33 | <a class="btn btn-info btn-lg btn-block disabled"
|
---|
34 | style="width:6%; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
35 | text-shadow:2px 2px black;">
|
---|
36 | <i class="fa fa-cloud"></i> Uploads
|
---|
37 | </a>
|
---|
38 | <a class="btn btn-success btn-block
|
---|
39 | @(Model.SelectedIndex == -1 ? "active" : "")
|
---|
40 | "
|
---|
41 | asp-controller="Job"
|
---|
42 | asp-action="UploadDir"
|
---|
43 | asp-route-index="-1"
|
---|
44 | onclick="showUploader()"
|
---|
45 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
46 | text-shadow:2px 2px black;">
|
---|
47 | <i class="fa fa-cloud-upload"></i>
|
---|
48 | </a>
|
---|
49 | </div>
|
---|
50 | <div class="btn-group-vertical btn-block">
|
---|
51 |
|
---|
52 | @for (int i = 0; i < Model.DisplayDatePaths.Count; i++)
|
---|
53 | {
|
---|
54 | <a class="btn btn-default @(i == Model.SelectedIndex ? "active" : "" )"
|
---|
55 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);"
|
---|
56 | asp-controller="Job"
|
---|
57 | asp-action="UploadDir"
|
---|
58 | asp-route-index="@(i)"
|
---|
59 | onclick="showDownloader()">
|
---|
60 | @Model.DisplayDatePaths[i]
|
---|
61 | </a>
|
---|
62 | }
|
---|
63 | </div>
|
---|
64 | @if (ViewBag.active != null && ViewBag.active == true)
|
---|
65 | {
|
---|
66 | <div>
|
---|
67 | <a class="btn btn-warning btn-block"
|
---|
68 | asp-controller="Job"
|
---|
69 | asp-action="OpenRecent"
|
---|
70 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
71 | text-shadow:2px 2px black;margin-top:10px">
|
---|
72 | <i class="fa fa-undo"></i> Reopen last file
|
---|
73 | </a>
|
---|
74 | </div>
|
---|
75 |
|
---|
76 | }
|
---|
77 |
|
---|
78 | </div>
|
---|
79 | <p style="display:none"
|
---|
80 | id="downloader"
|
---|
81 | class="text-center">
|
---|
82 | <br /><br /><br /><br /><br /><br /><br />
|
---|
83 | <i class="fa fa-cloud-download fa-spin fa-5x" id="spinner">
|
---|
84 | </i>
|
---|
85 | </p>
|
---|
86 | <p style="display:none"
|
---|
87 | id="uploader"
|
---|
88 | class="text-center">
|
---|
89 | <br /><br /><br /><br /><br /><br /><br />
|
---|
90 | <i class="fa fa-cloud-upload fa-spin fa-5x" id="spinner">
|
---|
91 | </i>
|
---|
92 | </p>
|
---|
93 | <p style="display:none"
|
---|
94 | id="deleter"
|
---|
95 | class="text-center">
|
---|
96 | <br /><br /><br /><br /><br /><br /><br />
|
---|
97 | <i class="fa fa-trash-o fa-spin fa-5x" id="spinner">
|
---|
98 | </i>
|
---|
99 | </p>
|
---|
100 | <div id="content">
|
---|
101 | @if (Model.SelectedIndex != -1)
|
---|
102 | {
|
---|
103 | <div class="col-sm-8">
|
---|
104 | <h3>@Model.DisplayDatePaths[Model.SelectedIndex]</h3>
|
---|
105 | <h4 style="text-align:left">Click on a file to prepare it for upload to Hive</h4>
|
---|
106 | @for (int i = 0; i < Model.DisplayFilesPaths.Count; i++)
|
---|
107 | {
|
---|
108 |
|
---|
109 | <div class="btn-group-justified btn-block">
|
---|
110 |
|
---|
111 | <a class="btn btn-default @(Model.DisplayFilesPaths[i].EndsWith(".hl") ? "" : "disabled" )"
|
---|
112 | asp-controller="Job"
|
---|
113 | asp-action="OpenFile"
|
---|
114 | asp-route-index="@(Model.SelectedIndex)"
|
---|
115 | asp-route-filedex="@i"
|
---|
116 | style="width:6%;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
|
---|
117 | <i class="fa fa-list-alt"></i> @Model.DisplayFilesPaths[i]
|
---|
118 | </a>
|
---|
119 | <a id="down"
|
---|
120 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
121 | text-shadow:2px 2px black;"
|
---|
122 | class='btn btn-group btn-success'
|
---|
123 | asp-controller="Job"
|
---|
124 | asp-action="DownloadFile"
|
---|
125 | asp-route-index="@(Model.SelectedIndex)"
|
---|
126 | asp-route-filedex="@i">
|
---|
127 | <span class='glyphicon glyphicon-download-alt' aria-hidden='true'></span>
|
---|
128 | </a>
|
---|
129 | <a id="del"
|
---|
130 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
131 | text-shadow:2px 2px black;"
|
---|
132 | class='btn btn-group btn-danger'
|
---|
133 | asp-controller="Job"
|
---|
134 | asp-action="DeleteFile"
|
---|
135 | asp-route-index="@(Model.SelectedIndex)"
|
---|
136 | asp-route-filedex="@i"
|
---|
137 | onclick="showDeleter()">
|
---|
138 | <span class='glyphicon glyphicon-trash' aria-hidden='true'></span>
|
---|
139 | </a>
|
---|
140 |
|
---|
141 | </div>
|
---|
142 | }
|
---|
143 | <hr style="border-color:gray;margin-top:50px" />
|
---|
144 | <form asp-controller="Job"
|
---|
145 | asp-action="changeDirName"
|
---|
146 | method="post"
|
---|
147 | class="col-sm-6">
|
---|
148 | <h5>Change directory name</h5>
|
---|
149 | <div class="input-group"
|
---|
150 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
|
---|
151 | <input type="text"
|
---|
152 | value="@Model.DisplayDatePaths[Model.SelectedIndex]"
|
---|
153 | style="display:none"
|
---|
154 | name="olddir"/>
|
---|
155 | <input
|
---|
156 | name="dirname"
|
---|
157 | type="text"
|
---|
158 | class="form-control"
|
---|
159 | value="@Model.DisplayDatePaths[Model.SelectedIndex]" />
|
---|
160 | <span class="input-group-btn">
|
---|
161 | <button style="text-shadow:2px 2px black"
|
---|
162 | type="submit"
|
---|
163 | class="btn btn-success pull-right"
|
---|
164 | ><i class="fa fa-save"></i> Save</button>
|
---|
165 | </span>
|
---|
166 | </div>
|
---|
167 | </form>
|
---|
168 |
|
---|
169 |
|
---|
170 | </div>
|
---|
171 |
|
---|
172 | }
|
---|
173 | else
|
---|
174 | {
|
---|
175 | <div class="col-sm-8">
|
---|
176 |
|
---|
177 | @Html.Partial("UploaderPartial/_UploaderPartial", Model)
|
---|
178 | </div>
|
---|
179 | }
|
---|
180 | </div>
|
---|
181 |
|
---|
182 |
|
---|
183 | </div>
|
---|
184 | <script type="text/javascript">
|
---|
185 | function showDownloader() {
|
---|
186 | document.getElementById("content").style.display = "none";
|
---|
187 | document.getElementById("downloader").style.display = "";
|
---|
188 |
|
---|
189 | }
|
---|
190 | function showUploader() {
|
---|
191 | document.getElementById("content").style.display = "none";
|
---|
192 | document.getElementById("uploader").style.display = "";
|
---|
193 |
|
---|
194 | }
|
---|
195 | function showDeleter() {
|
---|
196 | document.getElementById("content").style.display = "none";
|
---|
197 | document.getElementById("deleter").style.display = "";
|
---|
198 | }
|
---|
199 | </script>
|
---|
200 | </div> |
---|