forked from netbox-community/netbox
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work on virtualization support (netbox-community#142)
- Loading branch information
1 parent
34b69b6
commit 4eb45cb
Showing
21 changed files
with
1,210 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,7 @@ | |
'tenancy', | ||
'users', | ||
'utilities', | ||
'virtualization', | ||
) | ||
|
||
# Middleware | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{% extends '_base.html' %} | ||
{% load helpers %} | ||
|
||
{% block content %} | ||
<div class="row"> | ||
<div class="col-sm-8 col-md-9"> | ||
</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"> | ||
{% if perms.virtualization.change_cluster %} | ||
<a href="{% url 'virtualization:cluster_edit' pk=cluster.pk %}" class="btn btn-warning"> | ||
<span class="fa fa-pencil" aria-hidden="true"></span> | ||
Edit this cluster | ||
</a> | ||
{% endif %} | ||
{% if perms.dcim.delete_cluster %} | ||
<a href="{% url 'virtualization:cluster_delete' pk=cluster.pk %}" class="btn btn-danger"> | ||
<span class="fa fa-trash" aria-hidden="true"></span> | ||
Delete this cluster | ||
</a> | ||
{% endif %} | ||
</div> | ||
<h1>{% block title %}{{ cluster }}{% endblock %}</h1> | ||
{% include 'inc/created_updated.html' with obj=cluster %} | ||
<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> | ||
<tr> | ||
<td>Virtual Machines</td> | ||
<td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster={{ cluster.pk }}">{{ cluster.virtual_machines.count }}</a></td> | ||
</tr> | ||
</table> | ||
</div> | ||
{% include 'inc/custom_fields_panel.html' with custom_fields=cluster.get_custom_fields %} | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<strong>Comments</strong> | ||
</div> | ||
<div class="panel-body"> | ||
{% if cluster.comments %} | ||
{{ cluster.comments|gfm }} | ||
{% else %} | ||
<span class="text-muted">None</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-7"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<strong>Devices</strong> | ||
</div> | ||
<div class="panel-body"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% extends '_base.html' %} | ||
|
||
{% block content %} | ||
<div class="pull-right"> | ||
{% if perms.virtualization.add_cluster %} | ||
<a href="{% url 'virtualization:cluster_add' %}" class="btn btn-primary"> | ||
<span class="fa fa-plus" aria-hidden="true"></span> | ||
Add a cluster | ||
</a> | ||
<a href="{% url 'virtualization:cluster_import' %}" class="btn btn-info"> | ||
<span class="fa fa-download" aria-hidden="true"></span> | ||
Import clusters | ||
</a> | ||
{% endif %} | ||
{% include 'inc/export_button.html' with obj_type='clusters' %} | ||
</div> | ||
<h1>{% block title %}Clusters{% endblock %}</h1> | ||
<div class="row"> | ||
<div class="col-md-9"> | ||
{% include 'utilities/obj_table.html' %} | ||
</div> | ||
<div class="col-md-3"> | ||
{% include 'inc/search_panel.html' %} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends '_base.html' %} | ||
{% load helpers %} | ||
|
||
{% block content %} | ||
<div class="pull-right"> | ||
{% if perms.virtualization.add_clustergroup %} | ||
<a href="{% url 'virtualization:clustergroup_add' %}" class="btn btn-primary"> | ||
<span class="fa fa-plus" aria-hidden="true"></span> | ||
Add a cluster group | ||
</a> | ||
{% endif %} | ||
</div> | ||
<h1>{% block title %}Cluster Groups{% endblock %}</h1> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
{% include 'utilities/obj_table.html' with bulk_delete_url='virtualization:clustergroup_bulk_delete' %} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends '_base.html' %} | ||
{% load helpers %} | ||
|
||
{% block content %} | ||
<div class="pull-right"> | ||
{% if perms.virtualization.add_clustertype %} | ||
<a href="{% url 'virtualization:clustertype_add' %}" class="btn btn-primary"> | ||
<span class="fa fa-plus" aria-hidden="true"></span> | ||
Add a cluster type | ||
</a> | ||
{% endif %} | ||
</div> | ||
<h1>{% block title %}Cluster Types{% endblock %}</h1> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
{% include 'utilities/obj_table.html' with bulk_delete_url='virtualization:clustertype_bulk_delete' %} | ||
</div> | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.