mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 17:08:41 -06:00
Template cleanup (#6421)
* Clean up & comment base templates * Clean up login template & form * Use SVG file for NetBox logo * Simplify breadcrumbs * Merge changelog.html into home.html * Rename title_container block to header * Move breadcrumbs block to object.html * Attach names to endblock template tags * Reorganize root-level templates into base/ and inc/ * Remove obsolete reference to Bootstrap 3.4.1
This commit is contained in:
parent
744792452f
commit
805892f623
@ -1,4 +1,4 @@
|
|||||||
{% extends '40x.html' %}
|
{% extends 'base/40x.html' %}
|
||||||
|
|
||||||
{% block title %}Access Denied{% endblock %}
|
{% block title %}Access Denied{% endblock %}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends '40x.html' %}
|
{% extends 'base/40x.html' %}
|
||||||
|
|
||||||
{% block title %}Page Not Found{% endblock %}
|
{% block title %}Page Not Found{% endblock %}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
|
|
||||||
{% block title %}{% endblock %}
|
{% block title %}{% endblock %}
|
||||||
|
|
@ -1,8 +1,20 @@
|
|||||||
{% load static %} {% load helpers %}
|
{# Base template for (almost) all NetBox pages #}
|
||||||
|
{% load static %}
|
||||||
|
{% load static %}
|
||||||
|
{% load helpers %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"
|
||||||
|
/>
|
||||||
|
|
||||||
|
{# Page title #}
|
||||||
<title>{% block title %}Home{% endblock %} | NetBox</title>
|
<title>{% block title %}Home{% endblock %} | NetBox</title>
|
||||||
|
|
||||||
|
{# Static resources #}
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{% static 'netbox-external.css'%}"
|
href="{% static 'netbox-external.css'%}"
|
||||||
@ -18,30 +30,38 @@
|
|||||||
href="{% static 'netbox-dark.css'%}"
|
href="{% static 'netbox-dark.css'%}"
|
||||||
onerror="window.location='{% url 'media_failure' %}?filename=netbox-dark.css'"
|
onerror="window.location='{% url 'media_failure' %}?filename=netbox-dark.css'"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
|
<link rel="icon" type="image/png" href="{% static 'netbox.ico' %}" />
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta
|
{# Javascript #}
|
||||||
name="viewport"
|
|
||||||
content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"
|
|
||||||
/>
|
|
||||||
<script
|
<script
|
||||||
type="text/javascript"
|
type="text/javascript"
|
||||||
src="{% static 'netbox.js' %}"
|
src="{% static 'netbox.js' %}"
|
||||||
onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
|
onerror="window.location='{% url 'media_failure' %}?filename=netbox.js'">
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{# Additional <head> content #}
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
{% with color_mode=preferences|get_key:'ui.colormode' %}
|
|
||||||
|
|
||||||
<body{%if color_mode == 'dark'%} data-netbox-color-mode="dark"{% elif color_mode == 'light' %} data-netbox-color-mode="light"{% endif %}>
|
|
||||||
|
|
||||||
|
<body
|
||||||
|
{% if preferences|get_key:'ui.colormode' == 'dark'%} data-netbox-color-mode="dark"
|
||||||
|
{% else %} data-netbox-color-mode="light"
|
||||||
|
{% endif %}
|
||||||
|
>
|
||||||
|
|
||||||
|
{# Page layout #}
|
||||||
{% block layout %}{% endblock %}
|
{% block layout %}{% endblock %}
|
||||||
|
|
||||||
|
{# Additional Javascript #}
|
||||||
{% block javascript %}{% endblock %}
|
{% block javascript %}{% endblock %}
|
||||||
{% include './messages.html' %}
|
|
||||||
|
{# User messages #}
|
||||||
|
{% include 'inc/messages.html' %}
|
||||||
|
|
||||||
|
{# Data container #}
|
||||||
<div id="netbox-data" style="display: none!important; visibility: hidden!important">
|
<div id="netbox-data" style="display: none!important; visibility: hidden!important">
|
||||||
{% block data %}{% endblock %}
|
{% block data %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
{% endwith %}
|
|
||||||
</html>
|
</html>
|
128
netbox/templates/base/layout.html
Normal file
128
netbox/templates/base/layout.html
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
{# Base layout for the core NetBox UI w/navbar and page content #}
|
||||||
|
{% extends 'base/base.html' %}
|
||||||
|
{% load nav %}
|
||||||
|
{% load search_options %}
|
||||||
|
{% load static %}
|
||||||
|
|
||||||
|
{% block layout %}
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<main class="col-md-9 ms-sm-auto col-lg-10 px-0">
|
||||||
|
|
||||||
|
{# Sidebar #}
|
||||||
|
<nav id="sidebar-menu" class="col-md-3 col-lg-2 d-md-block sidebar collapse px-0">
|
||||||
|
|
||||||
|
{# Sidebar content #}
|
||||||
|
<div class="position-sticky pt-3">
|
||||||
|
|
||||||
|
{# Logo #}
|
||||||
|
<a class="px-2 sidebar-logo d-none d-md-flex" href="{% url 'home' %}">
|
||||||
|
<img src="{% static 'netbox_logo.svg' %}" alt="NetBox logo" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# Search bar #}
|
||||||
|
<ul class="nav flex-column">
|
||||||
|
<div class="d-block d-md-none mx-1 my-3 search-container">
|
||||||
|
{% search_options %}
|
||||||
|
</div>
|
||||||
|
<div class="d-flex d-md-none mx-1 my-3 justify-content-end">
|
||||||
|
{% include 'inc/profile_button.html' %}
|
||||||
|
</div>
|
||||||
|
{% nav %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Sidebar footer #}
|
||||||
|
<div class="d-flex flex-column container-fluid mt-auto justify-content-end sidebar-bottom">
|
||||||
|
<nav class="nav justify-content-between mb-2 mt-4 px-2">
|
||||||
|
|
||||||
|
{# Documentation #}
|
||||||
|
<a type="button" target="_blank" class="nav-link" href="https://netbox.readthedocs.io/">
|
||||||
|
<i title="Docs" class="mdi mdi-book-open-variant text-primary" data-bs-placement="top" data-bs-toggle="tooltip"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# API docs #}
|
||||||
|
<a class="nav-link" href="{% url 'api_docs' %}" target="_blank">
|
||||||
|
<i title="API" data-bs-placement="top" data-bs-toggle="tooltip" class="mdi mdi-code-braces text-primary"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# GitHub #}
|
||||||
|
<a class="nav-link" href="https://github.com/netbox-community/netbox" target="_blank">
|
||||||
|
<i title="Source Code" data-bs-placement="top" data-bs-toggle="tooltip" class="mdi mdi-code-tags text-primary"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# GitHub wiki #}
|
||||||
|
<a target="_blank" class="nav-link" href="https://github.com/netbox-community/netbox/wiki">
|
||||||
|
<i title="Get Help" data-bs-placement="top" data-bs-toggle="tooltip" class="mdi mdi-lifebuoy text-primary"></i>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{# Top bar #}
|
||||||
|
<nav class="navbar navbar-light sticky-top flex-md-nowrap py-4 search container-fluid">
|
||||||
|
<div class="d-md-none w-100 d-flex justify-content-between align-items-center my-3">
|
||||||
|
<a class="px-2 sidebar-logo d-block d-md-none" href="{% url 'home' %}">
|
||||||
|
<img src="{% static 'netbox_logo.svg' %}" alt="NetBox logo" />
|
||||||
|
</a>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
aria-expanded="false"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
aria-controls="sidebar-menu"
|
||||||
|
data-bs-target="#sidebar-menu"
|
||||||
|
aria-label="Toggle Navigation"
|
||||||
|
class="navbar-toggler position-relative collapsed"
|
||||||
|
>
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="d-none d-md-flex w-100 search-container">
|
||||||
|
{% search_options %}
|
||||||
|
{% include 'inc/profile_button.html' %}
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{# Body #}
|
||||||
|
<div class="px-4 content-container">
|
||||||
|
|
||||||
|
{# Page header #}
|
||||||
|
{% block header %}
|
||||||
|
<div class="title-container">
|
||||||
|
|
||||||
|
{# Title #}
|
||||||
|
<div id="content-title">
|
||||||
|
<h1 class="h2 w-100">{% block title %}{% endblock %}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Controls #}
|
||||||
|
{% block controls %}{% endblock %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endblock header %}
|
||||||
|
|
||||||
|
{# Page content #}
|
||||||
|
<div id="content" class="container-fluid p-0 m-0">
|
||||||
|
{% block tabs %}{% endblock %}
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Page footer #}
|
||||||
|
<footer class="footer container-fluid pb-3 pt-4 px-0">
|
||||||
|
<div class="row align-items-center justify-content-end">
|
||||||
|
<div class="col-auto d-none d-md-block"></div>
|
||||||
|
<div class="col text-center text-md-end small text-muted">
|
||||||
|
<span class="fw-light d-block d-md-inline">{% now 'Y-m-d H:i:s T' %}</span>
|
||||||
|
<span class="ms-md-3 d-block d-md-inline">{{ settings.HOSTNAME }} (v{{ settings.VERSION }})</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock layout %}
|
@ -1,16 +0,0 @@
|
|||||||
<div class="d-flex flex-column container-fluid mt-auto justify-content-end sidebar-bottom">
|
|
||||||
<nav class="nav justify-content-between mb-2 mt-4 px-2">
|
|
||||||
<a type="button" target="_blank" class="nav-link" href="https://netbox.readthedocs.io/">
|
|
||||||
<i title="Docs" class="mdi mdi-book-open-variant text-primary" data-bs-placement="top" data-bs-toggle="tooltip"></i>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link" href="{% url 'api_docs' %}" target="_blank">
|
|
||||||
<i title="API" data-bs-placement="top" data-bs-toggle="tooltip" class="mdi mdi-code-braces text-primary"></i>
|
|
||||||
</a>
|
|
||||||
<a class="nav-link" href="https://github.com/netbox-community/netbox" target="_blank">
|
|
||||||
<i title="Source Code" data-bs-placement="top" data-bs-toggle="tooltip" class="mdi mdi-code-tags text-primary"></i>
|
|
||||||
</a>
|
|
||||||
<a target="_blank" class="nav-link" href="https://github.com/netbox-community/netbox/wiki">
|
|
||||||
<i title="Get Help" data-bs-placement="top" data-bs-toggle="tooltip" class="mdi mdi-lifebuoy text-primary"></i>
|
|
||||||
</a>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
@ -1,47 +0,0 @@
|
|||||||
{% load helpers %} {% load get_status %}
|
|
||||||
{% if changelog and perms.extras.view_objectchange %}
|
|
||||||
<table class="table align-middle table-hover">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">User</th>
|
|
||||||
<th scope="col">Action</th>
|
|
||||||
<th scope="col">Type</th>
|
|
||||||
<th scope="col">Object</th>
|
|
||||||
<th scope="col">Time</th>
|
|
||||||
<th scope="col" align="right"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for change in changelog %}
|
|
||||||
<tr class="{% get_status change.get_action_display %}">
|
|
||||||
<th scope="row">{{ change.user|default:change.user_name }}</th>
|
|
||||||
<td>{{ change.get_action_display|bettertitle }}</td>
|
|
||||||
<td>{{ change.changed_object_type.name|bettertitle }}</td>
|
|
||||||
<td>
|
|
||||||
{% if change.changed_object.get_absolute_url %}
|
|
||||||
<a class="text-body" href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>
|
|
||||||
{% else %} {{ change.changed_object|default:change.object_repr }} {% endif %}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</td>
|
|
||||||
<td>
|
|
||||||
<a role="button" class="text-body" href="{{ change.get_absolute_url }}">
|
|
||||||
<i class="mdi mdi-dots-horizontal" data-bs-toggle="tooltip" data-bs-placement="left" title="View Change Details"></i>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
{% elif perms.extras.view_objectchange %}
|
|
||||||
<div class="alert alert-secondary mt-4" role="alert">
|
|
||||||
No change history found.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<div class="alert alert-danger mt-4" role="alert">
|
|
||||||
<strong>{{ request.user|truncatechars:"30" }}</strong> does not have
|
|
||||||
permission to view changes.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load buttons %}
|
{% load buttons %}
|
||||||
|
|
||||||
{% block title %}{{ title }}{% endblock %}
|
{% block title %}{{ title }}{% endblock %}
|
||||||
@ -10,7 +10,7 @@
|
|||||||
<div class="col col-md-9">
|
<div class="col col-md-9">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'responsive_table.html' %}
|
{% include 'inc/responsive_table.html' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
{% block title %}Create {{ component_type }}{% endblock %}
|
{% block title %}Create {{ component_type }}{% endblock %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
{% render_errors form %}
|
{% render_errors form %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
{% block title %}Add {{ component_type }} to {{ parent }}{% endblock %}
|
{% block title %}Add {{ component_type }} to {{ parent }}{% endblock %}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{{ title }}
|
{{ title }}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'responsive_table.html' %}
|
{% include 'inc/responsive_table.html' %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer noprint">
|
<div class="card-footer noprint">
|
||||||
{% if table.rows %}
|
{% if table.rows %}
|
||||||
@ -37,7 +37,7 @@
|
|||||||
{{ title }}
|
{{ title }}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'responsive_table.html' %}
|
{% include 'inc/responsive_table.html' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -291,12 +291,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'panel_table.html' with table=vlan_table heading="VLANs" %}
|
{% include 'inc/panel_table.html' with table=vlan_table heading="VLANs" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'panel_table.html' with table=child_interfaces_table heading="Child Interfaces" %}
|
{% include 'inc/panel_table.html' with table=child_interfaces_table heading="Child Interfaces" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
{% block title %}Add New Member to Virtual Chassis {{ virtual_chassis }}{% endblock %}
|
{% block title %}Add New Member to Virtual Chassis {{ virtual_chassis }}{% endblock %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
|
@ -16,4 +16,4 @@
|
|||||||
has recently been upgraded, check that the WSGI service (e.g. gunicorn or uWSGI) has been restarted. This
|
has recently been upgraded, check that the WSGI service (e.g. gunicorn or uWSGI) has been restarted. This
|
||||||
ensures that the new code is running.
|
ensures that the new code is running.
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock message %}
|
||||||
|
@ -9,4 +9,4 @@
|
|||||||
media root is <code>{{ settings.MEDIA_ROOT }}</code>. Ensure that the user NetBox runs as has access to write
|
media root is <code>{{ settings.MEDIA_ROOT }}</code>. Ensure that the user NetBox runs as has access to write
|
||||||
files to all locations within this path.
|
files to all locations within this path.
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock message %}
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
can check this by connecting to the database using NetBox's credentials and issuing a query for
|
can check this by connecting to the database using NetBox's credentials and issuing a query for
|
||||||
<code>SELECT VERSION()</code>.
|
<code>SELECT VERSION()</code>.
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock message %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% block title %}{{ object }} - Change Log{% endblock %}
|
{% block title %}{{ object }} - Change Log{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'panel_table.html' %}
|
{% include 'inc/panel_table.html' %}
|
||||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
Change log retention: {% if settings.CHANGELOG_RETENTION %}{{ settings.CHANGELOG_RETENTION }} days{% else %}Indefinite{% endif %}
|
Change log retention: {% if settings.CHANGELOG_RETENTION %}{{ settings.CHANGELOG_RETENTION }} days{% else %}Indefinite{% endif %}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="col col-md-9 mb-3">
|
<div class="col col-md-9 mb-3">
|
||||||
{% include 'panel_table.html' %}
|
{% include 'inc/panel_table.html' %}
|
||||||
</div>
|
</div>
|
||||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,22 +1,18 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title %}{{ object }}{% endblock %}
|
{% block title %}{{ object }}{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumb_main %}
|
{% block breadcrumbs %}
|
||||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
<li class="breadcrumb-item"><a href="{% url 'extras:objectchange_list' %}">Change Log</a></li>
|
||||||
<ol class="breadcrumb">
|
{% if object.related_object.get_absolute_url %}
|
||||||
<li class="breadcrumb-item"><a href="{% url 'extras:objectchange_list' %}">Change Log</a></li>
|
<li class="breadcrumb-item"><a href="{{ object.related_object.get_absolute_url }}changelog/">{{ object.related_object }}</a></li>
|
||||||
{% if object.related_object.get_absolute_url %}
|
{% elif object.changed_object.get_absolute_url %}
|
||||||
<li class="breadcrumb-item"><a href="{{ object.related_object.get_absolute_url }}changelog/">{{ object.related_object }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ object.changed_object.get_absolute_url }}changelog/">{{ object.changed_object }}</a></li>
|
||||||
{% elif object.changed_object.get_absolute_url %}
|
{% elif object.changed_object %}
|
||||||
<li class="breadcrumb-item"><a href="{{ object.changed_object.get_absolute_url }}changelog/">{{ object.changed_object }}</a></li>
|
<li class="breadcrumb-item">{{ object.changed_object }}</li>
|
||||||
{% elif object.changed_object %}
|
{% endif %}
|
||||||
<li class="breadcrumb-item">{{ object.changed_object }}</li>
|
<li class="breadcrumb-item">{{ object }}</li>
|
||||||
{% endif %}
|
|
||||||
<li class="breadcrumb-item">{{ object }}</li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
@ -159,7 +155,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %}
|
{% include 'inc/panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %}
|
||||||
{% if related_changes_count > related_changes_table.rows|length %}
|
{% if related_changes_count > related_changes_table.rows|length %}
|
||||||
<div class="float-end">
|
<div class="float-end">
|
||||||
<a href="{% url 'extras:objectchange_list' %}?request_id={{ object.request_id }}" class="btn btn-primary">See All {{ related_changes_count|add:"1" }} Changes</a>
|
<a href="{% url 'extras:objectchange_list' %}?request_id={{ object.request_id }}" class="btn btn-primary">See All {{ related_changes_count|add:"1" }} Changes</a>
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title %}{{ report.name }}{% endblock %}
|
{% block title %}{{ report.name }}{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumb_main %}
|
{% block breadcrumbs %}
|
||||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}">Reports</a></li>
|
||||||
<ol class="breadcrumb">
|
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}#module.{{ report.module }}">{{ report.module|bettertitle }}</a></li>
|
||||||
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}">Reports</a></li>
|
<li class="breadcrumb-item">{{ report.name }}</li>
|
||||||
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}#module.{{ report.module }}">{{ report.module|bettertitle }}</a></li>
|
|
||||||
<li class="breadcrumb-item">{{ report.name }}</li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title %}Reports{% endblock %}
|
{% block title %}Reports{% endblock %}
|
||||||
|
@ -1,19 +1,14 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
{% load log_levels %}
|
{% load log_levels %}
|
||||||
|
|
||||||
{% block title %}{{ script }}{% endblock %}
|
{% block title %}{{ script }}{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumb_main %}
|
{% block breadcrumbs %}
|
||||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
<li class="breadcrumb-item"><a href="{% url 'extras:script_list' %}">Scripts</a></li>
|
||||||
<ol class="breadcrumb">
|
<li class="breadcrumb-item"><a href="{% url 'extras:script_list' %}#module.{{ module }}">{{ module|bettertitle }}</a></li>
|
||||||
<li class="breadcrumb-item"><a href="/">Home</a></li>
|
<li class="breadcrumb-item">{{ script }}</li>
|
||||||
<li class="breadcrumb-item"><a href="{% url 'extras:script_list' %}">Scripts</a></li>
|
|
||||||
<li class="breadcrumb-item"><a href="{% url 'extras:script_list' %}#module.{{ module }}">{{ module|bettertitle }}</a></li>
|
|
||||||
<li class="breadcrumb-item">{{ script }}</li>
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title %}Scripts{% endblock %}
|
{% block title %}Scripts{% endblock %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
{% load log_levels %}
|
{% load log_levels %}
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
{% include 'panel_table.html' with table=items_table heading='Tagged Objects' %}
|
{% include 'inc/panel_table.html' with table=items_table heading='Tagged Objects' %}
|
||||||
{% include 'inc/paginator.html' with paginator=items_table.paginator page=items_table.page %}
|
{% include 'inc/paginator.html' with paginator=items_table.paginator page=items_table.page %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
<footer class="footer mt-auto bg-light p-3 text-center">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col d-flex flex-column justify-content-center">
|
|
||||||
<span class="text-muted">
|
|
||||||
{{ settings.HOSTNAME }} (v{{ settings.VERSION }})
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex flex-column justify-content-center">
|
|
||||||
<span class="text-muted">{% now 'Y-m-d H:i:s T' %}</span>
|
|
||||||
</div>
|
|
||||||
<div class="col d-flex flex-column justify-content-center">
|
|
||||||
<nav class="nav">
|
|
||||||
<a
|
|
||||||
class="nav-link"
|
|
||||||
href="https://netbox.readthedocs.io/"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<i class="mdi mdi-book-open-page-variant text-primary"></i> Docs
|
|
||||||
</a>
|
|
||||||
<a class="nav-link" href="{% url 'api_docs' %}" target="_blank">
|
|
||||||
<i class="mdi mdi-cloud-braces text-primary"></i> API
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
class="nav-link"
|
|
||||||
href="https://github.com/netbox-community/netbox"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<i class="mdi mdi-xml text-primary"></i> Code
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
class="nav-link"
|
|
||||||
href="https://github.com/netbox-community/netbox/wiki"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<i class="mdi mdi-lifebuoy text-primary"></i> Help
|
|
||||||
</a>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
@ -1,22 +1,22 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load buttons %}
|
{% load buttons %}
|
||||||
{% load custom_links %}
|
{% load custom_links %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load perms %}
|
{% load perms %}
|
||||||
{% load plugins %}
|
{% load plugins %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
{# Breadcrumbs #}
|
||||||
|
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
{% block breadcrumbs %}{% endblock %}
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
{{ block.super }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}{{ object }}{% endblock %}
|
{% block title %}{{ object }}{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumb_main %}
|
|
||||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item"><a href="/">Home</a></li>
|
|
||||||
{% block breadcrumbs %}{%endblock%}
|
|
||||||
</ol>
|
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block controls %}
|
{% block controls %}
|
||||||
<div class="controls mb-2 mx-0">
|
<div class="controls mb-2 mx-0">
|
||||||
<div class="d-flex flex-wrap justify-content-end">
|
<div class="d-flex flex-wrap justify-content-end">
|
||||||
@ -34,15 +34,15 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock controls %}
|
||||||
|
|
||||||
{% block tabs %}
|
{% block tabs %}
|
||||||
<ul class="nav nav-tabs mb-3">
|
<ul class="nav nav-tabs mb-3">
|
||||||
{% block tab_items %}
|
{% block tab_items %}
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<a class="nav-link{% if not active_tab %} active{% endif %}" href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
|
<a class="nav-link{% if not active_tab %} active{% endif %}" href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endblock %}
|
{% endblock tab_items %}
|
||||||
{% if perms.extras.view_journalentry %}
|
{% if perms.extras.view_journalentry %}
|
||||||
{% with journal_viewname=object|viewname:'journal' %}
|
{% with journal_viewname=object|viewname:'journal' %}
|
||||||
{% url journal_viewname pk=object.pk as journal_url %}
|
{% url journal_viewname pk=object.pk as journal_url %}
|
||||||
@ -62,7 +62,7 @@
|
|||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock tabs %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<p>
|
<p>
|
||||||
@ -72,5 +72,5 @@
|
|||||||
</small>
|
</small>
|
||||||
<span class="badge bg-primary">{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}</span>
|
<span class="badge bg-primary">{{ object|meta:"app_label" }}.{{ object|meta:"model_name" }}:{{ object.pk }}</span>
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
{% block components %}{% endblock %}
|
{% block components %}{% endblock %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
{% block title %}Add {{ model_name|title }}{% endblock %}
|
{% block title %}Add {{ model_name|title }}{% endblock %}
|
||||||
@ -37,4 +37,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title %}Delete {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}
|
{% block title %}Delete {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}
|
||||||
@ -39,4 +39,4 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
@ -42,4 +42,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
@ -127,4 +127,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title %}Remove {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}
|
{% block title %}Remove {{ table.rows|length }} {{ obj_type_plural|bettertitle }}?{% endblock %}
|
||||||
@ -37,4 +37,4 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
@ -47,4 +47,4 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
{% block title %}Delete {{ obj_type }}?{% endblock %}
|
{% block title %}Delete {{ obj_type }}?{% endblock %}
|
||||||
|
|
||||||
{% block message %}
|
{% block message %}
|
||||||
<p>Are you sure you want to delete {{ obj_type }} <strong>{{ obj }}</strong>?</p>
|
<p>Are you sure you want to delete {{ obj_type }} <strong>{{ obj }}</strong>?</p>
|
||||||
{% block message_extra %}{% endblock %}
|
{% block message_extra %}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock message %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %} {% load form_helpers %} {% load helpers %}
|
{% extends 'base/layout.html' %} {% load form_helpers %} {% load helpers %}
|
||||||
|
|
||||||
{% block title %}{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}{% endblock %}
|
{% block title %}{% if obj.pk %}Editing {{ obj_type }} {{ obj }}{% else %}Add a new {{ obj_type }}{% endif %}{% endblock %}
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
<i class="mdi mdi-help-circle"></i>
|
<i class="mdi mdi-help-circle"></i>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock controls %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="" method="post" enctype="multipart/form-data">
|
<form action="" method="post" enctype="multipart/form-data">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
{% block form_fields %}{% render_form form %}{% endblock %}
|
{% block form_fields %}{% render_form form %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock form %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row my-3">
|
<div class="row my-3">
|
||||||
@ -66,11 +66,11 @@
|
|||||||
Create
|
Create
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock buttons %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% if obj and settings.DOCS_ROOT %}
|
{% if obj and settings.DOCS_ROOT %}
|
||||||
{% include 'inc/modal.html' with name='docs' content=obj|get_docs %}
|
{% include 'inc/modal.html' with name='docs' content=obj|get_docs %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
@ -22,4 +22,4 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load buttons %}
|
{% load buttons %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load render_table from django_tables2 %}
|
{% load render_table from django_tables2 %}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock controls %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if table.paginator.num_pages > 1 %}
|
{% if table.paginator.num_pages > 1 %}
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<form method="post" class="form form-horizontal">
|
<form method="post" class="form form-horizontal">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />
|
<input type="hidden" name="return_url" value="{% if return_url %}{{ return_url }}{% else %}{{ request.path }}{% if request.GET %}?{{ request.GET.urlencode }}{% endif %}{% endif %}" />
|
||||||
{% include table_template|default:'responsive_table.html' %}
|
{% include table_template|default:'inc/responsive_table.html' %}
|
||||||
<div class="float-start noprint bulk-buttons">
|
<div class="float-start noprint bulk-buttons">
|
||||||
{% block bulk_buttons %}{% endblock %}
|
{% block bulk_buttons %}{% endblock %}
|
||||||
{% if bulk_edit_url and permissions.change %}
|
{% if bulk_edit_url and permissions.change %}
|
||||||
@ -111,4 +111,4 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% table_config_form table table_name="ObjectTable" %}
|
{% table_config_form table table_name="ObjectTable" %}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,56 +1,100 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
|
{% load get_status %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block title_container %}{% endblock %}
|
{% block header %}{% endblock %}
|
||||||
{% block title %}Home{% endblock %}
|
{% block title %}Home{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="stats-container">
|
|
||||||
<div class="row masonry">
|
{# General stats #}
|
||||||
{% for section in stats %}
|
<div class="stats-container">
|
||||||
<div class="col col-sm-12 col-md-4 my-2 masonry-item">
|
<div class="row masonry">
|
||||||
<div class="card">
|
{% for section in stats %}
|
||||||
<h5 class="card-header text-primary">{{ section.label }}</h5>
|
<div class="col col-sm-12 col-md-4 my-2 masonry-item">
|
||||||
<div class="card-body">
|
<div class="card">
|
||||||
<div class="list-group list-group-flush">
|
<h5 class="card-header text-primary">{{ section.label }}</h5>
|
||||||
{% for item in section.items %}
|
<div class="card-body">
|
||||||
<a href="{% url item.url %}" class="list-group-item list-group-item-action{% if item.disabled %} disabled{% endif %}">
|
<div class="list-group list-group-flush">
|
||||||
<div class="d-flex w-100 justify-content-between align-items-center">
|
{% for item in section.items %}
|
||||||
<div class="d-flex flex-column align-items-start">
|
<a href="{% url item.url %}" class="list-group-item list-group-item-action{% if item.disabled %} disabled{% endif %}">
|
||||||
<h6 class="mb-1">{{ item.label }}</h6>
|
<div class="d-flex w-100 justify-content-between align-items-center">
|
||||||
{% if item.description %}
|
<div class="d-flex flex-column align-items-start">
|
||||||
<small class="mb-1 text-muted">{{ item.description }}</small>
|
<h6 class="mb-1">{{ item.label }}</h6>
|
||||||
{% endif %}
|
{% if item.description %}
|
||||||
|
<small class="mb-1 text-muted">{{ item.description }}</small>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<span class="badge stat-badge rounded-pill">
|
||||||
|
{% if item.count == None %}
|
||||||
|
<i class="mdi mdi-lock"></i>
|
||||||
|
{% else %}
|
||||||
|
{{ item.count }}
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="badge stat-badge rounded-pill">
|
</a>
|
||||||
{% if item.count == None %}
|
{% endfor %}
|
||||||
<i class="mdi mdi-lock"></i>
|
</div>
|
||||||
{% else %}
|
<div class="display-4 font-weight-normal text-primary">
|
||||||
{{ item.count }}
|
{{ item.count }}
|
||||||
{% endif %}
|
</div>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
<div class="display-4 font-weight-normal text-primary">
|
|
||||||
{{ item.count }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-4 flex-grow-1 changelog-container">
|
{# Changelog #}
|
||||||
<div class="col">
|
<div class="row my-4 flex-grow-1 changelog-container">
|
||||||
<div class="card">
|
<div class="col">
|
||||||
<h4 class="card-header">Changelog</h4>
|
<div class="card">
|
||||||
<div class="card-body">
|
<h4 class="card-header">Changelog</h4>
|
||||||
{% include 'changelog.html' %}
|
<div class="card-body">
|
||||||
|
{% if changelog and perms.extras.view_objectchange %}
|
||||||
|
{# TODO: Replace this with a django-tables2 Table #}
|
||||||
|
<table class="table align-middle table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">User</th>
|
||||||
|
<th scope="col">Action</th>
|
||||||
|
<th scope="col">Type</th>
|
||||||
|
<th scope="col">Object</th>
|
||||||
|
<th scope="col">Time</th>
|
||||||
|
<th scope="col" align="right"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for change in changelog %}
|
||||||
|
<tr class="{% get_status change.get_action_display %}">
|
||||||
|
<th scope="row">{{ change.user|default:change.user_name }}</th>
|
||||||
|
<td>{{ change.get_action_display|bettertitle }}</td>
|
||||||
|
<td>{{ change.changed_object_type.name|bettertitle }}</td>
|
||||||
|
<td>
|
||||||
|
{% if change.changed_object.get_absolute_url %}
|
||||||
|
<a class="text-body" href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>
|
||||||
|
{% else %} {{ change.changed_object|default:change.object_repr }} {% endif %}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</td>
|
||||||
|
<td>
|
||||||
|
<a role="button" class="text-body" href="{{ change.get_absolute_url }}">
|
||||||
|
<i class="mdi mdi-dots-horizontal" data-bs-toggle="tooltip" data-bs-placement="left" title="View Change Details"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% elif perms.extras.view_objectchange %}
|
||||||
|
<div class="alert alert-secondary mt-4" role="alert">
|
||||||
|
No change history found.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endblock content %}
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
|
|
||||||
{% block title %}Import Completed{% endblock %}
|
{% block title %}Import Completed{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include 'responsive_table.html' %}
|
{% include 'inc/responsive_table.html' %}
|
||||||
{% if return_url %}
|
{% if return_url %}
|
||||||
<a href="{{ return_url }}" class="btn btn-outline-dark">View All</a>
|
<a href="{{ return_url }}" class="btn btn-outline-dark">View All</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -11,4 +11,4 @@
|
|||||||
<span class="mdi mdi-database-import-outline" aria-hidden="true"></span>
|
<span class="mdi mdi-database-import-outline" aria-hidden="true"></span>
|
||||||
Import More
|
Import More
|
||||||
</a>
|
</a>
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'utilities/obj_table.html' with table=prefix_table table_template='panel_table.html' heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
|
{% include 'utilities/obj_table.html' with table=prefix_table table_template='inc/panel_table.html' heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-md-8">
|
<div class="col col-md-8">
|
||||||
{% include 'panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %}
|
{% include 'inc/panel_table.html' with table=parent_prefixes_table heading='Parent Prefixes' %}
|
||||||
{% if duplicate_ips_table.rows %}
|
{% if duplicate_ips_table.rows %}
|
||||||
{# Custom version of panel_table.html #}
|
{# Custom version of panel_table.html #}
|
||||||
<div class="card bg-danger">
|
<div class="card bg-danger">
|
||||||
@ -138,7 +138,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
{% include 'utilities/obj_table.html' with table=related_ips_table table_template='panel_table.html' heading='Related IP Addresses' %}
|
{% include 'utilities/obj_table.html' with table=related_ips_table table_template='inc/panel_table.html' heading='Related IP Addresses' %}
|
||||||
</div>
|
</div>
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
<h3>Search Results</h3>
|
<h3>Search Results</h3>
|
||||||
{% include 'utilities/obj_table.html' with table_template='panel_table.html' %}
|
{% include 'utilities/obj_table.html' with table_template='inc/panel_table.html' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -117,9 +117,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col col-md-7">
|
<div class="col col-md-7">
|
||||||
{% if duplicate_prefix_table.rows %}
|
{% if duplicate_prefix_table.rows %}
|
||||||
{% include 'panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' %}
|
{% include 'inc/panel_table.html' with table=duplicate_prefix_table heading='Duplicate Prefixes' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include 'panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' %}
|
{% include 'inc/panel_table.html' with table=parent_prefix_table heading='Parent Prefixes' %}
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'utilities/obj_table.html' with table=ip_table table_template='panel_table.html' heading='IP Addresses' bulk_edit_url='ipam:ipaddress_bulk_edit' bulk_delete_url='ipam:ipaddress_bulk_delete' %}
|
{% include 'utilities/obj_table.html' with table=ip_table table_template='inc/panel_table.html' heading='IP Addresses' bulk_edit_url='ipam:ipaddress_bulk_edit' bulk_delete_url='ipam:ipaddress_bulk_delete' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'utilities/obj_table.html' with table=prefix_table table_template='panel_table.html' heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' parent=prefix %}
|
{% include 'utilities/obj_table.html' with table=prefix_table table_template='inc/panel_table.html' heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' parent=prefix %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -42,9 +42,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
{% include 'panel_table.html' with table=importing_vrfs_table heading="Importing VRFs" %}
|
{% include 'inc/panel_table.html' with table=importing_vrfs_table heading="Importing VRFs" %}
|
||||||
</div>
|
</div>
|
||||||
{% include 'panel_table.html' with table=exporting_vrfs_table heading="Exporting VRFs" %}
|
{% include 'inc/panel_table.html' with table=exporting_vrfs_table heading="Exporting VRFs" %}
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
Prefixes
|
Prefixes
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'responsive_table.html' with table=prefix_table %}
|
{% include 'inc/responsive_table.html' with table=prefix_table %}
|
||||||
</div>
|
</div>
|
||||||
{% if perms.ipam.add_prefix %}
|
{% if perms.ipam.add_prefix %}
|
||||||
<div class="card-footer text-end noprint">
|
<div class="card-footer text-end noprint">
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'utilities/obj_table.html' with table=members_table table_template='panel_table.html' heading='Device Interfaces' parent=vlan %}
|
{% include 'utilities/obj_table.html' with table=members_table table_template='inc/panel_table.html' heading='Device Interfaces' parent=vlan %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'utilities/obj_table.html' with table=members_table table_template='panel_table.html' heading='Virtual Machine Interfaces' parent=vlan %}
|
{% include 'utilities/obj_table.html' with table=members_table table_template='inc/panel_table.html' heading='Virtual Machine Interfaces' parent=vlan %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -66,8 +66,8 @@
|
|||||||
{% plugin_left_page object %}
|
{% plugin_left_page object %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
{% include 'panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
|
{% include 'inc/panel_table.html' with table=import_targets_table heading="Import Route Targets" %}
|
||||||
{% include 'panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
|
{% include 'inc/panel_table.html' with table=export_targets_table heading="Export Route Targets" %}
|
||||||
{% plugin_right_page object %}
|
{% plugin_right_page object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,81 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% load search_options %}
|
|
||||||
|
|
||||||
{% block head %}{% endblock %}
|
|
||||||
|
|
||||||
{% block layout %}
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<main class="col-md-9 ms-sm-auto col-lg-10 px-0">
|
|
||||||
<nav id="sidebar-menu" class="col-md-3 col-lg-2 d-md-block sidebar collapse px-0">
|
|
||||||
<div class="position-sticky pt-3">
|
|
||||||
<a class="px-2 sidebar-logo d-none d-md-flex" href="{% url 'home' %}">
|
|
||||||
{% load static %}
|
|
||||||
{% include 'logo.html' %}
|
|
||||||
</a>
|
|
||||||
<ul class="nav flex-column">
|
|
||||||
<div class="d-block d-md-none mx-1 my-3 search-container">
|
|
||||||
{% search_options %}
|
|
||||||
</div>
|
|
||||||
<div class="d-flex d-md-none mx-1 my-3 justify-content-end">
|
|
||||||
{% include './profile_button.html' %}
|
|
||||||
</div>
|
|
||||||
{% load nav %} {% nav %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% include './bottom.html' %}
|
|
||||||
</nav>
|
|
||||||
<nav class="navbar navbar-light sticky-top flex-md-nowrap py-4 search container-fluid">
|
|
||||||
<div class="d-md-none w-100 d-flex justify-content-between align-items-center my-3">
|
|
||||||
<a class="px-2 sidebar-logo d-block d-md-none" href="{% url 'home' %}">
|
|
||||||
{% include 'logo.html' %}
|
|
||||||
</a>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
aria-expanded="false"
|
|
||||||
data-bs-toggle="collapse"
|
|
||||||
aria-controls="sidebar-menu"
|
|
||||||
data-bs-target="#sidebar-menu"
|
|
||||||
aria-label="Toggle Navigation"
|
|
||||||
class="navbar-toggler position-relative collapsed"
|
|
||||||
>
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="d-none d-md-flex w-100 search-container">
|
|
||||||
{% search_options %}
|
|
||||||
{% include './profile_button.html' %}
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="px-4 content-container">
|
|
||||||
{% block title_container %}
|
|
||||||
<div class="title-container">
|
|
||||||
<div id="content-title">
|
|
||||||
<h1 class="h2 w-100">{% block title %}{% endblock %}</h1>
|
|
||||||
{% block breadcrumb_main %}{% endblock %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% block controls %}{% endblock %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
<div id="content" class="container-fluid p-0 m-0">
|
|
||||||
{% block tabs %}{% endblock %}
|
|
||||||
{% block content %}{% endblock %}
|
|
||||||
</div>
|
|
||||||
<footer class="footer container-fluid pb-3 pt-4 px-0">
|
|
||||||
<div class="row align-items-center justify-content-end">
|
|
||||||
<div class="col-auto d-none d-md-block"></div>
|
|
||||||
<div class="col text-center text-md-end small text-muted">
|
|
||||||
<span class="fw-light d-block d-md-inline">{% now 'Y-m-d H:i:s T' %}</span>
|
|
||||||
<span class="ms-md-3 d-block d-md-inline">{{ settings.HOSTNAME }} (v{{ settings.VERSION }})</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
{% block javascript %}{% endblock %}
|
|
||||||
{% block data %}{% endblock %}
|
|
@ -1,53 +1,58 @@
|
|||||||
{% extends 'base.html' %} {% load static %} {% block layout %}
|
{# User login page. Extends base.html directly to override normal UI layout. #}
|
||||||
<main class="login-container text-center">
|
{% extends 'base/base.html' %}
|
||||||
{% if settings.BANNER_LOGIN %}
|
{% load form_helpers %}
|
||||||
<div class="alert alert-secondary" role="alert">
|
{% load static %}
|
||||||
{{ settings.BANNER_LOGIN|safe }}
|
|
||||||
</div>
|
{% block layout %}
|
||||||
{% endif %}
|
<main class="login-container text-center">
|
||||||
<div class="form-login">
|
|
||||||
<form action="{% url 'login' %}" method="post">
|
{# Login banner #}
|
||||||
<div class="mb-4">
|
{% if settings.BANNER_LOGIN %}
|
||||||
{% include 'logo.html' with height=80 %}
|
<div class="alert alert-secondary" role="alert">
|
||||||
|
{{ settings.BANNER_LOGIN|safe }}
|
||||||
</div>
|
</div>
|
||||||
{% csrf_token %} {% if 'next' in request.GET %}
|
{% endif %}
|
||||||
<input type="hidden" name="next" value="{{ request.GET.next }}" />
|
|
||||||
{% endif %} {% if 'next' in request.POST %}
|
{# Login form #}
|
||||||
<input type="hidden" name="next" value="{{ request.POST.next }}" />
|
<div class="form-login">
|
||||||
{% endif %}
|
<form action="{% url 'login' %}" method="post">
|
||||||
<input
|
{% csrf_token %}
|
||||||
required
|
|
||||||
type="text"
|
{# Logo #}
|
||||||
placeholder="Username"
|
<div class="mb-4">
|
||||||
name="username"
|
<img src="{% static 'netbox_logo.svg' %}" height="80" alt="NetBox logo" />
|
||||||
maxlength="150"
|
</div>
|
||||||
id="id_username"
|
|
||||||
class="form-control"
|
{# Set post-login URL #}
|
||||||
/>
|
{% if 'next' in request.GET %}
|
||||||
<input
|
<input type="hidden" name="next" value="{{ request.GET.next }}" />
|
||||||
required
|
{% endif %} {% if 'next' in request.POST %}
|
||||||
type="password"
|
<input type="hidden" name="next" value="{{ request.POST.next }}" />
|
||||||
placeholder="Password"
|
{% endif %}
|
||||||
name="password"
|
|
||||||
id="id_password"
|
{{ form.username }}
|
||||||
class="form-control"
|
{{ form.password }}
|
||||||
/>
|
|
||||||
<button type="submit" class="btn btn-primary btn-lg w-100 mt-4">
|
<button type="submit" class="btn btn-primary btn-lg w-100 mt-4">
|
||||||
Sign In
|
Sign In
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% load form_helpers %} {% if form.non_field_errors %}
|
|
||||||
<div class="alert alert-danger" role="alert">
|
{# Login form errors #}
|
||||||
<h4 class="alert-heading">Errors</h4>
|
{% if form.non_field_errors %}
|
||||||
<p>
|
<div class="alert alert-danger" role="alert">
|
||||||
{{ form.non_field_errors }}
|
<h4 class="alert-heading">Errors</h4>
|
||||||
</p>
|
<p>
|
||||||
</div>
|
{{ form.non_field_errors }}
|
||||||
{% endif %}
|
</p>
|
||||||
</main>
|
</div>
|
||||||
<footer class="footer container-fluid login-footer py-3">
|
{% endif %}
|
||||||
<div class="row align-items-center">
|
</main>
|
||||||
|
|
||||||
|
{# Page footer #}
|
||||||
|
<footer class="footer container-fluid login-footer py-3">
|
||||||
|
<div class="row align-items-center">
|
||||||
<div class="col-2 col-md-1 mb-0">
|
<div class="col-2 col-md-1 mb-0">
|
||||||
<button type="button" class="btn btn-sm color-mode-toggle" title="Toggle Color Mode">
|
<button type="button" class="btn btn-sm color-mode-toggle" title="Toggle Color Mode">
|
||||||
<i class="color-mode-icon mdi mdi-lightbulb"></i>
|
<i class="color-mode-icon mdi mdi-lightbulb"></i>
|
||||||
@ -59,6 +64,7 @@
|
|||||||
{{ settings.HOSTNAME }} (v{{ settings.VERSION }})
|
{{ settings.HOSTNAME }} (v{{ settings.VERSION }})
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{% endblock %}
|
|
||||||
|
{% endblock layout %}
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 320" height="{{ height|default:50 }}">
|
|
||||||
<g id="netbox-logo-1">
|
|
||||||
<circle cx="37" cy="284" r="23"/>
|
|
||||||
<circle cx="101" cy="37" r="23"/>
|
|
||||||
<circle cx="101" cy="220" r="23"/>
|
|
||||||
<circle cx="284" cy="220" r="23"/>
|
|
||||||
<rect x="93" y="37" width="16" height="180"/>
|
|
||||||
<rect x="101" y="212" width="180" height="16"/>
|
|
||||||
<rect x="93" y="212" width="16" height="90" transform="rotate(45 101 220)"/>
|
|
||||||
</g>
|
|
||||||
<g id="netbox-logo-2">
|
|
||||||
<circle cx="284" cy="37" r="23"/>
|
|
||||||
<circle cx="37" cy="101" r="23"/>
|
|
||||||
<circle cx="220" cy="101" r="23"/>
|
|
||||||
<circle cx="220" cy="284" r="23"/>
|
|
||||||
<rect x="37" y="93" width="180" height="16"/>
|
|
||||||
<rect x="212" y="101" width="16" height="180"/>
|
|
||||||
<rect x="212" y="93" width="16" height="90" transform="rotate(225 220 101)"/>
|
|
||||||
<path transform="translate(380, 8)" d="M13.60 200L13.60 104L36.40 104L36.40 119.40L36.80 119.40Q40.20 112.20 47.20 106.90Q54.20 101.60 66.20 101.60L66.20 101.60Q75.80 101.60 82.50 104.80Q89.20 108 93.40 113.20Q97.60 118.40 99.40 125.20Q101.20 132 101.20 139.40L101.20 139.40L101.20 200L77.20 200L77.20 151.40Q77.20 147.40 76.80 142.50Q76.40 137.60 74.70 133.30Q73 129 69.40 126.10Q65.80 123.20 59.60 123.20L59.60 123.20Q53.60 123.20 49.50 125.20Q45.40 127.20 42.70 130.60Q40 134 38.80 138.40Q37.60 142.80 37.60 147.60L37.60 147.60L37.60 200L13.60 200ZM224.80 160.40L151.60 160.40Q152.80 171.20 160 177.20Q167.20 183.20 177.40 183.20L177.40 183.20Q186.40 183.20 192.50 179.50Q198.60 175.80 203.20 170.20L203.20 170.20L220.40 183.20Q212 193.60 201.60 198Q191.20 202.40 179.80 202.40L179.80 202.40Q169 202.40 159.40 198.80Q149.80 195.20 142.80 188.60Q135.80 182 131.70 172.70Q127.60 163.40 127.60 152L127.60 152Q127.60 140.60 131.70 131.30Q135.80 122 142.80 115.40Q149.80 108.80 159.40 105.20Q169 101.60 179.80 101.60L179.80 101.60Q189.80 101.60 198.10 105.10Q206.40 108.60 212.30 115.20Q218.20 121.80 221.50 131.50Q224.80 141.20 224.80 153.80L224.80 153.80L224.80 160.40ZM151.60 142.40L200.80 142.40Q200.60 131.80 194.20 125.70Q187.80 119.60 176.40 119.60L176.40 119.60Q165.60 119.60 159.30 125.80Q153 132 151.60 142.40L151.60 142.40ZM259.80 124.40L240.00 124.40L240.00 104L259.80 104L259.80 76.20L283.80 76.20L283.80 104L310.20 104L310.20 124.40L283.80 124.40L283.80 166.40Q283.80 173.60 286.50 177.80Q289.20 182 297.20 182L297.20 182Q300.40 182 304.20 181.30Q308 180.60 310.20 179L310.20 179L310.20 199.20Q306.40 201 300.90 201.70Q295.40 202.40 291.20 202.40L291.20 202.40Q281.60 202.40 275.50 200.30Q269.40 198.20 265.90 193.90Q262.40 189.60 261.10 183.20Q259.80 176.80 259.80 168.40L259.80 168.40L259.80 124.40ZM333.20 200L333.20 48.80L357.20 48.80L357.20 116.20L357.80 116.20Q359.60 113.80 362.40 111.30Q365.20 108.80 369.20 106.60Q373.20 104.40 378.40 103Q383.60 101.60 390.40 101.60L390.40 101.60Q400.60 101.60 409.20 105.50Q417.80 109.40 423.90 116.20Q430 123 433.40 132.20Q436.80 141.40 436.80 152L436.80 152Q436.80 162.60 433.60 171.80Q430.40 181 424.20 187.80Q418 194.60 409.20 198.50Q400.40 202.40 389.40 202.40L389.40 202.40Q379.20 202.40 370.40 198.40Q361.60 194.40 356.40 185.60L356.40 185.60L356 185.60L356 200L333.20 200ZM412.80 152L412.80 152Q412.80 146.40 410.90 141.20Q409 136 405.30 132Q401.60 128 396.40 125.60Q391.20 123.20 384.60 123.20L384.60 123.20Q378 123.20 372.80 125.60Q367.60 128 363.90 132Q360.20 136 358.30 141.20Q356.40 146.40 356.40 152L356.40 152Q356.40 157.60 358.30 162.80Q360.20 168 363.90 172Q367.60 176 372.80 178.40Q378 180.80 384.60 180.80L384.60 180.80Q391.20 180.80 396.40 178.40Q401.60 176 405.30 172Q409 168 410.90 162.80Q412.80 157.60 412.80 152ZM458.40 152L458.40 152Q458.40 140.60 462.50 131.30Q466.60 122 473.60 115.40Q480.60 108.80 490.20 105.20Q499.80 101.60 510.60 101.60L510.60 101.60Q521.40 101.60 531 105.20Q540.60 108.80 547.60 115.40Q554.60 122 558.70 131.30Q562.80 140.60 562.80 152L562.80 152Q562.80 163.40 558.70 172.70Q554.60 182 547.60 188.60Q540.60 195.20 531 198.80Q521.40 202.40 510.60 202.40L510.60 202.40Q499.80 202.40 490.20 198.80Q480.60 195.20 473.60 188.60Q466.60 182 462.50 172.70Q458.40 163.40 458.40 152ZM482.40 152L482.40 152Q482.40 157.60 484.30 162.80Q486.20 168 489.90 172Q493.60 176 498.80 178.40Q504 180.80 510.60 180.80L510.60 180.80Q517.20 180.80 522.40 178.40Q527.60 176 531.30 172Q535 168 536.90 162.80Q538.80 157.60 538.80 152L538.80 152Q538.80 146.40 536.90 141.20Q535 136 531.30 132Q527.60 128 522.40 125.60Q517.20 123.20 510.60 123.20L510.60 123.20Q504 123.20 498.80 125.60Q493.60 128 489.90 132Q486.20 136 484.30 141.20Q482.40 146.40 482.40 152ZM575.40 200L614 148.40L580.80 104L610 104L629.20 132.80L650 104L677.40 104L644.60 148.40L683.20 200L654 200L629 165.60L603.80 200L575.40 200Z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 4.6 KiB |
@ -1,10 +1,4 @@
|
|||||||
{% extends 'rest_framework/base.html' %}
|
{% extends 'rest_framework/base.html' %}
|
||||||
{% load static %}
|
|
||||||
|
|
||||||
{% block bootstrap_theme %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap-3.4.1-dist/css/bootstrap.min.css' %}"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static "rest_framework/css/bootstrap-tweaks.css" %}"/>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block branding %}
|
{% block branding %}
|
||||||
<a class="navbar-brand" href="/{{ settings.BASE_PATH }}">NetBox</a>
|
<a class="navbar-brand" href="/{{ settings.BASE_PATH }}">NetBox</a>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<div class="col col-md-9">
|
<div class="col col-md-9">
|
||||||
{% for obj_type in results %}
|
{% for obj_type in results %}
|
||||||
<h3 id="{{ obj_type.name|lower }}">{{ obj_type.name|bettertitle }}</h3>
|
<h3 id="{{ obj_type.name|lower }}">{{ obj_type.name|bettertitle }}</h3>
|
||||||
{% include 'panel_table.html' with table=obj_type.table %}
|
{% include 'inc/panel_table.html' with table=obj_type.table %}
|
||||||
<a href="{{ obj_type.url }}" class="btn btn-primary float-end my-3">
|
<a href="{{ obj_type.url }}" class="btn btn-primary float-end my-3">
|
||||||
<i class="mdi mdi-arrow-right-bold" aria-hidden="true"></i>
|
<i class="mdi mdi-arrow-right-bold" aria-hidden="true"></i>
|
||||||
{% if obj_type.table.page.has_next %}
|
{% if obj_type.table.page.has_next %}
|
||||||
@ -65,4 +65,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock content %}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
<div class="row" style="padding-bottom: 20px">
|
|
||||||
<div class="col col-md-12 text-center">
|
|
||||||
<form action="{% url 'search' %}" method="get" class="form-inline">
|
|
||||||
<input type="text" name="q" value="{{ request.GET.q }}" placeholder="Search" id="id_q" class="form-control" style="width: 350px" />
|
|
||||||
{{ search_form.obj_type }}
|
|
||||||
<button type="submit" class="btn btn-primary">Search</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
|
|
||||||
{% block title %}{% endblock %}
|
{% block title %}{% endblock %}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include table_template|default:'responsive_table.html' %}
|
{% include table_template|default:'inc/responsive_table.html' %}
|
||||||
<div class="float-start noprint">
|
<div class="float-start noprint">
|
||||||
{% block extra_actions %}{% endblock %}
|
{% block extra_actions %}{% endblock %}
|
||||||
{% if bulk_edit_url and permissions.change %}
|
{% if bulk_edit_url and permissions.change %}
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include table_template|default:'responsive_table.html' %}
|
{% include table_template|default:'inc/responsive_table.html' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
{% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<form action="{% url 'virtualization:cluster_remove_devices' pk=object.pk %}" method="post">
|
<form action="{% url 'virtualization:cluster_remove_devices' pk=object.pk %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'responsive_table.html' with table=devices_table %}
|
{% include 'inc/responsive_table.html' with table=devices_table %}
|
||||||
</div>
|
</div>
|
||||||
{% if perms.virtualization.change_cluster %}
|
{% if perms.virtualization.change_cluster %}
|
||||||
<div class="card-footer noprint">
|
<div class="card-footer noprint">
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Virtual Machines
|
Virtual Machines
|
||||||
</h5>
|
</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% include 'responsive_table.html' with table=virtualmachines_table %}
|
{% include 'inc/responsive_table.html' with table=virtualmachines_table %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'layout.html' %}
|
{% extends 'base/layout.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
{% load form_helpers %}
|
{% load form_helpers %}
|
||||||
|
|
||||||
|
@ -102,12 +102,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'panel_table.html' with table=vlan_table heading="VLANs" %}
|
{% include 'inc/panel_table.html' with table=vlan_table heading="VLANs" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col col-md-12">
|
<div class="col col-md-12">
|
||||||
{% include 'panel_table.html' with table=child_interfaces_table heading="Child Interfaces" %}
|
{% include 'inc/panel_table.html' with table=child_interfaces_table heading="Child Interfaces" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -6,12 +6,7 @@ from .models import Token
|
|||||||
|
|
||||||
|
|
||||||
class LoginForm(BootstrapMixin, AuthenticationForm):
|
class LoginForm(BootstrapMixin, AuthenticationForm):
|
||||||
|
pass
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
self.fields['username'].widget.attrs['placeholder'] = ''
|
|
||||||
self.fields['password'].widget.attrs['placeholder'] = ''
|
|
||||||
|
|
||||||
|
|
||||||
class PasswordChangeForm(BootstrapMixin, DjangoPasswordChangeForm):
|
class PasswordChangeForm(BootstrapMixin, DjangoPasswordChangeForm):
|
||||||
|
Loading…
Reference in New Issue
Block a user