Merge remote-tracking branch 'origin/main' into wilm
This commit is contained in:
@@ -658,7 +658,10 @@ def _search_subnets(query):
|
||||
'id': subnet.subnetid,
|
||||
'title': f'{subnet.name} ({subnet.cidr})',
|
||||
'subtitle': subnet.description or subnet.subnettype,
|
||||
'url': f'/network',
|
||||
# the matched subnet, not the hub: searching an IP
|
||||
# already identified WHICH subnet, so landing on the
|
||||
# hub makes the reader find it again by hand
|
||||
'url': f'/networks/{subnet.subnetid}',
|
||||
'relevance': 70
|
||||
})
|
||||
except ValueError:
|
||||
@@ -779,7 +782,9 @@ def _search_notifications(query, search_term):
|
||||
'id': notif.notificationid,
|
||||
'title': notif.title,
|
||||
'subtitle': notif.notificationtype.typename if notif.notificationtype else None,
|
||||
'url': f'/notifications',
|
||||
# the notification itself, not the list it sits in: the
|
||||
# `notification-detail` route renders one by id
|
||||
'url': f'/notifications/{notif.notificationid}',
|
||||
'relevance': min(int(base_relevance), 100),
|
||||
'ticketnumber': notif.ticketnumber,
|
||||
'iscurrent': notif.is_current
|
||||
|
||||
@@ -777,6 +777,13 @@ def build_default_settings():
|
||||
# QR codes and any absolute link the app emits - and facility name shown on
|
||||
# the shopfloor dashboard. Blank site_base_url falls back to the browsing
|
||||
# origin so nothing breaks before a site configures it.
|
||||
#
|
||||
# THE SUBPATH BELONGS IN THE VALUE. Consumers append the in-app route and
|
||||
# add nothing themselves (resolveCodeText in print/assetLabel.js, buildQrUrl
|
||||
# in utils/qrTarget.js), so a site served at /shopdb must carry that here or
|
||||
# every generated link 404s. This said "scheme + host" for a while, which is
|
||||
# true only of a site mounted at the root - and the email copy of the same
|
||||
# setting has always said https://host/ops.
|
||||
sitedefaults = [
|
||||
{
|
||||
'key': 'setup_complete',
|
||||
@@ -811,7 +818,7 @@ def build_default_settings():
|
||||
'value': '',
|
||||
'valuetype': 'string',
|
||||
'category': 'site',
|
||||
'description': 'Public base URL of this site (scheme + host), e.g. https://shopdb.example.net. Used for QR codes and absolute links. Blank = use the browsing origin.'
|
||||
'description': 'Public base URL of this site INCLUDING any subpath it is served under, e.g. https://shopdb.example.net or https://host/shopdb. Consumers append the in-app route to this and add nothing themselves, so a subpath left off here produces links that 404. Blank = use the browsing origin.'
|
||||
},
|
||||
{
|
||||
'key': 'facility_name',
|
||||
|
||||
Reference in New Issue
Block a user