summaryrefslogtreecommitdiff
path: root/templates/status.tpl
blob: eef9e952e5fcddcd77200fd9d95c3806d961f26e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE HTML>
<html>
    <head>
        <title>Lorry Controller status</title>
        <link rel="stylesheet" href="/lc-static/style.css" type="text/css" />
    </head>
    <body>
        % import json

        <p>{{warning_msg}}</p>

        <h1>Status of Lorry Controller</h1>

% if running_queue:
<form method="POST" action="/1.0/stop-queue">
  <p>New jobs are allowed.
    <input type="submit" name="submit" value="Don't allow new jobs" />
    <input type="hidden" name="redirect" value="/1.0/status-html" />
  </p>
</form>
% else:
<form method="POST" action="/1.0/start-queue">
  <p>New jobs are NOT allowed.
    <input type="submit" name="submit" value="Allow new jobs" />
    <input type="hidden" name="redirect" value="/1.0/status-html" />
  </p>
</form>
% end

<form method="POST" action="/1.0/read-configuration">
  <p>
    <input type="submit" name="submit" value="Re-read configuration" />
    <input type="hidden" name="redirect" value="/1.0/status-html" />
  </p>
</form>

<p>Maximum number of jobs: {{max_jobs}}.</p>

        <p>Free disk space: {{disk_free_gib}} GiB.</p>

<h2>Remote Troves</h2>

<table>
<tr>
<th>Trove host</th>
<th>Due for re-scan of remote repositories</th>
</tr>
% for trove_info in troves:
<tr>
<td>{{trove_info['trovehost']}}</td>
<td>{{trove_info['ls_due_nice']}}</td>
</tr>
% end
</table>

        <h2>Currently running jobs</h2>

% if len(run_queue) == 0:
<p>There are no jobs running at this time.</p>
% else:
<table>
<tr>
<th>Job ID</th>
<th>path</th>
</tr>
%     for spec in run_queue:
%         if spec['running_job'] is not None:
<tr>
<td><a href="/1.0/job-html/{{spec['running_job']}}">{{spec['running_job']}}</a></td>
<td><a href="/1.0/lorry-html/{{spec['path']}}">{{spec['path']}}</a></td>
</tr>
%         end
%     end
</table>
% end

<p>See separate list of <a href="/1.0/list-jobs-html">all jobs that
    have ever been started</a>.</p>

        <h2>Run-queue</h2>

<table>
<tr>
<th>Pos</th>
<th>Path</th>
<th>Interval</th>
<th>Due</th>
<th>Job?</th>
</tr>
% for i, spec in enumerate(run_queue):
%   obj = json.loads(spec['text'])
%   name = obj.keys()[0]
%   fields = obj[name]
<tr>
<td>{{i+1}}</td>
<td><a href="/1.0/lorry-html/{{spec['path']}}">{{spec['path']}}</a></td>
<td>{{spec['interval_nice']}}</td>
<td>{{spec['due_nice']}}</td>
%   if spec['running_job']:
<td><a href="/1.0/job-html/{{spec['running_job']}}">{{spec['running_job']}}</a></td>
%   else:
<td></td>
%   end
</tr>
% end
</table>

        <hr />

        <p>Updated: {{timestamp}}</p>

    </body>
</html>