mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 19:19:22 -06:00
migrate templates to bootstrap 5
This commit is contained in:
parent
4b0d5815c0
commit
f7c1bc71d9
BIN
netbox/project-static/dist/netbox.css
vendored
BIN
netbox/project-static/dist/netbox.css
vendored
Binary file not shown.
2
netbox/project-static/dist/netbox.css.map
vendored
2
netbox/project-static/dist/netbox.css.map
vendored
File diff suppressed because one or more lines are too long
@ -410,3 +410,29 @@ table th {
|
||||
margin-top: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
pre.change-data {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
& > span {
|
||||
display: block;
|
||||
padding-left: $spacer;
|
||||
padding-right: $spacer;
|
||||
&.added {
|
||||
background-color: rgba($green, 0.4);
|
||||
}
|
||||
&.removed {
|
||||
background-color: rgba($red, 0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre.change-diff {
|
||||
border-color: transparent;
|
||||
&.change-removed {
|
||||
background-color: rgba($red, 0.4);
|
||||
}
|
||||
&.change-added {
|
||||
background-color: rgba($green, 0.4);
|
||||
}
|
||||
}
|
||||
|
@ -4,23 +4,19 @@
|
||||
|
||||
<head>
|
||||
<title>Server Error</title>
|
||||
<link rel="stylesheet" href="{% static 'bootstrap-3.4.1-dist/css/bootstrap.min.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'materialdesignicons-5.4.55/css/materialdesignicons.min.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'netbox.css'%}" />
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="panel panel-danger" style="margin-top: 200px">
|
||||
<div class="panel-heading">
|
||||
<strong>
|
||||
<i class="mdi mdi-alert"></i>
|
||||
Server Error
|
||||
</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<div class="card bg-danger mt-5">
|
||||
<h5 class="card-header">
|
||||
<i class="mdi mdi-alert"></i> Server Error
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
{% block message %}
|
||||
<p>
|
||||
There was a problem with your request. Please contact an administrator.
|
||||
@ -38,7 +34,7 @@ NetBox version: {{ netbox_version }}</pre>
|
||||
<p>
|
||||
If further assistance is required, please post to the <a href="https://groups.google.com/g/netbox-discuss">NetBox mailing list</a>.
|
||||
</p>
|
||||
<div class="text-right">
|
||||
<div class="text-end">
|
||||
<a href="{% url 'home' %}" class="btn btn-primary">Home Page</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,9 +3,8 @@
|
||||
{% load plugins %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ block.super }}
|
||||
<li><a href="{% url 'dcim:device_consoleports' pk=object.device.pk %}">Console Ports</a></li>
|
||||
<li>{{ object }}</li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'dcim:device_consoleports' pk=object.device.pk %}">Console Ports</a></li>
|
||||
<li class="breadcrumb-item">{{ object }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -64,7 +63,7 @@
|
||||
<th scope="row">Cable</th>
|
||||
<td>
|
||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||
<a href="{% url 'dcim:consoleport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||
<a href="{% url 'dcim:consoleport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
@ -94,9 +93,9 @@
|
||||
<th scope="row">Path Status</th>
|
||||
<td>
|
||||
{% if object.path.is_active %}
|
||||
<span class="label label-success">Reachable</span>
|
||||
<span class="badge bg-success">Reachable</span>
|
||||
{% else %}
|
||||
<span class="label label-danger">Not Reachable</span>
|
||||
<span class="badge bg-danger">Not Reachable</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@ -106,11 +105,11 @@
|
||||
<div class="text-muted">
|
||||
Not Connected
|
||||
{% if perms.dcim.add_cable %}
|
||||
<div class="dropdown">
|
||||
<div class="dropdown float-end">
|
||||
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="mdi mdi-ethernet-cable" aria-hidden="true"></span> Connect
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
|
@ -3,9 +3,8 @@
|
||||
{% load plugins %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ block.super }}
|
||||
<li><a href="{% url 'dcim:device_consoleserverports' pk=object.device.pk %}">Console Server Ports</a></li>
|
||||
<li>{{ object }}</li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'dcim:device_consoleserverports' pk=object.device.pk %}">Console Server Ports</a></li>
|
||||
<li class="breadcrumb-item">{{ object }}</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -64,7 +63,7 @@
|
||||
<th scope="row">Cable</th>
|
||||
<td>
|
||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||
<a href="{% url 'dcim:consoleserverport_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||
<a href="{% url 'dcim:consoleserverport_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Console Ports</h5>
|
||||
<h5 class="d-inline">Console Ports</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceConsolePortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DeviceConsolePortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Console Server Ports</h5>
|
||||
<h5 class="d-inline">Console Server Ports</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceConsoleServerPortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DeviceConsoleServerPortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Device Bays</h5>
|
||||
<h5 class="d-inline">Device Bays</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceDeviceBayTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DeviceDeviceBayTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Inventory Items</h5>
|
||||
<h5 class="d-inline">Inventory Items</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DeviceInventoryItemTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DeviceInventoryItemTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Power Outlets</h5>
|
||||
<div class="float-right noprint">
|
||||
<h5 class="d-inline">Power Outlets</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DevicePowerOutletTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DevicePowerOutletTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -38,7 +38,7 @@
|
||||
{% if perms.dcim.add_poweroutlet %}
|
||||
<div class="float-end">
|
||||
<a href="{% url 'dcim:poweroutlet_add' %}?device={{ object.pk }}&return_url={% url 'dcim:device_poweroutlets' pk=object.pk %}" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add power outlets
|
||||
<i class="bi bi-plus" aria-hidden="true"></i> Add Power Outlets
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% csrf_token %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Power Ports</h5>
|
||||
<h5 class="d-inline">Power Ports</h5>
|
||||
<div class="float-end noprint">
|
||||
{% if request.user.is_authenticated %}
|
||||
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#DevicePowerPortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
<button type="button" class="btn btn-outline-dark btn-sm" data-bs-toggle="modal" data-bs-target="#DevicePowerPortTable_config" title="Configure table"><i class="mdi mdi-cog"></i> Configure</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
||||
{% render_field form.rack %}
|
||||
{% if obj.device_type.is_child_device and obj.parent_bay %}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">Parent device</label>
|
||||
<label class="col-md-3 control-label">Parent Device</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">
|
||||
<a href="{% url 'dcim:device' pk=obj.parent_bay.device.pk %}">{{ obj.parent_bay.device }}</a>
|
||||
@ -34,12 +34,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">Parent bay</label>
|
||||
<label class="col-md-3 control-label">Parent Bay</label>
|
||||
<div class="col-md-9">
|
||||
<p class="form-control-static">
|
||||
{{ obj.parent_bay.name }}
|
||||
{% if perms.dcim.change_devicebay %}
|
||||
<a href="{% url 'dcim:devicebay_depopulate' pk=obj.parent_bay.pk %}" class="btn btn-danger btn-xs">
|
||||
<a href="{% url 'dcim:devicebay_depopulate' pk=obj.parent_bay.pk %}" class="btn btn-danger btn-sm">
|
||||
<i class="mdi mdi-close-thick" aria-hidden="true" title="Remove device"></i> Remove
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -37,17 +37,17 @@
|
||||
{% if not obj.untagged_vlan and not tagged_vlans %}
|
||||
<tr>
|
||||
<td colspan="4" class="text-muted text-center">
|
||||
No VLANs assigned
|
||||
No VLANs Assigned
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
<td>
|
||||
<a href="#" id="clear_untagged_vlan" class="btn btn-warning btn-xs">Clear</a>
|
||||
<a href="#" id="clear_untagged_vlan" class="btn btn-outline-warning btn-sm">Clear</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" id="clear_tagged_vlans" class="btn btn-warning btn-xs">Clear All</a>
|
||||
<a href="#" id="clear_tagged_vlans" class="btn btn-warning btn-sm">Clear All</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
@ -129,7 +129,7 @@
|
||||
<th scope="row">Cable</th>
|
||||
<td>
|
||||
<a href="{{ object.cable.get_absolute_url }}">{{ object.cable }}</a>
|
||||
<a href="{% url 'dcim:powerfeed_trace' pk=object.pk %}" class="btn btn-primary btn-xs" title="Trace">
|
||||
<a href="{% url 'dcim:powerfeed_trace' pk=object.pk %}" class="btn btn-primary btn-sm lh-1" title="Trace">
|
||||
<i class="mdi mdi-transit-connection-variant" aria-hidden="true"></i>
|
||||
</a>
|
||||
</td>
|
||||
|
@ -281,12 +281,12 @@
|
||||
</td>
|
||||
<td class="text-end noprint">
|
||||
{% if perms.dcim.change_rackreservation %}
|
||||
<a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-xs" title="Edit reservation">
|
||||
<a href="{% url 'dcim:rackreservation_edit' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning btn-sm" title="Edit Reservation">
|
||||
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.dcim.delete_rackreservation %}
|
||||
<a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-sm" title="Delete reservation">
|
||||
<a href="{% url 'dcim:rackreservation_delete' pk=resv.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-danger btn-sm" title="Delete Reservation">
|
||||
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -1,25 +1,31 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layout.html' %}
|
||||
{% load helpers %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="btn-toolbar pull-right noprint" role="toolbar">
|
||||
<button class="btn btn-default toggle-images" selected="selected">
|
||||
<span class="mdi mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Images
|
||||
</button>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request face='front' %}" class="btn btn-default{% if rack_face == 'front' %} active{% endif %}">Front</a>
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request face='rear' %}" class="btn btn-default{% if rack_face == 'rear' %} active{% endif %}">Rear</a>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request reverse=None %}" class="btn btn-default{% if not reverse %} active{% endif %}">Normal</a>
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request reverse='true' %}" class="btn btn-default{% if reverse %} active{% endif %}">Reversed</a>
|
||||
{% block title %}Rack Elevations{% endblock %}
|
||||
|
||||
{% block controls %}
|
||||
<div class="container mb-2 mx-0">
|
||||
<div class="d-flex flex-wrap justify-content-end">
|
||||
<button class="btn btn-sm btn-outline-dark toggle-images m-1" selected="selected">
|
||||
<span class="mdi mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Images
|
||||
</button>
|
||||
<div class="btn-group btn-group-sm m-1" role="group">
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request face='front' %}" class="btn btn-outline-secondary{% if rack_face == 'front' %} active{% endif %}">Front</a>
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request face='rear' %}" class="btn btn-outline-secondary{% if rack_face == 'rear' %} active{% endif %}">Rear</a>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm m-1" role="group">
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request reverse=None %}" class="btn btn-outline-secondary{% if not reverse %} active{% endif %}">Normal</a>
|
||||
<a href="{% url 'dcim:rack_elevation_list' %}{% querystring request reverse='true' %}" class="btn btn-outline-secondary{% if reverse %} active{% endif %}">Reversed</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h1>{% block title %}Rack Elevations{% endblock %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3 pull-right right-side-panel noprint">
|
||||
<div class="col-md-3 float-end right-side-panel noprint">
|
||||
{% include 'inc/search_panel.html' %}
|
||||
</div>
|
||||
{% if page %}
|
||||
@ -30,7 +36,7 @@
|
||||
<div class="text-center">
|
||||
<strong><a href="{% url 'dcim:rack' pk=rack.pk %}">{{ rack.name }}</a></strong>
|
||||
{% if rack.role %}
|
||||
<br /><small class="label" style="color: {{ rack.role.color|fgcolor }}; background-color: #{{ rack.role.color }}">{{ rack.role }}</small>
|
||||
<br /><span class="badge my-3" style="color: {{ rack.role.color|fgcolor }}; background-color: #{{ rack.role.color }}">{{ rack.role }}</span>
|
||||
{% endif %}
|
||||
{% if rack.facility_id %}
|
||||
<br /><small class="text-muted">{{ rack.facility_id }}</small>
|
||||
@ -51,12 +57,8 @@
|
||||
<br />
|
||||
{% include 'inc/paginator.html' %}
|
||||
{% else %}
|
||||
<p>No racks found</p>
|
||||
<p>No Racks Found</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script src="{% static 'js/rack_elevations.js' %}?v{{ settings.VERSION }}"></script>
|
||||
{% endblock %}
|
||||
|
@ -91,7 +91,7 @@
|
||||
<th scope="row">Physical Address</th>
|
||||
<td>
|
||||
{% if object.physical_address %}
|
||||
<div class="pull-right noprint">
|
||||
<div class="float-end noprint">
|
||||
<a href="{{ settings.MAPS_URL }}{{ object.latitude }},{{ object.longitude }}" target="_blank" class="btn btn-primary btn-sm">
|
||||
<i class="mdi mdi-map-marker"></i> Map it
|
||||
</a>
|
||||
@ -110,7 +110,7 @@
|
||||
<th scope="row">GPS Coordinates</th>
|
||||
<td>
|
||||
{% if object.latitude and object.longitude %}
|
||||
<div class="pull-right noprint">
|
||||
<div class="float-end noprint">
|
||||
<a href="{{ settings.MAPS_URL }}{{ object.latitude }},{{ object.longitude }}" target="_blank" class="btn btn-primary btn-sm">
|
||||
<i class="mdi mdi-map-marker"></i> Map it
|
||||
</a>
|
||||
|
@ -42,7 +42,7 @@
|
||||
</h5>
|
||||
{% for context in source_contexts %}
|
||||
<div class="card-body">
|
||||
<div class="pull-right">
|
||||
<div class="float-end">
|
||||
<span class="text-muted">{{ context.weight }}</span>
|
||||
</div>
|
||||
<a href="{{ context.get_absolute_url }}"><strong>{{ context.name }}</strong></a>
|
||||
|
@ -3,21 +3,24 @@
|
||||
|
||||
{% block title %}{{ object }}{% endblock %}
|
||||
|
||||
{% block breadcrumb_main %}
|
||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'extras:objectchange_list' %}">Change Log</a></li>
|
||||
{% if object.related_object.get_absolute_url %}
|
||||
<li class="breadcrumb-item"><a href="{{ object.related_object.get_absolute_url }}changelog/">{{ object.related_object }}</a></li>
|
||||
{% elif object.changed_object.get_absolute_url %}
|
||||
<li class="breadcrumb-item"><a href="{{ object.changed_object.get_absolute_url }}changelog/">{{ object.changed_object }}</a></li>
|
||||
{% elif object.changed_object %}
|
||||
<li class="breadcrumb-item">{{ object.changed_object }}</li>
|
||||
{% endif %}
|
||||
<li class="breadcrumb-item">{{ object }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'extras:objectchange_list' %}">Change Log</a></li>
|
||||
{% if object.related_object.get_absolute_url %}
|
||||
<li><a href="{{ object.related_object.get_absolute_url }}changelog/">{{ object.related_object }}</a></li>
|
||||
{% elif object.changed_object.get_absolute_url %}
|
||||
<li><a href="{{ object.changed_object.get_absolute_url }}changelog/">{{ object.changed_object }}</a></li>
|
||||
{% elif object.changed_object %}
|
||||
<li>{{ object.changed_object }}</li>
|
||||
{% endif %}
|
||||
<li>{{ object }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-sm-4 col-md-3">
|
||||
<form action="{% url 'extras:objectchange_list' %}" method="get">
|
||||
<div class="input-group">
|
||||
@ -34,103 +37,106 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Change
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<td>Time</td>
|
||||
<td>
|
||||
{{ object.time }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User</td>
|
||||
<td>
|
||||
{{ object.user|default:object.user_name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Action</td>
|
||||
<td>
|
||||
{{ object.get_action_display }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Object Type</td>
|
||||
<td>
|
||||
{{ object.changed_object_type }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Object</td>
|
||||
<td>
|
||||
{% if object.changed_object.get_absolute_url %}
|
||||
<a href="{{ object.changed_object.get_absolute_url }}">{{ object.changed_object }}</a>
|
||||
{% else %}
|
||||
{{ object.object_repr }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Request ID</td>
|
||||
<td>
|
||||
{{ object.request_id }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Difference</h5>
|
||||
<div class="btn-group btn-group-xs pull-right noprint">
|
||||
<a {% if prev_change %}href="{% url 'extras:objectchange' pk=prev_change.pk %}"{% else %}disabled{% endif %} class="btn btn-default">
|
||||
<span class="mdi mdi-chevron-left" aria-hidden="true"></span> Previous
|
||||
</a>
|
||||
<a {% if next_change %}href="{% url 'extras:objectchange' pk=next_change.pk %}"{% else %}disabled{% endif %} class="btn btn-default">
|
||||
Next <span class="mdi mdi-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if diff_added == diff_removed %}
|
||||
<span class="text-muted" style="margin-left: 10px;">
|
||||
{% if object.action == 'create' %}
|
||||
Object created
|
||||
{% elif object.action == 'delete' %}
|
||||
Object deleted
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Change
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover attr-table">
|
||||
<tr>
|
||||
<th scope="row">Time</th>
|
||||
<td>
|
||||
{{ object.time }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">User</th>
|
||||
<td>
|
||||
{{ object.user|default:object.user_name }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Action</th>
|
||||
<td>
|
||||
{{ object.get_action_display }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Object Type</th>
|
||||
<td>
|
||||
{{ object.changed_object_type }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Object</th>
|
||||
<td>
|
||||
{% if object.changed_object.get_absolute_url %}
|
||||
<a href="{{ object.changed_object.get_absolute_url }}">{{ object.changed_object }}</a>
|
||||
{% else %}
|
||||
No changes
|
||||
{{ object.object_repr }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
<pre style="background-color: #ffdce0;">{{ diff_removed|render_json }}</pre>
|
||||
<pre style="background-color: #cdffd8;">{{ diff_added|render_json }}</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Request ID</th>
|
||||
<td>
|
||||
{{ object.request_id }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Pre-Change Data
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
{% if object.prechange_data %}
|
||||
<pre>{% for k, v in object.prechange_data.items %}{% spaceless %}
|
||||
<span{% if k in diff_removed %} style="background-color: #ffdce0"{% endif %}>{{ k }}: {{ v|render_json }}</span>
|
||||
{% endspaceless %}{% endfor %}
|
||||
</pre>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="d-inline">Difference</h5>
|
||||
<div class="btn-group btn-group-sm float-end noprint">
|
||||
<a {% if prev_change %}href="{% url 'extras:objectchange' pk=prev_change.pk %}"{% else %}disabled{% endif %} class="btn btn-outline-secondary">
|
||||
<i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous
|
||||
</a>
|
||||
<a {% if next_change %}href="{% url 'extras:objectchange' pk=next_change.pk %}"{% else %}disabled{% endif %} class="btn btn-outline-secondary">
|
||||
Next <i class="mdi mdi-chevron-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if diff_added == diff_removed %}
|
||||
<span class="text-muted" style="margin-left: 10px;">
|
||||
{% if object.action == 'create' %}
|
||||
Object Created
|
||||
{% elif object.action == 'delete' %}
|
||||
Object Deleted
|
||||
{% else %}
|
||||
No Changes
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
<pre class="change-diff change-removed">{{ diff_removed|render_json }}</pre>
|
||||
<pre class="change-diff change-added">{{ diff_added|render_json }}</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Pre-Change Data
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
{% if object.prechange_data %}
|
||||
<pre class="change-data">{% for k, v in object.prechange_data.items %}{% spaceless %}
|
||||
<span{% if k in diff_removed %} class="removed"{% endif %}>{{ k }}: {{ v|render_json }}</span>
|
||||
{% endspaceless %}{% endfor %}
|
||||
</pre>
|
||||
{% else %}
|
||||
<span class="text-muted">None</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@ -140,8 +146,8 @@
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
{% if object.postchange_data %}
|
||||
<pre>{% for k, v in object.postchange_data.items %}{% spaceless %}
|
||||
<span{% if k in diff_added %} style="background-color: #cdffd8"{% endif %}>{{ k }}: {{ v|render_json }}</span>
|
||||
<pre class="change-data">{% for k, v in object.postchange_data.items %}{% spaceless %}
|
||||
<span{% if k in diff_added %} class="added"{% endif %}>{{ k }}: {{ v|render_json }}</span>
|
||||
{% endspaceless %}{% endfor %}
|
||||
</pre>
|
||||
{% else %}
|
||||
@ -150,14 +156,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% include 'panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %}
|
||||
{% if related_changes_count > related_changes_table.rows|length %}
|
||||
<div class="pull-right">
|
||||
<a href="{% url 'extras:objectchange_list' %}?request_id={{ object.request_id }}" class="btn btn-primary">See all {{ related_changes_count|add:"1" }} changes</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-12">
|
||||
{% include 'panel_table.html' with table=related_changes_table heading='Related Changes' panel_class='default' %}
|
||||
{% if related_changes_count > related_changes_table.rows|length %}
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,46 +1,43 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layout.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block title %}{{ report.name }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="col-md-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'extras:report_list' %}">Reports</a></li>
|
||||
<li><a href="{% url 'extras:report_list' %}#module.{{ report.module }}">{{ report.module|bettertitle }}</a></li>
|
||||
<li>{{ report.name }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
{% if perms.extras.run_report %}
|
||||
<div class="pull-right noprint">
|
||||
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="_run" class="btn btn-primary">
|
||||
{% if report.result %}
|
||||
<i class="mdi mdi-replay"></i> Run Again
|
||||
{% else %}
|
||||
<i class="mdi mdi-play"></i> Run Report
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h1 class="title">{{ report.name }}</h1>
|
||||
{% if report.description %}
|
||||
<p class="lead">{{ report.description }}</p>
|
||||
{% endif %}
|
||||
{% block breadcrumb_main %}
|
||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'extras:report_list' %}">Reports</a></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 %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% if report.description %}
|
||||
<p class="text-muted">{{ report.description }}</p>
|
||||
{% endif %}
|
||||
{% if perms.extras.run_report %}
|
||||
<div class="float-end noprint">
|
||||
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="_run" class="btn btn-primary">
|
||||
{% if report.result %}
|
||||
Last run: <a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">
|
||||
<strong>{{ report.result.created }}</strong>
|
||||
</a>
|
||||
<i class="mdi mdi-replay"></i> Run Again
|
||||
{% else %}
|
||||
<i class="mdi mdi-play"></i> Run Report
|
||||
{% endif %}
|
||||
</div>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% if report.result %}
|
||||
Last run: <a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">
|
||||
<strong>{{ report.result.created }}</strong>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -5,72 +5,76 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-9">
|
||||
{% if reports %}
|
||||
{% for module, module_reports in reports %}
|
||||
<h3><a name="module.{{ module }}"></a>{{ module|bettertitle }}</h3>
|
||||
<table class="table table-hover table-headings reports">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Last Run</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for report in module_reports %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url 'extras:report' module=report.module name=report.class_name %}" id="{{ report.module }}.{{ report.class_name }}">
|
||||
<strong>{{ report.name }}</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% include 'extras/inc/job_label.html' with result=report.result %}
|
||||
</td>
|
||||
<td>{{ report.description|placeholder }}</td>
|
||||
<td class="text-end">
|
||||
{% if report.result %}
|
||||
<a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">{{ report.result.created }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Never</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if perms.extras.run_report %}
|
||||
<div class="float-end noprint">
|
||||
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="_run" class="btn btn-primary btn-sm">
|
||||
{% if report.result %}
|
||||
<i class="mdi mdi-replay"></i> Run Again
|
||||
{% else %}
|
||||
<i class="mdi mdi-play"></i> Run Report
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% for method, stats in report.result.data.items %}
|
||||
<div class="card">
|
||||
<h5 class="card-header"><a name="module.{{ module }}"></a>{{ module|bettertitle }}</h3>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover table-headings reports">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="4" class="method">
|
||||
{{ method }}
|
||||
</td>
|
||||
<td class="text-end text-nowrap report-stats">
|
||||
<span class="badge bg-success">{{ stats.success }}</span>
|
||||
<span class="badge bg-info">{{ stats.info }}</span>
|
||||
<span class="badge bg-warning">{{ stats.warning }}</span>
|
||||
<span class="badge bg-danger">{{ stats.failure }}</span>
|
||||
</td>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Last Run</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for report in module_reports %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{% url 'extras:report' module=report.module name=report.class_name %}" id="{{ report.module }}.{{ report.class_name }}">
|
||||
<strong>{{ report.name }}</strong>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% include 'extras/inc/job_label.html' with result=report.result %}
|
||||
</td>
|
||||
<td>{{ report.description|placeholder }}</td>
|
||||
<td class="text-end">
|
||||
{% if report.result %}
|
||||
<a href="{% url 'extras:report_result' job_result_pk=report.result.pk %}">{{ report.result.created }}</a>
|
||||
{% else %}
|
||||
<span class="text-muted">Never</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if perms.extras.run_report %}
|
||||
<div class="float-end noprint">
|
||||
<form action="{% url 'extras:report' module=report.module name=report.class_name %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" name="_run" class="btn btn-primary btn-sm">
|
||||
{% if report.result %}
|
||||
<i class="mdi mdi-replay"></i> Run Again
|
||||
{% else %}
|
||||
<i class="mdi mdi-play"></i> Run Report
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% for method, stats in report.result.data.items %}
|
||||
<tr>
|
||||
<td colspan="4" class="method">
|
||||
{{ method }}
|
||||
</td>
|
||||
<td class="text-end text-nowrap report-stats">
|
||||
<span class="badge bg-success">{{ stats.success }}</span>
|
||||
<span class="badge bg-info">{{ stats.info }}</span>
|
||||
<span class="badge bg-warning">{{ stats.warning }}</span>
|
||||
<span class="badge bg-danger">{{ stats.failure }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
@ -81,7 +85,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
{% if reports %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
@ -5,100 +5,92 @@
|
||||
{% block title %}{{ report.name }} - {{ result.get_status_display }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Run: <strong>{{ result.created }}</strong>
|
||||
{% if result.completed %}
|
||||
Duration: <strong>{{ result.duration }}</strong>
|
||||
{% else %}
|
||||
<img id="pending-result-loader" src="{% static 'img/ajax-loader.gif' %}" />
|
||||
{% endif %}
|
||||
<span id="pending-result-label">{% include 'extras/inc/job_label.html' with result=result %}</span>
|
||||
</p>
|
||||
<span id="jobId" data-value="{{ result.pk }}" style="display: none;"></span>
|
||||
<span id="jobComplete" data-value="{{ result.completed }}" style="display: none;"></span>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Run: <strong>{{ result.created }}</strong>
|
||||
{% if result.completed %}
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Report Methods
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover">
|
||||
Duration: <strong>{{ result.duration }}</strong>
|
||||
{% else %}
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<span id="pending-result-label">{% include 'extras/inc/job_label.html' with result=result %}</span>
|
||||
</p>
|
||||
{% if result.completed %}
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Report Methods
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover">
|
||||
{% for method, data in result.data.items %}
|
||||
<tr>
|
||||
<td><code><a href="#{{ method }}">{{ method }}</a></code></td>
|
||||
<td class="text-end report-stats">
|
||||
<span class="badge bg-success">{{ data.success }}</span>
|
||||
<span class="badge bg-info">{{ data.info }}</span>
|
||||
<span class="badge bg-warning">{{ data.warning }}</span>
|
||||
<span class="badge bg-danger">{{ data.failure }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Report Results
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover report">
|
||||
<thead>
|
||||
<tr class="table-headings">
|
||||
<th>Time</th>
|
||||
<th>Level</th>
|
||||
<th>Object</th>
|
||||
<th>Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for method, data in result.data.items %}
|
||||
<tr>
|
||||
<td><code><a href="#{{ method }}">{{ method }}</a></code></td>
|
||||
<td class="text-right report-stats">
|
||||
<label class="badge bg-success">{{ data.success }}</label>
|
||||
<label class="badge bg-info">{{ data.info }}</label>
|
||||
<label class="badge bg-warning">{{ data.warning }}</label>
|
||||
<label class="badge bg-danger">{{ data.failure }}</label>
|
||||
</td>
|
||||
<th colspan="4" style="font-family: monospace">
|
||||
<a name="{{ method }}"></a>{{ method }}
|
||||
</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
Report Results
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-hover report">
|
||||
<thead>
|
||||
<tr class="table-headings">
|
||||
<th>Time</th>
|
||||
<th>Level</th>
|
||||
<th>Object</th>
|
||||
<th>Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for method, data in result.data.items %}
|
||||
<tr>
|
||||
<th colspan="4" style="font-family: monospace">
|
||||
<a name="{{ method }}"></a>{{ method }}
|
||||
</th>
|
||||
{% for time, level, obj, url, message in data.log %}
|
||||
<tr class="{% if level == 'failure' %}danger{% elif level %}{{ level }}{% endif %}">
|
||||
<td>{{ time }}</td>
|
||||
<td>
|
||||
<label class="badge bg-{% if level == 'failure' %}danger{% else %}{{ level }}{% endif %}">{{ level|title }}</label>
|
||||
</td>
|
||||
<td>
|
||||
{% if obj and url %}
|
||||
<a href="{{ url }}">{{ obj }}</a>
|
||||
{% elif obj %}
|
||||
{{ obj }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ message }}</td>
|
||||
</tr>
|
||||
{% for time, level, obj, url, message in data.log %}
|
||||
<tr class="{% if level == 'failure' %}danger{% elif level %}{{ level }}{% endif %}">
|
||||
<td>{{ time }}</td>
|
||||
<td>
|
||||
<label class="badge bg-{% if level == 'failure' %}danger{% else %}{{ level }}{% endif %}">{{ level|title }}</label>
|
||||
</td>
|
||||
<td>
|
||||
{% if obj and url %}
|
||||
<a href="{{ url }}">{{ obj }}</a>
|
||||
{% elif obj %}
|
||||
{{ obj }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ message }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="well">Pending results</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="well">Pending results</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascript %}
|
||||
<script type="text/javascript">
|
||||
{% if not result.completed %}
|
||||
var pending_result_id = {{ result.pk }};
|
||||
{% else %}
|
||||
var pending_result_id = null;
|
||||
{% endif %}
|
||||
|
||||
function jobTerminatedAction(){
|
||||
refreshWindow();
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="{% static 'js/job_result.js' %}?v{{ settings.VERSION }}"
|
||||
onerror="window.location='{% url 'media_failure' %}?filename=js/job_result.js'"></script>
|
||||
<script src="{% static 'jobs.js' %}?v{{ settings.VERSION }}"
|
||||
onerror="window.location='{% url 'media_failure' %}?filename=jobs.js'"></script>
|
||||
{% endblock %}
|
||||
|
@ -20,14 +20,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
{% if form.non_field_errors %}
|
||||
<div class="panel bg-danger">
|
||||
<h5 class="card-header">Errors</h5>
|
||||
<div class="card-body">
|
||||
{{ form.non_field_errors }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card">
|
||||
<h5 class="card-header">{{ model_name|title }} to Add</h5>
|
||||
<div class="card-body">
|
||||
@ -36,10 +28,10 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<div class="form-group text-end">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
<button type="submit" name="_create" class="btn btn-primary">Create</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,16 +2,9 @@
|
||||
{% load helpers %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}Editing {{ table.rows|length }} {{ obj_type_plural|bettertitle }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% block title %}Editing {{ table.rows|length }} {{ obj_type_plural|bettertitle }}{% endblock %}</h1>
|
||||
{% if form.errors %}
|
||||
<div class="card bg-danger">
|
||||
<h5 class="card-header">Errors</h5>
|
||||
<div class="card-body">
|
||||
{{ form.errors }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="" method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% if request.POST.return_url %}
|
||||
@ -27,14 +20,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{% if form.non_field_errors %}
|
||||
<div class="card bg-danger">
|
||||
<h5 class="card-header">Errors</h5>
|
||||
<div class="card-body">
|
||||
{{ form.non_field_errors }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card">
|
||||
<h5 class="card-header">{% block form_title %}Attributes{% endblock %}</h5>
|
||||
<div class="card-body">
|
||||
@ -47,10 +32,10 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<div class="form-group text-end">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
<button type="submit" name="_apply" class="btn btn-primary">Apply</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,30 +1,22 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layout.html' %}
|
||||
{% load helpers %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block title %}{{ obj_type|bettertitle }} Import{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% block title %}{{ obj_type|bettertitle }} Import{% endblock %}</h1>
|
||||
{% block tabs %}{% endblock %}
|
||||
<div class="row">
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
{% if form.non_field_errors %}
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading"><strong>Errors</strong></div>
|
||||
<div class="panel-body">
|
||||
{{ form.non_field_errors }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form action="" method="post" class="form form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% render_form form %}
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 text-right">
|
||||
<button type="submit" name="_create" class="btn btn-primary">Submit</button>
|
||||
<button type="submit" name="_addanother" class="btn btn-primary">Submit and Import Another</button>
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
<div class="col-md-12 text-end">
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||
{% endif %}
|
||||
<button type="submit" name="_addanother" class="btn btn-outline-primary">Submit & Import Another</button>
|
||||
<button type="submit" name="_create" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -9,6 +9,7 @@
|
||||
{% block controls %}
|
||||
<div class="container mb-2 mx-0">
|
||||
<div class="d-flex flex-wrap justify-content-end">
|
||||
{% block extra_controls %}{% endblock %}
|
||||
{% if permissions.add and 'add' in action_buttons %}
|
||||
{% add_button content_type.model_class|validated_viewname:"add" %}
|
||||
{% endif %}
|
||||
@ -21,7 +22,6 @@
|
||||
|
||||
<div class="d-flex flex-shrink-1">
|
||||
{% if request.user.is_authenticated and table_config_form %}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-outline-secondary m-1"
|
||||
|
@ -1,13 +1,14 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layout.html' %}
|
||||
|
||||
{% block title %}Import Completed{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% block title %}Import Completed{% endblock %}</h1>
|
||||
{% include 'responsive_table.html' %}
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">View All</a>
|
||||
{% endif %}
|
||||
<a href="{{ request.path }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-database-import-outline" aria-hidden="true"></span>
|
||||
Import more
|
||||
Import More
|
||||
</a>
|
||||
{% if return_url %}
|
||||
<a href="{{ return_url }}" class="btn btn-default">View All</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -15,14 +15,14 @@
|
||||
</td>
|
||||
<td>{{ attachment.size|filesizeformat }}</td>
|
||||
<td>{{ attachment.created }}</td>
|
||||
<td class="text-right noprint">
|
||||
<td class="text-end noprint">
|
||||
{% if perms.extras.change_imageattachment %}
|
||||
<a href="{% url 'extras:imageattachment_edit' pk=attachment.pk %}" class="btn btn-warning btn-sm" title="Edit image">
|
||||
<a href="{% url 'extras:imageattachment_edit' pk=attachment.pk %}" class="btn btn-warning btn-sm" title="Edit Image">
|
||||
<i class="bi bi-pencil-fill" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.extras.delete_imageattachment %}
|
||||
<a href="{% url 'extras:imageattachment_delete' pk=attachment.pk %}" class="btn btn-danger btn-sm" title="Delete image">
|
||||
<a href="{% url 'extras:imageattachment_delete' pk=attachment.pk %}" class="btn btn-danger btn-sm" title="Delete Image">
|
||||
<i class="bi bi-trash-fill" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -8,10 +8,10 @@
|
||||
{% if not menu_item.permissions or request.user|has_perms:menu_item.permissions %}
|
||||
<li>
|
||||
{% if menu_item.buttons %}
|
||||
<div class="buttons pull-right">
|
||||
<div class="buttons float-end">
|
||||
{% for button in menu_item.buttons %}
|
||||
{% if not button.permissions or request.user|has_perms:button.permissions %}
|
||||
<a href="{% url button.link %}" class="btn btn-xs btn-{{ button.color }}" title="{{ button.title }}"><i class="{{ button.icon_class }}"></i></a>
|
||||
<a href="{% url button.link %}" class="btn btn-sm btn-{{ button.color }}" title="{{ button.title }}"><i class="{{ button.icon_class }}"></i></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -10,18 +10,18 @@
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ service.description }}</td>
|
||||
<td class="text-right noprint">
|
||||
<a href="{% url 'ipam:service_changelog' pk=service.pk %}" class="btn btn-default btn-sm" title="Change log">
|
||||
<td class="text-end noprint">
|
||||
<a href="{% url 'ipam:service_changelog' pk=service.pk %}" class="btn btn-sm btn-outline-secondary" title="Change Log">
|
||||
<i class="bi bi-clock-history"></i>
|
||||
</a>
|
||||
{% if perms.ipam.change_service %}
|
||||
<a href="{% url 'ipam:service_edit' pk=service.pk %}?return_url={{ service.parent.get_absolute_url }}" class="btn btn-info btn-sm" title="Edit service">
|
||||
<a href="{% url 'ipam:service_edit' pk=service.pk %}?return_url={{ service.parent.get_absolute_url }}" class="btn btn-warning btn-sm" title="Edit Service">
|
||||
<i class="bi bi-pencil-fill"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.ipam.delete_service %}
|
||||
<a href="{% url 'ipam:service_delete' pk=service.pk %}?return_url={{ service.parent.get_absolute_url }}" class="btn btn-danger btn-sm">
|
||||
<i class="bi bi-trash-fill" title="Delete service"></i>
|
||||
<i class="bi bi-trash-fill" title="Delete Service"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
@ -122,7 +122,7 @@
|
||||
Duplicate IP Addresses
|
||||
{% if more_duplicate_ips %}
|
||||
<div class="float-end">
|
||||
<a type="button" class="btn btn-primary btn-xs"
|
||||
<a type="button" class="btn btn-primary btn-sm"
|
||||
{% if object.vrf %}
|
||||
href="{% url 'ipam:ipaddress_list' %}?address={{ object.address.ip }}&vrf_id={{ object.vrf.pk }}"
|
||||
{% else %}
|
||||
|
@ -1,20 +1,17 @@
|
||||
{% extends 'generic/object_list.html' %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block buttons %}
|
||||
<div class="btn-group" role="group">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="max_length" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
Max Length{% if "mask_length__lte" in request.GET %}: {{ request.GET.mask_length__lte }}{% endif %}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="max_length">
|
||||
{% for i in "4,8,12,16,20,24,28,32,40,48,56,64"|split %}
|
||||
<li><a href="{% url 'ipam:prefix_list' %}{% querystring request mask_length__lte=i page=1 %}">
|
||||
{{ i }} {% if request.GET.mask_length__lte == i %}<i class="mdi mdi-check-bold"></i>{% endif %}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% block extra_controls %}
|
||||
<div class="dropdown m-1">
|
||||
<button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" id="max_length" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
Max Length{% if "mask_length__lte" in request.GET %}: {{ request.GET.mask_length__lte }}{% endif %}
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="max_length">
|
||||
{% for i in "4,8,12,16,20,24,28,32,40,48,56,64"|split %}
|
||||
<li><a class="dropdown-item" href="{% url 'ipam:prefix_list' %}{% querystring request mask_length__lte=i page=1 %}">
|
||||
{{ i }} {% if request.GET.mask_length__lte == i %}<i class="mdi mdi-check-bold"></i>{% endif %}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,13 +1,13 @@
|
||||
{% extends 'generic/object_list.html' %}
|
||||
|
||||
{% block buttons %}
|
||||
{% block extra_controls %}
|
||||
{% if request.GET.family == '6' %}
|
||||
<a href="{% url 'ipam:rir_list' %}" class="btn btn-default">
|
||||
<a href="{% url 'ipam:rir_list' %}" class="btn btn-sm btn-outline-secondary m-1">
|
||||
<span class="mdi mdi-table" aria-hidden="true"></span>
|
||||
IPv4 Stats
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'ipam:rir_list' %}?family=6{% if request.GET %}&{{ request.GET.urlencode }}{% endif %}" class="btn btn-default">
|
||||
<a href="{% url 'ipam:rir_list' %}?family=6{% if request.GET %}&{{ request.GET.urlencode }}{% endif %}" class="btn btn-sm btn-outline-secondary m-1">
|
||||
<span class="mdi mdi-table" aria-hidden="true"></span>
|
||||
IPv6 Stats
|
||||
</a>
|
||||
@ -16,8 +16,8 @@
|
||||
|
||||
{% block sidebar %}
|
||||
{% if request.GET.family == '6' %}
|
||||
<div class="alert alert-info">
|
||||
<i class="bi bi-info-circle"></i> Numbers shown indicate /64 prefixes.
|
||||
<div class="alert alert-info small">
|
||||
<i class="mdi mdi-information-outline"></i> Numbers shown indicate /64 prefixes.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -2,20 +2,20 @@
|
||||
<form id="secret_form">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
<table class="table table-hover panel-body">
|
||||
<table class="table table-hover">
|
||||
{% for secret in secrets %}
|
||||
<tr>
|
||||
<td><a href="{% url 'secrets:secret' pk=secret.pk %}">{{ secret.role }}</a></td>
|
||||
<td>{{ secret.name }}</td>
|
||||
<td id="secret_{{ secret.pk }}">********</td>
|
||||
<td class="text-right noprint">
|
||||
<button class="btn btn-xs btn-success unlock-secret" secret-id="{{ secret.pk }}">
|
||||
<td class="text-end noprint">
|
||||
<button class="btn btn-sm btn-success unlock-secret" secret-id="{{ secret.pk }}">
|
||||
<i class="mdi mdi-lock"></i> Unlock
|
||||
</button>
|
||||
<button class="btn btn-xs btn-default copy-secret collapse" secret-id="{{ secret.pk }}" data-clipboard-target="#secret_{{ secret.pk }}">
|
||||
<button class="btn btn-sm btn-outline-dark copy-secret collapse" secret-id="{{ secret.pk }}" data-clipboard-target="#secret_{{ secret.pk }}">
|
||||
<i class="mdi mdi-content-copy"></i> Copy
|
||||
</button>
|
||||
<button class="btn btn-xs btn-danger lock-secret collapse" secret-id="{{ secret.pk }}">
|
||||
<button class="btn btn-sm btn-danger lock-secret collapse" secret-id="{{ secret.pk }}">
|
||||
<i class="mdi mdi-lock-open"></i> Lock
|
||||
</button>
|
||||
</td>
|
||||
@ -23,7 +23,7 @@
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="panel-body text-muted">
|
||||
<div class="text-muted">
|
||||
None found
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -54,7 +54,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2">Secret</div>
|
||||
<div class="col-md-6"><code id="secret_{{ object.pk }}">********</code></div>
|
||||
<div class="col-md-4 text-right noprint">
|
||||
<div class="col-md-4 text-end noprint">
|
||||
<button class="btn btn-sm btn-success unlock-secret" secret-id="{{ object.pk }}">
|
||||
<i class="mdi mdi-lock"></i> Unlock
|
||||
</button>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<i class="mdi mdi-key"></i>
|
||||
<samp><span id="token_{{ token.pk }}">{{ token.key }}</span></samp>
|
||||
{% if token.is_expired %}
|
||||
<span class="label label-danger">Expired</span>
|
||||
<span class="badge bg-danger">Expired</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@ -35,11 +35,11 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<small class="text-muted">Create/edit/delete operations</small><br />
|
||||
<small class="text-muted">Create/Edit/Delete Operations</small><br />
|
||||
{% if token.write_enabled %}
|
||||
<span class="label label-success">Enabled</span>
|
||||
<span class="badge bg-success">Enabled</span>
|
||||
{% else %}
|
||||
<span class="label label-danger">Disabled</span>
|
||||
<span class="badge bg-danger">Disabled</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<pre class="copyable">{{ object.public_key }}</pre>
|
||||
<hr />
|
||||
{% if object.session_key %}
|
||||
<div class="pull-right noprint">
|
||||
<div class="float-end noprint">
|
||||
<a href="{% url 'user:sessionkey_delete' %}" class="btn btn-danger">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>
|
||||
Delete Session Key
|
||||
|
@ -1,21 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layout.html' %}
|
||||
{% load form_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<form action="" method="post" class="form">
|
||||
{% csrf_token %}
|
||||
{% for field in form.hidden_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<div class="panel panel-{{ panel_class|default:"danger" }}">
|
||||
<div class="panel-heading">{% block title %}{% endblock %}</div>
|
||||
<div class="panel-body">
|
||||
<div class="card bg-{{ panel_class|default:"danger" }}">
|
||||
<h5 class="card-header">{% block title %}{% endblock %}</h5>
|
||||
<div class="card-body">
|
||||
{% block message %}<p>Are you sure?</p>{% endblock %}
|
||||
<div class="text-right">
|
||||
<div class="text-end">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-dark">Cancel</a>
|
||||
<button type="submit" name="_confirm" class="btn btn-{{ button_class|default:"danger" }}">Confirm</button>
|
||||
<a href="{{ return_url }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user