Merge origin/main into wilm: reconcile endpoint agent dev with release channel
# Conflicts: # plugins/endpoints/api/routes.py
This commit is contained in:
@@ -118,6 +118,22 @@ class EndpointsPlugin(BasePlugin):
|
||||
"""
|
||||
return [
|
||||
('endpoints.view', 'View endpoint telemetry', 'endpoints'),
|
||||
# The FLEET-WIDE list and dashboards, separate from endpoints.view,
|
||||
# which covers reading ONE endpoint that the caller already reached
|
||||
# through its PC page.
|
||||
#
|
||||
# They were one permission, and that made a reasonable policy
|
||||
# impossible to express: a site that wants signed-out visitors to
|
||||
# see live status on a PC page had to hand them the whole fleet,
|
||||
# including every logged-in username on the floor, because the
|
||||
# panels and the list were gated on the same string.
|
||||
#
|
||||
# It is deliberately NOT named '.view'. guest_grantable_permissions
|
||||
# opens any '.view' or '.read' permission to the guest role, so this
|
||||
# name is what keeps the fleet roster off the public surface while
|
||||
# per-asset telemetry can still be granted.
|
||||
('endpoints.fleet',
|
||||
'View the fleet-wide endpoint list and dashboards', 'endpoints'),
|
||||
# Issue an allowlisted command to an endpoint agent (for example the
|
||||
# MTConnect toggle). Separate from endpoints.view because acting on a
|
||||
# shop-floor PC is a heavier grant than reading its telemetry.
|
||||
@@ -204,7 +220,7 @@ class EndpointsPlugin(BasePlugin):
|
||||
'icon': 'activity',
|
||||
'route': '/endpoints',
|
||||
'position': 16,
|
||||
'permission': 'endpoints.view',
|
||||
'permission': 'endpoints.fleet',
|
||||
'section': 'assets',
|
||||
},
|
||||
]
|
||||
@@ -288,10 +304,16 @@ class EndpointsPlugin(BasePlugin):
|
||||
'position': 13,
|
||||
},
|
||||
{
|
||||
'id': 'endpoints-events',
|
||||
'title': 'Recent events',
|
||||
# One feed instead of two cards. Events and commands answer the
|
||||
# same question - what happened to this box - and reading them
|
||||
# separately meant interleaving two lists by eye. Sits high on
|
||||
# the page because it is the first thing looked at when
|
||||
# something has gone wrong, and NOT collapsed by default for
|
||||
# the same reason.
|
||||
'id': 'endpoints-activity',
|
||||
'title': 'Activity',
|
||||
'assettypes': ['computer'],
|
||||
'endpoint': '/api/endpoints/asset/{assetid}/recentevents',
|
||||
'endpoint': '/api/endpoints/asset/{assetid}/activity',
|
||||
'render': 'list',
|
||||
'collapsible': True,
|
||||
'status': {
|
||||
@@ -313,12 +335,12 @@ class EndpointsPlugin(BasePlugin):
|
||||
},
|
||||
},
|
||||
'meta': [
|
||||
{'key': 'detail'},
|
||||
{'key': 'eventtime', 'label': 'At', 'format': 'date'},
|
||||
],
|
||||
},
|
||||
'empty': 'No recent events.',
|
||||
'collapsedDefault': True,
|
||||
'position': 90,
|
||||
'empty': 'Nothing recorded for this endpoint yet.',
|
||||
'position': 20,
|
||||
},
|
||||
{
|
||||
'id': 'endpoints-interfaces',
|
||||
@@ -355,7 +377,7 @@ class EndpointsPlugin(BasePlugin):
|
||||
'endpoint': '/api/endpoints/dashboard/quiet',
|
||||
'render': 'exceptions',
|
||||
'severity': 'warning',
|
||||
'permission': 'endpoints.view',
|
||||
'permission': 'endpoints.fleet',
|
||||
'empty': 'hide',
|
||||
'position': 22,
|
||||
'map': {
|
||||
@@ -373,7 +395,7 @@ class EndpointsPlugin(BasePlugin):
|
||||
'endpoint': '/api/endpoints/dashboard/stability',
|
||||
'render': 'exceptions',
|
||||
'severity': 'critical',
|
||||
'permission': 'endpoints.view',
|
||||
'permission': 'endpoints.fleet',
|
||||
'empty': 'hide',
|
||||
'position': 16,
|
||||
'map': {
|
||||
|
||||
Reference in New Issue
Block a user