mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 09:28:39 -06:00
110 lines
4.3 KiB
Handlebars
110 lines
4.3 KiB
Handlebars
<!DOCTYPE html>
|
|
<html lang="pt-br">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="shortcut icon" href="https://evolution-api.com/files/evolution-api-favicon.png" type="image/x-icon">
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
|
|
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
|
|
<title>Instance Manager</title>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container mt-4">
|
|
<!-- Botão para abrir o modal de adicionar nova instância -->
|
|
<button class="btn btn-primary mb-3" data-toggle="modal" data-target="#actionModal" data-action="add">Nova
|
|
Instância</button>
|
|
|
|
<!-- Tabela de instâncias -->
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Nome da Instância</th>
|
|
<th>Status</th>
|
|
<th>API Key</th>
|
|
<th>Ações</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<!-- Iterando sobre as instâncias e preenchendo a tabela -->
|
|
{{#each instances}}
|
|
<tr>
|
|
<td>{{this.instance.instanceName}}</td>
|
|
<td>{{this.instance.status}}</td>
|
|
<td>{{this.instance.apikey}}</td>
|
|
<td>
|
|
<!-- Dropdown de ações para cada instância -->
|
|
<div class="dropdown">
|
|
<button class="btn btn-secondary dropdown-toggle" type="button" id="actionDropdown"
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Ações
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="actionDropdown">
|
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#actionModal"
|
|
data-action="connect">Connect</a>
|
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#actionModal"
|
|
data-action="restart">Restart</a>
|
|
<!-- Adicione mais itens de ação aqui -->
|
|
<!-- ... -->
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Modal de ações -->
|
|
<div class="modal fade" id="actionModal" tabindex="-1" role="dialog" aria-labelledby="actionModalLabel"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="actionModalLabel">Ação</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
|
|
<button type="button" class="btn btn-primary">Salvar</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
|
|
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
|
|
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
|
|
crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"
|
|
integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+"
|
|
crossorigin="anonymous"></script>
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
$('#actionModal').on('show.bs.modal', function(event) {
|
|
var button = $(event.relatedTarget);
|
|
var action = button.data('action');
|
|
|
|
console.log(action);
|
|
|
|
if (action === 'connect') {
|
|
|
|
} else if (action === 'restart') {
|
|
|
|
}
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
|
|
</html> |