mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 01:48:38 -06:00
#15908: Introduce FeatureSet dataclass for tracking release features
This commit is contained in:
parent
845888c24e
commit
954eadcdc5
@ -32,7 +32,7 @@
|
|||||||
{% trans "Overview" %}
|
{% trans "Overview" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if True or not plugin.is_local and 'commercial' not in settings.RELEASE.features %}
|
{% if not plugin.is_local and not settings.RELEASE.features.commercial %}
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" id="install-tab" data-bs-toggle="tab" data-bs-target="#install" type="button" role="tab" aria-controls="object-list" aria-selected="false">
|
<button class="nav-link" id="install-tab" data-bs-toggle="tab" data-bs-target="#install" type="button" role="tab" aria-controls="object-list" aria-selected="false">
|
||||||
{% trans "Install" %}
|
{% trans "Install" %}
|
||||||
@ -100,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if True or not plugin.is_local and 'commercial' not in settings.RELEASE.features %}
|
{% if not plugin.is_local and not settings.RELEASE.features.commercial %}
|
||||||
<div class="tab-pane" id="install" role="tabpanel" aria-labelledby="install-tab">
|
<div class="tab-pane" id="install" role="tabpanel" aria-labelledby="install-tab">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h5 class="card-header">{% trans "Local Installation Instructions" %}</h5>
|
<h5 class="card-header">{% trans "Local Installation Instructions" %}</h5>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load navigation %}
|
{% load navigation %}
|
||||||
|
|
||||||
{% if 'help-center' in settings.RELEASE.features %}
|
{% if settings.RELEASE.features.help_center %}
|
||||||
{# Help center control #}
|
{# Help center control #}
|
||||||
<a href="#" class="nav-link px-1" aria-label="{% trans "Help center" %}">
|
<a href="#" class="nav-link px-1" aria-label="{% trans "Help center" %}">
|
||||||
<i class="mdi mdi-forum-outline"></i>
|
<i class="mdi mdi-forum-outline"></i>
|
||||||
|
@ -12,13 +12,25 @@ RELEASE_PATH = 'release.yaml'
|
|||||||
LOCAL_RELEASE_PATH = 'local/release.yaml'
|
LOCAL_RELEASE_PATH = 'local/release.yaml'
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class FeatureSet:
|
||||||
|
"""
|
||||||
|
A map of all available NetBox features.
|
||||||
|
"""
|
||||||
|
# Commercial support is provided by NetBox Labs
|
||||||
|
commercial: bool = False
|
||||||
|
|
||||||
|
# Live help center is enabled
|
||||||
|
help_center: bool = False
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class ReleaseInfo:
|
class ReleaseInfo:
|
||||||
version: str
|
version: str
|
||||||
edition: str
|
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)
|
features: FeatureSet = field(default_factory=FeatureSet)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def full_version(self):
|
def full_version(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user