@signalk/freeboard-sk 2.13.1 → 2.14.0
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.
- package/CHANGELOG.md +29 -0
- package/package.json +3 -2
- package/plugin/alarms/alarms.js +24 -19
- package/plugin/index.js +0 -40
- package/public/3rdpartylicenses.txt +28 -0
- package/public/{852.e15741f1d2b68244.js → 852.f44ac7e36ef8ff50.js} +1 -1
- package/public/assets/help/img/alarms.png +0 -0
- package/public/assets/help/img/anchor_watch.png +0 -0
- package/public/assets/help/img/anchor_watch_2.png +0 -0
- package/public/assets/help/img/anchor_watch_3.png +0 -0
- package/public/assets/help/index.html +123 -88
- package/public/assets/img/alarms/mob.svg +68 -0
- package/public/assets/img/atons/basestation.svg +59 -0
- package/public/assets/img/atons/real-aton.svg +78 -0
- package/public/assets/img/atons/real-danger.svg +144 -0
- package/public/assets/img/atons/real-east.svg +67 -0
- package/public/assets/img/atons/real-north.svg +67 -0
- package/public/assets/img/atons/real-port.svg +85 -0
- package/public/assets/img/atons/real-safe.svg +76 -0
- package/public/assets/img/atons/real-south.svg +67 -0
- package/public/assets/img/atons/real-special.svg +59 -0
- package/public/assets/img/atons/real-starboard.svg +73 -0
- package/public/assets/img/atons/real-west.svg +67 -0
- package/public/assets/img/atons/virtual-aton.svg +81 -0
- package/public/assets/img/atons/virtual-danger.svg +166 -0
- package/public/assets/img/atons/virtual-east.svg +70 -0
- package/public/assets/img/atons/virtual-north.svg +73 -0
- package/public/assets/img/atons/virtual-port.svg +85 -0
- package/public/assets/img/atons/virtual-safe.svg +87 -0
- package/public/assets/img/atons/virtual-south.svg +70 -0
- package/public/assets/img/atons/virtual-special.svg +65 -0
- package/public/assets/img/atons/virtual-starboard.svg +79 -0
- package/public/assets/img/atons/virtual-west.svg +70 -0
- package/public/assets/img/ob/alarm-abandon.svg +4 -0
- package/public/assets/img/ob/alarm-acknowledged-iec.svg +5 -0
- package/public/assets/img/ob/alarm-aground.svg +4 -0
- package/public/assets/img/ob/alarm-arrival.svg +4 -0
- package/public/assets/img/ob/alarm-cpa.svg +64 -0
- package/public/assets/img/ob/alarm-depth.svg +9 -0
- package/public/assets/img/ob/alarm-emergency-iec.svg +3 -0
- package/public/assets/img/ob/alarm-fire.svg +3 -0
- package/public/assets/img/ob/alarm-silenced-iec.svg +7 -0
- package/public/assets/img/ob/alarm-unack-iec.svg +7 -0
- package/public/assets/img/ob/alert-list.svg +9 -0
- package/public/assets/img/ob/alerts-active.svg +3 -0
- package/public/assets/img/ob/sound-high-fill.svg +5 -0
- package/public/assets/img/ob/sound-off-fill.svg +6 -0
- package/public/assets/img/ob/sound-unavailable-fill.svg +4 -0
- package/public/assets/img/ob/warning-acknowledged-iec.svg +5 -0
- package/public/assets/img/ob/warning-rectified-iec.svg +4 -0
- package/public/assets/img/ob/warning-silenced-iec.svg +7 -0
- package/public/assets/img/ob/warning-unack-iec.svg +6 -0
- package/public/assets/img/poi/fuel.svg +67 -0
- package/public/assets/img/poi/navigation-structure.svg +54 -0
- package/public/assets/img/poi/tunnel.svg +52 -0
- package/public/assets/img/poi/waterway-guage.svg +64 -0
- package/public/index.html +2 -2
- package/public/main.9037b6c388247b8e.js +1 -0
- package/public/runtime.6aa83b1321328ad0.js +1 -0
- package/public/{styles.aa8e03875149efa4.css → styles.d4b33102dd9d01a6.css} +1 -1
- package/public/assets/help/img/ackalarms.png +0 -0
- package/public/assets/help/img/buddy.png +0 -0
- package/public/assets/help/img/closest_approach.png +0 -0
- package/public/assets/img/alarms/abandon.png +0 -0
- package/public/assets/img/alarms/adrift.png +0 -0
- package/public/assets/img/alarms/anchor.png +0 -0
- package/public/assets/img/alarms/arrivalCircleEntered.png +0 -0
- package/public/assets/img/alarms/collision.png +0 -0
- package/public/assets/img/alarms/cpa.png +0 -0
- package/public/assets/img/alarms/depth.png +0 -0
- package/public/assets/img/alarms/fire.png +0 -0
- package/public/assets/img/alarms/flooding.png +0 -0
- package/public/assets/img/alarms/grounding.png +0 -0
- package/public/assets/img/alarms/listing.png +0 -0
- package/public/assets/img/alarms/mob.png +0 -0
- package/public/assets/img/alarms/piracy.png +0 -0
- package/public/assets/img/alarms/sinking.png +0 -0
- package/public/assets/img/aton.png +0 -0
- package/public/assets/img/aton_basestation.png +0 -0
- package/public/assets/img/gpx.png +0 -0
- package/public/assets/img/gpx_black.png +0 -0
- package/public/main.cfa032b5b0d70c12.js +0 -1
- package/public/runtime.de5013e09a888d20.js +0 -1
- /package/public/assets/img/ob/{alarm-pob.svg → alarm-mob.svg} +0 -0
- /package/public/assets/img/{marker-green.png → waypoints/marker-green.png} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# CHANGELOG: Freeboard
|
|
2
2
|
|
|
3
|
+
### v2.14.0
|
|
4
|
+
|
|
5
|
+
#### Deprecated: Local PyPilot support.
|
|
6
|
+
`pypilot-autopilot-provider` plugin now required!
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
- **New**: Alert list to display and manage alerts and raise alarms.
|
|
11
|
+
|
|
12
|
+
- **Fixed**: Raised alarms do not include identifier in path. (#261)
|
|
13
|
+
- **Fixed**: Track list not displaying tracks when filer text is undefined. (#262)
|
|
14
|
+
- **Fixed**: Export to GPX dialog formatting. (#263)
|
|
15
|
+
- **Fixed**: Re-ordered map layers. (#265)
|
|
16
|
+
- **Added**: Additional CEVNI icons. (#264)
|
|
17
|
+
|
|
18
|
+
### v2.13.2
|
|
19
|
+
|
|
20
|
+
- **Added**: Data loading progress indicator. (#240)
|
|
21
|
+
- **Added**: Ability to edit waypoint coordinates in details dialog. (#238)
|
|
22
|
+
- **Added**: Additional operating modes for anchor watch. (#248)
|
|
23
|
+
- **Change**: Main menu style / layout. (#243)
|
|
24
|
+
- **Change**: CSS style of links in note descriptions. (#245)
|
|
25
|
+
- **Change**: Track list layout. (#251)
|
|
26
|
+
- **Fixed**: Read-only flag not respected by Region Details dialog and formatting. (#244, #258)
|
|
27
|
+
- **Fixed**: "Navigate To" not correctly determining pointer location on IOS devices. (#241)
|
|
28
|
+
- **Fixed**: Heading up setting sometimes not applied at startup. (#254)
|
|
29
|
+
- **Fixed**: Regions not being fetched after initial app load. (#256)
|
|
30
|
+
- **Fixed**: Route point drag / drop re-ordering.
|
|
31
|
+
|
|
3
32
|
### v2.13.1
|
|
4
33
|
|
|
5
34
|
- **Change**: `Load GPX` and `Load GeoJSON` menu options have been combined as `Import` option in the Resource Layers menu.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalk/freeboard-sk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Openlayers chart plotter implementation for Signal K",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"signalk-webapp",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@signalk/server-api": "^2.3.0",
|
|
43
43
|
"socket.io-client": "^4.6.0",
|
|
44
|
-
"tslib": "^2.0.0"
|
|
44
|
+
"tslib": "^2.0.0",
|
|
45
|
+
"uuid": "^11.1.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@angular-devkit/build-angular": "^18.1.0",
|
package/plugin/alarms/alarms.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initAlarms = void 0;
|
|
4
4
|
const server_api_1 = require("@signalk/server-api");
|
|
5
|
+
const uuid = require("uuid");
|
|
5
6
|
const STANDARD_ALARMS = [
|
|
6
7
|
'mob',
|
|
7
8
|
'fire',
|
|
@@ -12,7 +13,8 @@ const STANDARD_ALARMS = [
|
|
|
12
13
|
'listing',
|
|
13
14
|
'adrift',
|
|
14
15
|
'piracy',
|
|
15
|
-
'abandon'
|
|
16
|
+
'abandon',
|
|
17
|
+
'aground'
|
|
16
18
|
];
|
|
17
19
|
let server;
|
|
18
20
|
let pluginId;
|
|
@@ -40,16 +42,16 @@ const initAlarmEndpoints = () => {
|
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
42
44
|
try {
|
|
45
|
+
const id = uuid.v4();
|
|
43
46
|
const msg = req.body.message
|
|
44
47
|
? req.body.message
|
|
45
48
|
: req.params.alarmType;
|
|
46
|
-
const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}`, {
|
|
49
|
+
const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}.${id}`, Object.assign({
|
|
47
50
|
message: msg,
|
|
48
51
|
method: [server_api_1.ALARM_METHOD.sound, server_api_1.ALARM_METHOD.visual],
|
|
49
|
-
state: server_api_1.ALARM_STATE.emergency
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
res.status(200).json(r);
|
|
52
|
+
state: server_api_1.ALARM_STATE.emergency
|
|
53
|
+
}, buildAlarmData()));
|
|
54
|
+
res.status(r.statusCode).json(Object.assign(r, { id: id }));
|
|
53
55
|
}
|
|
54
56
|
catch (e) {
|
|
55
57
|
res.status(400).json({
|
|
@@ -59,7 +61,7 @@ const initAlarmEndpoints = () => {
|
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
});
|
|
62
|
-
server.post(`${ALARM_API_PATH}/:alarmType/silence`, (req, res) => {
|
|
64
|
+
server.post(`${ALARM_API_PATH}/:alarmType/:id/silence`, (req, res) => {
|
|
63
65
|
server.debug(`** ${req.method} ${req.path}`);
|
|
64
66
|
if (!STANDARD_ALARMS.includes(req.params.alarmType)) {
|
|
65
67
|
res.status(200).json({
|
|
@@ -70,14 +72,14 @@ const initAlarmEndpoints = () => {
|
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
74
|
try {
|
|
73
|
-
const al = server.getSelfPath(`notifications.${req.params.alarmType}`);
|
|
75
|
+
const al = server.getSelfPath(`notifications.${req.params.alarmType}.${req.params.id}`);
|
|
74
76
|
if (al && al.value) {
|
|
75
77
|
server.debug('Alarm value....');
|
|
76
78
|
if (al.value.method && al.value.method.includes('sound')) {
|
|
77
79
|
server.debug('Alarm has sound... silence!!!');
|
|
78
|
-
al.value.method = al.value.method.filter(
|
|
79
|
-
const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}`, al.value);
|
|
80
|
-
res.status(
|
|
80
|
+
al.value.method = al.value.method.filter(i => i !== 'sound');
|
|
81
|
+
const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}.${req.params.id}`, al.value);
|
|
82
|
+
res.status(r.statusCode).json(r);
|
|
81
83
|
}
|
|
82
84
|
else {
|
|
83
85
|
server.debug('Alarm has no sound... no action required.');
|
|
@@ -89,7 +91,7 @@ const initAlarmEndpoints = () => {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
else {
|
|
92
|
-
throw new Error(`Alarm (${req.params.alarmType}) has no value or was not found!`);
|
|
94
|
+
throw new Error(`Alarm (${req.params.alarmType}.${req.params.id}) has no value or was not found!`);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
catch (e) {
|
|
@@ -100,19 +102,19 @@ const initAlarmEndpoints = () => {
|
|
|
100
102
|
});
|
|
101
103
|
}
|
|
102
104
|
});
|
|
103
|
-
server.delete(`${ALARM_API_PATH}/:alarmType`, (req, res, next) => {
|
|
105
|
+
server.delete(`${ALARM_API_PATH}/:alarmType/:id`, (req, res, next) => {
|
|
104
106
|
server.debug(`** ${req.method} ${ALARM_API_PATH}/${req.params.alarmType}`);
|
|
105
107
|
if (!STANDARD_ALARMS.includes(req.params.alarmType)) {
|
|
106
108
|
next();
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
111
|
try {
|
|
110
|
-
const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}`, {
|
|
112
|
+
const r = handleAlarm('vessels.self', `notifications.${req.params.alarmType}.${req.params.id}`, {
|
|
111
113
|
message: '',
|
|
112
114
|
method: [],
|
|
113
115
|
state: server_api_1.ALARM_STATE.normal
|
|
114
116
|
});
|
|
115
|
-
res.status(
|
|
117
|
+
res.status(r.statusCode).json(r);
|
|
116
118
|
}
|
|
117
119
|
catch (e) {
|
|
118
120
|
res.status(400).json({
|
|
@@ -128,10 +130,13 @@ const handleV1PutRequest = (context, path, value, cb) => {
|
|
|
128
130
|
};
|
|
129
131
|
const buildAlarmData = () => {
|
|
130
132
|
const pos = server.getSelfPath('navigation.position');
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
timestamp: new Date().toISOString()
|
|
133
|
+
const r = {
|
|
134
|
+
createdAt: new Date().toISOString()
|
|
134
135
|
};
|
|
136
|
+
if (pos) {
|
|
137
|
+
r.position = pos.value;
|
|
138
|
+
}
|
|
139
|
+
return r;
|
|
135
140
|
};
|
|
136
141
|
const handleAlarm = (context, path, value) => {
|
|
137
142
|
server.debug(`context: ${context}`);
|
|
@@ -147,7 +152,7 @@ const handleAlarm = (context, path, value) => {
|
|
|
147
152
|
};
|
|
148
153
|
}
|
|
149
154
|
const pa = path.split('.');
|
|
150
|
-
const alarmType = pa[
|
|
155
|
+
const alarmType = pa[1];
|
|
151
156
|
server.debug(`alarmType: ${JSON.stringify(alarmType)}`);
|
|
152
157
|
if (STANDARD_ALARMS.includes(alarmType)) {
|
|
153
158
|
server.debug(`****** Sending Delta (Std Alarm Notification): ******`);
|
package/plugin/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const alarms_1 = require("./alarms/alarms");
|
|
4
4
|
const weather_service_1 = require("./weather/weather-service");
|
|
5
|
-
const pypilot_1 = require("./autopilot/pypilot");
|
|
6
5
|
const openapi = require("./openApi.json");
|
|
7
6
|
const defaultPollInterval = 60;
|
|
8
7
|
const CONFIG_SCHEMA = {
|
|
@@ -39,29 +38,6 @@ const CONFIG_SCHEMA = {
|
|
|
39
38
|
description: 'Select the interval at which the weather service is polled.'
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
},
|
|
43
|
-
pypilot: {
|
|
44
|
-
type: 'object',
|
|
45
|
-
title: 'PyPilot.',
|
|
46
|
-
description: 'PyPilot host connection settings.',
|
|
47
|
-
properties: {
|
|
48
|
-
enable: {
|
|
49
|
-
type: 'boolean',
|
|
50
|
-
default: false,
|
|
51
|
-
title: 'Enable PyPilot',
|
|
52
|
-
description: ' '
|
|
53
|
-
},
|
|
54
|
-
host: {
|
|
55
|
-
type: 'string',
|
|
56
|
-
title: 'Host name / address',
|
|
57
|
-
default: 'localhost'
|
|
58
|
-
},
|
|
59
|
-
port: {
|
|
60
|
-
type: 'number',
|
|
61
|
-
title: 'Port number',
|
|
62
|
-
default: 8000
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
41
|
}
|
|
66
42
|
}
|
|
67
43
|
};
|
|
@@ -98,11 +74,6 @@ module.exports = (server) => {
|
|
|
98
74
|
apiVersion: 3,
|
|
99
75
|
apiKey: '',
|
|
100
76
|
pollInterval: defaultPollInterval
|
|
101
|
-
},
|
|
102
|
-
pypilot: {
|
|
103
|
-
enable: false,
|
|
104
|
-
host: 'localhost',
|
|
105
|
-
port: 8000
|
|
106
77
|
}
|
|
107
78
|
};
|
|
108
79
|
// ******** REQUIRED PLUGIN DEFINITION *******
|
|
@@ -145,14 +116,6 @@ module.exports = (server) => {
|
|
|
145
116
|
enable: true
|
|
146
117
|
};
|
|
147
118
|
settings.alarms.enable = true;
|
|
148
|
-
settings.pypilot = options.pypilot ?? {
|
|
149
|
-
enable: false,
|
|
150
|
-
host: 'localhost',
|
|
151
|
-
port: 8000
|
|
152
|
-
};
|
|
153
|
-
settings.pypilot.enable = options.pypilot.enable ?? false;
|
|
154
|
-
settings.pypilot.host = options.pypilot.host ?? 'localhost';
|
|
155
|
-
settings.pypilot.port = options.pypilot.port ?? 8000;
|
|
156
119
|
server.debug(`Applied config: ${JSON.stringify(settings)}`);
|
|
157
120
|
if (settings.alarms.enable) {
|
|
158
121
|
(0, alarms_1.initAlarms)(server, plugin.id);
|
|
@@ -162,8 +125,6 @@ module.exports = (server) => {
|
|
|
162
125
|
msg = `Started - Providing: weather`;
|
|
163
126
|
(0, weather_service_1.initWeather)(server, plugin.id, settings.weather);
|
|
164
127
|
}
|
|
165
|
-
// *** DEPRECATED ***
|
|
166
|
-
(0, pypilot_1.initPyPilot)(server, plugin.id, settings.pypilot);
|
|
167
128
|
server.setPluginStatus(msg);
|
|
168
129
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
130
|
}
|
|
@@ -178,7 +139,6 @@ module.exports = (server) => {
|
|
|
178
139
|
const doShutdown = () => {
|
|
179
140
|
server.debug('** shutting down **');
|
|
180
141
|
(0, weather_service_1.stopWeather)();
|
|
181
|
-
(0, pypilot_1.closePyPilot)();
|
|
182
142
|
server.debug('** Un-subscribing from events **');
|
|
183
143
|
const msg = 'Stopped';
|
|
184
144
|
server.setPluginStatus(msg);
|
|
@@ -198,6 +198,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
198
198
|
SOFTWARE.
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
@signalk/server-api
|
|
202
|
+
Apache-2.0
|
|
203
|
+
|
|
204
|
+
baconjs
|
|
205
|
+
MIT
|
|
206
|
+
The MIT License
|
|
207
|
+
|
|
208
|
+
Copyright (c) 2017 Juha Paananen
|
|
209
|
+
|
|
210
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
211
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
212
|
+
in the Software without restriction, including without limitation the rights
|
|
213
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
214
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
215
|
+
furnished to do so, subject to the following conditions:
|
|
216
|
+
|
|
217
|
+
The above copyright notice and this permission notice shall be included in
|
|
218
|
+
all copies or substantial portions of the Software.
|
|
219
|
+
|
|
220
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
221
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
222
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
223
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
224
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
225
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
226
|
+
THE SOFTWARE.
|
|
227
|
+
|
|
228
|
+
|
|
201
229
|
base64-js
|
|
202
230
|
MIT
|
|
203
231
|
The MIT License (MIT)
|