Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Job/Index.cshtml @ 9324

Last change on this file since 9324 was 9324, checked in by fschoepp, 12 years ago

#1888:

  • DAL: Added a Delete method which deletes by experiment id.
  • HL DataTables will now be transposed and mapped as double[ROWS][COLUMNS] (transposed)
  • JS: Moved all classes into "modules" to prevent namespace pollution (using OAAS_MODEL for model classes, OAAS_VIEW for views and OAAS_CONTROLLER for controllers)
  • JS: Moved DatatypeMapper classes into Backbone views
  • JS: Models now correctly send DELETE requests
  • Added a new job overview page (which also renders run details) using AJAX
  • Using moment.min.js to format DateTime as string
  • Controllers now inherit from BaseController which provides a RedirectToLoginIfNecessary-method
  • Added loading animations to several AJAX bound places (loading experiments / scenarios)
  • Added a section to _Layout.cshtml which allows page-specific JavaScript includes (<script> only for a certain page)
  • Fixed Build/Edit of experiment menu redirecting to the wrong page
  • The Experiment Variation Dialog disables input fields, if the property has not been activated before
File size: 2.7 KB
RevLine 
[9324]1@section customHeader {
2    <script type='text/javascript' src='@Url.Content("~/Content/job.model.js")'></script>
3    <script type='text/javascript' src='@Url.Content("~/Content/job.view.js")'></script>
4    <script type='text/javascript' src='@Url.Content("~/Content/job.controller.js")'></script>
5    <script type='text/javascript' src='@Url.Content("~/Content/moment.min.js")'></script>
6}
7
8@{
9    ViewBag.Title = "Jobs";
10}
11
12<script type="text/template" id="loadingTemplate">
13    <span><%= text %> <img src="@Url.Content("~/Content/ajax-loader.gif")" alt="Loading animation" class="hugeLoading" /> </span>
14</script>
15
16<script type="text/template" id="jobRowTemplate">
17<tr data-jobId="<%= Id%>">
18  <td><%= Id%></td>
19  <td>
20    <%= moment(DateCreated).format('YYYY-MM-DD HH:mm:ss') %>
21  </td>
22  <td><%= Name%></td>
23  <td><%= Resource%></td> 
24  <td>
25  <% if (Loading) { %>
26    <img src="@Url.Content("~/Content/ajax-loader.gif")" alt="Loading animation" class="loader" />
27  <% }%>
28  <% if (State == 0) { %>   
29  <span>Waiting...</span>
30  <% } else if (State == 1) { %>
31  <span>Calculating...</span>
32  <% } else if (State == 2) { %>
33  <img src="@Url.Content("~/Content/warning-2.png")" alt="Loading animation" class="loader" />
34  <span>Aborted</span>
35  <% } else if (State == 3) { %>
36  <img src="@Url.Content("~/Content/warning-2.png")" alt="Loading animation" class="loader" />
37  <span>Failed</span>
38  <% } else { %>
39  <img src="@Url.Content("~/Content/ok-2.png")" alt="Loading animation" class="loader" />
40  <span>Finished</span>
41  <% } %> 
42  </td>
43  <td><button type="button" data-id="<%= Id %>" data-name="DeleteButton" >Delete</Button></td>
44</tr>
45</script>
46
47<script type="text/template" id="jobHeaderTemplate">
48<thead>
49<tr>
50  <th>Id</th>
51  <th>Created</th>
52  <th>Name</th>
53  <th>Resource</th>
54  <th>State</th>
55  <td>Delete</td>
56</tr>
57</thead>
58</script>
59
60<script type="text/template" id="runTemplate">
61  <h3><%= name %></h3>
62  <div>
63    <table>
64      <thead>
65        <tr>
66          <td>Key</td>
67          <td>Value</td>
68        </tr>
69      </thead>
70      <tbody>
71      </tbody>
72    </table>
73  </div>
74</script>
75
76
77<script type='text/javascript'>
78$(document).ready(function () {
79    var ctrl = new OAAS_CONTROLLER.JobPageController();
80    ctrl.create();
81  });
82
83</script>
84<noscript>
85<p>
86  Please activate JavaScript to view this page correctly!
87</p>
88</noscript>
89
90<h1>Job overview</h1>
91<div id='jobOverview' style='overflow: auto; height: 450px' class='bigImage'>
92    <p>Loading jobs... Please be patient...</p>
93    <img src="@Url.Content("~/Content/ajax-loader.gif")" alt="Loading animation" class="hugeLoading" />
94</div>
95
96
97<h1>Job results</h1>
98<div id='jobDetails'></div>
99<div id='tmp'>
100</div>
Note: See TracBrowser for help on using the repository browser.