Enforcement reports with asset context; contract 0.17.0
This commit is contained in:
@@ -1014,10 +1014,7 @@ def _attach_display_roles(facts, hostnames):
|
|||||||
|
|
||||||
ShopDB's mirror of the display-type.txt each kiosk reads at startup.
|
ShopDB's mirror of the display-type.txt each kiosk reads at startup.
|
||||||
"""
|
"""
|
||||||
try:
|
from shopdb.api import DashboardDefault
|
||||||
from shopdb.core.models.dashboarddefault import DashboardDefault
|
|
||||||
except ImportError:
|
|
||||||
return
|
|
||||||
lowered = {name.lower() for name in hostnames}
|
lowered = {name.lower() for name in hostnames}
|
||||||
for default in DashboardDefault.query.filter_by(isactive=True).all():
|
for default in DashboardDefault.query.filter_by(isactive=True).all():
|
||||||
host = (default.fqdn or '').split('.')[0].lower()
|
host = (default.fqdn or '').split('.')[0].lower()
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ from .plugins import plugin_manager
|
|||||||
# first-time write under the declared category, and lets a plugin mark a key
|
# first-time write under the declared category, and lets a plugin mark a key
|
||||||
# readable without auth for pages that run logged out. Additive optional hook,
|
# readable without auth for pages that run logged out. Additive optional hook,
|
||||||
# minor bump.
|
# minor bump.
|
||||||
__contract_version__ = '0.16.0'
|
__contract_version__ = '0.17.0'
|
||||||
|
|
||||||
# Product release version (see ADR-007). The product version and the
|
# Product release version (see ADR-007). The product version and the
|
||||||
# plugin-contract version above are distinct series with independent
|
# plugin-contract version above are distinct series with independent
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ from shopdb.core.models import (
|
|||||||
Role,
|
Role,
|
||||||
SupportTeam,
|
SupportTeam,
|
||||||
)
|
)
|
||||||
|
# Display-role mapping (which kiosk shows which surface). On the surface
|
||||||
|
# because a plugin reporting on displays has no other way to name what a
|
||||||
|
# display IS - the role lives in core, not in any plugin.
|
||||||
|
from shopdb.core.models.dashboarddefault import DashboardDefault
|
||||||
|
|
||||||
# Response + pagination helpers for plugin API blueprints
|
# Response + pagination helpers for plugin API blueprints
|
||||||
from shopdb.utils.responses import (
|
from shopdb.utils.responses import (
|
||||||
|
|||||||
Reference in New Issue
Block a user