[13733] | 1 | @using HeuristicLab.Clients.Hive.WebJobManager.ViewModels
|
---|
| 2 | @model JobViewModel
|
---|
[13739] | 3 | <div id="userId" style="display:none">@ViewBag.SessionId</div>
|
---|
[13656] | 4 | <div>
|
---|
[13733] | 5 | @Html.Partial("Navbar", new NavbarViewModel("Job"))
|
---|
[13656] | 6 |
|
---|
[13733] | 7 | <ul class="nav nav-pills nav-justified">
|
---|
| 8 | <li role="presentation"
|
---|
| 9 | class="active">
|
---|
| 10 | <a asp-controller="Job"
|
---|
| 11 | asp-action="Index">
|
---|
[13742] | 12 | <i class="fa fa-tasks"></i> Jobs
|
---|
[13733] | 13 | </a>
|
---|
| 14 | </li>
|
---|
| 15 | <li role="presentation"
|
---|
| 16 | class="">
|
---|
| 17 | <a asp-controller="Job"
|
---|
| 18 | asp-action="Uploads">
|
---|
[13742] | 19 | <i class="fa fa-cloud"></i> Uploads
|
---|
[13733] | 20 | </a>
|
---|
| 21 | </li>
|
---|
[13656] | 22 | </ul>
|
---|
[13733] | 23 |
|
---|
| 24 | <div class="row"
|
---|
| 25 | style="text-align:center">
|
---|
[13656] | 26 | @Model.message
|
---|
| 27 | </div>
|
---|
[13733] | 28 |
|
---|
| 29 | <div class="row"
|
---|
| 30 | style="padding:10px; margin-right:0px!important">
|
---|
[13656] | 31 | @if (Model.userJobs.Count == 0)
|
---|
[13733] | 32 | {
|
---|
[13656] | 33 | <div>
|
---|
[13733] | 34 | <p style="text-align:center">
|
---|
| 35 | No jobs found
|
---|
| 36 | </p>
|
---|
[13656] | 37 | </div>
|
---|
| 38 |
|
---|
| 39 | }
|
---|
| 40 | else {
|
---|
| 41 | <div class="col-sm-4">
|
---|
| 42 | <div class="btn-group-vertical btn-block">
|
---|
[13733] | 43 | <a class="btn btn-info btn-lg btn-block disabled"
|
---|
| 44 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
| 45 | text-shadow:2px 2px black;">
|
---|
| 46 | <i class="fa fa-cog"></i> Hive jobs
|
---|
| 47 | </a>
|
---|
[13656] | 48 | @foreach (var job in Model.userJobs)
|
---|
| 49 | {
|
---|
[13733] | 50 | <a class="btn btn-default
|
---|
| 51 | @(Model.selectedJob != null && job.Id == Model.selectedJob.Id ? "active" : "" )
|
---|
| 52 | "
|
---|
[13656] | 53 | asp-controller="Job"
|
---|
| 54 | asp-action="Selected"
|
---|
[13712] | 55 | asp-route-id="@job.Id"
|
---|
[13733] | 56 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
| 57 | text-align:left;"
|
---|
[13712] | 58 | onclick="showLoader()">
|
---|
| 59 | @job.Job.Name - @job.Job.DateCreated
|
---|
[13733] | 60 | <span class="label
|
---|
| 61 | @(job.Job.FinishedCount == @job.Job.JobCount ? "label-success" : "label-default")
|
---|
| 62 | label-as-badge pull-right">
|
---|
| 63 | <strong>@job.Job.FinishedCount / @job.Job.JobCount</strong>
|
---|
| 64 | </span>
|
---|
[13656] | 65 | </a>
|
---|
| 66 | }
|
---|
| 67 |
|
---|
| 68 | </div>
|
---|
| 69 | </div>
|
---|
[13712] | 70 | <p style="display:none" id="loader" class="text-center">
|
---|
| 71 | <br /><br /><br /><br /><br /><br /><br />
|
---|
| 72 | <i class="fa fa-cog fa-spin fa-5x" id="spinner">
|
---|
| 73 | </i>
|
---|
| 74 | </p>
|
---|
[13689] | 75 |
|
---|
[13740] | 76 | <div class="col-sm-8"
|
---|
| 77 | id="content"
|
---|
| 78 | style="padding:5px; padding-left:10px;">
|
---|
| 79 | @if (Model.selectedJob != null)
|
---|
[13733] | 80 | {
|
---|
[13740] | 81 | <div class="panel panel-default"
|
---|
| 82 | style="border-width:2px!important;padding:17px;
|
---|
[13733] | 83 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
|
---|
[13740] | 84 | <div class="row">
|
---|
| 85 | <h2 style="padding-left:20px">
|
---|
| 86 | @Model.selectedJob.Job.Name
|
---|
| 87 | <a onclick="popUpDelete()"
|
---|
| 88 | style="margin-bottom:10px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
[13733] | 89 | text-shadow:2px 2px black;"
|
---|
[13740] | 90 | class='btn btn-danger'>
|
---|
| 91 | <span class="glyphicon glyphicon-trash"
|
---|
| 92 | aria-hidden="true"></span>
|
---|
| 93 | Delete job
|
---|
| 94 | </a>
|
---|
| 95 | <a style="display:none; "
|
---|
| 96 | asp-action="Delete"
|
---|
| 97 | asp-route-id="@Model.selectedJob.Id"
|
---|
| 98 | asp-controller="Job" id="del"
|
---|
| 99 | onclick="showDeleter()"></a>
|
---|
[13689] | 100 |
|
---|
[13740] | 101 | <script type="text/javascript">
|
---|
| 102 | function popUpDelete() {
|
---|
| 103 | if (confirm("Are you sure you want to delete this job?") == true) {
|
---|
| 104 | document.getElementById("del").click();
|
---|
[13733] | 105 | }
|
---|
[13656] | 106 |
|
---|
[13740] | 107 | }
|
---|
| 108 | </script>
|
---|
[13656] | 109 |
|
---|
[13740] | 110 | </h2>
|
---|
| 111 | <div class="col-sm-6" style="padding-left:30px">
|
---|
| 112 | <p>Description: @Model.selectedJob.Job.Description</p>
|
---|
| 113 | <p>Resources: @Model.selectedJob.Job.ResourceNames</p>
|
---|
| 114 | <p>Created: @Model.selectedJob.Job.DateCreated</p>
|
---|
| 115 | <p>Owned by: @Model.selectedJob.Job.OwnerUsername</p>
|
---|
[13714] | 116 |
|
---|
[13733] | 117 | </div>
|
---|
[13740] | 118 | <div class="col-sm-6" style="padding-left:30px">
|
---|
| 119 | <p id="jobcalculating">
|
---|
| 120 | Calculating: @Model.selectedJob.Job.CalculatingCount
|
---|
| 121 | </p>
|
---|
| 122 | <p id="jobfinished">
|
---|
| 123 | Finished: @Model.selectedJob.Job.FinishedCount
|
---|
| 124 | </p>
|
---|
| 125 | <p>
|
---|
| 126 | Automatic refresh:
|
---|
| 127 | <input type="checkbox"
|
---|
| 128 | checked
|
---|
| 129 | data-toggle="toggle"
|
---|
| 130 | data-onstyle="success"
|
---|
| 131 | id="refreshtogg"
|
---|
| 132 | onchange="autoRefresh()" />
|
---|
| 133 | </p>
|
---|
| 134 | </div>
|
---|
[13714] | 135 |
|
---|
[13740] | 136 | </div>
|
---|
[13754] | 137 | <script src="~/js/hubs/graphhubber.js"></script>
|
---|
[13740] | 138 | <div class="row" style="text-align:center">
|
---|
| 139 | @Html.Partial("_Graphlegend")
|
---|
| 140 | <div id="graphMain" style="width:100%;height:0px">
|
---|
[13733] | 141 |
|
---|
[13740] | 142 | </div>
|
---|
| 143 | <div class="btn btn-lg btn-info"
|
---|
| 144 | onclick="redrawMain()"
|
---|
| 145 | style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
---|
[13733] | 146 | text-shadow:2px 2px black;">Refresh main graph</div>
|
---|
[13740] | 147 | </div>
|
---|
| 148 | <div class="row">
|
---|
| 149 | <h3 style="padding-left:20px; ">
|
---|
| 150 | @Model.selectedJob.Job.JobCount Tasks
|
---|
| 151 | </h3>
|
---|
| 152 | @foreach (var task in Model.selectedJob.HiveTasks)
|
---|
| 153 | {
|
---|
| 154 | @Html.Partial("SelectedJobPartials/_TaskPartial",
|
---|
[13712] | 155 | new HeuristicLab.Clients.Hive.WebJobManager.Models.HiveTaskContainer(task))
|
---|
[13689] | 156 |
|
---|
[13740] | 157 | }
|
---|
[13733] | 158 | </div>
|
---|
[13740] | 159 | </div>
|
---|
| 160 | }
|
---|
| 161 | </div>
|
---|
[13733] | 162 |
|
---|
[13740] | 163 |
|
---|
[13656] | 164 | }
|
---|
[13712] | 165 | <script type="text/javascript">
|
---|
| 166 | function showLoader() {
|
---|
[13733] | 167 | document.getElementById("content").style.display = "none";
|
---|
[13712] | 168 | document.getElementById("loader").style.display = "";
|
---|
[13733] | 169 |
|
---|
[13712] | 170 | }
|
---|
| 171 | function showDeleter() {
|
---|
[13733] | 172 | document.getElementById("content").style.display = "none";
|
---|
[13712] | 173 | document.getElementById("loader").style.display = "";
|
---|
[13733] | 174 |
|
---|
[13712] | 175 | document.getElementById("spinner").className = "fa fa-trash-o fa-spin fa-5x";
|
---|
| 176 | }
|
---|
| 177 | </script>
|
---|
[13656] | 178 | </div>
|
---|
[13689] | 179 | </div>
|
---|