@yarkivaev/scada 2.5.3 → 2.5.5
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/README.md +8 -0
- package/package.json +1 -1
- package/src/application/deploy/expand.js +1 -0
- package/src/application/deploy/releaseValues.js +5 -1
- package/src/application/deploy/releases.js +1 -0
- package/src/application/siteServer.js +1 -1
- package/src/application/supervisorSink.js +2 -1
- package/src/infrastructure/http/plant/routes/stateRoute.js +1 -1
package/README.md
CHANGED
|
@@ -580,6 +580,14 @@ servers:
|
|
|
580
580
|
|
|
581
581
|
This changes the selected server only; it does not mutate the shared profile.
|
|
582
582
|
|
|
583
|
+
The optional `mdmesh` module projects `chart` settings into `releases(...).scada.mdmesh`,
|
|
584
|
+
with its explicit `namespace` and `enabled` (default `true`) taking precedence.
|
|
585
|
+
It uses the same profile inheritance and server overrides. A consuming application
|
|
586
|
+
owns the MDMesh chart and deployment; the generic application chart does not install it.
|
|
587
|
+
An optional root `hmi` catalog passes through reading, includes, expansion, and release
|
|
588
|
+
projection as `releases(...).hmi` without interpretation. Catalog validation belongs
|
|
589
|
+
to the consuming application.
|
|
590
|
+
|
|
583
591
|
### Central backup freshness
|
|
584
592
|
|
|
585
593
|
Silent Modbus backup sources use `MX210/<device>` freshness identities. AMQP telemetry tracks `<source-family>/<device>`, so cooling for a device cannot hide missing MX210 electrical samples. Measurement topic paths are unchanged. Custom freshness callbacks must pass the source’s full identity to `seen()`.
|
package/package.json
CHANGED
|
@@ -41,6 +41,7 @@ export default function expand(document) {
|
|
|
41
41
|
assertProfiles(document.servers || [], profiles);
|
|
42
42
|
const servers = expandServers(document.servers || [], paths, document.mappings || {});
|
|
43
43
|
return frozen({
|
|
44
|
+
...(document.hmi !== undefined && { hmi: document.hmi }),
|
|
44
45
|
mappings: document.mappings || {},
|
|
45
46
|
namespace,
|
|
46
47
|
profiles,
|
|
@@ -23,6 +23,10 @@ function bindOne(name, spec, secret) {
|
|
|
23
23
|
if (name === 'telemetry_store') {
|
|
24
24
|
return ['clickhouse', { enabled: spec.enabled !== false }];
|
|
25
25
|
}
|
|
26
|
+
if (name === 'mdmesh') {
|
|
27
|
+
return ['mdmesh', { ...spec.chart, ...(spec.namespace !== undefined && { namespace: spec.namespace }),
|
|
28
|
+
enabled: spec.enabled !== false }];
|
|
29
|
+
}
|
|
26
30
|
throw new Error(`system document has no module ${name}`);
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -31,7 +35,7 @@ function bindOne(name, spec, secret) {
|
|
|
31
35
|
*
|
|
32
36
|
* @param {object} profile - server profile
|
|
33
37
|
* @param {string|undefined} secret - state-store Secret name
|
|
34
|
-
* @returns {object} postgres, rabbitmq, and
|
|
38
|
+
* @returns {object} postgres, rabbitmq, clickhouse, and mdmesh fragments
|
|
35
39
|
* @example
|
|
36
40
|
* bindModules({ modules: { telemetry_store: { enabled: true } } }, 'pg');
|
|
37
41
|
*/
|
|
@@ -110,6 +110,7 @@ export default function releases(document, cluster) {
|
|
|
110
110
|
const profile = profileFor(expanded, host);
|
|
111
111
|
assertHeld(expanded, links);
|
|
112
112
|
return frozen({
|
|
113
|
+
...(expanded.hmi !== undefined && { hmi: expanded.hmi }),
|
|
113
114
|
...(profile.target && { target: profile.target }),
|
|
114
115
|
apps: passedApps(profile),
|
|
115
116
|
scada: scadaRelease(expanded, host, profile, links)
|
|
@@ -120,7 +120,7 @@ function siteExtraRoutes(catalog, extraRoutes, syncRoutes) {
|
|
|
120
120
|
*/
|
|
121
121
|
export default async function siteServer(config) {
|
|
122
122
|
const env = collectionEnvironment(config);
|
|
123
|
-
const sink = supervisorSink(env);
|
|
123
|
+
const sink = supervisorSink(env, { stateData: config.stateData });
|
|
124
124
|
const ops = bindSiteOperations(sink, config.kindSources || config.operationSources);
|
|
125
125
|
const http = edgeApi(sink.dataAccess, {
|
|
126
126
|
port: sink.apiPort,
|
|
@@ -97,7 +97,8 @@ export default function supervisorSink(env = process.env, options = {}) {
|
|
|
97
97
|
if (cfg.pipeline.transactions.enabled) { cfg.pipeline.onBatch = segmentBatchStats(cfg.pipeline.transactions.statsIntervalMs); }
|
|
98
98
|
const pool = holdClient(new pg.Pool({ connectionString: cfg.postgres, max: cfg.dbPoolMax }));
|
|
99
99
|
const metricsEnabled = cfg.sinkDbProfile === 'edge';
|
|
100
|
-
const
|
|
100
|
+
const data = stateDataFromPool(pool, { metricsEnabled });
|
|
101
|
+
const dataAccess = options.stateData ? options.stateData(data, pool) : data;
|
|
101
102
|
return {
|
|
102
103
|
health: () => {return health.status()},
|
|
103
104
|
apiPort: cfg.apiPort,
|