Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml @ 13742

Last change on this file since 13742 was 13742, checked in by jlodewyc, 8 years ago

#2582 User delete, subscriptions. Groups add, delete, edit, add members

File size: 8.2 KB
Line 
1@using HeuristicLab.Clients.Hive.WebJobManager.ViewModels
2@model JobViewModel
3<div id="userId" style="display:none">@ViewBag.SessionId</div>
4<div>
5    @Html.Partial("Navbar", new NavbarViewModel("Job"))
6
7    <ul class="nav nav-pills nav-justified">
8        <li role="presentation"
9            class="active">
10            <a asp-controller="Job"
11               asp-action="Index">
12                <i class="fa fa-tasks"></i> Jobs
13            </a>
14        </li>
15        <li role="presentation"
16            class="">
17            <a asp-controller="Job"
18               asp-action="Uploads">
19                <i class="fa fa-cloud"></i>  Uploads
20            </a>
21        </li>
22    </ul>
23
24    <div class="row"
25         style="text-align:center">
26        @Model.message
27    </div>
28
29    <div class="row"
30         style="padding:10px; margin-right:0px!important">
31        @if (Model.userJobs.Count == 0)
32            {
33            <div>
34                <p style="text-align:center">
35                    No jobs found
36                </p>
37            </div>
38
39        }
40        else {
41            <div class="col-sm-4">
42                <div class="btn-group-vertical btn-block">
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>
48                    @foreach (var job in Model.userJobs)
49                {
50                        <a class="btn btn-default
51                           @(Model.selectedJob != null && job.Id == Model.selectedJob.Id ? "active" : "" )
52                           "
53                           asp-controller="Job"
54                           asp-action="Selected"
55                           asp-route-id="@job.Id"
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;"
58                           onclick="showLoader()">
59                            @job.Job.Name - @job.Job.DateCreated
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>
65                        </a>
66                    }
67
68                </div>
69            </div>
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>
75
76            <div class="col-sm-8"
77                 id="content"
78                 style="padding:5px; padding-left:10px;">
79                @if (Model.selectedJob != null)
80                {
81                    <div class="panel panel-default"
82                         style="border-width:2px!important;padding:17px;
83                        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
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);
89                                    text-shadow:2px 2px black;"
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>
100
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();
105                                        }
106
107                                    }
108                                </script>
109
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>
116
117                            </div>
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>
135
136                        </div>
137                        <script src="~/js/scripts/graphs/graphdatacollector.min.js"></script>
138                        <script src="~/js/scripts/graphs/graphhubber.min.js"></script>
139                        <div class="row" style="text-align:center">
140                            @Html.Partial("_Graphlegend")
141                            <div id="graphMain" style="width:100%;height:0px">
142
143                            </div>
144                            <div class="btn btn-lg btn-info"
145                                 onclick="redrawMain()"
146                                 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
147                            text-shadow:2px 2px black;">Refresh main graph</div>
148                        </div>
149                        <div class="row">
150                            <h3 style="padding-left:20px; ">
151                                @Model.selectedJob.Job.JobCount Tasks
152                            </h3>
153                            @foreach (var task in Model.selectedJob.HiveTasks)
154                            {
155                                @Html.Partial("SelectedJobPartials/_TaskPartial",
156                           new HeuristicLab.Clients.Hive.WebJobManager.Models.HiveTaskContainer(task))
157
158                            }
159                        </div>
160                    </div>
161                }
162            </div>
163
164
165        }
166        <script type="text/javascript">
167            function showLoader() {
168                document.getElementById("content").style.display = "none";
169                document.getElementById("loader").style.display = "";
170
171            }
172            function showDeleter() {
173                document.getElementById("content").style.display = "none";
174                document.getElementById("loader").style.display = "";
175
176                document.getElementById("spinner").className = "fa fa-trash-o fa-spin fa-5x";
177            }
178        </script>
179    </div>
180</div>
Note: See TracBrowser for help on using the repository browser.