User Tools

Site Tools


redecomep:clientes:fiocruz:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
redecomep:clientes:fiocruz:start [2025/10/07 11:29]
admin removed
redecomep:clientes:fiocruz:start [2025/11/24 19:11] (current)
paulo.cruz created
Line 1: Line 1:
 ===== FIOCRUZ ===== ===== FIOCRUZ =====
 +<​html>​
 +  <div class="​grafico-container">​
 +    <img src="​https://​librenms.dcc.ufmg.br//​graph.php?​height=100&​width=500&​id=14148&​type=port_bits&​legend=yes"/>​
 +    <div style="​font-size:​ 12px; color: #​555;">​
 +      Última atualização:​ <span class="​timestamp"></​span>​
 +    </​div>​
 +  </​div>​
 +</​html>​
  
-  * Centro de Pesquisas René Rachou + 
-    ​* ​  <​html><​a href="​https://​librenms.dcc.ufmg.br//graph.php?height=100&​width=512&id=10386&​type=port_bits&​legend=yes"​ target="​_blank"><​img ​src="​https:​//librenms.dcc.ufmg.br//graph.php?height=100&​width=512&​id=10386&​type=port_bits&​legend=yes"/></​a></​html>​+<​html>​ 
 +<script>​ 
 +  function atualizarTodosOsGraficos() { 
 +    const todosOsGraficos ​document.querySelectorAll('​.grafico-container'​);​ 
 +    const agora = new Date(); 
 +    const textoFormatado = agora.toLocaleString('​pt-BR'​);​ 
 + 
 +    todosOsGraficos.forEach(grafico ​=> { 
 +      const imagem ​grafico.querySelector('​img'​);​ 
 +      const spanTimestamp ​grafico.querySelector('​.timestamp'​);​ 
 +      const baseUrl ​imagem.src.split('?​d='​)[0];​ 
 + 
 +      ​// Remove o // duplo da URL para evitar problemas 
 +      const cleanBaseUrl = baseUrl.replace(/([^:]\/)\/+/g, "​$1"​);​ 
 +       
 +      imagem.src = cleanBaseUrl + '?d=' + agora.getTime();​ 
 +      spanTimestamp.innerHTML ​textoFormatado;​ 
 +    }); 
 +  } 
 + 
 +  ​// Espera ​página carregar completamente antes de rodar o script 
 +  document.addEventListener('​DOMContentLoaded',​ function() { 
 +      atualizarTodosOsGraficos();​ 
 +      setInterval(atualizarTodosOsGraficos,​ 10000); // 10 segundos 
 +  }); 
 +</script> 
 +</​html>​
redecomep/clientes/fiocruz/start.txt · Last modified: 2025/11/24 19:11 by paulo.cruz