1 | @model HeuristicLab.Clients.Hive.WebJobManager.ViewModels.JobViewModel
|
---|
2 |
|
---|
3 | <div>
|
---|
4 |
|
---|
5 | <ul class="nav nav-tabs">
|
---|
6 | <li role="presentation" class="active"><a asp-controller="Job" asp-action="Index">Jobs <span class="badge">@Model.userJobs.Count</span></a></li>
|
---|
7 | <li role="presentation"><a asp-controller="User" asp-action="Index">User management</a></li>
|
---|
8 | <li role="presentation"><a asp-controller="Resource" asp-action="Index">Resources</a></li>
|
---|
9 | </ul>
|
---|
10 | <div class="row" style="text-align:center">
|
---|
11 | @Model.message
|
---|
12 | </div>
|
---|
13 | <div class="row" style="margin:10px">
|
---|
14 | <a class="btn btn-info btn-lg btn-block"
|
---|
15 | asp-controller="Job"
|
---|
16 | asp-action="Uploads">
|
---|
17 | Uploads
|
---|
18 | </a>
|
---|
19 | </div>
|
---|
20 | <div class="row" style="padding:10px">
|
---|
21 | @if (Model.userJobs.Count == 0)
|
---|
22 | {
|
---|
23 | <div>
|
---|
24 | <p style="text-align:center">No jobs found</p>
|
---|
25 | </div>
|
---|
26 |
|
---|
27 | }
|
---|
28 | else {
|
---|
29 | <div class="col-sm-4">
|
---|
30 | <div class="btn-group-vertical btn-block">
|
---|
31 | @foreach (var job in Model.userJobs)
|
---|
32 | {
|
---|
33 | <a class="btn btn-default @(Model.selectedJob != null && job.Id == Model.selectedJob.Id ? "active" : "" )"
|
---|
34 | asp-controller="Job"
|
---|
35 | asp-action="Selected"
|
---|
36 | asp-route-id="@job.Id">
|
---|
37 | @job.Name - @job.DateCreated
|
---|
38 | <span class="badge">@job.JobCount</span>
|
---|
39 | </a>
|
---|
40 | }
|
---|
41 |
|
---|
42 | </div>
|
---|
43 | </div>
|
---|
44 | @if (Model.selectedJob != null)
|
---|
45 | {
|
---|
46 | <div class="col-sm-8" style="padding:5px; padding-left:10px;">
|
---|
47 | <div class="row">
|
---|
48 | <h2 style="padding-left:20px">
|
---|
49 | @Model.selectedJob.Name
|
---|
50 | <a onclick="popUpDelete()"
|
---|
51 | style="margin-bottom:10px;"
|
---|
52 |
|
---|
53 | class='btn btn-danger'>
|
---|
54 | <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
|
---|
55 | </a>
|
---|
56 | <a style="display:none"
|
---|
57 | asp-action="Delete"
|
---|
58 | asp-route-id="@Model.selectedJob.Id"
|
---|
59 | asp-controller="Job" id="del" ></a>
|
---|
60 |
|
---|
61 | <script type="text/javascript">
|
---|
62 | function popUpDelete() {
|
---|
63 | if (confirm("Are you sure you want to delete this job?") == true) {
|
---|
64 | document.getElementById("del").click();
|
---|
65 | }
|
---|
66 |
|
---|
67 | }
|
---|
68 | </script>
|
---|
69 |
|
---|
70 | </h2>
|
---|
71 | <div class="col-sm-6" style="padding-left:30px">
|
---|
72 | <p>Description: @Model.selectedJob.Description</p>
|
---|
73 | <p>Resources: @Model.selectedJob.ResourceNames</p>
|
---|
74 | <p>Created: @Model.selectedJob.DateCreated</p>
|
---|
75 | <p>Owned by: @Model.selectedJob.OwnerUsername</p>
|
---|
76 |
|
---|
77 | </div>
|
---|
78 | <div class="col-sm-6" style="padding-left:30px">
|
---|
79 | <p>Calculating: @Model.selectedJob.CalculatingCount</p>
|
---|
80 | <p>Finished: @Model.selectedJob.FinishedCount</p>
|
---|
81 | </div>
|
---|
82 |
|
---|
83 | </div>
|
---|
84 | <div class="row">
|
---|
85 | <h3 style="padding-left:20px">@Model.lightJobTasks.Count Task@(Model.lightJobTasks != null && Model.lightJobTasks.Count != 1 ? "s" : "" )</h3>
|
---|
86 | @foreach (var task in Model.lightJobTasks)
|
---|
87 | {
|
---|
88 | <table class="table "
|
---|
89 | style="margin-left:20px;">
|
---|
90 | <thead>
|
---|
91 | <tr>
|
---|
92 | <th>@task</th>
|
---|
93 | </tr>
|
---|
94 | </thead>
|
---|
95 | <tbody>
|
---|
96 | <tr>
|
---|
97 | <td>Last update @task.LastTaskDataUpdate</td>
|
---|
98 | <td>State: @task.State</td>
|
---|
99 |
|
---|
100 | </tr>
|
---|
101 | <tr>
|
---|
102 | <td>@task.ExecutionTime executed</td>
|
---|
103 | <td>Created: @task.DateCreated</td>
|
---|
104 | </tr>
|
---|
105 | </tbody>
|
---|
106 | </table>
|
---|
107 |
|
---|
108 | }
|
---|
109 | </div>
|
---|
110 | </div>
|
---|
111 | }
|
---|
112 | }
|
---|
113 | </div>
|
---|
114 | </div>
|
---|