Introduce generic object template

This commit is contained in:
Jeremy Stretch 2021-03-02 15:58:33 -05:00
parent 8dd7123923
commit 51120ccf31
27 changed files with 494 additions and 1324 deletions

View File

@ -1,60 +1,11 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block title %}{{ object }}{% endblock %} {% block breadcrumbs %}
{% block header %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'circuits:circuit_list' %}">Circuits</a></li> <li><a href="{% url 'circuits:circuit_list' %}">Circuits</a></li>
<li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.provider.slug }}">{{ object.provider }}</a></li> <li><a href="{% url 'circuits:circuit_list' %}?provider={{ object.provider.slug }}">{{ object.provider }}</a></li>
<li>{{ object.cid }}</li> <li>{{ object.cid }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'circuits:circuit_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.circuits.add_circuit %}
{% clone_button object %}
{% endif %}
{% if perms.circuits.change_circuit %}
{% edit_button object %}
{% endif %}
{% if perms.circuits.delete_circuit %}
{% delete_button object %}
{% endif %}
</div>
<h1>{{ object }}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Circuit</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'circuits:circuit_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,60 +1,11 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load static %} {% load static %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block title %}{{ object }}{% endblock %} {% block breadcrumbs %}
{% block header %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'circuits:provider_list' %}">Providers</a></li> <li><a href="{% url 'circuits:provider_list' %}">Providers</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'circuits:provider_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.circuits.add_provider %}
{% clone_button object %}
{% endif %}
{% if perms.circuits.change_provider %}
{% edit_button object %}
{% endif %}
{% if perms.circuits.delete_provider %}
{% delete_button object %}
{% endif %}
</div>
<h1>{{ object }}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Provider</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'circuits:provider_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,42 +1,21 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load perms %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:cable_list' %}">Cables</a></li> <li><a href="{% url 'dcim:cable_list' %}">Cables</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
</div> {% block buttons %}
<div class="pull-right noprint"> {% if request.user|can_change:object %}
{% plugin_buttons object %}
{% if perms.dcim.change_cable %}
{% edit_button object %} {% edit_button object %}
{% endif %} {% endif %}
{% if perms.dcim.delete_cable %} {% if request.user|can_delete:object %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div>
<h1>{% block title %}Cable {{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Cable</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:cable_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,16 +1,11 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load static %} {% load static %}
{% load helpers %} {% load helpers %}
{% load custom_links %} {% load custom_links %}
{% load plugins %} {% load plugins %}
{% block title %}{{ object }}{% endblock %} {% block breadcrumbs %}
{% block header %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li> <li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
<li><a href="{% url 'dcim:device_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li> <li><a href="{% url 'dcim:device_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
{% if object.parent_bay %} {% if object.parent_bay %}
@ -18,23 +13,9 @@
<li>{{ object.parent_bay }}</li> <li>{{ object.parent_bay }}</li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'dcim:device_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search devices" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.change_device %} {% if perms.dcim.change_device %}
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -80,12 +61,9 @@
{% if perms.dcim.delete_device %} {% if perms.dcim.delete_device %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div> {% endblock %}
<h1>{{ object }}</h1>
{% include 'inc/created_updated.html' %} {% block tabs %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li role="presentation" {% if active_tab == 'device' %} class="active"{% endif %}> <li role="presentation" {% if active_tab == 'device' %} class="active"{% endif %}>
<a href="{% url 'dcim:device' pk=object.pk %}">Device</a> <a href="{% url 'dcim:device' pk=object.pk %}">Device</a>

View File

@ -1,44 +1,15 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load helpers %} {% load helpers %}
{% load perms %} {% load perms %}
{% load plugins %} {% load plugins %}
{% block header %} {% block title %}{{ object.device }} / {{ object }}{% endblock %}
<div class="row noprint">
<div class="col-md-12"> {% block breadcrumbs %}
<ol class="breadcrumb">
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li> <li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
<li><a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a></li> <li><a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a></li>
{% if breadcrumb_url %} {% if breadcrumb_url %}
<li><a href="{% url breadcrumb_url pk=object.device.pk %}">{{ object|meta:"verbose_name_plural"|bettertitle }}</a></li> <li><a href="{% url breadcrumb_url pk=object.device.pk %}">{{ object|meta:"verbose_name_plural"|bettertitle }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if request.user|can_change:object %}
<a href="{% url object|viewname:"edit" pk=object.pk %}" class="btn btn-warning">
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
</a>
{% endif %}
{% if request.user|can_delete:object %}
<a href="{% url object|viewname:"delete" pk=object.pk %}" class="btn btn-danger">
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
</a>
{% endif %}
</div>
<h1>{% block title %}{{ object.device }} / {{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url object|viewname:"changelog" pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}

View File

@ -1,23 +1,17 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block title %}{{ object.manufacturer }} {{ object.model }}{% endblock %} {% block title %}{{ object.manufacturer }} {{ object.model }}{% endblock %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:devicetype_list' %}">Device Types</a></li> <li><a href="{% url 'dcim:devicetype_list' %}">Device Types</a></li>
<li><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ object.manufacturer.slug }}">{{ object.manufacturer }}</a></li> <li><a href="{% url 'dcim:devicetype_list' %}?manufacturer={{ object.manufacturer.slug }}">{{ object.manufacturer }}</a></li>
<li>{{ object.model }}</li> <li>{{ object.model }}</li>
</ol> {% endblock %}
</div>
</div> {% block buttons %}
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.change_devicetype %} {% if perms.dcim.change_devicetype %}
<div class="btn-group"> <div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -60,22 +54,6 @@
{% if perms.dcim.delete_devicetype %} {% if perms.dcim.delete_devicetype %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div>
<h1>{{ object.manufacturer }} {{ object.model }}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Device Type</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:devicetype_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,14 +1,11 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load static %} {% load static %}
{% load custom_links %} {% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:powerfeed_list' %}">Power Feeds</a></li> <li><a href="{% url 'dcim:powerfeed_list' %}">Power Feeds</a></li>
<li><a href="{{ object.power_panel.site.get_absolute_url }}">{{ object.power_panel.site }}</a></li> <li><a href="{{ object.power_panel.site.get_absolute_url }}">{{ object.power_panel.site }}</a></li>
<li><a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a></li> <li><a href="{{ object.power_panel.get_absolute_url }}">{{ object.power_panel }}</a></li>
@ -16,48 +13,6 @@
<li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li> <li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'dcim:powerfeed_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search power feeds" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.add_powerfeed %}
{% clone_button object %}
{% endif %}
{% if perms.dcim.change_powerfeed %}
{% edit_button object %}
{% endif %}
{% if perms.dcim.delete_powerfeed %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Cable</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:powerfeed_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,59 +1,14 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load static %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:powerpanel_list' %}">Power Panels</a></li> <li><a href="{% url 'dcim:powerpanel_list' %}">Power Panels</a></li>
<li><a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a></li> <li><a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a></li>
{% if object.rack_group %} {% if object.rack_group %}
<li><a href="{{ object.rack_group.get_absolute_url }}">{{ object.rack_group }}</a></li> <li><a href="{{ object.rack_group.get_absolute_url }}">{{ object.rack_group }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'dcim:powerpanel_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search power panels" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.change_powerpanel %}
{% edit_button object %}
{% endif %}
{% if perms.dcim.delete_powerpanel %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Cable</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:powerpanel_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,14 +1,12 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load static %} {% load static %}
{% load plugins %} {% load plugins %}
{% block header %} {% block title %}Rack {{ object }}{% endblock %}
<div class="row noprint">
<div class="col-sm-8 col-md-9"> {% block breadcrumbs %}
<ol class="breadcrumb">
<li><a href="{% url 'dcim:rack_list' %}">Racks</a></li> <li><a href="{% url 'dcim:rack_list' %}">Racks</a></li>
<li><a href="{% url 'dcim:rack_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li> <li><a href="{% url 'dcim:rack_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
{% if object.group %} {% if object.group %}
@ -18,23 +16,9 @@
<li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li> <li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'dcim:rack_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search racks" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
<a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}"{% else %}disabled="disabled"{% endif %} class="btn btn-primary"> <a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}"{% else %}disabled="disabled"{% endif %} class="btn btn-primary">
<span class="mdi mdi-chevron-left" aria-hidden="true"></span> Previous Rack <span class="mdi mdi-chevron-left" aria-hidden="true"></span> Previous Rack
</a> </a>
@ -50,25 +34,13 @@
{% if perms.dcim.delete_rack %} {% if perms.dcim.delete_rack %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div> {% endblock %}
<h1>{% block title %}Rack {{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %} {% block tab_buttons %}
<div class="pull-right noprint">
<button class="btn btn-sm btn-default toggle-images" selected="selected"> <button class="btn btn-sm btn-default toggle-images" selected="selected">
<span class="mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Images <span class="mdi mdi-checkbox-marked-circle-outline" aria-hidden="true"></span> Show Images
</button> </button>
{% custom_links object %} {{ block.super }}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Rack</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:rack_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,56 +1,23 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %} {% load custom_links %}
{% load helpers %} {% load helpers %}
{% load static %} {% load static %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:rackreservation_list' %}">Rack Reservations</a></li> <li><a href="{% url 'dcim:rackreservation_list' %}">Rack Reservations</a></li>
<li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li> <li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
<li>Units {{ object.unit_list }}</li> <li>Units {{ object.unit_list }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'dcim:rackreservation_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search racks" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.change_rackreservation %} {% if perms.dcim.change_rackreservation %}
{% edit_button object %} {% edit_button object %}
{% endif %} {% endif %}
{% if perms.dcim.delete_rackreservation %} {% if perms.dcim.delete_rackreservation %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Rack</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:rackreservation_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,15 +1,9 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% load static %}
{% load tz %} {% load tz %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:site_list' %}">Sites</a></li> <li><a href="{% url 'dcim:site_list' %}">Sites</a></li>
{% if object.region %} {% if object.region %}
{% for region in object.region.get_ancestors %} {% for region in object.region.get_ancestors %}
@ -18,48 +12,6 @@
<li><a href="{{ object.region.get_absolute_url }}">{{ object.region }}</a></li> <li><a href="{{ object.region.get_absolute_url }}">{{ object.region }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'dcim:site_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search sites" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.add_site %}
{% clone_button object %}
{% endif %}
{% if perms.dcim.change_site %}
{% edit_button object %}
{% endif %}
{% if perms.dcim.delete_site %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Site</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:site_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,57 +1,24 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %} {% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'dcim:virtualchassis_list' %}">Virtual Chassis</a></li> <li><a href="{% url 'dcim:virtualchassis_list' %}">Virtual Chassis</a></li>
{% if object.master %} {% if object.master %}
<li><a href="{% url 'dcim:virtualchassis_list' %}?site={{ object.master.site.slug }}">{{ object.master.site }}</a></li> <li><a href="{% url 'dcim:virtualchassis_list' %}?site={{ object.master.site.slug }}">{{ object.master.site }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'dcim:virtualchassis_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search virtual chassis" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.dcim.change_virtualchassis %} {% if perms.dcim.change_virtualchassis %}
{% edit_button object %} {% edit_button object %}
{% endif %} {% endif %}
{% if perms.dcim.delete_virtualchassis %} {% if perms.dcim.delete_virtualchassis %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Virtual Chassis</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:virtualchassis_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,47 +1,10 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load helpers %} {% load helpers %}
{% load static %} {% load static %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'extras:configcontext_list' %}">Config Contexts</a></li> <li><a href="{% url 'extras:configcontext_list' %}">Config Contexts</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'extras:configcontext_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% if perms.extras.change_configcontext %}
<a href="{% url 'extras:configcontext_edit' pk=object.pk %}" class="btn btn-warning">
<span class="mdi mdi-pencil" aria-hidden="true"></span>
Edit this config context
</a>
{% endif %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Config Context</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'extras:configcontext_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -0,0 +1,63 @@
{% extends 'base.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %}
{% load perms %}
{% load plugins %}
{% block header %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
{% block breadcrumbs %}{% endblock %}
</ol>
</div>
<div class="col-sm-4 col-md-3">
{# TODO: Provide absolute search URL #}
<form action="../" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% block buttons %}
{% if request.user|can_add:object %}
{% clone_button object %}
{% endif %}
{% if request.user|can_change:object %}
{% edit_button object %}
{% endif %}
{% if request.user|can_delete:object %}
{% delete_button object %}
{% endif %}
{% endblock %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% block tab_buttons %}
{% custom_links object %}
{% endblock %}
</div>
{% block tabs %}
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
{# TODO: Fix changelog URL resolution hack #}
<a href="{{ object.get_absolute_url }}changelog/">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %}
{% endblock %}

View File

@ -1,59 +1,18 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %} {% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li> <li><a href="{% url 'ipam:aggregate_list' %}">Aggregates</a></li>
<li><a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a></li> <li><a href="{% url 'ipam:aggregate_list' %}?rir={{ object.rir.slug }}">{{ object.rir }}</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'ipam:aggregate_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search aggregates" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_aggregate %}
{% clone_button object %}
{% endif %}
{% if perms.ipam.change_aggregate %}
{% edit_button object %}
{% endif %}
{% if perms.ipam.delete_aggregate %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
{% include 'ipam/inc/toggle_available.html' %} {% include 'ipam/inc/toggle_available.html' %}
<div class="pull-right noprint"> {{ block.super }}
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Aggregate</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:aggregate_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,6 +1,5 @@
{% load helpers %} {% load helpers %}
{% if show_available is not None %} {% if show_available is not None %}
<div class="pull-right">
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-default{% if show_available %} active disabled{% endif %}"> <a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-default{% if show_available %} active disabled{% endif %}">
<i class="mdi mdi-eye-outline"></i> Show available <i class="mdi mdi-eye-outline"></i> Show available
@ -9,5 +8,4 @@
<i class="mdi mdi-eye-off-outline"></i> Hide available <i class="mdi mdi-eye-off-outline"></i> Hide available
</a> </a>
</div> </div>
</div>
{% endif %} {% endif %}

View File

@ -1,61 +1,14 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></li> <li><a href="{% url 'ipam:ipaddress_list' %}">IP Addresses</a></li>
{% if object.vrf %} {% if object.vrf %}
<li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li> <li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'ipam:ipaddress_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search IPs" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_ipaddress %}
{% clone_button object %}
{% endif %}
{% if perms.ipam.change_ipaddress %}
{%edit_button object %}
{% endif %}
{% if perms.ipam.delete_ipaddress %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">IP Address</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:ipaddress_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,35 +1,17 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:prefix_list' %}">Prefixes</a></li> <li><a href="{% url 'ipam:prefix_list' %}">Prefixes</a></li>
{% if object.vrf %} {% if object.vrf %}
<li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li> <li><a href="{% url 'ipam:vrf' pk=object.vrf.pk %}">{{ object.vrf }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'ipam:prefix_list' %}" method="get"> {% include 'ipam/inc/toggle_available.html' %}
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search prefixes" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_prefix and active_tab == 'prefixes' and first_available_prefix %} {% if perms.ipam.add_prefix and active_tab == 'prefixes' and first_available_prefix %}
<a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ object.vrf.pk }}&site={{ object.site.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-success"> <a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ object.vrf.pk }}&site={{ object.site.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-success">
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Child Prefix <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Child Prefix
@ -41,22 +23,10 @@
Add an IP Address Add an IP Address
</a> </a>
{% endif %} {% endif %}
{% if perms.ipam.add_prefix %} {{ block.super }}
{% clone_button object %} {% endblock %}
{% endif %}
{% if perms.ipam.change_prefix %} {% block tabs %}
{% edit_button object %}
{% endif %}
{% if perms.ipam.delete_prefix %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
{% include 'ipam/inc/toggle_available.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs" style="margin-bottom: 20px"> <ul class="nav nav-tabs" style="margin-bottom: 20px">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}> <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{% url 'ipam:prefix' pk=object.pk %}">Prefix</a> <a href="{% url 'ipam:prefix' pk=object.pk %}">Prefix</a>

View File

@ -1,57 +1,10 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:routetarget_list' %}">Route Targets</a></li> <li><a href="{% url 'ipam:routetarget_list' %}">Route Targets</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'ipam:routetarget_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search roue targets" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_routetarget %}
{% clone_button object %}
{% endif %}
{% if perms.ipam.change_routetarget %}
{% edit_button object %}
{% endif %}
{% if perms.ipam.delete_routetarget %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}Route target {{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Route Target</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:routetarget_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,45 +1,25 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load perms %}
{% load plugins %} {% load plugins %}
{% block content %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'ipam:service_list' %}">Services</a></li> <li><a href="{% url 'ipam:service_list' %}">Services</a></li>
<li><a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a></li> <li><a href="{{ object.parent.get_absolute_url }}">{{ object.parent }}</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'ipam:service_list' %}" method="get"> {% if request.user|can_change:object %}
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search Services" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right">
{% plugin_buttons object %}
{% if perms.dcim.change_service %}
{% edit_button object %} {% edit_button object %}
{% endif %} {% endif %}
{% if perms.dcim.delete_service %} {% if request.user|can_delete:object %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div> {% endblock %}
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %} {% block content %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -1,13 +1,10 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block title %}VLAN {{ object.display_name }}{% endblock %}
<div class="row noprint">
<div class="col-sm-8 col-md-9"> {% block breadcrumbs %}
<ol class="breadcrumb">
<li><a href="{% url 'ipam:vlan_list' %}">VLANs</a></li> <li><a href="{% url 'ipam:vlan_list' %}">VLANs</a></li>
{% if object.site %} {% if object.site %}
<li><a href="{% url 'ipam:vlan_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li> <li><a href="{% url 'ipam:vlan_list' %}?site={{ object.site.slug }}">{{ object.site }}</a></li>
@ -16,38 +13,9 @@
<li><a href="{% url 'ipam:vlan_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li> <li><a href="{% url 'ipam:vlan_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block tabs %}
<form action="{% url 'ipam:vlan_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search VLANs" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_vlan %}
{% clone_button object %}
{% endif %}
{% if perms.ipam.change_vlan %}
{% edit_button object %}
{% endif %}
{% if perms.ipam.delete_vlan %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}VLAN {{ object.display_name }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs" style="margin-bottom: 20px"> <ul class="nav nav-tabs" style="margin-bottom: 20px">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}> <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{% url 'ipam:vlan' pk=object.pk %}">VLAN</a> <a href="{% url 'ipam:vlan' pk=object.pk %}">VLAN</a>

View File

@ -1,57 +1,14 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %} {% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block title %}VRF {{ object }}{% endblock %}
<div class="row noprint">
<div class="col-sm-8 col-md-9"> {% block breadcrumbs %}
<ol class="breadcrumb">
<li><a href="{% url 'ipam:vrf_list' %}">VRFs</a></li> <li><a href="{% url 'ipam:vrf_list' %}">VRFs</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'ipam:vrf_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search VRFs" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.ipam.add_vrf %}
{% clone_button object %}
{% endif %}
{% if perms.ipam.change_vrf %}
{% edit_button object %}
{% endif %}
{% if perms.ipam.delete_vrf %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}VRF {{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">VRF</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'ipam:vrf_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,45 +1,23 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load static %} {% load static %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="{% url 'secrets:secret_list' %}">Secrets</a></li> <li><a href="{% url 'secrets:secret_list' %}">Secrets</a></li>
<li><a href="{% url 'secrets:secret_list' %}?role={{ object.role.slug }}">{{ object.role }}</a></li> <li><a href="{% url 'secrets:secret_list' %}?role={{ object.role.slug }}">{{ object.role }}</a></li>
<li><a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a></li> <li><a href="{{ object.assigned_object.get_absolute_url }}">{{ object.assigned_object }}</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
</div> {% block buttons %}
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.secrets.change_secret %} {% if perms.secrets.change_secret %}
{% edit_button object %} {% edit_button object %}
{% endif %} {% endif %}
{% if perms.secrets.delete_secret %} {% if perms.secrets.delete_secret %}
{% delete_button object %} {% delete_button object %}
{% endif %} {% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Secret</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'secrets:secret_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,60 +1,13 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %}
{% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{% url 'tenancy:tenant_list' %}">Tenants</a></li> <li><a href="{% url 'tenancy:tenant_list' %}">Tenants</a></li>
{% if object.group %} {% if object.group %}
<li><a href="{% url 'tenancy:tenant_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li> <li><a href="{% url 'tenancy:tenant_list' %}?group={{ object.group.slug }}">{{ object.group }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'tenancy:tenant_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Name" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.tenancy.add_tenant %}
{% clone_button object %}
{% endif %}
{% if perms.tenancy.change_tenant %}
{% edit_button object %}
{% endif %}
{% if perms.tenancy.delete_tenant %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Tenant</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'tenancy:tenant_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,60 +1,15 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %} {% load custom_links %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint" xmlns="http://www.w3.org/1999/html">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></li> <li><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></li>
{% if object.group %} {% if object.group %}
<li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li> <li><a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
<div class="col-sm-4 col-md-3">
<form action="{% url 'virtualization:cluster_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search clusters" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.virtualization.add_cluster %}
{% clone_button object %}
{% endif %}
{% if perms.virtualization.change_cluster %}
{% edit_button object %}
{% endif %}
{% if perms.virtualization.delete_cluster %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Cluster</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'virtualization:cluster_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,55 +1,27 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load buttons %} {% load buttons %}
{% load custom_links %} {% load custom_links %}
{% load static %} {% load static %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block breadcrumbs %}
<div class="row noprint">
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
{% if object.cluster %} {% if object.cluster %}
<li><a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a></li> <li><a href="{{ object.cluster.get_absolute_url }}">{{ object.cluster }}</a></li>
{% endif %} {% endif %}
<li>{{ object }}</li> <li>{{ object }}</li>
</ol> {% endblock %}
</div>
<div class="col-sm-4 col-md-3"> {% block buttons %}
<form action="{% url 'virtualization:virtualmachine_list' %}" method="get">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search virtual machines" />
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
<span class="mdi mdi-magnify"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% if perms.virtualization.add_vminterface %} {% if perms.virtualization.add_vminterface %}
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary"> <a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces
</a> </a>
{% endif %} {% endif %}
{% plugin_buttons object %} {{ block.super }}
{% if perms.virtualization.add_virtualmachine %} {% endblock %}
{% clone_button object %}
{% endif %} {% block tabs %}
{% if perms.virtualization.change_virtualmachine %}
{% edit_button object %}
{% endif %}
{% if perms.virtualization.delete_virtualmachine %}
{% delete_button object %}
{% endif %}
</div>
<h1>{% block title %}{{ object }}{% endblock %}</h1>
{% include 'inc/created_updated.html' %}
<div class="pull-right noprint">
{% custom_links object %}
</div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}> <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Virtual Machine</a> <a href="{{ object.get_absolute_url }}">Virtual Machine</a>

View File

@ -1,41 +1,13 @@
{% extends 'base.html' %} {% extends 'generic/object.html' %}
{% load helpers %} {% load helpers %}
{% load plugins %} {% load plugins %}
{% block header %} {% block title %}{{ object.virtual_machine }} / {{ object.name }}{% endblock %}
<div class="row noprint">
<div class="col-md-12"> {% block breadcrumbs %}
<ol class="breadcrumb">
<li><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></li> <li><a href="{% url 'virtualization:virtualmachine_list' %}">Virtual Machines</a></li>
<li><a href="{{ object.virtual_machine.get_absolute_url }}">{{ object.virtual_machine }}</a></li> <li><a href="{{ object.virtual_machine.get_absolute_url }}">{{ object.virtual_machine }}</a></li>
<li>{{ object }}</li> <li>{{ object }}</li>
</ol>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons object %}
{% if perms.virtualization.change_vminterface %}
<a href="{% url 'virtualization:vminterface_edit' pk=object.pk %}" class="btn btn-warning">
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
</a>
{% endif %}
{% if perms.virtualization.delete_vminterface %}
<a href="{% url 'virtualization:vminterface_delete' pk=object.pk %}" class="btn btn-danger">
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
</a>
{% endif %}
</div>
<h1>{% block title %}{{ object.virtual_machine }} / {{ object.name }}{% endblock %}</h1>
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ object.get_absolute_url }}">Interface</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'virtualization:vminterface_changelog' pk=object.pk %}">Change Log</a>
</li>
{% endif %}
</ul>
{% endblock %} {% endblock %}
{% block content %} {% block content %}