1 | @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.UploadedJobViewModel
|
---|
2 |
|
---|
3 |
|
---|
4 | <!-- Shows uploaded files and the uploader -->
|
---|
5 | <div>
|
---|
6 |
|
---|
7 | @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job"))
|
---|
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 | <div class="row" style="margin:10px">
|
---|
26 | <div style="text-align:center">@Model.message</div>
|
---|
27 |
|
---|
28 | </div>
|
---|
29 | <div class="row" style="padding:10px">
|
---|
30 | @if (Model.DisplayDatePaths.Count == 0)
|
---|
31 | {
|
---|
32 | <div>
|
---|
33 | <p style="text-align:center">
|
---|
34 | No files uploaded
|
---|
35 | </p>
|
---|
36 | <a class="btn btn-success btn-lg btn-block"
|
---|
37 | asp-controller="Job"
|
---|
38 | asp-action="Uploader"
|
---|
39 | 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);
|
---|
40 | text-shadow:2px 2px black;">
|
---|
41 | <i class="fa fa-cloud-upload"></i> Upload new file(s)
|
---|
42 | </a>
|
---|
43 | </div>
|
---|
44 |
|
---|
45 | }
|
---|
46 | else {
|
---|
47 | <div class="col-sm-4">
|
---|
48 | <div class="btn-group btn-group-justified btn-block"
|
---|
49 | role="group" style="margin-bottom:-4px">
|
---|
50 |
|
---|
51 | <a class="btn btn-info btn-lg btn-block disabled"
|
---|
52 | 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);
|
---|
53 | text-shadow:2px 2px black;">
|
---|
54 | <i class="fa fa-cloud"></i> Uploads
|
---|
55 | </a>
|
---|
56 | <a class="btn btn-success btn-block
|
---|
57 | @(Model.SelectedIndex == -1 ? "active" : "")
|
---|
58 | "
|
---|
59 | asp-controller="Job"
|
---|
60 | asp-action="UploadDir"
|
---|
61 | asp-route-index="-1"
|
---|
62 | onclick="showUploader()"
|
---|
63 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
64 | text-shadow:2px 2px black;">
|
---|
65 | <i class="fa fa-cloud-upload"></i>
|
---|
66 | </a>
|
---|
67 | </div>
|
---|
68 | <div class="btn-group-vertical btn-block">
|
---|
69 |
|
---|
70 | @for (int i = 0; i < Model.DisplayDatePaths.Count; i++)
|
---|
71 | {
|
---|
72 | <a class="btn btn-default @(i == Model.SelectedIndex ? "active" : "" )"
|
---|
73 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);"
|
---|
74 | asp-controller="Job"
|
---|
75 | asp-action="UploadDir"
|
---|
76 | asp-route-index="@(i)"
|
---|
77 | onclick="showDownloader()">
|
---|
78 | @Model.DisplayDatePaths[i]
|
---|
79 | </a>
|
---|
80 | }
|
---|
81 | </div>
|
---|
82 | </div>
|
---|
83 | <p style="display:none"
|
---|
84 | id="downloader"
|
---|
85 | class="text-center">
|
---|
86 | <br /><br /><br /><br /><br /><br /><br />
|
---|
87 | <i class="fa fa-cloud-download fa-spin fa-5x" id="spinner">
|
---|
88 | </i>
|
---|
89 | </p>
|
---|
90 | <p style="display:none"
|
---|
91 | id="uploader"
|
---|
92 | class="text-center">
|
---|
93 | <br /><br /><br /><br /><br /><br /><br />
|
---|
94 | <i class="fa fa-cloud-upload fa-spin fa-5x" id="spinner">
|
---|
95 | </i>
|
---|
96 | </p>
|
---|
97 | <p style="display:none"
|
---|
98 | id="deleter"
|
---|
99 | class="text-center">
|
---|
100 | <br /><br /><br /><br /><br /><br /><br />
|
---|
101 | <i class="fa fa-trash-o fa-spin fa-5x" id="spinner">
|
---|
102 | </i>
|
---|
103 | </p>
|
---|
104 | <div id="content">
|
---|
105 | @if (Model.SelectedIndex != -1)
|
---|
106 | {
|
---|
107 | <div class="col-sm-8">
|
---|
108 | <h4>Click on a file to prepare it for upload to Hive</h4>
|
---|
109 | @for (int i = 0; i < Model.DisplayFilesPaths.Count; i++)
|
---|
110 | {
|
---|
111 |
|
---|
112 | <div class="btn-group-justified btn-block">
|
---|
113 |
|
---|
114 | <a class="btn btn-default @(Model.DisplayFilesPaths[i].EndsWith(".hl") ? "" : "disabled" )"
|
---|
115 | asp-controller="Job"
|
---|
116 | asp-action="OpenFile"
|
---|
117 | asp-route-index="@(Model.SelectedIndex)"
|
---|
118 | asp-route-filedex="@i"
|
---|
119 | 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);">
|
---|
120 | <i class="fa fa-list-alt"></i> @Model.DisplayFilesPaths[i]
|
---|
121 | </a>
|
---|
122 | <a id="down"
|
---|
123 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
124 | text-shadow:2px 2px black;"
|
---|
125 | class='btn btn-group btn-success'
|
---|
126 | asp-controller="Job"
|
---|
127 | asp-action="DownloadFile"
|
---|
128 | asp-route-index="@(Model.SelectedIndex)"
|
---|
129 | asp-route-filedex="@i">
|
---|
130 | <span class='glyphicon glyphicon-download-alt' aria-hidden='true'></span>
|
---|
131 | </a>
|
---|
132 | <a id="del"
|
---|
133 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
134 | text-shadow:2px 2px black;"
|
---|
135 | class='btn btn-group btn-danger'
|
---|
136 | asp-controller="Job"
|
---|
137 | asp-action="DeleteFile"
|
---|
138 | asp-route-index="@(Model.SelectedIndex)"
|
---|
139 | asp-route-filedex="@i"
|
---|
140 | onclick="showDeleter()">
|
---|
141 | <span class='glyphicon glyphicon-trash' aria-hidden='true'></span>
|
---|
142 | </a>
|
---|
143 |
|
---|
144 | </div>
|
---|
145 | }
|
---|
146 |
|
---|
147 |
|
---|
148 | </div>
|
---|
149 |
|
---|
150 | }
|
---|
151 | else
|
---|
152 | {
|
---|
153 | <div class="col-sm-8">
|
---|
154 |
|
---|
155 | @Html.Partial("UploaderPartial/_UploaderPartial")
|
---|
156 | </div>
|
---|
157 | }
|
---|
158 | </div>
|
---|
159 |
|
---|
160 | }
|
---|
161 | </div>
|
---|
162 | <script type="text/javascript">
|
---|
163 | function showDownloader() {
|
---|
164 | document.getElementById("content").style.display = "none";
|
---|
165 | document.getElementById("downloader").style.display = "";
|
---|
166 |
|
---|
167 | }
|
---|
168 | function showUploader() {
|
---|
169 | document.getElementById("content").style.display = "none";
|
---|
170 | document.getElementById("uploader").style.display = "";
|
---|
171 |
|
---|
172 | }
|
---|
173 | function showDeleter() {
|
---|
174 | document.getElementById("content").style.display = "none";
|
---|
175 | document.getElementById("deleter").style.display = "";
|
---|
176 | }
|
---|
177 | </script>
|
---|
178 | </div> |
---|