@sailingrotevista/rotevista-dash 1.0.14 → 1.0.15
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/app.js +1 -1
- package/index.js +14 -11
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -80,7 +80,7 @@ async function fetchServerConfig() {
|
|
|
80
80
|
if (window.location.protocol.includes("http")) {
|
|
81
81
|
try {
|
|
82
82
|
// SignalK espone le configurazioni dei plugin a questo indirizzo
|
|
83
|
-
const response = await fetch('/plugins/rotevista-dash/settings');
|
|
83
|
+
const response = await fetch('/signalk/v1/plugins/rotevista-dash/settings');
|
|
84
84
|
if (response.ok) {
|
|
85
85
|
const serverConfig = await response.json();
|
|
86
86
|
|
package/index.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
module.exports = function (app) {
|
|
2
2
|
const plugin = {};
|
|
3
|
-
|
|
4
|
-
plugin.
|
|
5
|
-
plugin.
|
|
3
|
+
|
|
4
|
+
plugin.id = 'rotevista-dash'; // ID univoco per il plugin
|
|
5
|
+
plugin.name = 'Rotevista Dash Config';
|
|
6
|
+
plugin.description = 'Impostazioni centralizzate per la Dashboard Rotevista';
|
|
6
7
|
|
|
7
8
|
plugin.start = function (options, restartServer) {
|
|
8
|
-
app.debug('Rotevista Dash
|
|
9
|
+
app.debug('Plugin Rotevista Dash avviato con opzioni:', options);
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
plugin.stop = function () {
|
|
12
|
-
app.debug('Rotevista Dash
|
|
13
|
+
app.debug('Plugin Rotevista Dash fermato');
|
|
13
14
|
};
|
|
14
15
|
|
|
16
|
+
// Schema conforme alla doc di SignalK per generare la UI
|
|
15
17
|
plugin.schema = {
|
|
16
18
|
type: 'object',
|
|
19
|
+
title: 'Configurazione Barca',
|
|
17
20
|
properties: {
|
|
18
21
|
alarms: {
|
|
19
22
|
type: 'object',
|
|
@@ -25,18 +28,18 @@ module.exports = function (app) {
|
|
|
25
28
|
},
|
|
26
29
|
graphs: {
|
|
27
30
|
type: 'object',
|
|
28
|
-
title: 'Soglie
|
|
31
|
+
title: 'Soglie Vento (Nodi TWS)',
|
|
29
32
|
properties: {
|
|
30
|
-
reef1: { type: 'number', title: '1° Mano
|
|
31
|
-
reef2: { type: 'number', title: '2° Mano
|
|
33
|
+
reef1: { type: 'number', title: 'Soglia Arancio (1° Mano)', default: 15.0 },
|
|
34
|
+
reef2: { type: 'number', title: 'Soglia Rossa (2° Mano)', default: 20.0 }
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
averages: {
|
|
35
38
|
type: 'object',
|
|
36
|
-
title: 'Medie
|
|
39
|
+
title: 'Parametri Medie',
|
|
37
40
|
properties: {
|
|
38
|
-
longWindow: { type: 'number', title: 'Finestra Medie
|
|
39
|
-
minSpeed: { type: 'number', title: 'Velocità
|
|
41
|
+
longWindow: { type: 'number', title: 'Finestra Medie LUNGHE (ms)', default: 60000 },
|
|
42
|
+
minSpeed: { type: 'number', title: 'Velocità Minima Stabilità (kts)', default: 0.5 }
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
}
|