Version 1.0.1 - Fix de WebMetrics et de l'édit utilisateur
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Neutral/pipeline/head This commit looks good
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Neutral/pipeline/head This commit looks good
				
			This commit is contained in:
		@@ -1221,10 +1221,16 @@ class Metric {
 | 
			
		||||
 | 
			
		||||
        const contentDiv = getID(`${this.properties.id}_content`)
 | 
			
		||||
 | 
			
		||||
        for(const data of this.data) {
 | 
			
		||||
            contentDiv.innerHTML += `<div class='metric-data'><div class='metric-data-div'><p class='metric-data-title'>${data.description}</p><p class='metric-data-id'>${data.name}</p></div><p class='metric-data-value'>Valeur : <span>${data.value}<span></p></div>`
 | 
			
		||||
    
 | 
			
		||||
        if(this.data == "ERROR") {
 | 
			
		||||
            contentDiv.innerHTML += `<p class='metric-error'>Impossible de charger les données de la métrique</p>`
 | 
			
		||||
 | 
			
		||||
        } else {
 | 
			
		||||
            for(const data of this.data) {
 | 
			
		||||
                contentDiv.innerHTML += `<div class='metric-data'><div class='metric-data-div'><p class='metric-data-title'>${data.description}</p><p class='metric-data-id'>${data.name}</p></div><p class='metric-data-value'>Valeur : <span>${data.value}<span></p></div>`
 | 
			
		||||
        
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
       
 | 
			
		||||
 | 
			
		||||
        const deleteButton = getID(`${this.properties.id}_metricpower`)
 | 
			
		||||
        
 | 
			
		||||
 
 | 
			
		||||
@@ -42,8 +42,14 @@ metrics.createWindow(() => {
 | 
			
		||||
        })
 | 
			
		||||
 | 
			
		||||
        metricsReq.then((ANS_metrics) => {
 | 
			
		||||
            console.log(ANS_metrics)
 | 
			
		||||
            if(ANS_metrics != "UNAVAILABLE") {
 | 
			
		||||
                metricsList.length = 0
 | 
			
		||||
                metricsList.length = 0 
 | 
			
		||||
                if(ANS_metrics.length == 0) {
 | 
			
		||||
                    metricsList.push(`<div style='font-size: 24px; margin-top: 180px;'  class='yellow t-center'>
 | 
			
		||||
                    <p><i class="fa-solid fa-warning"></i> Aucune WebMetrik n'a été ajoutée</p>
 | 
			
		||||
                    </div>`)
 | 
			
		||||
                }
 | 
			
		||||
                ANS_metrics.forEach((metric) => {
 | 
			
		||||
                    const metricComponent = new Metric({
 | 
			
		||||
                        properties: metric,
 | 
			
		||||
 
 | 
			
		||||
@@ -1359,4 +1359,9 @@ a {
 | 
			
		||||
  border-radius: 10px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  width: 100px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.metric-error {
 | 
			
		||||
 | 
			
		||||
  color: yellow;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user