Commit f4e9be82 authored by Stan Hu's avatar Stan Hu

Rename Geo node JavaScript calls from html() -> text()

parent 7afe7c82
...@@ -58,16 +58,16 @@ class GeoNodeStatus { ...@@ -58,16 +58,16 @@ class GeoNodeStatus {
this.$dbReplicationLag.text('UNKNOWN'); this.$dbReplicationLag.text('UNKNOWN');
} }
this.$repositoriesSynced.html(`${status.repositories_synced_count}/${status.repositories_count} (${status.repositories_synced_in_percentage})`); this.$repositoriesSynced.text(`${status.repositories_synced_count}/${status.repositories_count} (${status.repositories_synced_in_percentage})`);
this.$repositoriesFailed.html(status.repositories_failed_count); this.$repositoriesFailed.text(status.repositories_failed_count);
this.$lfsObjectsSynced.html(`${status.lfs_objects_synced_count}/${status.lfs_objects_count} (${status.lfs_objects_synced_in_percentage})`); this.$lfsObjectsSynced.text(`${status.lfs_objects_synced_count}/${status.lfs_objects_count} (${status.lfs_objects_synced_in_percentage})`);
this.$attachmentsSynced.html(`${status.attachments_synced_count}/${status.attachments_count} (${status.attachments_synced_in_percentage})`); this.$attachmentsSynced.text(`${status.attachments_synced_count}/${status.attachments_count} (${status.attachments_synced_in_percentage})`);
const eventDate = gl.utils.formatDate(new Date(status.last_event_date)); const eventDate = gl.utils.formatDate(new Date(status.last_event_date));
const cursorDate = gl.utils.formatDate(new Date(status.cursor_last_event_date)); const cursorDate = gl.utils.formatDate(new Date(status.cursor_last_event_date));
this.$lastEventSeen.html(`${status.last_event_id} (${eventDate})`); this.$lastEventSeen.text(`${status.last_event_id} (${eventDate})`);
this.$lastCursorEvent.html(`${status.cursor_last_event_id} (${cursorDate})`); this.$lastCursorEvent.text(`${status.cursor_last_event_id} (${cursorDate})`);
if (status.health === 'Healthy') { if (status.health === 'Healthy') {
this.$health.html(''); this.$health.text('');
} else { } else {
const strippedData = $('<div>').html(`${status.health}`).text(); const strippedData = $('<div>').html(`${status.health}`).text();
this.$health.html(`<code class="geo-health">${strippedData}</code>`); this.$health.html(`<code class="geo-health">${strippedData}</code>`);
...@@ -96,11 +96,11 @@ class GeoNodeStatus { ...@@ -96,11 +96,11 @@ class GeoNodeStatus {
if (healthy) { if (healthy) {
this.$healthStatus.removeClass(unhealthyClass) this.$healthStatus.removeClass(unhealthyClass)
.addClass(healthyClass) .addClass(healthyClass)
.html('Healthy'); .text('Healthy');
} else { } else {
this.$healthStatus.removeClass(healthyClass) this.$healthStatus.removeClass(healthyClass)
.addClass(unhealthyClass) .addClass(unhealthyClass)
.html('Unhealthy'); .text('Unhealthy');
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment