2018-11-26 07:23:33 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<form action="#" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="serial">Serial Number</label>
|
|
|
|
<input type="text" class="form-control" id="serial" disabled="disabled" value="{{ device.serial }}"></input>
|
|
|
|
</div>
|
2018-12-15 11:35:00 +00:00
|
|
|
{% if user.is_superuser %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="secret">Device Secret</label>
|
|
|
|
<input type="text" class="form-control" id="secret" disabled="disabled" value="{{ device.secret }}"></input>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="password">Root Password</label>
|
|
|
|
<input type="text" class="form-control" id="password" disabled="disabled" value="{{ device.password }}"></input>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-11-26 07:23:33 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">Device Name</label>
|
2018-11-26 19:55:09 +00:00
|
|
|
<input type="text" class="form-control" name="name" id="name" placeholder="Enter Device Name (Optional)" value="{{ device.name }}"></input>
|
2018-11-26 07:23:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="subnet">Assigned Network</label>
|
|
|
|
<select class="custom-select mr-sm-2" id="subnet" name="subnet">
|
|
|
|
{% for choice in subnets %}
|
|
|
|
<option {% if choice.intip == device.network.intip %} selected {% endif %} value="{{ choice.intip }}">{{ choice.intip}} ({{ choice.extip }})</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2018-11-28 15:38:35 +00:00
|
|
|
<small id="subnetHelp" class="form-text text-muted">A network change will require a reboot of the device to be applied.</small>
|
|
|
|
</div>
|
|
|
|
<div class="form-group form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" value="True" {% if device.reboot %} checked {% endif %} id="reboot" name="reboot">
|
|
|
|
<label class="form-check-label" for="reboot">Reboot device immediately </label>
|
2018-11-26 07:23:33 +00:00
|
|
|
</div>
|
2018-11-26 19:55:09 +00:00
|
|
|
<button type="submit" class="btn btn-success">Apply Changes</button>
|
|
|
|
<a class="btn btn-danger" href="/" role="button">Cancel</a>
|
2018-11-26 07:23:33 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
{% endblock %}
|