agent-trace 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-trace.cjs +7 -6
- package/package.json +1 -1
package/agent-trace.cjs
CHANGED
|
@@ -24239,16 +24239,17 @@ function renderDashboardHtml(options = {}) {
|
|
|
24239
24239
|
}
|
|
24240
24240
|
|
|
24241
24241
|
function escapeHtml(value) {
|
|
24242
|
+
var DQ = String.fromCharCode(34);
|
|
24242
24243
|
return String(value)
|
|
24243
24244
|
.replaceAll("&", "&")
|
|
24244
24245
|
.replaceAll("<", "<")
|
|
24245
24246
|
.replaceAll(">", ">")
|
|
24246
|
-
.replaceAll(
|
|
24247
|
+
.replaceAll(DQ, """)
|
|
24247
24248
|
.replaceAll("'", "'");
|
|
24248
24249
|
}
|
|
24249
24250
|
|
|
24250
24251
|
function setReplayPlaceholder(message) {
|
|
24251
|
-
replayBody.innerHTML =
|
|
24252
|
+
replayBody.innerHTML = '<tr><td colspan="5">' + escapeHtml(message) + '</td></tr>';
|
|
24252
24253
|
}
|
|
24253
24254
|
|
|
24254
24255
|
function renderSessionReplay(session) {
|
|
@@ -24329,7 +24330,7 @@ function renderDashboardHtml(options = {}) {
|
|
|
24329
24330
|
|
|
24330
24331
|
function renderSessions(sessions) {
|
|
24331
24332
|
if (!Array.isArray(sessions) || sessions.length === 0) {
|
|
24332
|
-
sessionsBody.innerHTML =
|
|
24333
|
+
sessionsBody.innerHTML = '<tr><td colspan="6">No sessions yet.</td></tr>';
|
|
24333
24334
|
sessionsMetric.textContent = "0";
|
|
24334
24335
|
costMetric.textContent = "$0.00";
|
|
24335
24336
|
latestMetric.textContent = "-";
|
|
@@ -24348,9 +24349,9 @@ function renderDashboardHtml(options = {}) {
|
|
|
24348
24349
|
+ "<td>" + escapeHtml(repo) + "</td>"
|
|
24349
24350
|
+ "<td>" + escapeHtml(formatDate(session.startedAt)) + "</td>"
|
|
24350
24351
|
+ "<td>" + escapeHtml(formatMoney(cost)) + "</td>"
|
|
24351
|
-
+
|
|
24352
|
+
+ '<td><button type="button" class="replay-button" data-session-id="'
|
|
24352
24353
|
+ escapeHtml(session.sessionId)
|
|
24353
|
-
+ "
|
|
24354
|
+
+ '">View</button></td>'
|
|
24354
24355
|
+ "</tr>";
|
|
24355
24356
|
}).join("");
|
|
24356
24357
|
sessionsBody.innerHTML = rows;
|
|
@@ -24390,7 +24391,7 @@ function renderDashboardHtml(options = {}) {
|
|
|
24390
24391
|
status.classList.remove("error");
|
|
24391
24392
|
status.textContent = "Data source connected.";
|
|
24392
24393
|
} catch (error) {
|
|
24393
|
-
sessionsBody.innerHTML =
|
|
24394
|
+
sessionsBody.innerHTML = '<tr><td colspan="6">Failed to load sessions.</td></tr>';
|
|
24394
24395
|
status.classList.add("error");
|
|
24395
24396
|
status.textContent = String(error);
|
|
24396
24397
|
}
|