Commit d9163445 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Neil Williams
Browse files

Remove references to v1 jobs

Remove distinctions between V1 and V2 support in
device tables and other settings.

Change-Id: Ie293bb3405f6485e3fea40eb5b908c6b8d4b0132
parent 103a44be
......@@ -402,7 +402,6 @@ class RecentJobsTable(JobTable):
template_name="lava_scheduler_app/job_actions_field.html")
actions.orderable = False
device = tables.Column(accessor='device_sort')
log_level = tables.Column(accessor="definition", verbose_name="Log level")
duration = tables.Column(accessor='duration_sort')
duration.orderable = False
submit_time = tables.DateColumn("Nd, g:ia")
......@@ -412,17 +411,6 @@ class RecentJobsTable(JobTable):
super(RecentJobsTable, self).__init__(*args, **kwargs)
self.length = 10
def render_log_level(self, record): # pylint: disable=no-self-use
try:
data = json.loads(record.definition)
except ValueError:
return "debug"
try:
data['logging_level']
except KeyError:
return ""
return data['logging_level'].lower()
class Meta(JobTable.Meta): # pylint: disable=too-few-public-methods,no-init,no-self-use
fields = (
'id', 'actions', 'status', 'priority',
......@@ -432,7 +420,7 @@ class RecentJobsTable(JobTable):
sequence = (
'id', 'actions', 'status', 'priority',
'description', 'submitter', 'submit_time', 'end_time',
'duration', 'log_level'
'duration'
)
exclude = ('device',)
......@@ -556,20 +544,6 @@ class DeviceTable(LavaTable):
health_status = tables.Column(verbose_name='Health')
tags = TagsColumn()
json = tables.Column(accessor='is_pipeline', verbose_name='JSON jobs')
def render_json(self, record): # pylint: disable=no-self-use
if record.is_exclusive:
return mark_safe('<span class="glyphicon glyphicon-remove text-danger"></span>')
return mark_safe('<span class="glyphicon glyphicon-ok"></span>')
pipeline = tables.Column(accessor='is_pipeline', verbose_name='Pipeline jobs')
def render_pipeline(self, record): # pylint: disable=no-self-use
if record.is_pipeline:
return mark_safe('<span class="glyphicon glyphicon-ok"></span>')
return mark_safe('<span class="glyphicon glyphicon-remove text-danger"></span>')
class Meta(LavaTable.Meta): # pylint: disable=too-few-public-methods,no-init,no-self-use
model = Device
exclude = [
......@@ -579,7 +553,7 @@ class DeviceTable(LavaTable):
]
sequence = [
'hostname', 'worker_host', 'device_type', 'status',
'owner', 'health_status', 'json', 'pipeline'
'owner', 'health_status'
]
searches = {
'hostname': 'contains',
......
......@@ -83,14 +83,6 @@
{% endif %}
<dt>Worker</dt>
<dd><a href="{{ device.worker_host.get_absolute_url }}">{{ device.worker_host.hostname }}</a></dd>
<dt>Support</dt>
{% if exclusive %}
<dd>v2 only</dd>
{% elif pipeline %}
<dd>v1 and v2</dd>
{% else %}
<dd>v1 only</dd>
{% endif %}
{% 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>
......
......@@ -11,8 +11,6 @@
<a href="{% url 'lava.scheduler.job.active' %}">Active Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-pause">
<a href="{% url 'lava.scheduler.queue' %}">Queued Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline' %}">Pipeline Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-heart">
<a href="{% url 'lava.scheduler.healthcheck' %}">Healthcheck Jobs</a></span></li>
</ul>
......
......@@ -10,8 +10,6 @@
<a href="{% url 'lava.scheduler.alldevices' %}">All Devices</a></span></li>
<li class="btn btn-sm disabled"><span class="glyphicon glyphicon-play">
<a href="{% url 'lava.scheduler.active_devices' %}">Active Devices</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline_devices' %}">Pipeline Devices</a></span></li>
</ul>
......
......@@ -10,8 +10,6 @@
<a href="{% url 'lava.scheduler.alldevices' %}">All Devices</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-play">
<a href="{% url 'lava.scheduler.active_devices' %}">Active Devices</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline_devices' %}">Pipeline Devices</a></span></li>
</ul>
{% render_table devices_table %}
......
......@@ -12,8 +12,6 @@
<a href="{% url 'lava.scheduler.job.active' %}">Active Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-pause">
<a href="{% url 'lava.scheduler.queue' %}">Queued Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline' %}">Pipeline Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-heart">
<a href="{% url 'lava.scheduler.healthcheck' %}">Healthcheck Jobs</a></span></li>
</ul>
......
......@@ -12,8 +12,6 @@
<a href="{% url 'lava.scheduler.job.active' %}">Active Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-pause">
<a href="{% url 'lava.scheduler.queue' %}">Queued Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline' %}">Pipeline Jobs</a></span></li>
<li class="btn btn-sm disabled"><span class="glyphicon glyphicon-heart">
<a href="{% url 'lava.scheduler.healthcheck' %}">Healthcheck Jobs</a></span></li>
</ul>
......
{% extends "layouts/content-bootstrap.html" %}
{% load django_tables2 %}
{% block content %}
<h2>Pipeline Devices - <small>excluding retired</small></h2>
<ul class="pager">
<li class="btn btn-sm"><span class="glyphicon glyphicon-move">
<a href="{% url 'lava.scheduler.alldevices' %}">All Devices</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-play">
<a href="{% url 'lava.scheduler.active_devices' %}">Active Devices</a></span></li>
<li class="btn btn-sm disabled"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline_devices' %}">Pipeline Devices</a></span></li>
</ul>
{% render_table pipeline_devices_table %}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="{{ STATIC_URL }}lava_scheduler_app/js/tables.min.js"></script>
{% endblock %}
{% extends "layouts/content-bootstrap.html" %}
{% load django_tables2 %}
{% block content %}
<h2>Pipeline Jobs</h2>
<ul class="pager">
<li class="btn btn-sm"><span class="glyphicon glyphicon-asterisk">
<a href="{% url 'lava.scheduler.job.list' %}">All Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-play">
<a href="{% url 'lava.scheduler.job.active' %}">Active Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-pause">
<a href="{% url 'lava.scheduler.queue' %}">Queued Jobs</a></span></li>
<li class="btn btn-sm disabled"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline' %}">Pipeline Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-heart">
<a href="{% url 'lava.scheduler.healthcheck' %}">Healthcheck Jobs</a></span></li>
</ul>
{% render_table pipeline_table %}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="{{ STATIC_URL }}lava_scheduler_app/js/tables.min.js"></script>
{% endblock %}
......@@ -11,8 +11,6 @@
<a href="{% url 'lava.scheduler.job.active' %}">Active Jobs</a></span></li>
<li class="btn btn-sm disabled"><span class="glyphicon glyphicon-pause">
<a href="{% url 'lava.scheduler.queue' %}">Queued Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-tasks">
<a href="{% url 'lava.scheduler.pipeline' %}">Pipeline Jobs</a></span></li>
<li class="btn btn-sm"><span class="glyphicon glyphicon-heart">
<a href="{% url 'lava.scheduler.healthcheck' %}">Healthcheck Jobs</a></span></li>
</ul>
......
......@@ -18,7 +18,7 @@ from lava_scheduler_app.views import (
job_submit, job_toggle_favorite, lab_health, migration,
longest_jobs, multinode_job_definition, multinode_job_definition_plain,
mydevice_list, mydevices_health_history_log, myjobs, online_device_list,
passing_health_checks, pipeline, pipeline_device_list, queue, reports,
passing_health_checks, queue, reports,
running, transition_detail, username_list_json, vmgroup_job_definition,
vmgroup_job_definition_plain, worker_detail, workers,
download_device_type_template, similar_jobs,)
......@@ -145,8 +145,6 @@ urlpatterns = [
name='lava.scheduler.device.edit_description'),
url(r'^transition/(?P<pk>[0-9]+)$', transition_detail,
name='lava.scheduler.transition_detail'),
url(r'^alldevices/pipeline$', pipeline_device_list,
name='lava.scheduler.pipeline_devices'),
url(r'^alldevices/active$', active_device_list,
name='lava.scheduler.active_devices'),
url(r'^alldevices/online$', online_device_list,
......@@ -161,7 +159,6 @@ urlpatterns = [
url(r'^username-list-json$', username_list_json,
name='lava.scheduler.username_list_json'),
url(r'^queue$', queue, name='lava.scheduler.queue'),
url(r'^pipeline$', pipeline, name='lava.scheduler.pipeline'),
url(r'^healthcheck$', healthcheck, name='lava.scheduler.healthcheck'),
url(r'^running$', running, name='lava.scheduler.running'),
url(r'^devicehealthhistory/device/(?P<pk>[-_a-zA-Z0-9.]+)',
......
......@@ -294,7 +294,8 @@ class DeviceTableView(JobTableView):
"user", "group") \
.prefetch_related("tags") \
.filter(temporarydevice=None,
device_type__in=visible) \
device_type__in=visible,
is_pipeline=True) \
.order_by("hostname")
......@@ -507,33 +508,11 @@ def active_device_list(request):
request=request))
@BreadCrumb("Pipeline Devices", parent=index)
def pipeline_device_list(request):
data = PipelineDeviceView(request, model=Device, table_class=DeviceTable)
ptable = DeviceTable(data.get_table_data())
RequestConfig(request, paginate={"per_page": ptable.length}).configure(
ptable)
template = loader.get_template("lava_scheduler_app/pipelinedevices.html")
return HttpResponse(template.render(
{
'pipeline_devices_table': ptable,
"length": ptable.length,
"terms_data": ptable.prepare_terms_data(data),
"search_data": ptable.prepare_search_data(data),
"discrete_data": ptable.prepare_discrete_data(data),
'bread_crumb_trail': BreadCrumbTrail.leading_to(
pipeline_device_list),
},
request=request))
class OnlineDeviceView(DeviceTableView):
def get_queryset(self):
visible = filter_device_types(self.request.user)
return Device.objects.filter(device_type__in=visible)\
.exclude(status=Device.RETIRED).order_by("status")
q = super(OnlineDeviceView, self).get_queryset()
return q.exclude(status=Device.RETIRED)
@BreadCrumb("Online Devices", parent=index)
......@@ -666,16 +645,6 @@ class ActiveDeviceView(DeviceTableView):
return q.exclude(status=Device.RETIRED)
class PipelineDeviceView(DeviceTableView):
def get_queryset(self):
visible = filter_device_types(self.request.user)
return Device.objects.filter(device_type__in=visible,
is_pipeline=True)\
.exclude(status=Device.RETIRED)\
.order_by("hostname")
class DeviceHealthView(DeviceTableView):
def get_queryset(self):
......@@ -1040,7 +1009,7 @@ class FavoriteJobsView(JobTableView):
class AllJobsView(JobTableView):
def get_queryset(self):
return all_jobs_with_custom_sort()
return all_jobs_with_custom_sort().filter(is_pipeline=True)
@BreadCrumb("All Jobs", parent=index)
......@@ -2785,33 +2754,6 @@ def healthcheck(request):
request=request))
class PipelineJobsView(JobTableView):
def get_queryset(self):
return all_jobs_with_custom_sort().filter(is_pipeline=True)
@BreadCrumb("Pipeline", parent=index)
def pipeline(request):
pipeline_data = PipelineJobsView(request, model=TestJob,
table_class=JobTable)
pipeline_ptable = JobTable(pipeline_data.get_table_data(),)
config = RequestConfig(request,
paginate={"per_page": pipeline_ptable.length})
config.configure(pipeline_ptable)
template = loader.get_template("lava_scheduler_app/pipelinejobs.html")
return HttpResponse(template.render(
{
"times_data": pipeline_ptable.prepare_times_data(pipeline_data),
"terms_data": pipeline_ptable.prepare_terms_data(pipeline_data),
"search_data": pipeline_ptable.prepare_search_data(pipeline_data),
"discrete_data": pipeline_ptable.prepare_discrete_data(pipeline_data),
'pipeline_table': pipeline_ptable,
'bread_crumb_trail': BreadCrumbTrail.leading_to(pipeline),
},
request=request))
class QueueJobsView(JobTableView):
def get_queryset(self):
......
......@@ -58,9 +58,6 @@ class Command(BaseCommand):
help="Device type")
add_parser.add_argument("--description", default=None,
help="Device description")
add_parser.add_argument("--non-pipeline", action="store_false",
dest="pipeline", default=True,
help="Create a v1 device (v2 by default)")
add_parser.add_argument("--offline", action="store_false",
dest="online", default=True,
help="Create the device offline (online by default)")
......@@ -116,8 +113,8 @@ class Command(BaseCommand):
if options["sub_command"] == "add":
self.handle_add(options["hostname"], options["device_type"],
options["worker"], options["description"],
options["pipeline"], options["public"],
options["online"], options["tags"])
options["public"], options["online"],
options["tags"])
elif options["sub_command"] == "details":
self.handle_details(options["hostname"])
elif options["sub_command"] == "list":
......@@ -127,7 +124,7 @@ class Command(BaseCommand):
self.handle_set(options)
def handle_add(self, hostname, device_type, worker_name,
description, pipeline, public, online, tags):
description, public, online, tags):
try:
dt = DeviceType.objects.get(name=device_type)
except DeviceType.DoesNotExist:
......@@ -141,7 +138,7 @@ class Command(BaseCommand):
status = Device.IDLE if online else Device.OFFLINE
device = Device.objects.create(hostname=hostname, device_type=dt,
description=description,
worker_host=worker, is_pipeline=pipeline,
worker_host=worker, is_pipeline=True,
status=status, is_public=public)
if tags is not None:
......@@ -162,7 +159,6 @@ class Command(BaseCommand):
self.stdout.write("health job : %s" % bool(device.get_health_check()))
self.stdout.write("description: %s" % device.description)
self.stdout.write("public : %s" % device.is_public)
self.stdout.write("pipeline : %s" % device.is_pipeline)
config = device.load_configuration(output_format="raw")
self.stdout.write("device-dict: %s" % bool(config))
......
......@@ -230,10 +230,6 @@ LOGGING = {
}
}
# pipeline results display
# set to false in /etc/lava-server/settings.conf to hide the Results menu
PIPELINE = distro_settings.get_setting("PIPELINE", True)
# Scheduler options
SCHEDULER_DAEMON_OPTIONS.update(distro_settings.get_setting('SCHEDULER_DAEMON_OPTIONS', {}))
......
......@@ -6,7 +6,7 @@
{% block breadcrumbs %}
<div class="breadcrumbs">
[ <a href="/../">LAVA home</a> ] [ <a href="/../scheduler/">LAVA scheduler</a> ]
[ <a href="/../dashboard/">LAVA dashboard</a> ] [ <a href="/../static/docs/">LAVA Documentation</a> ]
[ <a href="/../static/docs/">LAVA Documentation</a> ]
<hr/>
<a href="{% url 'admin:index' %}">{% trans 'Admin Home' %}</a>
&rsaquo;
......
......@@ -26,14 +26,12 @@ of each type are available for tests and currently running jobs.</p>
{% endif %}
<h3>LAVA components</h3>
<ul>
{% if 'PIPELINE'|get_settings %}
<li>
<span class="glyphicon glyphicon-signal"></span>
<b><a href="{% url 'lava_results' %}">Results</a></b> - viewing
results of pipeline tests run by you or others. (YAML pipeline
submissions only.)
</li>
{% endif %}
<li>
<span class="glyphicon glyphicon-calendar"></span>
<b><a href="{% url 'lava.scheduler' %}">Scheduler</a></b> - jobs
......
......@@ -23,14 +23,13 @@
<a class="navbar-brand" href="{{ lava.branding_url }}"><p><img height={{ lava.branding_height }}
width={{ lava.branding_width }} src="{{ STATIC_URL }}{{ lava.branding_icon }}" alt="{{ lava.branding_alt }}" /> LAVA</p></a>
{% else %}
<a class="navbar-brand" href="{{ lava.branding_url }}"><p><img height={{ lava.branding_height }}
<a class="navbar-brand" href="{{ lava.branding_url }}"><p><img height={{ lava.branding_height }}
width={{ lava.branding_width }} src="{{ lava.branding_icon }}" alt="{{ lava.branding_alt }}" /> LAVA</p></a>
{% endif %}
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="{% url 'lava.home' %}"><span class="glyphicon glyphicon-home"></span> Home</a></li>
{% if 'PIPELINE'|get_settings %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-signal"></span> Results <b class="caret"></b></a>
<ul class="dropdown-menu">
......@@ -39,7 +38,6 @@
<li><a href="{% url 'lava.results.chart_list' %}">Charts</a></li>
</ul>
</li>
{% endif %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-calendar"></span> Scheduler <b class="caret"></b></a>
<ul class="dropdown-menu">
......@@ -48,12 +46,10 @@
<li><a href="{% url 'lava.scheduler.job.submit' %}">Submit Job</a></li>
<li><a href="{% url 'lava.scheduler.job.active' %}">Active Jobs</a></li>
<li><a href="{% url 'lava.scheduler.queue' %}">Queued Jobs</a></li>
<li><a href="{% url 'lava.scheduler.pipeline' %}">Pipeline Jobs</a></li>
<li><a href="{% url 'lava.scheduler.healthcheck' %}">Healthcheck Jobs</a></li>
<li><a href="{% url 'lava.scheduler.job.list' %}">All Jobs</a></li>
<li role="separator" class="divider"></li>
<li><a href="{% url 'lava.scheduler.active_devices' %}">Active Devices</a></li>
<li><a href="{% url 'lava.scheduler.pipeline_devices' %}">Pipeline Devices</a></li>
<li><a href="{% url 'lava.scheduler.alldevices' %}">All Devices</a></li>
<li role="separator" class="divider"></li>
<li><a href="{% url 'lava.scheduler.reports' %}">Reports</a></li>
......@@ -71,12 +67,7 @@
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-question-sign"></span> Help <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ STATIC_URL }}docs/">LAVA Overview</a></li>
{% if not 'HIDE_V2_DOCS'|get_settings %}
<li><a href="{{ STATIC_URL }}docs/v2">Help (Pipeline V2)</a></li>
{% endif %}
{% if not 'HIDE_V1_DOCS'|get_settings %}
<li><a href="{{ STATIC_URL }}docs/v1">Help (Deprecated V1)</a></li>
{% endif %}
<li><a href="{{ STATIC_URL }}docs/v2">Help</a></li>
{% assign_setting 'CUSTOM_DOCS' as userdocs %}
{% if userdocs %}
{% for label, url in userdocs.items %}
......@@ -132,11 +123,7 @@
{% block breadcrumb_container %}
{% if context_help %}
<span style="float: right; padding-right: 1em; padding-top: 0.5em"><a target="_blank"
{% if not 'HIDE_V2_DOCS'|get_settings %}
href="/static/docs/v2/{{ context_help|join:'-'|slugify }}.html"
{% else %}
href="/static/docs/v1/{{ context_help|join:'-'|slugify }}.html"
{% endif %}
><b>Help</b></a></span>
{% endif %}
<ul class="breadcrumb">
......
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