Commit 9930e1a8 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

Hide the job logs panel until the job is started

(because it's kind of confusing to have it stand there
 with nothing inside)
parent 5337ba09
Pipeline #30634 failed with stage
in 1 minute and 13 seconds
......@@ -537,6 +537,9 @@ class JobDetail(LoginRequiredMixin, DetailView):
logs = ""
kwargs['logs'] = logs
# Hide the logs panel if the job is not yet started
kwargs["logs_hidden"] = "hidden" if job.state in (Job.NEW, Job.WAITING) else ""
# Get the files and some metadata such as the webapp version
webapp = Webapp.objects.get(docker_name=self.object.webapp.docker_name)
if os.path.exists(dirname):
......@@ -100,7 +100,7 @@
<div class="col-sm">
<div class="col-sm" id="job-logs-panel" {{ logs_hidden }}>
<h5 class="card-title">Logs</h5>
<pre style="overflow: auto; height: 40em;"
><code class="lang-console" id="job-logs">{{ logs }}</code></pre>
......@@ -141,6 +141,10 @@ json_seq_event_listener("/aio/jobs/{{ }}/events",
if (msg.state) {
// job state updated
// display the logs panel when job starts
if (!["NEW", "WAITING"].includes(msg.state)) {
$("#job-logs-panel").attr("hidden", null)
if (msg.logs) {
// new logs received
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment