112 lines
4.9 KiB
JavaScript
112 lines
4.9 KiB
JavaScript
|
|
function setupItGuysServices(Data_Center) {
|
|
Data_Center.Ser_Itguys.Gerador_de_arquivos_telefonia = createService({
|
|
nome: 'Configurador de Telefonia',
|
|
imagem: '../../Acessts/Imagens/Iconis/chamada-telefonica.png',
|
|
id_server: 'serv_gat_1',
|
|
resposta_popup: createTelefoniaForm(),
|
|
resposta_script: '../js/Ambiente/Service/List/Gerador_XML_Telefonia.js',
|
|
resposta_estilo: generateTelefoniaStyles()
|
|
});
|
|
}
|
|
|
|
function createTelefoniaForm() {
|
|
return `
|
|
<form id="form" class='control'>
|
|
<div class='formulario'>
|
|
<h2>Preencha o Formulario</h2>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="mac_equipamento">MAC Equipamento:</label>
|
|
<input type="text" id="mac_equipamento" name="mac_equipamento" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="nome_cliente">Nome do Cliente:</label>
|
|
<input type="text" id="nome_cliente" name="nome_cliente" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="nome_setor">Nome do Setor:</label>
|
|
<input type="text" id="nome_setor" name="nome_setor" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="usuario_sip">Usuário SIP:</label>
|
|
<input type="text" id="usuario_sip" name="usuario_sip" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="senha_sip">Senha SIP:</label>
|
|
<input type="password" id="senha_sip" name="senha_sip" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<button type="button" onclick="gerarArquivo()">Gerar Arquivo</button>
|
|
</div>
|
|
</form>`;
|
|
}
|
|
|
|
function generateTelefoniaStyles() {
|
|
return `.control { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
|
|
.formulario { width: 80%; display: flex; flex-direction: column; animation: surgirpopup 0.8s ease; }
|
|
@keyframes surgirpopup { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(40vw); } }
|
|
.formulario input { border: none; outline: none; background: none; background-color: var(--Matriz); border: 0.2vw solid var(--Cor_Segundaria_2_1); box-shadow: 5px 5px 0px 2px var(--Cor_Segundaria_2_2); font-family: var(--font_titulo); font-size: 0.9vw; color: var(--Cor_Segundaria_2_1); padding-left: 1vw; padding-right: 1vw; width: 100%; height: 3vh; }
|
|
.formulario label { font-family: var(--font_titulo); font-size: 1vw; color: var(--Matriz); }
|
|
.formulario button { border: none; outline: none; background: none; font-family: var(--font_titulo); font-size: 1vw; color: var(--Matriz); background-color: #c6c6c6; box-shadow: -5px 5px 0px #9a9a9a; transition: 1s ease; width: 8vw; height: 4vh; }
|
|
.formulario button:hover { background-color: var(--Cor_Segundaria_2_1); box-shadow: 5px 5px 0px var(--Cor_Segundaria_2_2); }
|
|
.formulario h2 { font-family: var(--font_titulo); text-align: center; font-size: 2vw; color: var(--Matriz); }`;
|
|
}
|
|
|
|
function setupUserServices(Data_Center) {
|
|
Data_Center.Ser_User.resetar_senha = createService({
|
|
nome: 'Resetar senha',
|
|
imagem: '../../Acessts/Imagens/Iconis/ferramentas.png',
|
|
id_server: 'serv_gat_2',
|
|
resposta_popup: createFormeZabix(),
|
|
resposta_script: `../js/page/Ambiente/Service/List/teste.js`,
|
|
resposta_estilo: `document.body.style.backgroundColor = '#f0f0f0';`
|
|
});
|
|
}
|
|
|
|
|
|
function createFormeZabix() {
|
|
return `
|
|
<form id="form" class='control'>
|
|
<div class='formulario'>
|
|
<h2>Preencha o Formulario</h2>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="mac_equipamento">MAC Equipamento:</label>
|
|
<input type="text" id="mac_equipamento" name="mac_equipamento" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="nome_cliente">Nome do Cliente:</label>
|
|
<input type="text" id="nome_cliente" name="nome_cliente" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="nome_setor">Nome do Setor:</label>
|
|
<input type="text" id="nome_setor" name="nome_setor" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="usuario_sip">Usuário SIP:</label>
|
|
<input type="text" id="usuario_sip" name="usuario_sip" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<label for="senha_sip">Senha SIP:</label>
|
|
<input type="password" id="senha_sip" name="senha_sip" required><br>
|
|
</div>
|
|
<div class='formulario'>
|
|
<button type="button" onclick="gerarArquivo()">Gerar Arquivo</button>
|
|
</div>
|
|
</form>`;
|
|
}
|
|
|
|
|
|
|
|
|
|
function createService({ nome, imagem, id_server, resposta_popup, resposta_script, resposta_estilo }) {
|
|
return {
|
|
nome,
|
|
Imagem: imagem,
|
|
id_server,
|
|
resposta_popup,
|
|
resposta_script,
|
|
resposta_estilo
|
|
};
|
|
} |