mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-18 05:28:16 -06:00
14729 rq table
This commit is contained in:
parent
39c7b1ed5d
commit
5bada6d3ed
21
netbox/core/tables/tasks.py
Normal file
21
netbox/core/tables/tasks.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import django_tables2 as tables
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
from netbox.tables import NetBoxTable, columns
|
||||||
|
from ..models import Job
|
||||||
|
|
||||||
|
|
||||||
|
class BackgroundTasksTable(tables.Table):
|
||||||
|
name = tables.Column()
|
||||||
|
jobs = tables.Column()
|
||||||
|
oldest_job_timestamp = tables.Column()
|
||||||
|
started_jobs = tables.Column()
|
||||||
|
deferred_jobs = tables.Column()
|
||||||
|
finished_jobs = tables.Column()
|
||||||
|
failed_jobs = tables.Column()
|
||||||
|
scheduled_jobs = tables.Column()
|
||||||
|
workers = tables.Column()
|
||||||
|
host = tables.Column(accessor="connection_kwargs__host")
|
||||||
|
port = tables.Column(accessor="connection_kwargs__port")
|
||||||
|
db = tables.Column(accessor="connection_kwargs__db")
|
||||||
|
pid = tables.Column(accessor="scheduler__pid")
|
30
netbox/templates/core/background_tasks.html
Normal file
30
netbox/templates/core/background_tasks.html
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{% extends 'base/layout.html' %}
|
||||||
|
{% load buttons %}
|
||||||
|
{% load helpers %}
|
||||||
|
{% load i18n %}
|
||||||
|
{% load render_table from django_tables2 %}
|
||||||
|
|
||||||
|
{% block title %}{% trans "Plugins" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block controls %}
|
||||||
|
<div class="controls">
|
||||||
|
<div class="control-group">
|
||||||
|
{% block extra_controls %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock controls %}
|
||||||
|
|
||||||
|
{% block tabs %}
|
||||||
|
<ul class="nav nav-tabs px-3">
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<a class="nav-link active" role="tab">{% trans "Background Tasks" %}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endblock tabs %}
|
||||||
|
|
||||||
|
{% block content-wrapper %}
|
||||||
|
<div class="tab-content">
|
||||||
|
{% render_table table %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock content-wrapper %}
|
Loading…
Reference in New Issue
Block a user