1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

163 lines
6.4 KiB
HTML
Raw Normal View History

2020-04-10 10:21:02 -04:00
{% extends 'base.html' %}
{% load buttons %}
2019-04-15 21:38:04 -04:00
{% load custom_links %}
{% load helpers %}
{% load plugins %}
2018-06-14 16:15:14 -04:00
{% block header %}
<div class="row noprint" xmlns="http://www.w3.org/1999/html">
2018-06-14 16:15:14 -04:00
<div class="col-sm-8 col-md-9">
<ol class="breadcrumb">
<li><a href="{{ cluster.type.get_absolute_url }}">{{ cluster.type }}</a></li>
{% if cluster.group %}
<li><a href="{{ cluster.group.get_absolute_url }}">{{ cluster.group }}</a></li>
{% endif %}
<li>{{ cluster }}</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="fa fa-search" aria-hidden="true"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<div class="pull-right noprint">
{% plugin_buttons cluster %}
{% if perms.virtualization.add_cluster %}
{% clone_button cluster %}
{% endif %}
2018-06-14 16:15:14 -04:00
{% if perms.virtualization.change_cluster %}
{% edit_button cluster %}
2018-06-14 16:15:14 -04:00
{% endif %}
{% if perms.virtualization.delete_cluster %}
{% delete_button cluster %}
2018-06-14 16:15:14 -04:00
{% endif %}
</div>
2018-06-14 16:15:14 -04:00
<h1>{% block title %}{{ cluster }}{% endblock %}</h1>
{% include 'inc/created_updated.html' with obj=cluster %}
2019-04-15 21:38:04 -04:00
<div class="pull-right noprint">
{% custom_links cluster %}
</div>
2018-06-14 16:15:14 -04:00
<ul class="nav nav-tabs">
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ cluster.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=cluster.pk %}">Change Log</a>
</li>
{% endif %}
2018-06-14 16:15:14 -04:00
</ul>
{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-5">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Cluster</strong>
</div>
<table class="table table-hover panel-body attr-table">
<tr>
<td>Name</td>
<td>{{ cluster.name }}</td>
</tr>
<tr>
<td>Type</td>
<td><a href="{{ cluster.type.get_absolute_url }}">{{ cluster.type }}</a></td>
</tr>
<tr>
<td>Group</td>
<td>
{% if cluster.group %}
<a href="{{ cluster.group.get_absolute_url }}">{{ cluster.group }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
2019-10-07 08:29:32 +02:00
<tr>
<td>Tenant</td>
<td>
{% if cluster.tenant %}
<a href="{{ cluster.tenant.get_absolute_url }}">{{ cluster.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Site</td>
<td>
{% if cluster.site %}
<a href="{{ cluster.site.get_absolute_url }}">{{ cluster.site }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Virtual Machines</td>
2017-09-15 11:36:06 -04:00
<td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ cluster.pk }}">{{ cluster.virtual_machines.count }}</a></td>
</tr>
</table>
</div>
{% include 'inc/custom_fields_panel.html' with obj=cluster %}
{% include 'extras/inc/tags_panel.html' with tags=cluster.tags.all url='virtualization:cluster_list' %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Comments</strong>
</div>
<div class="panel-body rendered-markdown">
{% if cluster.comments %}
2020-03-09 10:42:32 -04:00
{{ cluster.comments|render_markdown }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</div>
</div>
{% plugin_left_page cluster %}
</div>
<div class="col-md-7">
<div class="panel panel-default">
<div class="panel-heading">
<strong>Host Devices</strong>
</div>
{% if perms.virtualization.change_cluster %}
<form action="{% url 'virtualization:cluster_remove_devices' pk=cluster.pk %}" method="post">
{% csrf_token %}
{% endif %}
{% include 'responsive_table.html' with table=device_table %}
{% if perms.virtualization.change_cluster %}
<div class="panel-footer noprint">
<div class="pull-right">
<a href="{% url 'virtualization:cluster_add_devices' pk=cluster.pk %}?site={{ cluster.site.pk }}" class="btn btn-primary btn-xs">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Add devices
</a>
</div>
<button type="submit" name="_remove" class="btn btn-danger primary btn-xs">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
Remove devices
</button>
</div>
</form>
{% endif %}
</div>
{% plugin_right_page cluster %}
</div>
</div>
<div class="row">
<div class="col-md-12">
{% plugin_full_width_page cluster %}
</div>
</div>
{% endblock %}