Replaces device_role with role on device model (#13342)

* replaces device_role with role on device model #6391

* fixes lint issue #6391

* revert the database user

* revert test_runner comment

* changes as per review

* Update references to device_role column in UserConfigs

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Abhimanyu Saharan
2023-08-02 19:25:52 +05:30
committed by GitHub
parent 7e6449a822
commit 2072edb19c
37 changed files with 422 additions and 331 deletions

View File

@@ -202,7 +202,7 @@
</tr>
<tr>
<th scope="row">{% trans "Role" %}</th>
<td>{{ object.device_role|linkify }}</td>
<td>{{ object.role|linkify }}</td>
</tr>
<tr>
<th scope="row">{% trans "Platform" %}</th>

View File

@@ -10,7 +10,7 @@
<h5 class="offset-sm-3">{% trans "Device" %}</h5>
</div>
{% render_field form.name %}
{% render_field form.device_role %}
{% render_field form.role %}
{% render_field form.description %}
{% render_field form.tags %}
</div>

View File

@@ -10,7 +10,7 @@
{% block extra_controls %}
{% if perms.dcim.add_device %}
<a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
<a href="{% url 'dcim:device_add' %}?role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Device" %}
</a>
{% endif %}

View File

@@ -19,7 +19,7 @@
<td>
<a href="{% url 'dcim:device' pk=device.pk %}">{{ device }}</a>
</td>
<td>{{ device.device_role }}</td>
<td>{{ device.role }}</td>
<td>{{ device.device_type }}</td>
{% if device.parent_bay %}
<td>{{ device.parent_bay.device|linkify }}</td>

View File

@@ -13,7 +13,7 @@
{% block extra_controls %}
{% if perms.dcim.add_device %}
<a href="{% url 'dcim:device_add' %}?device_role={{ object.pk }}" class="btn btn-sm btn-primary">
<a href="{% url 'dcim:device_add' %}?role={{ object.pk }}" class="btn btn-sm btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Device" %}
</a>
{% endif %}