mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-17 21:18:16 -06:00
Remove obsolete styling
This commit is contained in:
parent
27a3de02be
commit
0d7417d8b5
@ -35,23 +35,19 @@ DEVICEBAY_STATUS = """
|
||||
"""
|
||||
|
||||
INTERFACE_IPADDRESSES = """
|
||||
<div class="table-badge-group">
|
||||
{% for ip in value.all %}
|
||||
{% if ip.status != 'active' %}
|
||||
<a href="{{ ip.get_absolute_url }}" class="table-badge badge text-bg-{{ ip.get_status_color }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
||||
<a href="{{ ip.get_absolute_url }}" class="badge text-bg-{{ ip.get_status_color }}" data-bs-toggle="tooltip" data-bs-placement="left" title="{{ ip.get_status_display }}">{{ ip }}</a>
|
||||
{% else %}
|
||||
<a href="{{ ip.get_absolute_url }}" class="table-badge">{{ ip }}</a>
|
||||
<a href="{{ ip.get_absolute_url }}">{{ ip }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
"""
|
||||
|
||||
INTERFACE_FHRPGROUPS = """
|
||||
<div class="table-badge-group">
|
||||
{% for assignment in value.all %}
|
||||
<a href="{{ assignment.group.get_absolute_url }}">{{ assignment.group.get_protocol_display }}: {{ assignment.group.group_id }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
"""
|
||||
|
||||
INTERFACE_TAGGED_VLANS = """
|
||||
|
BIN
netbox/project-static/dist/netbox.css
vendored
BIN
netbox/project-static/dist/netbox.css
vendored
Binary file not shown.
40
netbox/project-static/styles/custom/_code.scss
Normal file
40
netbox/project-static/styles/custom/_code.scss
Normal file
@ -0,0 +1,40 @@
|
||||
// Serialized data from change records
|
||||
pre.change-data {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
|
||||
// Display each line individually for highlighting
|
||||
> span {
|
||||
display: block;
|
||||
padding-right: $spacer;
|
||||
padding-left: $spacer;
|
||||
|
||||
&.added {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
&.removed {
|
||||
background-color: $red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Change data diff w/added & removed data
|
||||
pre.change-diff {
|
||||
border-color: transparent;
|
||||
|
||||
&.change-added {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
&.change-removed {
|
||||
background-color: $red;
|
||||
}
|
||||
}
|
||||
|
||||
// <pre> elements displayed with a border
|
||||
pre.block {
|
||||
padding: $spacer;
|
||||
border: 1px;
|
||||
border-radius: $border-radius;
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
@use 'sass:map';
|
||||
|
||||
// Color labels
|
||||
span.color-label {
|
||||
display: block;
|
||||
@ -37,3 +39,22 @@ span.color-label {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Object hierarchy depth indicators
|
||||
.record-depth {
|
||||
display: inline;
|
||||
user-select: none;
|
||||
opacity: 33%;
|
||||
|
||||
// Add spacing to the last or only dot.
|
||||
span:only-of-type,
|
||||
span:last-of-type {
|
||||
margin-right: map.get($spacers, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Hides the last child of an element
|
||||
.hide-last-child :last-child {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
@ -18,4 +18,5 @@
|
||||
@import 'transitional/tabs';
|
||||
|
||||
// Custom styling
|
||||
@import 'custom/code';
|
||||
@import 'custom/misc';
|
||||
|
@ -1,202 +0,0 @@
|
||||
// NetBox-specific Styles and Overrides.
|
||||
|
||||
@use 'sass:map';
|
||||
@use 'sass:math';
|
||||
//@import './sidenav';
|
||||
@import './overrides';
|
||||
@import './utilities';
|
||||
//@import './variables';
|
||||
|
||||
// Style objects with statuses/roles within a table. As of implementation, used for IP addresses
|
||||
// assigned to interfaces.
|
||||
table .table-badge-group {
|
||||
.table-badge {
|
||||
display: block;
|
||||
width: min-content;
|
||||
font-size: $font-size-sm;
|
||||
font-weight: $font-weight-base;
|
||||
|
||||
&:not(.badge) {
|
||||
// Apply badge horizontal padding so that IP addresses *not* within a badge appear aligned
|
||||
// with IP addresses that *are* within a badge.
|
||||
padding: 0 $badge-padding-x;
|
||||
}
|
||||
|
||||
&.badge:not(:last-of-type):not(:only-child) {
|
||||
margin-bottom: map.get($spacers, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre.change-data {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
|
||||
> span {
|
||||
display: block;
|
||||
padding-right: $spacer;
|
||||
padding-left: $spacer;
|
||||
|
||||
&.added {
|
||||
background-color: var(--nbx-change-added);
|
||||
}
|
||||
|
||||
&.removed {
|
||||
background-color: var(--nbx-change-removed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre.change-diff {
|
||||
border-color: transparent;
|
||||
|
||||
&.change-removed {
|
||||
background-color: var(--nbx-change-removed);
|
||||
}
|
||||
|
||||
&.change-added {
|
||||
background-color: var(--nbx-change-added);
|
||||
}
|
||||
}
|
||||
|
||||
div.card-overlay {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba($white, 0.75);
|
||||
border-radius: $border-radius;
|
||||
|
||||
> div.spinner-border {
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
color: $secondary;
|
||||
}
|
||||
}
|
||||
|
||||
.table-controls {
|
||||
display: flex;
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
// `!important` needed because of inherited margin-bottom from `.col`
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.table-configure {
|
||||
justify-content: flex-start;
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.form-switch.form-check-inline {
|
||||
flex: 1 0 auto;
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
}
|
||||
|
||||
// Tabbed content
|
||||
.nav-tabs {
|
||||
background-color: $body-bg;
|
||||
.nav-link {
|
||||
&:hover {
|
||||
// Don't show a bottom-border on a hovered nav link because it overlaps with the .nav-tab border.
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
&.active {
|
||||
// Set the background-color of an active tab to the same color as the .tab-content
|
||||
// background-color so it visually indicates which tab is open.
|
||||
background-color: $tab-content-bg;
|
||||
border-bottom-color: $tab-content-bg;
|
||||
// Move the active tab down 1px to overtake the .nav-tabs element's border, but only for that
|
||||
// tab. This is an ugly hack, but it works.
|
||||
transform: translateY(1px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: $spacer;
|
||||
}
|
||||
|
||||
// Object hierarchy indicators.
|
||||
.record-depth {
|
||||
display: inline;
|
||||
font-size: $font-size-base;
|
||||
user-select: none;
|
||||
opacity: 0.33;
|
||||
|
||||
// Add spacing to the last or only dot.
|
||||
span:only-of-type,
|
||||
span:last-of-type {
|
||||
margin-right: map.get($spacers, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the max-width from image preview popovers as this is controlled on the image element.
|
||||
.popover.image-preview-popover {
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
/* Markdown widget */
|
||||
.markdown-widget {
|
||||
.nav-link {
|
||||
border-bottom: 0;
|
||||
|
||||
&.active {
|
||||
background-color: var(--nbx-body-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
background-color: var(--nbx-pre-bg);
|
||||
}
|
||||
}
|
||||
|
||||
// Preformatted text blocks
|
||||
td pre {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
pre.block {
|
||||
padding: $spacer;
|
||||
background-color: var(--nbx-pre-bg);
|
||||
border: 1px solid var(--nbx-pre-border-color);
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
#django-messages {
|
||||
position: fixed;
|
||||
right: $spacer;
|
||||
bottom: 0;
|
||||
margin: $spacer;
|
||||
}
|
||||
|
||||
// Page-specific styles.
|
||||
html {
|
||||
// Shade the home page content background-color.
|
||||
&[data-netbox-url-name='home'] {
|
||||
.content-container,
|
||||
.search {
|
||||
background-color: $gray-100 !important;
|
||||
}
|
||||
&[data-netbox-color-mode='dark'] {
|
||||
.content-container,
|
||||
.search {
|
||||
background-color: $darkest !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Don't show the django-messages toasts on the login screen in favor of the alert component.
|
||||
&[data-netbox-url-name='login'] {
|
||||
#django-messages {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
// Overrides to native HTML elements (i.e., not bootstrap classes or custom components).
|
||||
|
||||
body {
|
||||
color: var(--nbx-body-color);
|
||||
background-color: var(--nbx-body-bg);
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
// Force <small/> elements to make text smaller.
|
||||
small {
|
||||
font-size: smaller !important;
|
||||
}
|
||||
|
||||
// Fix the hideous way Safari shows button anchor elements.
|
||||
a[type='button'] {
|
||||
-webkit-appearance: unset !important;
|
||||
}
|
||||
|
||||
// Ensure elements with data-href set show the correct cursor.
|
||||
// data-href is set on non non-anchor elements that need to redirect the user to a URL when
|
||||
// clicked, but where an anchor element does not suffice or is not supported.
|
||||
*[data-href] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-control:not([type='file']) {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: $font-size-xs;
|
||||
}
|
||||
|
||||
/* clears the 'X' in search inputs from webkit browsers */
|
||||
input[type='search']::-webkit-search-decoration,
|
||||
input[type='search']::-webkit-search-cancel-button,
|
||||
input[type='search']::-webkit-search-results-button,
|
||||
input[type='search']::-webkit-search-results-decoration {
|
||||
-webkit-appearance: none !important;
|
||||
}
|
||||
|
||||
// Remove x-axis padding from highlighted text
|
||||
mark {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
// Custom Utility classes.
|
||||
|
||||
// Utility class for extra-small text.
|
||||
.text-xs {
|
||||
font-size: $font-size-xs !important;
|
||||
line-height: $line-height-sm !important;
|
||||
}
|
||||
|
||||
// Add a border color that mimics the appearance of a form element.
|
||||
.border-input {
|
||||
border: $input-border-width solid $input-border-color !important;
|
||||
}
|
||||
|
||||
// Force no line wrapping.
|
||||
.ws-nowrap {
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
// Vertically align table rows/cells.
|
||||
table tr,
|
||||
table td {
|
||||
.vertical-align {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
// Hide element when printing.
|
||||
.noprint {
|
||||
@media print {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Only show element when printing, otherwise hide.
|
||||
.printonly {
|
||||
display: none !important;
|
||||
visibility: hidden !important;
|
||||
|
||||
@media print {
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Hides the last child of an element
|
||||
.hide-last-child :last-child {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
@ -39,3 +39,8 @@ table.attr-table {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Remove bottom margin from <pre> elements inside table cells
|
||||
td pre {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
<td class="position-relative">
|
||||
{% if object.rack %}
|
||||
{{ object.rack|linkify }}
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y noprint">
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y d-print-none">
|
||||
<a href="{{ object.rack.get_absolute_url }}?device={{ object.pk }}" class="btn btn-primary" title="{% trans "Highlight device" %}">
|
||||
<i class="mdi mdi-view-day-outline"></i>
|
||||
</a>
|
||||
@ -64,7 +64,7 @@
|
||||
<td class="position-relative">
|
||||
{% if object.latitude and object.longitude %}
|
||||
{% if config.MAPS_URL %}
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y noprint">
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y d-print-none">
|
||||
<a href="{{ config.MAPS_URL }}{{ object.latitude }},{{ object.longitude }}" target="_blank" class="btn btn-primary">
|
||||
<i class="mdi mdi-map-marker"></i> {% trans "Map It" %}
|
||||
</a>
|
||||
@ -142,7 +142,7 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{{ object.virtual_chassis.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-arrow-right-bold" aria-hidden="true"></span> {% trans "View Virtual Chassis" %}
|
||||
</a>
|
||||
@ -159,7 +159,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_virtualdevicecontext %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:virtualdevicecontext_add' %}?device={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Create VDC" %}
|
||||
</a>
|
||||
@ -297,7 +297,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.ipam.add_service %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'ipam:service_add' %}?device={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add a service" %}
|
||||
</a>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<div class="htmx-container table-responsive" id="object_list">
|
||||
{% include 'htmx/table.html' %}
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
<div class="card-footer d-print-none">
|
||||
{% if table.rows %}
|
||||
<button type="submit" name="_edit" formaction="{% url table.Meta.model|viewname:"bulk_rename" %}?return_url={{ return_url }}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil-outline" aria-hidden="true"></span> {% trans "Rename" %}
|
||||
|
@ -18,7 +18,7 @@
|
||||
<td>{{ item|linkify:"name" }}</td>
|
||||
<td>{{ item.label|placeholder }}</td>
|
||||
<td>{{ item.role|linkify|placeholder }}</td>
|
||||
<td class="text-end noprint">
|
||||
<td class="text-end d-print-none">
|
||||
{% if perms.dcim.change_inventoryitem %}
|
||||
<a href="{% url 'dcim:inventoryitem_edit' pk=item.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning lh-1" title="{% trans "Edit" %}">
|
||||
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
||||
@ -38,7 +38,7 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
{% if perms.dcim.add_inventoryitem %}
|
||||
<a href="{% url 'dcim:inventoryitem_add' %}?device={{ object.device.pk }}&component_type={{ object|content_type_id }}&component_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Inventory Item" %}
|
||||
|
@ -341,7 +341,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.ipam.add_ipaddress %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?device={{ object.device.pk }}&interface={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add IP Address" %}
|
||||
</a>
|
||||
|
@ -75,7 +75,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_location %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:location_add' %}?site={{ object.site.pk }}&parent={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Location" %}
|
||||
</a>
|
||||
@ -89,7 +89,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_device %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:device_add' %}?site={{ object.site.pk }}&location={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Device" %}
|
||||
</a>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<div class="htmx-container table-responsive" id="object_list">
|
||||
{% include 'htmx/table.html' %}
|
||||
</div>
|
||||
<div class="card-footer noprint">
|
||||
<div class="card-footer d-print-none">
|
||||
{% if table.rows %}
|
||||
<button type="submit" name="_edit" formaction="{% url table.Meta.model|viewname:"bulk_rename" %}?return_url={{ return_url }}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil-outline" aria-hidden="true"></span> {% trans "Rename" %}
|
||||
|
@ -53,7 +53,7 @@
|
||||
hx-get="{% url 'dcim:powerfeed_list' %}?power_panel_id={{ object.pk }}"
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
<div class="card-footer noprint">
|
||||
<div class="card-footer d-print-none">
|
||||
{% if perms.dcim.change_powerfeed %}
|
||||
<button type="submit" name="_edit" formaction="{% url 'dcim:powerfeed_bulk_edit' %}?return_url={% url 'dcim:powerpanel' pk=object.pk %}" class="btn btn-warning">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> {% trans "Edit" %}
|
||||
|
@ -57,7 +57,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_region %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:region_add' %}?parent={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Region" %}
|
||||
</a>
|
||||
|
@ -75,7 +75,7 @@
|
||||
<td class="position-relative">
|
||||
{% if object.physical_address %}
|
||||
{% if config.MAPS_URL %}
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y noprint">
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y d-print-none">
|
||||
<a href="{{ config.MAPS_URL }}{{ object.physical_address|urlencode }}" target="_blank" class="btn btn-primary">
|
||||
<i class="mdi mdi-map-marker"></i> {% trans "Map" %}
|
||||
</a>
|
||||
@ -96,7 +96,7 @@
|
||||
<td class="position-relative">
|
||||
{% if object.latitude and object.longitude %}
|
||||
{% if config.MAPS_URL %}
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y noprint">
|
||||
<div class="position-absolute top-50 end-0 translate-middle-y d-print-none">
|
||||
<a href="{{ config.MAPS_URL }}{{ object.latitude }},{{ object.longitude }}" target="_blank" class="btn btn-primary">
|
||||
<i class="mdi mdi-map-marker"></i> {% trans "Map It" %}
|
||||
</a>
|
||||
@ -130,7 +130,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_location %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:location_add' %}?site={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Location" %}
|
||||
</a>
|
||||
@ -144,7 +144,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_device %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:device_add' %}?site={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Device" %}
|
||||
</a>
|
||||
|
@ -57,7 +57,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.dcim.add_sitegroup %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:sitegroup_add' %}?parent={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Site Group" %}
|
||||
</a>
|
||||
|
@ -79,7 +79,7 @@
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if perms.dcim.change_virtualchassis %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'dcim:virtualchassis_add_member' pk=object.pk %}?site={{ object.master.site.pk }}&rack={{ object.master.rack.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Member" %}
|
||||
</a>
|
||||
|
@ -109,36 +109,38 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
{% trans "Pre-Change Data" %}
|
||||
</h5>
|
||||
<h5 class="card-header">{% trans "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 %}
|
||||
{% spaceless %}
|
||||
<pre class="change-data">
|
||||
{% for k, v in object.prechange_data.items %}
|
||||
<span{% if k in diff_removed %} class="removed"{% endif %}>{{ k }}: {{ v|json }}</span>
|
||||
{% endspaceless %}{% endfor %}
|
||||
{% endfor %}
|
||||
</pre>
|
||||
{% endspaceless %}
|
||||
{% elif non_atomic_change %}
|
||||
{% trans "Warning: Comparing non-atomic change to previous change record" %} (<a href="{% url 'extras:objectchange' pk=prev_change.pk %}">{{ prev_change.pk }}</a>)
|
||||
{% trans "Warning: Comparing non-atomic change to previous change record" %} (<a href="{% url 'extras:objectchange' pk=prev_change.pk %}">{{ prev_change.pk }}</a>)
|
||||
{% else %}
|
||||
<span class="text-muted">{% trans "None" %}</span>
|
||||
<span class="text-muted">{% trans "None" %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-md-6">
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
{% trans "Post-Change Data" %}
|
||||
</h5>
|
||||
<h5 class="card-header">{% trans "Post-Change Data" %}</h5>
|
||||
<div class="card-body">
|
||||
{% if object.postchange_data %}
|
||||
<pre class="change-data">{% for k, v in object.postchange_data.items %}{% spaceless %}
|
||||
{% spaceless %}
|
||||
<pre class="change-data">
|
||||
{% for k, v in object.postchange_data.items %}
|
||||
<span{% if k in diff_added %} class="added"{% endif %}>{{ k }}: {{ v|json }}</span>
|
||||
{% endspaceless %}{% endfor %}
|
||||
{% endfor %}
|
||||
</pre>
|
||||
{% endspaceless %}
|
||||
{% else %}
|
||||
<span class="text-muted">{% trans "None" %}</span>
|
||||
<span class="text-muted">{% trans "None" %}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,7 +74,7 @@
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if perms.extras.run_report and report.is_valid %}
|
||||
<div class="float-end noprint">
|
||||
<div class="float-end d-print-none">
|
||||
<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" style="width: 110px">
|
||||
|
@ -11,7 +11,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="row noprint">
|
||||
<div class="row d-print-none">
|
||||
<div class="col col-md-12">
|
||||
<nav class="breadcrumb-container px-3" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
|
@ -46,7 +46,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer text-end noprint border-0">
|
||||
<div class="card-footer text-end d-print-none border-0">
|
||||
<button type="button" class="btn btn-outline-danger m-1" data-reset-select>
|
||||
<i class="mdi mdi-backspace"></i> {% trans "Reset" %}
|
||||
</button>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<h5 class="card-header">{% trans "Images" %}</h5>
|
||||
{% htmx_table 'extras:imageattachment_list' content_type_id=object|content_type_id object_id=object.pk %}
|
||||
{% if perms.extras.add_imageattachment %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'extras:imageattachment_add' %}?content_type={{ object|content_type_id }}&object_id={{ object.pk }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Attach an image" %}
|
||||
</a>
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-auto table-controls noprint">
|
||||
<div class="col-auto d-print-none">
|
||||
<div class="input-group me-2 quicksearch hide-last-child">
|
||||
<input type="search" results="5" name="q" id="quicksearch" class="form-control" placeholder="Quick search"
|
||||
hx-get="{{ request.full_path }}" hx-target="#object_list" hx-trigger="keyup changed delay:500ms, search" />
|
||||
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
{% block extra_table_controls %}{% endblock %}
|
||||
</div>
|
||||
<div class="col-auto ms-auto table-controls noprint">
|
||||
<div class="col-auto ms-auto d-print-none">
|
||||
{% if request.user.is_authenticated and table_modal %}
|
||||
<div class="table-configure input-group">
|
||||
<button type="button" data-bs-toggle="modal" title="{% trans "Configure Table" %}" data-bs-target="#{{ table_modal }}"
|
||||
|
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary ws-nowrap" type="button" href="{% url 'login' %}?next={{ request.path }}">
|
||||
<a class="btn btn-primary" type="button" href="{% url 'login' %}?next={{ request.path }}">
|
||||
<i class="mdi mdi-login-variant"></i> {% trans "Log In" %}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>{{ assignment.priority }}</td>
|
||||
<td class="text-end noprint">
|
||||
<td class="text-end d-print-none">
|
||||
{% if perms.ipam.change_fhrpgroupassignment %}
|
||||
<a href="{% url 'ipam:fhrpgroupassignment_edit' pk=assignment.pk %}?return_url={{ object.get_absolute_url }}" class="btn btn-warning lh-1" title="{% trans "Edit" %}">
|
||||
<i class="mdi mdi-pencil" aria-hidden="true"></i>
|
||||
@ -44,7 +44,7 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
{% if perms.ipam.add_fhrpgroup %}
|
||||
<a href="{% url 'ipam:fhrpgroup_add' %}?return_url={% url 'ipam:fhrpgroupassignment_add' %}%3Finterface_type={{ object|content_type_id }}%26interface_id={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Create Group" %}
|
||||
|
@ -86,7 +86,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.ipam.add_prefix %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'ipam:prefix_add' %}?{% if object.tenant %}tenant={{ object.tenant.pk }}&{% endif %}site={{ object.site.pk }}&vlan={{ object.pk }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Prefix" %}
|
||||
</a>
|
||||
|
@ -48,7 +48,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.tenancy.add_contactgroup %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'tenancy:contactgroup_add' %}?parent={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Contact Group" %}
|
||||
</a>
|
||||
|
@ -57,7 +57,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.tenancy.add_tenantgroup %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'tenancy:tenantgroup_add' %}?parent={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Tenant Group" %}
|
||||
</a>
|
||||
|
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col col-md-6 offset-md-3 text-end noprint">
|
||||
<div class="col col-md-6 offset-md-3 text-end d-print-none">
|
||||
<a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
|
||||
<button type="submit" name="_add" class="btn btn-primary">{% trans "Add Devices" %}</button>
|
||||
</div>
|
||||
|
@ -152,7 +152,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.ipam.add_service %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'ipam:service_add' %}?virtual_machine={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add a service" %}
|
||||
</a>
|
||||
@ -172,7 +172,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.virtualization.add_virtualdisk %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'virtualization:virtualdisk_add' %}?device={{ object.device.pk }}&virtual_machine={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Virtual Disk" %}
|
||||
</a>
|
||||
|
@ -87,7 +87,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.ipam.add_ipaddress %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?virtual_machine={{ object.virtual_machine.pk }}&vminterface={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add IP Address" %}
|
||||
</a>
|
||||
|
@ -58,7 +58,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.vpn.add_l2vpntermination %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'vpn:l2vpntermination_add' %}?l2vpn={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary{% if not object.can_add_termination %} disabled" aria-disabled="true{% endif %}">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Termination" %}
|
||||
</a>
|
||||
|
@ -74,7 +74,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.vpn.add_tunneltermination %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'vpn:tunneltermination_add' %}?tunnel={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add a Termination" %}
|
||||
</a>
|
||||
|
@ -57,7 +57,7 @@
|
||||
hx-trigger="load"
|
||||
></div>
|
||||
{% if perms.wireless.add_wirelesslangroup %}
|
||||
<div class="card-footer text-end noprint">
|
||||
<div class="card-footer text-end d-print-none">
|
||||
<a href="{% url 'wireless:wirelesslangroup_add' %}?parent={{ object.pk }}" class="btn btn-primary">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Wireless LAN Group" %}
|
||||
</a>
|
||||
|
@ -33,7 +33,7 @@
|
||||
{% elif 'data-clipboard' in field.field.widget.attrs %}
|
||||
<div class="input-group">
|
||||
{{ field }}
|
||||
<button type="button" title="{% trans "Copy to clipboard" %}" class="btn btn-outline-dark border-input copy-content" data-clipboard-target="#{{ field.id_for_label }}">
|
||||
<button type="button" title="{% trans "Copy to clipboard" %}" class="btn btn-outline-dark copy-content" data-clipboard-target="#{{ field.id_for_label }}">
|
||||
<i class="mdi mdi-content-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% load i18n %}
|
||||
<div class="border rounded markdown-widget">
|
||||
<div class="border rounded">
|
||||
<ul class="nav nav-tabs px-3 pt-2 rounded-top border-0">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active " id="{{ widget.name }}-input-tab" data-bs-toggle="tab" data-bs-target="#{{ widget.name }}-input" type="button" role="tab" aria-controls="{{ widget.name }}-input" aria-selected="true">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="input-group">
|
||||
{% include 'django/forms/widgets/number.html' %}
|
||||
<button type="button" class="btn btn-outline-dark border-input dropdown-toggle" data-bs-toggle="dropdown"></button>
|
||||
<button type="button" class="btn btn-outline-dark dropdown-toggle" data-bs-toggle="dropdown"></button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
{% for value, label in widget.options %}
|
||||
<li>
|
||||
|
Loading…
Reference in New Issue
Block a user