Dataforth UI push + dedup + refactor, GuruRMM roadmap evolution, Azure signing setup
Dataforth (projects/dataforth-dos/): - UI feature: row coloring + PUSH/RE-PUSH buttons + Website Status filter - Database dedup to one row per SN (2.89M -> 469K rows, UNIQUE constraint added) - Import logic handles FAIL -> PASS retest transition - Refactored upload-to-api.js to render datasheets in-memory (dropped For_Web filesystem dep) - Bulk pushed 170,984 records to Hoffman API - Statistical sanity check: 100/100 stamped SNs verified on Hoffman GuruRMM (projects/msp-tools/guru-rmm/): - ROADMAP.md: added Terminology (5-tier hierarchy), Tunnel Channels Phase 2, Logging/Audit/Observability, Multi-tenancy, Modular Architecture, Protocol Versioning, Certificates sections + Decisions Log - CONTEXT.md: hierarchy table, new anti-patterns (bootstrap sacred, no cross-module imports), revised next-steps priorities Session logs for both projects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* In-memory equivalent of what export-datasheets.js writes to
|
||||
* X:\For_Web\<SN>.TXT. Lets upload-to-api.js POST directly to Hoffman's API
|
||||
* from DB state without a filesystem intermediate.
|
||||
*
|
||||
* Returns a string (datasheet text) or null if the record cannot be rendered
|
||||
* (no specs for the model, no raw_data for VASLOG_ENG, etc.).
|
||||
*/
|
||||
const { loadAllSpecs, getSpecs } = require('../parsers/spec-reader');
|
||||
const { generateExactDatasheet } = require('../templates/datasheet-exact');
|
||||
|
||||
let _specMap = null;
|
||||
function specs() {
|
||||
if (_specMap === null) _specMap = loadAllSpecs();
|
||||
return _specMap;
|
||||
}
|
||||
|
||||
function renderContent(record) {
|
||||
if (record.log_type === 'VASLOG_ENG') {
|
||||
return record.raw_data || null;
|
||||
}
|
||||
const modelSpecs = getSpecs(specs(), record.model_number);
|
||||
if (!modelSpecs) return null;
|
||||
return generateExactDatasheet(record, modelSpecs) || null;
|
||||
}
|
||||
|
||||
module.exports = { renderContent };
|
||||
Reference in New Issue
Block a user