diff options
author | Rémi Duraffort <remi.duraffort@linaro.org> | 2017-10-26 10:06:07 +0200 |
---|---|---|
committer | Neil Williams <neil.williams@linaro.org> | 2017-10-27 13:29:57 +0000 |
commit | 4d0d867e497d0df66ee47210d7992e0244b3cd2e (patch) | |
tree | 9c0bcb16339895c91c43a3ab11a738f2312bf6eb /lava_scheduler_app/templates/lava_scheduler_app | |
parent | c44009facd0f44007dc36bb84b2241636fcc5637 (diff) |
Remove non pipeline jobs support
Change-Id: I1aeeda2ba5db79d1b083d86b172b515811f5b45e
Diffstat (limited to 'lava_scheduler_app/templates/lava_scheduler_app')
10 files changed, 15 insertions, 938 deletions
diff --git a/lava_scheduler_app/templates/lava_scheduler_app/_device_base.html b/lava_scheduler_app/templates/lava_scheduler_app/_device_base.html index 60f15d322..149fdbc73 100644 --- a/lava_scheduler_app/templates/lava_scheduler_app/_device_base.html +++ b/lava_scheduler_app/templates/lava_scheduler_app/_device_base.html @@ -10,7 +10,7 @@ </div> {% endif %} -{% if can_admin and device.is_pipeline and template_mismatch %} +{% if can_admin and template_mismatch %} <div class="alert alert-warning"> <strong>Configuration Error: template-mismatch.</strong> <p>The '{{ device.device_type }}' device type has no matching jinja2 template. @@ -83,10 +83,8 @@ {% endif %} <dt>Worker</dt> <dd><a href="{{ device.worker_host.get_absolute_url }}">{{ device.worker_host.hostname }}</a></dd> - {% if device.is_pipeline %} <dt>Device dictionary</dt> <dd><a href="{% url 'lava.scheduler.device.dictionary' device.pk %}"><span class="glyphicon glyphicon-eye-open"></span></a></dd> - {% endif %} </dl> </div> <div class="col-md-4"> diff --git a/lava_scheduler_app/templates/lava_scheduler_app/_section_logging.html b/lava_scheduler_app/templates/lava_scheduler_app/_section_logging.html deleted file mode 100644 index cf35aec04..000000000 --- a/lava_scheduler_app/templates/lava_scheduler_app/_section_logging.html +++ /dev/null @@ -1,50 +0,0 @@ -{% load utils %} -{% load django_tables2 %} -{% spaceless %} - {% get_pipeline_sections pipeline_data as sections %} - <div class="col-md-6"> - <h4>Sections</h4> - <ul class="nav nav-pills"> - {% for item in sections %} - {% if 'section' in request.GET %} - {% for section, level in item.items %} - {% if section in request.GET.section %} - <li><a href="{% querystring "section"=section %}" class="btn btn-primary">{{ section }}</a></li> - {% else %} - <li><a href="{% querystring "section"=section %}" class="btn btn-info">{{ section }}</a></li> - {% endif %} - {% endfor %} - {% else %} - {% for section, level in item.items %} - {% if section == default_section %} - <li><a href="{% querystring "section"=section %}" class="btn btn-primary">{{ section }}</a></li> - {% else %} - <li><a href="{% querystring "section"=section %}" class="btn btn-info">{{ section }}</a></li> - {% endif %} - {% endfor %} - {% endif %} - {% endfor %} - </ul> - </div> - <div class="col-md-6"> - <h4>Logging levels</h4> - <ul class="nav nav-pills"> - <li> </li> - {% if 'off' in request.GET.warning %} - <li><a href="{% querystring "warning"="" %}" class="btn btn-info">Warning</a></li> - {% else %} - <li><a href="{% querystring "warning"="off" %}" class="btn btn-warning">Warning</a></li> - {% endif %} - {% if 'off' in request.GET.info %} - <li><a href="{% querystring "info"="" %}" class="btn btn-info">Info</a></li> - {% else %} - <li><a href="{% querystring "info"="off" %}" class="btn btn-primary">Info</a></li> - {% endif %} - {% if 'on' in request.GET.debug %} - <li><a href="{% querystring "debug"="" %}" class="btn btn-primary">Debug</a></li> - {% else %} - <li><a href="{% querystring "debug"="on" %}" class="btn btn-info">Debug</a></li> - {% endif %} - </ul> - </div> -{% endspaceless %} diff --git a/lava_scheduler_app/templates/lava_scheduler_app/expanded_job_definition.html b/lava_scheduler_app/templates/lava_scheduler_app/expanded_job_definition.html deleted file mode 100644 index 5034bea36..000000000 --- a/lava_scheduler_app/templates/lava_scheduler_app/expanded_job_definition.html +++ /dev/null @@ -1,111 +0,0 @@ -{% extends "layouts/content-bootstrap.html" %} - -{% block content %} -<h2>Expanded job definition file - {% if job.is_multinode %}{{ job.sub_id }}{% else %}{{ job.id }}{% endif %} - <a class="btn btn-xs btn-info" href="{% url 'lava.scheduler.job.definition.plain' job.pk %}" title="Download as text file"><span class="glyphicon glyphicon-download"></span> download</a></h2> -This job has repeated actions. Resubmit action will use Original Definition. - -<div class="row"> - <div class="col-md-4"> - <h4 class="modal-header">Device</h4> - <dl class="dl-horizontal"> - {% if job.actual_device %} - <dt>Name</dt> - <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a>{% endif %}</dd> - {% endif %} - - {% if job.requested_device %} - <dt>Type</dt> - <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a>{% endif %}</dd> - {% elif job.requested_device_type %} - <dt>Requested type</dt> - <dd><a href="{{ job.requested_device_type.get_absolute_url }}">{{ job.requested_device_type }}</a> <a href="{% url 'lava.scheduler.device_type_report' job.requested_device_type %}">(reports)</a></dd> - {% endif %} - </dl> - </div> - <div class="col-md-4"> - <h4 class="modal-header">Logs</h4> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{{ job.get_absolute_url }}" class="btn btn-primary">Summary</a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.pk %}" class="btn btn-primary">Complete log</a></li> - {% endif %} - {% if job.results_link %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} - </ul> - </div> - </div> - </div> - <div class="col-md-4"> - <h4 class="modal-header">Actions</h4> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if show_resubmit and not job.is_multinode and not job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.resubmit' job.pk %}" class="btn btn-default">Resubmit</a></li> - {% endif %} - {% if user.is_authenticated %} - <li><a href="{% url 'lava.scheduler.job.toggle_favorite' job.pk %}" class="btn btn-info"> - {% if is_favorite %} - Remove from favorites - {% else %} - Add to favorites - {% endif %} - </a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - <li><a href="{% url 'lava.scheduler.job.definition' job.pk %}" class="btn btn-info">Original Definition</a></li> - {% if job.is_multinode %} - <li><a href="{% url 'lava.scheduler.job.multinode_definition' job.pk %}" class="btn btn-info">Multinode Definition</a></li> - {% elif job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.vmgroup_definition' job.pk %}" class="btn btn-info">VMGroup Definition</a></li> - {% endif %} - </ul> - </div> - </div> - </div> -</div> -{% if job.is_multinode or job.is_vmgroup %} -<div class="row"> - <div class="col-md-6"> - <h4 class="modal-header">Sub jobs</h4> - <dl class="dl-horizontal"> - {% for subjob in job.sub_jobs_list %} - <dt><a href="{% url 'lava.scheduler.job.detail' subjob.sub_id %}">{{ subjob.sub_id }}</a> - {% if '0' in subjob.sub_id and '0' not in job.sub_id %} - <abbr title="view job {{ subjob.sub_id }} to see the result bundle, if any.">(?)</abbr> - {% endif %} - </dt> - <dd> - {% if subjob.actual_device.hostname %} - on: <a href="{{ subjob.actual_device.get_absolute_url }}">{{ subjob.actual_device.hostname }}</a> - as: {{ subjob.device_role }} - {% else %} - No device assigned as {{ subjob.device_role }}.</dd> - {% endif %} - </dd> - {% endfor %} - </dl> - </div> -</div> -{% endif %} - - -<h4 class="modal-header">Definition</h4> -<pre>{{ job.definition }}</pre> - -{% endblock content %} diff --git a/lava_scheduler_app/templates/lava_scheduler_app/job.html b/lava_scheduler_app/templates/lava_scheduler_app/job.html index d98e76819..aa571d06a 100644 --- a/lava_scheduler_app/templates/lava_scheduler_app/job.html +++ b/lava_scheduler_app/templates/lava_scheduler_app/job.html @@ -40,10 +40,6 @@ {% endblock %} {% block content %} -{% if job.status >= job.RUNNING and not job.is_pipeline %} -<a class="btn btn-sm btn-default" href="#bottom">End of log file <span class="glyphicon glyphicon-fast-forward"></span></a> -{% endif %} - <div class="row" id="top"> <div class="col-md-4"> <h4 class="modal-header">Job information</h4> @@ -89,34 +85,18 @@ <li><a href="{% url 'lava.scheduler.job.definition' job.pk %}" class="btn btn-info">Definition</a></li> {% if job.is_multinode %} <li><a href="{% url 'lava.scheduler.job.multinode_definition' job.sub_id %}" class="btn btn-info">Multinode Definition</a></li> - {% elif job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.vmgroup_definition' job.pk %}" class="btn btn-info">VMGroup Definition</a></li> - {% elif expand %} - <li><a href="{% url 'lava.scheduler.job.expanded_definition' job.pk %}" class="btn btn-info">Expanded Definition</a></li> {% endif %} </ul> </div> <div class="col-md-3"> <ul class="nav nav-pills nav-stacked"> - {% if job.is_pipeline %} - {% if job.is_multinode %} + {% if job.is_multinode %} <li><a href="{% url 'lava.scheduler.job.complete_log' job.sub_id %}" class="btn btn-primary">Complete log</a></li> - {% else %} + {% else %} <li><a href="{% url 'lava.scheduler.job.complete_log' job.pk %}" class="btn btn-primary">Complete log</a></li> - {% endif %} - {% elif job_file_present and not job.archived_job_file %} - {% if job.is_multinode %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.sub_id %}" class="btn btn-primary"{% if size_warning %} disabled="disabled"{% endif %}>Complete log</a></li> - {% else %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.pk %}" class="btn btn-primary"{% if size_warning %} disabled="disabled"{% endif %}>Complete log</a></li> - {% endif %} {% endif %} {% if job.results_link and not job.archived_bundle %} - {% if job.is_pipeline %} <li><a href="{{ job.results_link }}" class="btn btn-success">Results <span class="glyphicon glyphicon-signal"></span></a></li> - {% else %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle <span class="glyphicon glyphicon-signal"></span></a></li> - {% endif %} {% endif %} </ul> </div> @@ -162,19 +142,12 @@ {% endif %} </ul> {% endif %} - {% if change_priority and job.status == job.SUBMITTED and not job.is_multinode %} - <form method="POST" action="{% url 'lava.scheduler.job.priority' job.id %}" id="priority-choice"> - {% csrf_token %} - <button id="priority-button" class="btn btn-default">Set priority</button><br /> - {{ job.priority|get_priority_select }} - </form> - {% endif %} </div> </div> </div> </div> <hr/> -{% if job.is_multinode or job.is_vmgroup %} +{% if job.is_multinode %} <div class="row"> <div class="col-md-6"> <h4 class="modal-header">Sub jobs</h4> @@ -202,19 +175,14 @@ </div> {% endif %} -{% if job.is_pipeline %} <ul class="nav nav-tabs"> <li class="active"><a href="#Log" data-toggle="tab">Job summary</a></li> <li><a href="#Description" data-toggle="tab">Job description</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="Log"> -{% endif %} -{% if job.status < job.RUNNING and not job.is_pipeline %} -<h4 class="modal-header">Dispatcher Log messages</h4> -<i>No log file yet.</i> -{% elif job.archived_job_file %} +{% if job.archived_job_file %} <i>Job log file archived. Please contact the administrator for job log file.</i> {% else %} {% if job_file_present and not job.archived_job_file %} @@ -244,31 +212,11 @@ It can only be downloaded.</p> </div> {% endif %} -{% if not job.is_pipeline %} -<h4 class="modal-header">Dispatcher Log messages (file size = {{ job_file_size|filesizeformat }}) <a - class="btn btn-xs btn-info" href="{% url 'lava.scheduler.job.log_file.plain' job.pk %}" - title="Download as text file"><span class="glyphicon glyphicon-download"></span> download</a></h4> -<a class="btn btn-sm btn-default" href="#bottom">End of log file <span class="glyphicon glyphicon-fast-forward"></span></a><br/><br/> - -<div class="btn-group" data-toggle="buttons" id="logbuttons"> -{% for level in levels %} -{% if level.1 %} - <label class="btn btn-primary" id="{{ level.0 }}_label" for="{{ level.0 }}"><input type="checkbox" id="{{ level.0 }}">{{ level.0 }}</label> -{% else %} - <label class="btn btn-primary disabled" id="{{ level.0 }}_label" for="{{ level.0 }}"><input type="checkbox" id="{{ level.0 }}">{{ level.0 }}</label> - -{% endif %} -{% endfor %} -</div> -{% endif %} <div id="log-messages"> {% for log in job_log_messages %} <code class="log {{log.0}} {{log.2}}">{{ log.1 }}</code> {% endfor %} - {% if job.status == job.RUNNING and not job.is_pipeline %} - <img src="{{ STATIC_URL }}lava_scheduler_app/images/ajax-progress.gif"/> - {% endif %} </div> {% else %} {% if job.failure_comment %} @@ -280,7 +228,6 @@ {% endif %} {% endif %} -{% if job.is_pipeline %} <div class="row" id="sectionlogs"> {% spaceless %} {% get_pipeline_sections pipeline_data as sections %} @@ -347,13 +294,6 @@ <div id="log_data"> {% include 'lava_scheduler_app/_structured_logdata.html' %} </div> - <div class="row" id="log_progress"> - <div class="col-md-8 col-md-offset-2"> - {% if job.status != job.COMPLETE and job.status != job.INCOMPLETE and job.status != job.CANCELED %} - <img src="{{ STATIC_URL }}lava_scheduler_app/images/ajax-progress.gif"/> - {% endif %} - </div> - </div> <hr/> <p>Each action is displayed relative to the timeline of the job, according to the logging level of the message from that action. @@ -364,9 +304,7 @@ There is often a lag between the dispatcher message describing an operation and the message from the target processing that operation.</p> </div> {% comment %}log messages{% endcomment %} -{% endif %} -{% if job.is_pipeline %} {% spaceless %} </div> <div class="tab-pane" id="Description"> @@ -605,14 +543,9 @@ operation.</p> </div> </div> {% endspaceless %} -{% endif %} -{% if job.status >= job.RUNNING and job_file_present and job_file_size > 0 and not job.archived_job_file %} -{% if not job.is_pipeline %} -<a class="btn btn-sm btn-default" href="#top"><span class="glyphicon glyphicon-fast-backward"></span> Start of log file</a> -<br/><br/> -{% endif %} +{% if job_file_present and job_file_size > 0 and not job.archived_job_file %} <hr/> <div class="row"> <div class="col-md-6"> @@ -627,8 +560,6 @@ operation.</p> <ul class="nav nav-pills nav-stacked"> {% if job.is_multinode %} <li><a href="{% url 'lava.scheduler.job.multinode_definition' job.sub_id %}" class="btn btn-info">Multinode Definition</a></li> - {% elif job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.vmgroup_definition' job.pk %}" class="btn btn-info">VMGroup Definition</a></li> {% else %} <li><a href="{% url 'lava.scheduler.job.definition' job.pk %}" class="btn btn-info">Definition</a></li> {% endif %} @@ -636,11 +567,7 @@ operation.</p> </div> <div class="col-md-4"> <ul class="nav nav-pills nav-stacked"> - {% if job.is_pipeline %} <li><a href="{% url 'lava.scheduler.job.complete_log' job.pk %}" class="btn btn-primary">Complete log</a></li> - {% elif job_file_present %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.pk %}#bottom" class="btn btn-primary">Complete log</a></li> - {% endif %} </ul> </div> </div> @@ -650,11 +577,7 @@ operation.</p> <div class="col-md-6"> <ul class="nav nav-pills nav-stacked"> {% if job.results_link %} - {% if job.is_pipeline %} <li><a href="{{ job.results_link }}" class="btn btn-success">Results</a></li> - {% else %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} {% endif %} </ul> </div> @@ -688,61 +611,4 @@ Each JS id relates to a HTML block of polled content. } }); </script> -{% if job.is_pipeline %} -{% if job.status == job.SUBMITTED or job.status == job.RUNNING or job.status == job.CANCELING %} -<script type="text/javascript"> - - var job_status_url = '{% url 'lava.scheduler.job_status' pk=job.pk %}'; - var logs_url = '{% url 'lava.scheduler.job_pipeline_incremental' pk=job.pk %}{% querystring 'summary'=1 %}'; - var section_url = '{% url 'lava.scheduler.job_pipeline_sections' pk=job.pk %}'; - -</script> -<script type="text/javascript" src="{{ STATIC_URL }}lava_scheduler_app/js/lava-job-polling.min.js"></script> -{% endif %} -{% else %} -{% if job.status == job.RUNNING and job_file_present %} -<script type="text/javascript"> -var pollTimer = null, logLenth = '{{ job_file_size }}'; - -function poll (start) { - $.ajax({ - url: '{% url 'lava_scheduler_app.views.job_log_incremental' pk=job.pk %}?start=' + logLenth, - dataType: 'json', - global: false, - success: function (data, success, xhr) { - var progressNode = $('#log-messages img'); - for (var i = 0; i < data.length; i++) { - var d = data[i]; - var node = $('<code class="log"></code>'); - node.addClass(d[0]); - node.text(d[1]); - - // if the button is checked we should hide the new elements - var button = $('input#' + d[0]); - if (button.is(':checked')) { - node.css('display', 'none'); - } - node.insertBefore(progressNode); - - // Activate the label if needed - var label = $('label#' + d[0] + '_label'); - label.removeClass('disabled'); - } - logLenth = xhr.getResponseHeader('X-Current-Size'); - if (xhr.getResponseHeader('X-Is-Finished')) { - $('#log-messages img').css('display', 'none'); - } else { - pollTimer = setTimeout(poll, 1000); - } - } - }); -} -$(document).ready( -function () { -pollTimer = setTimeout(poll, 1000); -} -); -</script> -{% endif %} -{% endif %} {% endblock scripts %} diff --git a/lava_scheduler_app/templates/lava_scheduler_app/job_actions_field.html b/lava_scheduler_app/templates/lava_scheduler_app/job_actions_field.html index bd8ea6c25..2640f8958 100644 --- a/lava_scheduler_app/templates/lava_scheduler_app/job_actions_field.html +++ b/lava_scheduler_app/templates/lava_scheduler_app/job_actions_field.html @@ -25,7 +25,7 @@ {% if not can_view %} onclick="javascript:void(0)" style="pointer-events: auto;" {% else %} - href="{{ record.get_absolute_url }}{% if record.is_pipeline %}#bottom{% else %}/log_file#bottom{% endif %}" + href="{{ record.get_absolute_url }}#bottom" {% endif %}> <span class="glyphicon glyphicon-fast-forward"></span> </a> diff --git a/lava_scheduler_app/templates/lava_scheduler_app/job_definition.html b/lava_scheduler_app/templates/lava_scheduler_app/job_definition.html index f78eef878..8c59e06fa 100644 --- a/lava_scheduler_app/templates/lava_scheduler_app/job_definition.html +++ b/lava_scheduler_app/templates/lava_scheduler_app/job_definition.html @@ -26,14 +26,14 @@ <dl class="dl-horizontal"> {% if job.actual_device %} <dt>Name</dt> - <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a>{% endif %}</dd> + <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a> <a + href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a></dd> {% endif %} {% if job.requested_device %} <dt>Type</dt> - <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a>{% endif %}</dd> + <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a> <a + href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a></dd> {% elif job.requested_device_type %} <dt>Requested type</dt> <dd><a href="{{ job.requested_device_type.get_absolute_url }}">{{ job.requested_device_type }}</a> <a href="{% url 'lava.scheduler.device_type_report' job.requested_device_type %}">(reports)</a></dd> @@ -43,28 +43,11 @@ <div class="col-md-4"> <h4 class="modal-header">Logs</h4> <div class="row"> - {% if not job.is_pipeline %} <div class="col-md-6"> <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{{ job.get_absolute_url }}" class="btn btn-primary">Summary</a></li> - {% endif %} - </ul> - </div> - {% endif %} - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job.is_pipeline %} <li><a href="{{ job.get_absolute_url }}" class="btn btn-primary">Complete log</a></li> - {% elif job_file_present %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.pk %}" class="btn btn-primary">Complete log</a></li> - {% endif %} {% if job.results_link %} - {% if job.is_pipeline %} <li><a href="{{ job.results_link }}" class="btn btn-success">Results</a></li> - {% else %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} {% endif %} </ul> </div> @@ -75,7 +58,7 @@ <div class="row"> <div class="col-md-6"> <ul class="nav nav-pills nav-stacked"> - {% if show_resubmit and not job.is_multinode and not job.is_vmgroup %} + {% if show_resubmit and not job.is_multinode %} <li><a href="{% url 'lava.scheduler.job.resubmit' job.pk %}" class="btn btn-default">Resubmit</a></li> {% endif %} {% if user.is_authenticated %} @@ -93,15 +76,13 @@ <ul class="nav nav-pills nav-stacked"> {% if job.is_multinode %} <li><a href="{% url 'lava.scheduler.job.multinode_definition' job.pk %}" class="btn btn-info">Multinode Definition</a></li> - {% elif job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.vmgroup_definition' job.pk %}" class="btn btn-info">VMGroup Definition</a></li> {% endif %} </ul> </div> </div> </div> </div> -{% if job.is_multinode or job.is_vmgroup %} +{% if job.is_multinode %} <div class="row"> <div class="col-md-6"> <h4 class="modal-header">Sub jobs</h4> @@ -126,7 +107,6 @@ </div> {% endif %} -{% if job.is_pipeline %} <ul class="nav nav-tabs"> <li class="active"><a href="#YAML" data-toggle="tab">Definition</a></li> <li><a href="#pipeline" data-toggle="tab">Pipeline</a></li> @@ -232,17 +212,6 @@ timeouts: </div> </div> -{% else %} -<h4 class="modal-header">Definition</h4> -{% if job.is_multinode %} -<pre>{{ job.display_definition }}</pre> -{% else %} -<pre><div class="pull-right"><small><a href="javascript: void(0);" id="copy_link" - class="btn btn-xs btn-default"><span class="glyphicon glyphicon-copy"></span> Copy to clipboard</a></small></div><span - id="job_definition_text">{{ job.display_definition }}</span> -</pre> -{% endif %} -{% endif %} {% endblock content %} {% block scripts %} diff --git a/lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html b/lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html deleted file mode 100644 index 3ebbb71c5..000000000 --- a/lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html +++ /dev/null @@ -1,424 +0,0 @@ -{% extends "layouts/content-bootstrap.html" %} -{% load utils %} - -{% block styles %} - <link href="{{ STATIC_URL }}lava_scheduler_app/css/logfile.css" rel="stylesheet" type="text/css" /> - <style> - code { - margin: 0px; - padding-top: 0px; - padding-bottom: 0px; - border: 0px; - color: black; - - display: block; - font-size: 13px; - background-color: rgb(245, 245, 245); - } - code.console { - color: blue; - } - code.traceback { - color: red; - } - </style> -{% endblock %} - -{% block content %} -{% load linenumbers %} -{% if job.status >= job.RUNNING %} -<a class="btn btn-sm btn-default" href="#bottom">End of log file <span class="glyphicon glyphicon-fast-forward"></span></a><br/><br/> -{% endif %} - -<div class="row"> - <div class="col-md-4"> - <h4 class="modal-header">Job information</h4> - <dl class="dl-horizontal"> - <dt>Description</dt> - <dd>{{job.description|default:"<i>not set</i>" }}</dd> - <dt>Status<dt> - <dd>{{ job.get_status_display }}</dd> - <dt>Priority</dt> - <dd>{{ job.get_priority_display }}</dd> - <dt>Submitter</dt> - <dd>{{ job.submitter }}</dd> - </dl> - </div> - <div class="col-md-4"> - <h4 class="modal-header">Device</h4> - <dl class="dl-horizontal"> - {% if job.actual_device %} - <dt>Name</dt> - <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a>{% endif %}</dd> - {% endif %} - - {% if job.requested_device %} - <dt>Type</dt> - <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a>{% endif %}</dd> - {% elif job.requested_device_type %} - <dt>Requested type</dt> - <dd><a href="{{ job.requested_device_type.get_absolute_url }}">{{ job.requested_device_type }}</a> <a href="{% url 'lava.scheduler.device_type_report' job.requested_device_type %}">(reports)</a></dd> - {% endif %} - - {% for tag in job.tags.all %} - {% if forloop.first %} - {% if forloop.revcounter > 1 %} - <dt>Required Tags</dt> - {% else %} - <dt>Required Tag</dt> - {% endif %} - {% endif %} - <dd>{{ tag.name }}<abbr title="{{ tag.description }}">(?)</abbr></dd> - {% endfor %} - - {% if job.actual_device %} - <dt>Owner</dt> - <dd> - {% if job.actual_device.user %} - <a href="mailto:{{ job.actual_device.user.email }}">{{ job.actual_device.user.email }}</a> - {% elif job.actual_device.group %} - Group <em>{{ job.actual_device.group }}</em> - {% else %} - <i>Unrestricted</i> - {% endif %} - </dd> - <dt>Physical access</dt> - <dd> - {% if job.actual_device.physical_owner %} - <a href="mailto:{{ job.actual_device.physical_owner.email }}">{{ job.actual_device.physical_owner.email }}</a> - {% elif job.actual_device.physical_group %} - Group <em>{{ job.actual_device.physical_group }}</em> - {% else %} - <i>Unknown</i> - {% endif %} - </dd> - {% endif %} - </dl> - </div> - <div class="col-md-4"> - <h4 class="modal-header">Timing</h4> - <dl class="dl-horizontal"> - <dt>Submitted</dt> - <dd title="{{ job.submit_time }}">{{ job.submit_time|timesince }}</dd> - <dt>Started</dt> - <dd title="{{ job.start_time|default:"not started" }}">{% if job.start_time %}{{ job.start_time|timesince }}{% else %}<i>not started</i>{% endif %}</dd> - <dt>Finished</dt> - <dd title="{{ job.end_time|default:"not finished" }}">{% if job.end_time %}{{ job.end_time|timesince }}{% else %}<i>not finished</i>{% endif %}</dd> - {% if job.start_time and job.end_time %} - <dt>Duration</dt> - <dd>{{ job.end_time|timeuntil:job.start_time }}</dd> - {% endif %} - </dl> - </div> -</div> -<div class="row"> - <div class="col-md-6"> - <h4 class="modal-header">Logs</h4> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - <li><a href="{% url 'lava.scheduler.job.definition' job.pk %}" class="btn btn-info">Definition</a></li> - {% if job.is_multinode %} - <li><a href="{% url 'lava.scheduler.job.multinode_definition' job.pk %}" class="btn btn-info">Multinode Definition</a></li> - {% elif job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.vmgroup_definition' job.pk %}" class="btn btn-info">VMGroup Definition</a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present and not job.archived_job_file %} - <li><a href="{{ job.get_absolute_url }}" class="btn btn-primary">Summary</a></li> - {% endif %} - {% if job.results_link and not job.archived_bundle %} - {% if job.is_pipeline %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results</a></li> - {% else %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} - {% endif %} - </ul> - </div> - </div> - </div> - <div class="col-md-6"> - <h4 class="modal-header">Actions</h4> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if show_cancel %} - <li><a href="{% url 'lava.scheduler.job.cancel' job.pk %}" class="btn btn-warning">Cancel</a></li> - {% endif %} - {% if show_resubmit %} - <li><a href="{% url 'lava.scheduler.job.resubmit' job.pk %}" class="btn btn-default">Resubmit</a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - {% if show_failure %} - <ul class="nav nav-pills nav-stacked"> - <li><a href="{% url 'lava.scheduler.job.annotate_failure' job.pk %}" class="btn btn-default">Comment</a></li> - </ul> - {% endif %} - {% if change_priority and not job.is_multinode %} - <form method="POST" action="{% url 'lava.scheduler.job.priority' job.pk %}" id="priority-choice"> - {% csrf_token %} - <button id="priority-button" class="btn btn-default">Set priority</button><br /> - {{ job.priority|get_priority_select }} - </form> - {% endif %} - </div> - </div> - </div> -</div> -{% if job.is_multinode or job.is_vmgroup %} -<div class="row"> - <div class="col-md-6"> - <h4 class="modal-header">Sub jobs</h4> - <dl class="dl-horizontal"> - {% for subjob in job.sub_jobs_list %} - <dt><a href="{% url 'lava.scheduler.job.detail' subjob.sub_id %}">{{ subjob.sub_id }}</a> - {% if '0' in subjob.sub_id and '0' not in job.sub_id %} - <abbr title="view job {{ subjob.sub_id }} to see the result bundle, if any.">(?)</abbr> - {% endif %} - ({{ subjob.id }}) - </dt> - <dd> - {% if subjob.actual_device.hostname %} - on: <a href="{{ subjob.actual_device.get_absolute_url }}">{{ subjob.actual_device.hostname }}</a> - as: {{ subjob.device_role }} - </dd> - {% else %} - No device assigned as {{ subjob.device_role }}.</dd> - {% endif %} - {% endfor %} - </dl> - </div> -</div> -{% endif %} - -{% if size_warning %} -<div class="alert alert-warning" id="size-warning"> -<p><strong>This log file is too large to view</strong>, (over {{ size_warning|filesizeformat }} bytes). - It can only be downloaded.</p> -</div> -{% endif %} - -{% if job.archived_job_file %} -<div class="alert alert-warning" id="archive-warning"> -<p><strong>Job log file archived.</strong> -Please contact the administrator for job log file.</p> -</div> -{% endif %} - -{% if not job.archived_job_file %} -<h4 class="modal-header" id="top">Dispatcher Log messages (file size = {{ job_file_size|filesizeformat }}) <a class="btn btn-xs btn-info" href="{% url 'lava.scheduler.job.log_file.plain' job.pk %}" title="Download as text file"><span class="glyphicon glyphicon-download"></span> download</a></h4> -<a class="btn btn-sm btn-default" href="#bottom">End of log file <span class="glyphicon glyphicon-fast-forward"></span></a> - - -<div id="logfile_content"> -{% for section in sections %} - <a href="#L_{{ forloop.counter0 }}" id="L_{{ forloop.counter0 }}">Section {{ forloop.counter0 }}</a> - {% if section.0 == 'console' and section.1 > 20 and not forloop.last %} - <a href="#L_{{ forloop.counter }}">skip {{ section.1 }} lines to next log entry →</a> - {% endif %} - {% linenumbers section.2 forloop.counter0 section.0 %} -{% endfor %} - - {% if job.status == job.RUNNING %} - <img id="progress" src="{{ STATIC_URL }}lava_scheduler_app/images/ajax-progress.gif"/> - {% endif %} -</div> - -<a class="btn btn-sm btn-default" href="#top" id="bottom"><span class="glyphicon glyphicon-fast-backward"></span> Start of log file</a><br/><br/> -<div class="row"> - <div class="col-md-6"> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - <li><a href="{% url 'lava.scheduler.job.definition' job.pk %}" class="btn btn-info">Definition</a></li> - {% if job.is_multinode %} - <li><a href="{% url 'lava.scheduler.job.multinode_definition' job.pk %}" class="btn btn-info">Multinode Definition</a></li> - {% elif job.is_vmgroup %} - <li><a href="{% url 'lava.scheduler.job.vmgroup_definition' job.pk %}" class="btn btn-info">VMGroup Definition</a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{{ job.get_absolute_url }}#bottom" class="btn btn-primary">Summary</a></li> - {% endif %} - </ul> - </div> - </div> - </div> -{% endif %} - <div class="col-md-6"> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job.results_link and not job.archived_bundle %} - {% if job.is_pipeline %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results</a></li> - {% else %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} - {% else %} - {% if show_cancel %} - <li><a href="{% url 'lava.scheduler.job.cancel' job.pk %}" class="btn btn-warning">Cancel</a></li> - {% endif %} - {% endif %} - {% if show_resubmit and not job.archived_job_file %} - <li><a href="{% url 'lava.scheduler.job.resubmit' job.pk %}" class="btn btn-default">Resubmit</a></li> - {% endif %} - </ul> - </div> - </div> - </div> -</div> - -{% if job.status == job.RUNNING %} -<div class="row"> - <div class="col-md-6"> - <h4 class="modal-header">Job information</h4> - <dl class="dl-horizontal"> - <dt>Description</dt> - <dd>{{job.description|default:"<i>not set</i>" }}</dd> - <dt>Submitter</dt> - <dd>{{ job.submitter }}</dd> - </dl> - </div> -{% if job.actual_device %} - <div class="col-md-6"> - <h4 class="modal-header">Device</h4> - <dl class="dl-horizontal"> - <dt>Name</dt> - <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a> - {% if not job.is_vmgroup %} <a href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a>{% endif %}</dd> - {% if job.requested_device %} - <dt>Type</dt> - <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a>{% if not job.is_vmgroup %} <a - href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a>{% endif %}</dd> - {% elif job.requested_device_type %} - <dt>Requested type</dt> - <dd><a href="{{ job.requested_device_type.get_absolute_url }}">{{ job.requested_device_type }}</a> <a href="{% url 'lava.scheduler.device_type_report' job.requested_device_type %}">(reports)</a></dd> - {% endif %} - </dl> - </div> -</div> -{% endif %} -{% endif %} - -{% endblock %} - -{% block scripts %} - -{% if job.status == job.RUNNING %} -<script type="text/javascript"> -var pollTimer = null, logLenth = '{{ job_file_size }}'; -var section_number = -1; -var line_number = -1; - -function poll (start) { - $.ajax({ - url: '{% url 'lava_scheduler_app.views.job_full_log_incremental' pk=job.pk %}?start=' + logLenth, - dataType: 'json', - global: false, - success: function (data, success, xhr) { - var progressNode = $('#progress'); - // Do we have to scroll down ? - var scroll_down = false; - if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) { - scroll_down = true; - } - for (var i = 0; i < data.length; i++) { - var d = data[i]; - var cls = 'line ' + d[0]; - var last_code = $("#logfile_content > div:last > code:last"); - if (last_code.attr('class') == cls) { - append_to_section(last_code, d); - } else { - var newNode = create_new_section_node(d); - newNode.insertBefore(progressNode); - } - - // Scroll if needed - if (scroll_down) { - document.getElementById('bottom').scrollIntoView(); - } - } - logLenth = xhr.getResponseHeader('X-Current-Size'); - if (xhr.getResponseHeader('X-Is-Finished')) { - progressNode.css('display', 'none'); - } else { - pollTimer = setTimeout(poll, 1000); - } - } - }); -} - -function append_to_section (element, data) { - // Spit at end of line - var data_arr = data[2].replace(/\r\n/, "\n").split("\n"); - - // Remove trailing empty line - if (data_arr[data_arr.length-1] == "") { - data_arr.pop(); - } - - var old_node = element; - // Add new lines, one by one - for (var i in data_arr) { - var name = 'L_' + section_number + '_' + line_number; - var node = $('<code id="' + name + '" class="line ' + data[0] + '"><a href="#' + name + '">' + section_number + '.' + line_number + '</a> ' + data_arr[i] + '</code>'); - node.insertAfter(old_node); - old_node = node; - line_number++; - } -} - -function create_new_section_node (data) { - section_number++; - line_number = 0; - // Spit at end of line - var data_arr = data[2].replace(/\r\n/, "\n").split("\n"); - if (data_arr[data_arr.length-1] == "") { - data_arr.pop(); - } - - var node = '<a href="#L_' + section_number + '" id="L_' + section_number + '">Section ' + section_number + '</a>\n<div>\n'; - - for (var i in data_arr) { - var name = 'L_' + section_number + '_' + i; - var code_node = '<code id="' + name + '" class="line ' + data[0] + '"><a href="#' + name + '">' + section_number + '.' + line_number + '</a> ' + data_arr[i] + '</code>'; - node = node + code_node; - line_number++; - } - return $(node); -} - -function get_current_section_number () { - - last_code = $("#logfile_content > div:last > code:last"); - - if ($(last_code).attr("id")) { - code_id_arr = $(last_code).attr("id").split('_'); - return [code_id_arr[1], code_id_arr[2]]; - } - - return [-1, -1]; -} - -$(function () { - var initial_numbers = get_current_section_number(); - section_number = initial_numbers[0]; - line_number = initial_numbers[1]; - - pollTimer = setTimeout(poll, 1000); -}); -</script> -{% endif %} -{% endblock scripts %} diff --git a/lava_scheduler_app/templates/lava_scheduler_app/multinode_job_definition.html b/lava_scheduler_app/templates/lava_scheduler_app/multinode_job_definition.html index 24a8da7e5..c02e9d3dd 100644 --- a/lava_scheduler_app/templates/lava_scheduler_app/multinode_job_definition.html +++ b/lava_scheduler_app/templates/lava_scheduler_app/multinode_job_definition.html @@ -38,26 +38,13 @@ <div class="col-md-4"> <h4 class="modal-header">Logs</h4> <div class="row"> - {% if not job.is_pipeline %} <div class="col-md-6"> <ul class="nav nav-pills nav-stacked"> {% if job_file_present %} - <li><a href="{{ job.get_absolute_url }}" class="btn btn-primary">Summary</a></li> - {% endif %} - </ul> - </div> - {% endif %} - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.pk %}" class="btn btn-primary">Complete log</a></li> + <li><a href="{% url 'lava.scheduler.job.complete_log' job.pk %}" class="btn btn-primary">Complete log</a></li> {% endif %} {% if job.results_link %} - {% if job.is_pipeline %} <li><a href="{{ job.results_link }}" class="btn btn-success">Results</a></li> - {% else %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} {% endif %} </ul> </div> @@ -90,7 +77,7 @@ </div> </div> </div> -{% if job.is_multinode or job.is_vmgroup %} +{% if job.is_multinode %} <div class="row"> <div class="col-md-6"> <h4 class="modal-header">Sub jobs</h4> diff --git a/lava_scheduler_app/templates/lava_scheduler_app/pipeline_complete.html b/lava_scheduler_app/templates/lava_scheduler_app/pipeline_complete.html index 9e824e009..de2fee485 100644 --- a/lava_scheduler_app/templates/lava_scheduler_app/pipeline_complete.html +++ b/lava_scheduler_app/templates/lava_scheduler_app/pipeline_complete.html @@ -79,13 +79,6 @@ <li><a href="{% url 'lava.scheduler.job.annotate_failure' job.pk %}" class="btn btn-default">Comment</a></li> </ul> {% endif %} - {% if change_priority and job.status == job.SUBMITTED and not job.is_multinode %} - <form method="POST" action="{% url 'lava.scheduler.job.priority' job.pk %}" id="priority-choice"> - {% csrf_token %} - <button id="priority-button" class="btn btn-default">Set priority</button><br /> - {{ job.priority|get_priority_select }} - </form> - {% endif %} </div> </div> </div> @@ -203,13 +196,6 @@ extra blank lines to the output.</p> <div id="log_data"> {% include 'lava_scheduler_app/_structured_logdata.html' %} </div> - <div class="row" id="log_progress"> - <div class="col-md-8 col-md-offset-2"> - {% if job.status != job.COMPLETE and job.status != job.INCOMPLETE and job.status != job.CANCELED %} - <img src="{{ STATIC_URL }}lava_scheduler_app/images/ajax-progress.gif"/> - {% endif %} - </div> - </div> </div> {% comment %}log messages{% endcomment %} <hr/> <div class="row"> @@ -256,48 +242,4 @@ extra blank lines to the output.</p> </div> </div> </div> - -{% if job.status == job.RUNNING %} -<div class="row"> - <div class="col-md-6"> - <h4 class="modal-header">Job information</h4> - <dl class="dl-horizontal"> - <dt>Description</dt> - <dd>{{job.description|default:"<i>not set</i>" }}</dd> - <dt>Submitter</dt> - <dd>{{ job.submitter }}</dd> - </dl> - </div> -{% if job.actual_device %} - <div class="col-md-6"> - <h4 class="modal-header">Device</h4> - <dl class="dl-horizontal"> - <dt>Name</dt> - <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a> - <a href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a></dd> - {% if job.requested_device %} - <dt>Type</dt> - <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a> <a - href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a></dd> - {% elif job.requested_device_type %} - <dt>Requested type</dt> - <dd><a href="{{ job.requested_device_type.get_absolute_url }}">{{ job.requested_device_type }}</a> - <a href="{% url 'lava.scheduler.device_type_report' job.requested_device_type %}">(reports)</a></dd> - {% endif %} - </dl> - </div> -</div> -{% endif %} -{% endif %} {% endblock %} {% comment %} content block {% endcomment %} - -{% block scripts %} -{% if job.status == job.SUBMITTED or job.status == job.RUNNING or job.status == job.CANCELING %} -<script type="text/javascript"> - var job_status_url = '{% url 'lava.scheduler.job_status' pk=job.pk %}'; - var logs_url = '{% url 'lava.scheduler.job_pipeline_incremental' pk=job.pk %}{% querystring 'summary'=0 %}'; - var section_url = '{% url 'lava.scheduler.job_pipeline_sections' pk=job.pk %}'; -</script> -<script type="text/javascript" src="{{ STATIC_URL }}lava_scheduler_app/js/lava-job-polling.min.js"></script> -{% endif %} -{% endblock scripts %} diff --git a/lava_scheduler_app/templates/lava_scheduler_app/vmgroup_job_definition.html b/lava_scheduler_app/templates/lava_scheduler_app/vmgroup_job_definition.html deleted file mode 100644 index 639377f58..000000000 --- a/lava_scheduler_app/templates/lava_scheduler_app/vmgroup_job_definition.html +++ /dev/null @@ -1,100 +0,0 @@ -{% extends "layouts/content-bootstrap.html" %} - -{% block content %} -<h2>VM Group Job definition file - {{ job.sub_id }} <a class="btn btn-xs btn-info" href="{% url 'lava.scheduler.job.vmgroup_definition.plain' job.pk %}" title="Download as text file"><span class="glyphicon glyphicon-download"></span> download</a></h2> - -<div class="row"> - <div class="col-md-4"> - <h4 class="modal-header">Device</h4> - <dl class="dl-horizontal"> - {% if job.actual_device %} - <dt>Name</dt> - <dd><a href="{{ job.actual_device.get_absolute_url }}">{{ job.actual_device.hostname }}</a> <a href="{% url 'lava.scheduler.device_report' job.actual_device.pk %}">(reports)</a></dd> - {% endif %} - - {% if job.requested_device %} - <dt>Type</dt> - <dd><a href="{{ job.requested_device.device_type.get_absolute_url }}">{{ job.requested_device.device_type }}</a> <a href="{% url 'lava.scheduler.device_type_report' job.requested_device.device_type %}">(reports)</a></dd> - {% elif job.requested_device_type %} - <dt>Requested type</dt> - <dd><a href="{{ job.requested_device_type.get_absolute_url }}">{{ job.requested_device_type }}</a> <a href="{% url 'lava.scheduler.device_type_report' job.requested_device_type %}">(reports)</a></dd> - {% endif %} - </dl> - </div> - <div class="col-md-4"> - <h4 class="modal-header">Logs</h4> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{{ job.get_absolute_url }}" class="btn btn-primary">Summary</a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if job_file_present %} - <li><a href="{% url 'lava.scheduler.job.log_file' job.pk %}" class="btn btn-primary">Complete log</a></li> - {% endif %} - {% if job.results_link %} - <li><a href="{{ job.results_link }}" class="btn btn-success">Results Bundle</a></li> - {% endif %} - </ul> - </div> - </div> - </div> - <div class="col-md-4"> - <h4 class="modal-header">Actions</h4> - <div class="row"> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - {% if show_resubmit %} - <li><a href="{% url 'lava.scheduler.job.resubmit' job.pk %}" class="btn btn-default">Resubmit</a></li> - {% endif %} - </ul> - </div> - <div class="col-md-6"> - <ul class="nav nav-pills nav-stacked"> - <li><a href="{% url 'lava.scheduler.job.definition' job.pk %}" class="btn btn-info">Definition of {{ job.sub_id }}</a></li> - {% if user.is_authenticated %} - <li><a href="{% url 'lava.scheduler.job.toggle_favorite' job.pk %}" class="btn btn-info"> - {% if is_favorite %} - Remove from favorites - {% else %} - Add to favorites - {% endif %} - </a></li> - {% endif %} - </ul> - </div> - </div> - </div> -</div> -{% if job.is_vmgroup %} -<div class="row"> - <div class="col-md-6"> - <h4 class="modal-header">Sub jobs</h4> - <dl class="dl-horizontal"> - {% for subjob in job.sub_jobs_list %} - <dt><a href="{% url 'lava.scheduler.job.detail' subjob.sub_id %}">{{ subjob.sub_id }}</a> - {% if '0' in subjob.sub_id and '0' not in job.sub_id %} - <abbr title="view job {{ subjob.sub_id }} to see the result bundle, if any.">(?)</abbr> - {% endif %} - ({{ subjob.id }}) - </dt> - <dd> - {% if subjob.actual_device.hostname %} - on: <a href="{{ subjob.actual_device.get_absolute_url }}">{{ subjob.actual_device.hostname }}</a> - as: {{ subjob.device_role }} - {% else %} - No device assigned as {{ subjob.device_role }}. - {% endif %} - </dd> - {% endfor %} - </dl> - </div> -</div> -{% endif %} - -<pre>{{ job.vmgroup_definition }}</pre> -{% endblock content %} |