Skip to content
Snippets Groups Projects
Commit 72d91100 authored by Benedikt's avatar Benedikt
Browse files

added valide DCC example

parent 1317df50
No related branches found
No related tags found
No related merge requests found
Pipeline #52713 passed
Source diff could not be displayed: it is too large. Options to address this: view the blob.
{
"name": "dccviewer-js",
"version": "0.1.1",
"version": "0.1.3",
"description": "A JS application for displaying digital calibration certificates.",
"main": "dist/dccviewer-js.bundle.js",
"files": [
......
import { parseString } from 'xml2js';
import { renderMeasurementResults } from './renderers/MeasurementRenderer.js';
import { renderAdminData } from './renderers/AdminRenderer.js';
import { version } from '../package.json';
import { EventEmitter } from 'events';
if (typeof window.EventEmitter !== 'function') {
......@@ -15,8 +15,9 @@ export function init(xmlStr, options = {}) {
console.error('No container found with id', containerId);
return;
}
appContainer.innerHTML = '<div id="disclaimer" style="background:orangered; color:#000; padding:8px; margin-bottom:10px; font-family: sans-serif; font-weight:bold;">This is a proof of concept and contains missing fields and errors. It is not for production use.</div>';
appContainer.innerHTML = `<div id="disclaimer" style="background:orangered; color:#000; padding:8px; margin-bottom:10px; font-family: sans-serif; font-weight:bold;">
This is a proof of concept and contains missing fields and errors. It is not for production use. dcc-viewer-js Version ${version}
</div>`;
// Parse the XML string first
const cleanXmlStr = xmlStr.trim();
console.log("Clean XML string:", cleanXmlStr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment