schema + asset menu fixes
- configs/machineGroupControl.json: drop prioritypercentagecontrol mode
(unused — set.demand became unit-self-describing, so percentage-vs-absolute
is decided per-message, not by a node-wide scaling mode). Add output.process
/ output.dbase enums + functionality.distance{,Unit,Description} so the
editor's distance offset persists. Fixes the runtime warnings 'Unknown key
optimization/scaling/movement/curvePressureUnit etc.' the validator was
logging on every MGC instantiation.
- configs/measurement.json: same output.process/dbase block + nullable
position.x for the rare case a measurement has no parent yet.
- datasets/assetData/machine.json -> rotatingmachine.json: rename so
AssetMenu's softwareType lookup matches. AssetMenu.getActiveCategoryKey
no longer silently falls back to keys[0] (which mis-showed diffuser models
for rotatingMachine nodes) — returns null with a console.warn instead.
- menu/asset.js: re-derive supplier/assetType from saved model id on reopen.
The save handler intentionally discards the denormalized registry copies
to keep the persisted node small, so the cascade dropdown booted at
'Select...' even when a model was saved. Walk the registry tree to
reconstitute.
- predict/predict_class.js: minor.
- configs/index.js: minor.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -71,14 +71,22 @@ class Predict {
|
||||
// Capture share-source BEFORE config validation strips it (ConfigUtils
|
||||
// mutates the input config to drop unknown keys, which would remove
|
||||
// shareInputsFrom because it's not in predictConfig.json's schema).
|
||||
// Detach on a shallow clone so validateSchema doesn't see the key at all
|
||||
// — leaving it on the input would emit a `[interpolation] Unknown key
|
||||
// 'shareInputsFrom'` warning per group-predictor on every curve refresh.
|
||||
const _sharedSource = (config && config.shareInputsFrom instanceof Predict)
|
||||
? config.shareInputsFrom
|
||||
: null;
|
||||
let _initConfig = config;
|
||||
if (_initConfig && 'shareInputsFrom' in _initConfig) {
|
||||
_initConfig = { ..._initConfig };
|
||||
delete _initConfig.shareInputsFrom;
|
||||
}
|
||||
|
||||
// Initialize dependencies
|
||||
this.emitter = new EventEmitter(); // Own EventEmitter
|
||||
this.configUtils = new ConfigUtils(defaultConfig);
|
||||
this.config = this.configUtils.initConfig(config);
|
||||
this.config = this.configUtils.initConfig(_initConfig);
|
||||
|
||||
// Init after config is set
|
||||
this.logger = new Logger(this.config.general.logging.enabled,this.config.general.logging.logLevel, this.config.general.name);
|
||||
|
||||
Reference in New Issue
Block a user