Version 0.5.5.95: pick MeshCentral source paths from device JSON

- 🔍 button next to every mapping source path (table and new-mapping
  form) opens a dialog with the stored MeshCentral JSON of a chosen
  asset as an expandable, searchable tree; already mapped paths are
  marked, keys the path syntax cannot express are greyed out, list
  entries produce "list[].key".
- Preview evaluates the path with the row's transformation, multiple
  value mode, separator and "value if empty"/guard using the sync code.
- Coverage check across all assets with stored JSON: devices with a
  value, devices where the mapping writes a value (incl. fallbacks)
  and the most frequent results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
RolandandClaude Opus 5.5 committed 2026-11-18 21:41:02 +01:00
1 parent 40cd88871f
commit d6de4d9878
10 files changed
+723 -4

No files matched your search

+22
View File
@@ -147,4 +147,26 @@ async function startJob(url){setBusy(true);logBox.innerHTML='';offset=0;try{cons
startButton.onclick=()=>startJob('/sync/meshcentral/start');
if(dryButton)dryButton.onclick=()=>startJob('/sync/meshcentral/dry-run');
})();</script>
<div data-mesh-path-picker hidden data-assets-url="/sync/meshcentral/path-picker/assets" data-source-url="/sync/meshcentral/path-picker/source" data-preview-url="/sync/meshcentral/path-picker/preview" data-coverage-url="/sync/meshcentral/path-picker/coverage" data-open-label="{{ t('mesh.picker.open')|e }}" data-open-title="{{ t('mesh.picker.open_title')|e }}" data-mapped-label="{{ t('mesh.picker.mapped')|e }}" data-unavailable-hint="{{ t('mesh.picker.unavailable')|e }}" data-more-label="{{ t('mesh.picker.more')|e }}" data-no-matches="{{ t('mesh.picker.no_matches')|e }}" data-matches-limited="{{ t('mesh.picker.matches_limited')|e }}" data-loading="{{ t('common.loading')|e }}" data-values-label="{{ t('mesh.picker.values')|e }}" data-no-value="{{ t('mesh.picker.no_value')|e }}" data-result-label="{{ t('mesh.picker.result')|e }}" data-no-result="{{ t('mesh.picker.no_result')|e }}" data-fallback-note="{{ t('mesh.picker.fallback')|e }}" data-preview-error="{{ t('mesh.picker.preview_error')|e }}" data-coverage-summary="{{ t('mesh.picker.coverage_summary')|e }}" data-coverage-fallback="{{ t('mesh.picker.coverage_fallback')|e }}" data-coverage-top="{{ t('mesh.picker.coverage_top')|e }}" data-no-asset-match="{{ t('mesh.picker.no_asset_match')|e }}" data-no-assets="{{ t('mesh.picker.no_assets')|e }}" data-last-sync="{{ t('mesh.picker.last_sync')|e }}" data-load-error="{{ t('mesh.picker.load_error')|e }}" data-save-hint="{{ t('mesh.picker.save_hint')|e }}"></div>
<dialog id="mesh-path-picker-dialog" class="mesh-path-picker-dialog" aria-labelledby="mesh-path-picker-title">
<div class="dialog-heading"><h2 id="mesh-path-picker-title">{{ t('mesh.picker.title') }}</h2><button type="button" class="button button-secondary button-small" data-picker-cancel aria-label="{{ t('common.cancel')|e }}">✕</button></div>
<p class="muted">{{ t('mesh.picker.help') }}</p>
<div class="picker-device-row">
<label>{{ t('mesh.picker.device_search') }}<input type="search" data-picker-asset-search autocomplete="off"></label>
<label>{{ t('mesh.picker.device') }}<select data-picker-asset-select></select></label>
<span class="muted" data-picker-asset-info></span>
</div>
<label>{{ t('mesh.picker.tree_search') }}<input type="search" data-picker-tree-search autocomplete="off"></label>
<div class="picker-tree" data-picker-tree role="tree"></div>
<label>{{ t('mesh.picker.path') }}<input class="picker-path" data-picker-path autocomplete="off" spellcheck="false"></label>
<div class="picker-preview" data-picker-preview aria-live="polite"></div>
<div class="picker-coverage" data-picker-coverage aria-live="polite"></div>
<div class="form-actions">
<button type="button" class="button button-secondary" data-picker-coverage-button>📊 {{ t('mesh.picker.coverage') }}</button>
<button type="button" class="button button-secondary" data-picker-cancel>{{ t('common.cancel') }}</button>
<button type="button" class="button button-save" data-picker-apply disabled>✓ {{ t('mesh.picker.apply') }}</button>
</div>
</dialog>
<script src="/static/js/mesh-path-picker.js?v={{ application_version() }}"></script>
{% endblock %}