feat(modal): add rollout telemetry foundation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,8 +63,20 @@
|
||||
var currentUuid = config.currentUuid || '';
|
||||
var pollTimer = null;
|
||||
var shouldPoll = false;
|
||||
var telemetry = window.AksrtModalTelemetry;
|
||||
var telemetryId = '';
|
||||
|
||||
function open() { modal.classList.add('is-open'); modal.setAttribute('aria-hidden', 'false'); document.body.style.overflow = 'hidden'; }
|
||||
function telemetryMark(event) {
|
||||
if (telemetry && telemetryId && typeof telemetry.mark === 'function') telemetry.mark(telemetryId, event);
|
||||
}
|
||||
|
||||
function open() {
|
||||
telemetryId = telemetry && typeof telemetry.start === 'function' ? telemetry.start('identity') : '';
|
||||
modal.classList.add('is-open');
|
||||
modal.setAttribute('aria-hidden', 'false');
|
||||
document.body.style.overflow = 'hidden';
|
||||
telemetryMark('shell');
|
||||
}
|
||||
function close() { modal.classList.remove('is-open'); modal.setAttribute('aria-hidden', 'true'); document.body.style.overflow = ''; }
|
||||
root.querySelectorAll('[data-auth-modal-open]').forEach(function (button) { button.addEventListener('click', open); });
|
||||
modal.querySelectorAll('[data-auth-modal-close]').forEach(function (button) { button.addEventListener('click', close); });
|
||||
@@ -80,6 +92,7 @@
|
||||
|
||||
function render(data) {
|
||||
if (!data) return;
|
||||
telemetryMark('first-content');
|
||||
currentUuid = data.uuid || currentUuid;
|
||||
if (statusBox) statusBox.hidden = false;
|
||||
if (createForm) createForm.hidden = true;
|
||||
@@ -102,6 +115,7 @@
|
||||
} else {
|
||||
stopPolling();
|
||||
}
|
||||
telemetryMark('ready');
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
|
||||
Reference in New Issue
Block a user