mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
Merge branch 'feature' into feature-ui
This commit is contained in:
commit
4342024613
@ -48,6 +48,6 @@ class ObjectChangeTable(NetBoxTable):
|
|||||||
class Meta(NetBoxTable.Meta):
|
class Meta(NetBoxTable.Meta):
|
||||||
model = ObjectChange
|
model = ObjectChange
|
||||||
fields = (
|
fields = (
|
||||||
'pk', 'id', 'time', 'user_name', 'full_name', 'action', 'changed_object_type', 'object_repr', 'request_id',
|
'pk', 'time', 'user_name', 'full_name', 'action', 'changed_object_type', 'object_repr', 'request_id',
|
||||||
'actions',
|
'actions',
|
||||||
)
|
)
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
version: "4.1.0"
|
version: "4.1.0"
|
||||||
designation: "dev"
|
edition: Community
|
||||||
|
designation: dev
|
||||||
|
@ -42,7 +42,8 @@ Blocks:
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{# User menu (mobile view) #}
|
{# User menu (mobile view) #}
|
||||||
<div class="navbar-nav flex-row d-lg-none">
|
<div class="navbar-nav flex-row align-items-center d-lg-none">
|
||||||
|
{% plugin_navbar %}
|
||||||
{% include 'inc/light_toggle.html' %}
|
{% include 'inc/light_toggle.html' %}
|
||||||
{% include 'inc/user_menu.html' %}
|
{% include 'inc/user_menu.html' %}
|
||||||
</div>
|
</div>
|
||||||
@ -59,15 +60,10 @@ Blocks:
|
|||||||
<header class="navbar navbar-expand-md sticky-top d-none d-lg-flex d-print-none">
|
<header class="navbar navbar-expand-md sticky-top d-none d-lg-flex d-print-none">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
|
{# User menu (desktop view) #}
|
||||||
<div class="navbar-nav flex-row align-items-center order-md-last">
|
<div class="navbar-nav flex-row align-items-center order-md-last">
|
||||||
|
|
||||||
{# Plugin content #}
|
|
||||||
{% plugin_navbar %}
|
{% plugin_navbar %}
|
||||||
|
|
||||||
{# Dark/light mode toggle #}
|
|
||||||
{% include 'inc/light_toggle.html' %}
|
{% include 'inc/light_toggle.html' %}
|
||||||
|
|
||||||
{# User menu #}
|
|
||||||
{% include 'inc/user_menu.html' %}
|
{% include 'inc/user_menu.html' %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import yaml
|
import yaml
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass, field
|
||||||
from typing import Union
|
from typing import List, Union
|
||||||
|
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
|
||||||
@ -15,9 +15,10 @@ LOCAL_RELEASE_PATH = 'local/release.yaml'
|
|||||||
@dataclass
|
@dataclass
|
||||||
class ReleaseInfo:
|
class ReleaseInfo:
|
||||||
version: str
|
version: str
|
||||||
edition: str = 'Community'
|
edition: str
|
||||||
published: Union[datetime.date, None] = None
|
published: Union[datetime.date, None] = None
|
||||||
designation: Union[str, None] = None
|
designation: Union[str, None] = None
|
||||||
|
features: List = field(default_factory=list)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def full_version(self):
|
def full_version(self):
|
||||||
@ -46,11 +47,12 @@ def load_release_data():
|
|||||||
local_data = yaml.safe_load(release_file)
|
local_data = yaml.safe_load(release_file)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
local_data = {}
|
local_data = {}
|
||||||
if type(local_data) is not dict:
|
if local_data is not None:
|
||||||
raise ImproperlyConfigured(
|
if type(local_data) is not dict:
|
||||||
f"{LOCAL_RELEASE_PATH}: Local release data must be defined as a dictionary."
|
raise ImproperlyConfigured(
|
||||||
)
|
f"{LOCAL_RELEASE_PATH}: Local release data must be defined as a dictionary."
|
||||||
data.update(local_data)
|
)
|
||||||
|
data.update(local_data)
|
||||||
|
|
||||||
# Convert the published date to a date object
|
# Convert the published date to a date object
|
||||||
if 'published' in data:
|
if 'published' in data:
|
||||||
|
Loading…
Reference in New Issue
Block a user