diff --git a/install/cws-ui/deployments.ftl b/install/cws-ui/deployments.ftl index bfffc918..46daa976 100644 --- a/install/cws-ui/deployments.ftl +++ b/install/cws-ui/deployments.ftl @@ -31,6 +31,9 @@ const refreshRateVar = "CWS_DASH_DEPLOY_REFRESH_RATE-" + username; const hideSuspendedProcVar = "CWS_DASH_DEPLOY_HIDE_SUS-" + username; + const tooltipTriggerList = document.querySelectorAll('.progress-bar[data-bs-toggle="tooltip"]') + const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl)) + //GLOBAL VARIABLES var statsVal = {}; @@ -181,13 +184,23 @@ $("#stat-bar-" + name + " div.bar-failedToStart").css('width', statsPercent.fts + '%'); $("#stat-bar-" + name + " div.bar-incident").css('width', statsPercent.incident + '%'); //set the tooltip text of each bar - $("#stat-bar-" + name + " div.bar-pending").attr('data-original-title', statsCounts.pending + " Pending"); - $("#stat-bar-" + name + " div.bar-disabled").attr('data-original-title', statsCounts.disabled + " Disabled"); - $("#stat-bar-" + name + " div.bar-active").attr('data-original-title', statsCounts.active + " Running"); - $("#stat-bar-" + name + " div.bar-completed").attr('data-original-title', statsCounts.completed + " Completed"); - $("#stat-bar-" + name + " div.bar-error").attr('data-original-title', statsCounts.error + " Failed"); - $("#stat-bar-" + name + " div.bar-failedToStart").attr('data-original-title', statsCounts.fts + " Failed to Start"); - $("#stat-bar-" + name + " div.bar-incident").attr('data-original-title', statsCounts.incident + " Incidents"); + $("#stat-bar-" + name + " div.bar-pending").attr('data-bs-title', statsCounts.pending + " Pending"); + $("#stat-bar-" + name + " div.bar-disabled").attr('data-bs-title', statsCounts.disabled + " Disabled"); + $("#stat-bar-" + name + " div.bar-active").attr('data-bs-title', statsCounts.active + " Running"); + $("#stat-bar-" + name + " div.bar-completed").attr('data-bs-title', statsCounts.completed + " Completed"); + $("#stat-bar-" + name + " div.bar-error").attr('data-bs-title', statsCounts.error + " Failed"); + $("#stat-bar-" + name + " div.bar-failedToStart").attr('data-bs-title', statsCounts.fts + " Failed to Start"); + $("#stat-bar-" + name + " div.bar-incident").attr('data-bs-title', statsCounts.incident + " Incidents"); + + // Update the tooltips + document.querySelectorAll('.progress-bar[data-bs-toggle="tooltip"]').forEach(el => { + const tooltipInstance = bootstrap.Tooltip.getInstance(el); + tooltipInstance._config.title = el.dataset.bsTitle; + tooltipInstance.update(); + }); + + + } //HANDLER FUNCTION FOR DELETING A PROCESS DEFINITION @@ -514,31 +527,31 @@ var html = `
` + `