eclipse/cmd/eclipse-httpd/html/pages/job.html.tmpl

62 lines
1.7 KiB
Cheetah
Raw Normal View History

2024-01-18 04:15:20 +00:00
{{/*
* Copyright (C) 2024 Umorpha Systems
* SPDX-License-Identifier: AGPL-3.0-or-later
*/}}
{{- define "page-title" }}Job {{ .Job.ID }}{{ end }}
{{- define "page-content" }}
<section>
<dl class="job">
<dt class="job-status job-{{ .Job.Status }}">Status</dt>
2024-01-23 04:10:47 +00:00
<dd class="job-status job-{{ .Job.Status }}">{{ .Job.Status }}{{ if gt (len .Job.StatusMsg) 0 }}: {{ .Job.StatusMsg }}{{ end }}</dd>
2024-01-18 04:15:20 +00:00
<dt class="job-triggers">Triggers</dt>
<dd class="job-triggers">{{ template "triggers.html.tmpl" .Job }}</dd>
<dt class="job-command">Command</dt>
2024-01-23 01:31:22 +00:00
<dd class="job-command"><pre>{{ .Job.Command }}</pre></dd>
2024-01-18 04:15:20 +00:00
</dl>
</section>
<section>
<h2>Artifacts</h2>
2024-01-18 19:55:53 +00:00
{{- if .Job.Status.Finished }}
2024-01-18 21:17:26 +00:00
{{- if gt (len .ArtifactNames) 0 }}
2024-01-18 19:55:53 +00:00
<ul>
2024-01-18 21:17:26 +00:00
{{- range $name := .ArtifactNames }}
<li><a href="artifacts/{{ $name }}"><tt>{{ $name }}</tt></a></li>
2024-01-18 19:55:53 +00:00
{{- end }}
</ul>
2024-01-18 04:15:20 +00:00
{{- else }}
2024-01-19 01:23:49 +00:00
<p>This job had no artifacts.<p>
2024-01-18 21:17:26 +00:00
{{- end }}
{{- else }}
2024-01-18 04:15:20 +00:00
<p>Artifacts are not available until the job has finished.</p>
{{- end }}
</section>
<section>
<h2>Log</h2>
2024-01-18 19:55:53 +00:00
{{- if .Job.Status.HasLog }}
2024-01-18 04:15:20 +00:00
<iframe src="log.txt"></iframe>
2024-01-19 05:22:24 +00:00
<script>
var frame = document.getElementsByTagName('iframe')[0];
function resizeFrame() {
if (frame.contentWindow.document.documentElement) {
frame.style.height = frame.contentWindow.document.documentElement.offsetHeight + 'px';
}
requestAnimationFrame(resizeFrame);
};
resizeFrame();
{{- if not .Job.Status.Finished }}
frame.onload = () => {
location.reload();
};
{{- end }}
2024-01-19 05:22:24 +00:00
</script>
2024-01-18 04:15:20 +00:00
{{- else }}
<p>There is no log because the job has not started yet.</p>
{{- end }}
</section>
{{- end }}
{{- template "page.html.tmpl" . }}