@7365admin1/layer-common 4.97.1-staging.638 → 4.97.1-staging.639
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
id="alerts"
|
|
10
10
|
:steps="[
|
|
11
11
|
'Turn on Send phone notifications. Leave the roles empty to tell everyone who can see CCTV events at this site, or choose roles to tell only them.',
|
|
12
|
-
'
|
|
12
|
+
'Type the objects that matter (e.g. person, car). Only these are saved in Events and raise alerts. Empty means every object.',
|
|
13
13
|
'Optional: limit to zones or cameras, and set quiet hours. Then press Save alert settings.',
|
|
14
14
|
]"
|
|
15
15
|
results="Alerts appear in Events marked Alert. With Send phone notifications on, people also get a notification with the picture."
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div>
|
|
4
4
|
<p class="hero-muted mt-0 mb-2">
|
|
5
|
-
|
|
6
|
-
and the time. Use the boxes to narrow the list, then press Search. Click a row to see the photo and details.
|
|
5
|
+
What you set up to be saved, newest first: matching people and vehicles (see Alerts), watch-list plates, known faces and
|
|
6
|
+
smart detection results, each with a photo and the time. Use the boxes to narrow the list, then press Search. Click a row to see the photo and details.
|
|
7
7
|
</p>
|
|
8
8
|
<v-row dense>
|
|
9
9
|
<v-col cols="6" sm="4" md="3"><v-text-field v-model="f.camera" label="Camera" density="comfortable" hide-details clearable /></v-col>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<div>
|
|
9
9
|
<p class="hero-muted mt-0">
|
|
10
|
-
Set up the steps below once.
|
|
11
|
-
|
|
10
|
+
Set up the steps below once. Only what you set up is saved: it appears in <strong>Events</strong> with a photo, and the
|
|
11
|
+
people you choose get a phone notification. Nothing set up = nothing saved.
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<v-progress-linear v-if="loading" indeterminate class="mb-3" />
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.97.1-staging.
|
|
5
|
+
"version": "4.97.1-staging.639",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|
package/utils/cctv-engine.ts
CHANGED
|
@@ -493,7 +493,7 @@ export function setupSteps(input: {
|
|
|
493
493
|
can: (perm: TCctvPermission) => boolean;
|
|
494
494
|
faceEnabled: boolean;
|
|
495
495
|
engines: { status?: string; name?: string }[] | null;
|
|
496
|
-
alertSettings: { notifyRoles?: string[]; notifyGuards?: boolean; labels?: string[] } | null;
|
|
496
|
+
alertSettings: { notifyRoles?: string[]; notifyGuards?: boolean; labels?: string[]; zones?: string[]; cameras?: string[]; createIncident?: boolean } | null;
|
|
497
497
|
classifiers: TClassifier[] | null;
|
|
498
498
|
plates: number | null;
|
|
499
499
|
faces: number | null;
|
|
@@ -525,19 +525,22 @@ export function setupSteps(input: {
|
|
|
525
525
|
const a = input.alertSettings;
|
|
526
526
|
// Server rule (core onAlert / NotificationService.cctvAlert): the `notifyGuards` switch turns phone notifications on;
|
|
527
527
|
// they go to everyone at the site holding cctv-engine:view-events, or only to `notifyRoles` when some are chosen.
|
|
528
|
+
// Server rules (core keepEvent / onAlert): only objects matching what is set up here are saved; `notifyGuards`
|
|
529
|
+
// turns phone notifications on, for everyone with cctv-engine:view-events or only `notifyRoles` when chosen.
|
|
528
530
|
const roles = a?.notifyRoles?.length ?? 0;
|
|
529
531
|
const told = a?.notifyGuards === true;
|
|
530
|
-
const
|
|
531
|
-
const
|
|
532
|
+
const setUp = !!(a && (a.labels?.length || a.zones?.length || a.cameras?.length || told || a.createIncident));
|
|
533
|
+
const what = a?.labels?.length ? a.labels.join(", ") : "every object";
|
|
534
|
+
const who = roles ? `people in ${plural(roles, "role", "roles")}` : "everyone who can see CCTV events";
|
|
532
535
|
steps.push({
|
|
533
536
|
key: "alerts",
|
|
534
|
-
title: "
|
|
535
|
-
what: "Choose who gets a phone notification with the picture
|
|
536
|
-
state: a === null || !
|
|
537
|
+
title: "What to save and who to tell",
|
|
538
|
+
what: "Choose which objects (e.g. person, car) are saved in Events, and who gets a phone notification with the picture.",
|
|
539
|
+
state: a === null || !setUp ? "attention" : told ? "done" : "attention",
|
|
537
540
|
now:
|
|
538
541
|
a === null ? unread
|
|
539
|
-
: !
|
|
540
|
-
:
|
|
542
|
+
: !setUp ? "Nothing set up yet, so no people or vehicles are being saved."
|
|
543
|
+
: `Saving: ${what}. ${told ? `Phone notification to ${who}.` : "Phone notifications are off."}`,
|
|
541
544
|
section: "alerts",
|
|
542
545
|
action: "Set up alerts",
|
|
543
546
|
});
|
|
@@ -601,7 +604,7 @@ export function setupSteps(input: {
|
|
|
601
604
|
|
|
602
605
|
/** Where each kind of result appears. `query` pre-fills the Events filters. */
|
|
603
606
|
export const RESULT_PLACES: { title: string; body: string; section: TCctvSection; query?: Record<string, string>; needs: TCctvPermission }[] = [
|
|
604
|
-
{ title: "Everything
|
|
607
|
+
{ title: "Everything saved", body: "What you set up: matching people and vehicles, watch-list plates, known faces and smart detection results, newest first, each with a photo.", section: "events", needs: CCTV_PERMISSIONS.viewEvents },
|
|
605
608
|
{ title: "Alerts only", body: "The events that raised an alert. With phone notifications on, people were also told on their phones.", section: "events", query: { severity: "alert" }, needs: CCTV_PERMISSIONS.viewEvents },
|
|
606
609
|
{ title: "Smart detection results", body: "What your smart detections saw (e.g. rubbish), with the photo and time.", section: "events", query: { kind: "classification" }, needs: CCTV_PERMISSIONS.viewEvents },
|
|
607
610
|
{ title: "Find a past moment", body: "Describe it in words, e.g. person in orange shirt, and pick the dates.", section: "search", needs: CCTV_PERMISSIONS.viewEvents },
|