@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.
Files changed (3) hide show
  1. package/app.js +1 -1
  2. package/index.js +14 -11
  3. 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
- plugin.id = 'rotevista-dash'; // Questo ID determina l'URL delle impostazioni
4
- plugin.name = 'Rotevista Dash Configuration';
5
- plugin.description = 'Configura i parametri della barca per la Dashboard';
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 Plugin Started');
9
+ app.debug('Plugin Rotevista Dash avviato con opzioni:', options);
9
10
  };
10
11
 
11
12
  plugin.stop = function () {
12
- app.debug('Rotevista Dash Plugin Stopped');
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 Terzaroli (Nodi TWS)',
31
+ title: 'Soglie Vento (Nodi TWS)',
29
32
  properties: {
30
- reef1: { type: 'number', title: '1° Mano (Arancio)', default: 15.0 },
31
- reef2: { type: 'number', title: '2° Mano (Rosso)', default: 20.0 }
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 e Stabilità',
39
+ title: 'Parametri Medie',
37
40
  properties: {
38
- longWindow: { type: 'number', title: 'Finestra Medie MEAN (millisecondi)', default: 60000 },
39
- minSpeed: { type: 'number', title: 'Velocità minima stabilità (nodi)', default: 0.5 }
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailingrotevista/rotevista-dash",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Public Wind Dashboard with navigation and course aids",
5
5
  "main": "index.js",
6
6
  "publishConfig": {