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; margin-right:0px!important">
|
---|
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 | onclick="showLoader()">
|
---|
38 | @job.Job.Name - @job.Job.DateCreated
|
---|
39 | <span class="badge">@job.Job.JobCount</span>
|
---|
40 | </a>
|
---|
41 | }
|
---|
42 |
|
---|
43 | </div>
|
---|
44 | </div>
|
---|
45 | <p style="display:none" id="loader" class="text-center">
|
---|
46 | <br /><br /><br /><br /><br /><br /><br />
|
---|
47 | <i class="fa fa-cog fa-spin fa-5x" id="spinner">
|
---|
48 | </i>
|
---|
49 | </p>
|
---|
50 | @if (Model.selectedJob != null)
|
---|
51 | {
|
---|
52 | <div class="col-sm-8" id="content" style="padding:5px; padding-left:10px;">
|
---|
53 | <div class="row">
|
---|
54 | <h2 style="padding-left:20px">
|
---|
55 | @Model.selectedJob.Job.Name
|
---|
56 | <a onclick="popUpDelete()"
|
---|
57 | style="margin-bottom:10px;"
|
---|
58 | class='btn btn-danger'>
|
---|
59 | <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
|
---|
60 | </a>
|
---|
61 | <a style="display:none"
|
---|
62 | asp-action="Delete"
|
---|
63 | asp-route-id="@Model.selectedJob.Id"
|
---|
64 | asp-controller="Job" id="del"
|
---|
65 | onclick="showDeleter()"></a>
|
---|
66 |
|
---|
67 | <script type="text/javascript">
|
---|
68 | function popUpDelete() {
|
---|
69 | if (confirm("Are you sure you want to delete this job?") == true) {
|
---|
70 | document.getElementById("del").click();
|
---|
71 | }
|
---|
72 |
|
---|
73 | }
|
---|
74 | </script>
|
---|
75 |
|
---|
76 | </h2>
|
---|
77 | <div class="col-sm-6" style="padding-left:30px">
|
---|
78 | <p>Description: @Model.selectedJob.Job.Description</p>
|
---|
79 | <p>Resources: @Model.selectedJob.Job.ResourceNames</p>
|
---|
80 | <p>Created: @Model.selectedJob.Job.DateCreated</p>
|
---|
81 | <p>Owned by: @Model.selectedJob.Job.OwnerUsername</p>
|
---|
82 |
|
---|
83 | </div>
|
---|
84 | <div class="col-sm-6" style="padding-left:30px">
|
---|
85 | <p>Calculating: @Model.selectedJob.Job.CalculatingCount</p>
|
---|
86 | <p>Finished: @Model.selectedJob.Job.FinishedCount</p>
|
---|
87 | </div>
|
---|
88 |
|
---|
89 | </div>
|
---|
90 |
|
---|
91 | <script src="~/js/scripts/graphs/graphdatacollector.js"></script>
|
---|
92 | <script src="~/js/scripts/graphs/graphhubber.js"></script>
|
---|
93 |
|
---|
94 | <div class="row" >
|
---|
95 | <h3 style="padding-left:20px; ">Tasks</h3>
|
---|
96 | @foreach (var task in Model.selectedJob.HiveTasks)
|
---|
97 | {
|
---|
98 | @Html.Partial("SelectedJobPartials/_TaskPartial",
|
---|
99 | new HeuristicLab.Clients.Hive.WebJobManager.Models.HiveTaskContainer(task))
|
---|
100 |
|
---|
101 | }
|
---|
102 | </div>
|
---|
103 | </div>
|
---|
104 | }
|
---|
105 | }
|
---|
106 | <script type="text/javascript">
|
---|
107 | function showLoader() {
|
---|
108 | document.getElementById("loader").style.display = "";
|
---|
109 | document.getElementById("content").style.display = "none";
|
---|
110 | }
|
---|
111 | function showDeleter() {
|
---|
112 | document.getElementById("loader").style.display = "";
|
---|
113 | document.getElementById("content").style.display = "none";
|
---|
114 | document.getElementById("spinner").className = "fa fa-trash-o fa-spin fa-5x";
|
---|
115 | }
|
---|
116 | </script>
|
---|
117 | </div>
|
---|
118 | </div>
|
---|