From bf0e08ed9d11fa7ea143b04999a141d8ba4a3747 Mon Sep 17 00:00:00 2001 From: "daivid.alves" Date: Wed, 2 Oct 2024 17:36:33 -0300 Subject: [PATCH] =?UTF-8?q?Atualiza=C3=A7=C3=A3o=206=20-=20Alihamentos=20f?= =?UTF-8?q?inais=20do=20ambiente=20do=20usu=C3=A1rio.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ambiente_Usuario_copy.html | 1 + html/Ambiente_Usuario copy.html | 80 +++---------------- html/Home.html | 15 ++++ html/Monitoramento.html | 17 ++++ html/Tela_home/Home_page.html | 30 ------- html/{ => arquivos_extras}/Erro.html | 0 html/{ => arquivos_extras}/Teste_Grafico.html | 0 .../Teste_graficos_dinamicos.html | 0 html/{ => arquivos_extras}/algo.html | 0 html/{ => arquivos_extras}/construindo.html | 0 .../gerenciarDominios.html | 0 html/{ => arquivos_extras}/tela_lode.html | 0 .../Config/Estrutural_config}/config.js | 0 .../Estrutural_config}/construtor_config.js | 0 .../Ambiente/Estrutura/Estrutura_Primaria.js | 8 +- .../Ambiente/Estrutura/Reacao_menu.js | 0 js/Ambiente/Estrutura/load.js | 72 +++++++++++++++++ .../Estrutura_Secundaria_Monitor.js | 2 +- 18 files changed, 119 insertions(+), 106 deletions(-) create mode 100644 html/Home.html create mode 100644 html/Monitoramento.html delete mode 100644 html/Tela_home/Home_page.html rename html/{ => arquivos_extras}/Erro.html (100%) rename html/{ => arquivos_extras}/Teste_Grafico.html (100%) rename html/{ => arquivos_extras}/Teste_graficos_dinamicos.html (100%) rename html/{ => arquivos_extras}/algo.html (100%) rename html/{ => arquivos_extras}/construindo.html (100%) rename html/{ => arquivos_extras}/gerenciarDominios.html (100%) rename html/{ => arquivos_extras}/tela_lode.html (100%) rename {html => js/Ambiente/Config/Estrutural_config}/config.js (100%) rename {html => js/Ambiente/Config/Estrutural_config}/construtor_config.js (100%) rename html/padrao.js => js/Ambiente/Estrutura/Estrutura_Primaria.js (93%) rename html/Reação_menu.js => js/Ambiente/Estrutura/Reacao_menu.js (100%) create mode 100644 js/Ambiente/Estrutura/load.js rename html/Monitor.js => js/Ambiente/Monitoramento/Estrutura_Secundaria_Monitor.js (93%) diff --git a/Ambiente_Usuario_copy.html b/Ambiente_Usuario_copy.html index 70c557c..bbc47b2 100644 --- a/Ambiente_Usuario_copy.html +++ b/Ambiente_Usuario_copy.html @@ -10,6 +10,7 @@ + Ambiente do Usuario diff --git a/html/Ambiente_Usuario copy.html b/html/Ambiente_Usuario copy.html index 655bd8b..6751671 100644 --- a/html/Ambiente_Usuario copy.html +++ b/html/Ambiente_Usuario copy.html @@ -2,93 +2,31 @@ + Ambiente de teste + + + + - Ambiente de teste - -
- +
- - - - - + + - \ No newline at end of file diff --git a/html/Home.html b/html/Home.html new file mode 100644 index 0000000..34aa0ac --- /dev/null +++ b/html/Home.html @@ -0,0 +1,15 @@ + + + + + + + Document + + + + +

Aqui serão apresentandos os resumos das interfaces

+ + + \ No newline at end of file diff --git a/html/Monitoramento.html b/html/Monitoramento.html new file mode 100644 index 0000000..b532a5a --- /dev/null +++ b/html/Monitoramento.html @@ -0,0 +1,17 @@ + + + + + + + Monitoramento + + + + + +

Aqui vão aparecer os graficos do influx e do Zabix

+ + + + \ No newline at end of file diff --git a/html/Tela_home/Home_page.html b/html/Tela_home/Home_page.html deleted file mode 100644 index 0aaf626..0000000 --- a/html/Tela_home/Home_page.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - Document - - - - -
- - - -
- -
- -
- - - \ No newline at end of file diff --git a/html/Erro.html b/html/arquivos_extras/Erro.html similarity index 100% rename from html/Erro.html rename to html/arquivos_extras/Erro.html diff --git a/html/Teste_Grafico.html b/html/arquivos_extras/Teste_Grafico.html similarity index 100% rename from html/Teste_Grafico.html rename to html/arquivos_extras/Teste_Grafico.html diff --git a/html/Teste_graficos_dinamicos.html b/html/arquivos_extras/Teste_graficos_dinamicos.html similarity index 100% rename from html/Teste_graficos_dinamicos.html rename to html/arquivos_extras/Teste_graficos_dinamicos.html diff --git a/html/algo.html b/html/arquivos_extras/algo.html similarity index 100% rename from html/algo.html rename to html/arquivos_extras/algo.html diff --git a/html/construindo.html b/html/arquivos_extras/construindo.html similarity index 100% rename from html/construindo.html rename to html/arquivos_extras/construindo.html diff --git a/html/gerenciarDominios.html b/html/arquivos_extras/gerenciarDominios.html similarity index 100% rename from html/gerenciarDominios.html rename to html/arquivos_extras/gerenciarDominios.html diff --git a/html/tela_lode.html b/html/arquivos_extras/tela_lode.html similarity index 100% rename from html/tela_lode.html rename to html/arquivos_extras/tela_lode.html diff --git a/html/config.js b/js/Ambiente/Config/Estrutural_config/config.js similarity index 100% rename from html/config.js rename to js/Ambiente/Config/Estrutural_config/config.js diff --git a/html/construtor_config.js b/js/Ambiente/Config/Estrutural_config/construtor_config.js similarity index 100% rename from html/construtor_config.js rename to js/Ambiente/Config/Estrutural_config/construtor_config.js diff --git a/html/padrao.js b/js/Ambiente/Estrutura/Estrutura_Primaria.js similarity index 93% rename from html/padrao.js rename to js/Ambiente/Estrutura/Estrutura_Primaria.js index 1ffb97a..9c4da6b 100644 --- a/html/padrao.js +++ b/js/Ambiente/Estrutura/Estrutura_Primaria.js @@ -84,7 +84,7 @@ if (autenteticação == true) { + '
' + - '
' + '
' + '

Home

' + @@ -112,7 +112,7 @@ if (autenteticação == true) { + '
' + - '
' + '
' + '
' + @@ -120,11 +120,11 @@ if (autenteticação == true) { ; const script1 = document.createElement('script'); - script1.src = './Reação_menu.js'; + script1.src = '../js/Ambiente/Estrutura/Reacao_menu.js'; document.body.appendChild(script1); const script2 = document.createElement('script'); - script2.src = './Monitor.js'; + script2.src = '../js/Ambiente/Monitoramento/Estrutura_Secundaria_Monitor.js'; document.body.appendChild(script2); } else { diff --git a/html/Reação_menu.js b/js/Ambiente/Estrutura/Reacao_menu.js similarity index 100% rename from html/Reação_menu.js rename to js/Ambiente/Estrutura/Reacao_menu.js diff --git a/js/Ambiente/Estrutura/load.js b/js/Ambiente/Estrutura/load.js new file mode 100644 index 0000000..e7aaf61 --- /dev/null +++ b/js/Ambiente/Estrutura/load.js @@ -0,0 +1,72 @@ +document.addEventListener("DOMContentLoaded", function () { + var main = document.getElementById("entrada_1"); + + // Verificar se a tag main está vazia + if (main.innerHTML.trim() === "") { + + const tela_laod = document.getElementById('entrada_1'); + + tela_laod.innerHTML = ''; + + const canvas = document.getElementById('animationCanvas'); + const ctx = canvas.getContext('2d'); + + // Define canvas dimensions + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + + const circle = { + centerX: canvas.width / 2, + centerY: canvas.height / 2, + radius: 150, // Raio do caminho circular + rotationSpeed: 0.02, + angle: 0, + linePath: [], // Para armazenar a trajetória + maxPathLength: 350 // Limite para o comprimento da trajetória + }; + + function drawCircularPath() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + + // Adiciona o ponto da trajetória atual ao caminho + const pathX = circle.centerX + circle.radius * Math.cos(circle.angle); + const pathY = circle.centerY + circle.radius * Math.sin(circle.angle); + circle.linePath.push({ x: pathX, y: pathY }); + + // Desenha a trajetória acumulada + ctx.beginPath(); + for (let i = 0; i < circle.linePath.length - 1; i++) { + ctx.moveTo(circle.linePath[i].x, circle.linePath[i].y); + ctx.lineTo(circle.linePath[i + 1].x, circle.linePath[i + 1].y); + } + ctx.strokeStyle = '#22c0a3'; + ctx.lineWidth = 10; + ctx.stroke(); + + // Limita o comprimento da trajetória e reinicia a trajetória quando necessário + if (circle.linePath.length > circle.maxPathLength) { + circle.linePath.shift(); // Remove o primeiro ponto do caminho + if (circle.angle >= Math.PI * 2) { // Completa um ciclo + circle.angle = 0; // Reinicia o ângulo + circle.linePath = []; // Limpa a trajetória + } + } + } + + function animate() { + circle.angle += circle.rotationSpeed; + drawCircularPath(); + requestAnimationFrame(animate); + } + + animate(); + + // Ajusta o tamanho do canvas quando a janela é redimensionada + window.addEventListener('resize', () => { + canvas.width = window.innerWidth; + canvas.height = window.innerHeight; + circle.centerX = canvas.width / 2; + circle.centerY = canvas.height / 2; + }); + } +}); \ No newline at end of file diff --git a/html/Monitor.js b/js/Ambiente/Monitoramento/Estrutura_Secundaria_Monitor.js similarity index 93% rename from html/Monitor.js rename to js/Ambiente/Monitoramento/Estrutura_Secundaria_Monitor.js index 8205b4e..dd7b7bf 100644 --- a/html/Monitor.js +++ b/js/Ambiente/Monitoramento/Estrutura_Secundaria_Monitor.js @@ -7,7 +7,7 @@ if (visuMonitor == true) { + '