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

Merge branch 'develop' into develop-2.9

This commit is contained in:
Jeremy Stretch
2020-07-22 17:11:35 -04:00
4 changed files with 17 additions and 3 deletions

View File

@ -0,0 +1,3 @@
# Image Attachments
Certain objects in NetBox support the attachment of uploaded images. These will be saved to the NetBox server and made available whenever the object is viewed.

View File

@ -1,5 +1,14 @@
# NetBox v2.8 # NetBox v2.8
## v2.8.9 (FUTURE)
### Bug Fixes
* [#4875](https://github.com/netbox-community/netbox/issues/4875) - Fix documentation for image attachments
* [#4876](https://github.com/netbox-community/netbox/issues/4876) - Fix labels for sites in staging or decommissioning status
---
## v2.8.8 (2020-07-21) ## v2.8.8 (2020-07-21)
### Enhancements ### Enhancements

View File

@ -260,8 +260,10 @@ class Site(ChangeLoggedModel, CustomFieldModel):
] ]
STATUS_CLASS_MAP = { STATUS_CLASS_MAP = {
SiteStatusChoices.STATUS_ACTIVE: 'success',
SiteStatusChoices.STATUS_PLANNED: 'info', SiteStatusChoices.STATUS_PLANNED: 'info',
SiteStatusChoices.STATUS_STAGING: 'primary',
SiteStatusChoices.STATUS_ACTIVE: 'success',
SiteStatusChoices.STATUS_DECOMMISSIONING: 'warning',
SiteStatusChoices.STATUS_RETIRED: 'danger', SiteStatusChoices.STATUS_RETIRED: 'danger',
} }

View File

@ -27,12 +27,12 @@ def _get_viewname(instance, action):
@register.inclusion_tag('buttons/clone.html') @register.inclusion_tag('buttons/clone.html')
def clone_button(instance): def clone_button(instance):
viewname = _get_viewname(instance, 'add') url = reverse(_get_viewname(instance, 'add'))
# Populate cloned field values # Populate cloned field values
param_string = prepare_cloned_fields(instance) param_string = prepare_cloned_fields(instance)
if param_string: if param_string:
url = '{}?{}'.format(reverse(viewname), param_string) url = f'{url}?{param_string}'
return { return {
'url': url, 'url': url,