Adjusted display of created and last_updated times for primary objects

This commit is contained in:
Jeremy Stretch 2016-08-19 12:19:02 -04:00
parent 7a558d8332
commit eab18a81c9
14 changed files with 17 additions and 96 deletions

View File

@ -102,16 +102,9 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ circuit.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ circuit.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=circuit %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -103,14 +103,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ provider.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ provider.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
@ -125,6 +117,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% include 'inc/created_updated.html' with obj=provider %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -79,14 +79,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ device.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ device.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
@ -306,6 +298,7 @@
<div class="panel-body text-muted">None found</div> <div class="panel-body text-muted">None found</div>
{% endif %} {% endif %}
</div> </div>
{% include 'inc/created_updated.html' with obj=device %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{% if device_bays or device.device_type.is_parent_device %} {% if device_bays or device.device_type.is_parent_device %}

View File

@ -130,14 +130,6 @@
<a href="{% url 'dcim:device_list' %}?rack_id={{ rack.id }}">{{ rack.devices.count }}</a> <a href="{% url 'dcim:device_list' %}?rack_id={{ rack.id }}">{{ rack.devices.count }}</a>
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ rack.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ rack.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
@ -187,6 +179,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% include 'inc/created_updated.html' with obj=rack %}
</div> </div>
<div class="row col-md-6"> <div class="row col-md-6">
<div class="col-md-6 col-sm-6 col-xs-12"> <div class="col-md-6 col-sm-6 col-xs-12">

View File

@ -109,14 +109,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ site.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ site.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
@ -131,6 +123,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% include 'inc/created_updated.html' with obj=site %}
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -0,0 +1,3 @@
<p>
<small class="text-muted">Created {{ obj.created }} &middot; Updated <span title="{{ obj.last_updated }}">{{ obj.last_updated|timesince }}</span> ago</small>
</p>

View File

@ -77,16 +77,9 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ aggregate.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ aggregate.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=aggregate %}
</div> </div>
</div> </div>
<div class="row"> <div class="row">

View File

@ -119,16 +119,9 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ ipaddress.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ ipaddress.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=ipaddress %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{% with heading='Parent Prefixes' %} {% with heading='Parent Prefixes' %}

View File

@ -99,16 +99,10 @@
<td>IP Addresses</td> <td>IP Addresses</td>
<td><a href="{% url 'ipam:prefix_ipaddresses' pk=prefix.pk %}">{{ ipaddress_count }}</a></td> <td><a href="{% url 'ipam:prefix_ipaddresses' pk=prefix.pk %}">{{ ipaddress_count }}</a></td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ prefix.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ prefix.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=prefix %}
<br />
</div> </div>
<div class="col-md-7"> <div class="col-md-7">
{% if duplicate_prefix_table.rows %} {% if duplicate_prefix_table.rows %}

View File

@ -107,17 +107,10 @@
<span class="text-muted">N/A</span> <span class="text-muted">N/A</span>
{% endif %} {% endif %}
</td> </td>
</tr>
<tr>
<td>Created</td>
<td>{{ vlan.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ vlan.last_updated }}</td>
</tr> </tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=vlan %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -79,17 +79,10 @@
<span class="text-muted">N/A</span> <span class="text-muted">N/A</span>
{% endif %} {% endif %}
</td> </td>
</tr>
<tr>
<td>Created</td>
<td>{{ vrf.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ vrf.last_updated }}</td>
</tr> </tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=vrf %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -56,16 +56,9 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ secret.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ secret.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
{% include 'inc/created_updated.html' with obj=secret %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
{% if secret|decryptable_by:request.user %} {% if secret|decryptable_by:request.user %}

View File

@ -63,14 +63,6 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
<tr>
<td>Created</td>
<td>{{ tenant.created }}</td>
</tr>
<tr>
<td>Last Updated</td>
<td>{{ tenant.last_updated }}</td>
</tr>
</table> </table>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
@ -85,6 +77,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% include 'inc/created_updated.html' with obj=tenant %}
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="panel panel-default"> <div class="panel panel-default">

View File

@ -31,6 +31,7 @@
Edit user key Edit user key
</a> </a>
</div> </div>
{% include 'inc/created_updated.html' with obj=userkey %}
{% else %} {% else %}
<p>You don't have a user key on file.</p> <p>You don't have a user key on file.</p>
<p> <p>