Skip to content

Commit 21b606d

Browse files
committed
update experimental/template
1 parent 6d792b7 commit 21b606d

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed
227 Bytes
Binary file not shown.

experimental/template/index.html

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -227,33 +227,20 @@
227227
throw new Error("Template name cannot be empty");
228228
}
229229

230-
// Get parameters from textarea
231230
const paramsText = document.getElementById("paramsInput").value;
232231
const params = JSON.parse(paramsText);
233232

234-
// Measure rendering time
235-
const startTime = performance.now();
236-
237-
// Call the WASM function with template name and parameters
238-
// Get helpers from textarea
239233
const helpersText = document.getElementById("helpersInput").value;
240234
const helpers = JSON.parse(helpersText);
241235

236+
const startTime = performance.now();
242237
const result = RenderTemplate(templateName, JSON.stringify(params), JSON.stringify(helpers));
243-
244-
// Calculate rendering time
245238
const endTime = performance.now();
246239
const renderTime = endTime - startTime;
247240

248241
try {
249-
// Parse the result JSON
250242
const files = JSON.parse(result);
251-
252-
// Calculate total size
253-
let totalSize = 0;
254-
Object.values(files).forEach(content => {
255-
totalSize += content.length;
256-
});
243+
let totalSize = result.length;
257244

258245
// Add summary information
259246
const summaryDiv = document.createElement("div");
@@ -403,7 +390,7 @@
403390
</script>
404391
</head>
405392
<body>
406-
<h1>Databricks Template Renderer</h1>
393+
<h1>Databricks Asset Bundles Template Renderer</h1>
407394
<p>Customize the parameters below and click the button to render the template.</p>
408395

409396
<div class="params-container">

0 commit comments

Comments
 (0)