diff --git a/src/AzureEventGridSimulator/Dashboard/app.js b/src/AzureEventGridSimulator/Dashboard/app.js index 7417e55..d178369 100644 --- a/src/AzureEventGridSimulator/Dashboard/app.js +++ b/src/AzureEventGridSimulator/Dashboard/app.js @@ -279,9 +279,9 @@ elements.emptyState.classList.add('hidden'); - elements.eventsList.innerHTML = filteredEvents + elements.eventsList.innerHTML = DOMPurify.sanitize(filteredEvents .map(event => renderEventItem(event)) - .join(''); + .join('')); // Attach click handlers elements.eventsList.querySelectorAll('.event-item').forEach(item => { @@ -303,9 +303,9 @@ elements.emptyRejectionsState.classList.add('hidden'); - elements.rejectionsList.innerHTML = filteredRejections + elements.rejectionsList.innerHTML = DOMPurify.sanitize(filteredRejections .map(rejection => renderRejectionItem(rejection)) - .join(''); + .join('')); // Attach click handlers elements.rejectionsList.querySelectorAll('.rejection-item').forEach(item => { @@ -386,7 +386,7 @@ selectedEventId = null; selectedRejectionId = null; elements.detailPanel.classList.remove('open'); - elements.detailContent.innerHTML = '

Select an event to view details

'; + elements.detailContent.innerHTML = DOMPurify.sanitize('

Select an event to view details

'); renderEventsList(); renderRejectionsList(); } @@ -447,7 +447,7 @@ ${renderDeliverySection(event.deliveries || [])} `; - elements.detailContent.innerHTML = html; + elements.detailContent.innerHTML = DOMPurify.sanitize(html); // Attach attempt toggle handlers elements.detailContent.querySelectorAll('.attempt-toggle').forEach(toggle => { @@ -505,7 +505,7 @@ ` : ''} `; - elements.detailContent.innerHTML = html; + elements.detailContent.innerHTML = DOMPurify.sanitize(html); } function renderDeliverySection(deliveries) { diff --git a/src/AzureEventGridSimulator/Dashboard/index.html b/src/AzureEventGridSimulator/Dashboard/index.html index 9238729..861c1b1 100644 --- a/src/AzureEventGridSimulator/Dashboard/index.html +++ b/src/AzureEventGridSimulator/Dashboard/index.html @@ -1,98 +1,127 @@ - - - - Azure Event Grid Simulator - Dashboard - - - -
-

Azure Event Grid Simulator

-
- - - -
-
+ + + + Azure Event Grid Simulator - Dashboard + + + +
+

Azure Event Grid Simulator

+
+ + + +
+
-
-
-
- 0 - Total Received -
-
- 0 - In History -
-
- 0 - Delivered -
-
- 0 - Failed -
-
- 0 - Pending -
-
- 0 - Rejected -
-
- 0 - Active Topics -
-
+
+
+
+ 0 + Total Received +
+
+ 0 + In History +
+
+ 0 + Delivered +
+
+ 0 + Failed +
+
+ 0 + Pending +
+
+ 0 + Rejected +
+
+ 0 + Active Topics +
+
-
-
-
- - -
- -
+
+
+
+ + +
+ +
-
-
-
📫
-

No events received yet

-

Events will appear here when they are published to the simulator.

-
-
-
+
+
+
📫
+

No events received yet

+

+ Events will appear here when they are published to + the simulator. +

+
+
+
- -
+ +
- -
+ +
- - + + +