Spaces:
Runtime error
Runtime error
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>Contacts</title> | |
<link href="https://unpkg.com/tabulator-tables/dist/css/tabulator.min.css" rel="stylesheet"> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
text-align: center; | |
background-color: #f0f0f0; | |
margin: 0; | |
padding: 0; | |
} | |
h1 { | |
background-color: #4CAF50; | |
color: white; | |
padding: 20px; | |
margin: 0; | |
border-bottom: 2px solid #388E3C; | |
} | |
#table { | |
width: 70%; | |
margin: 20px auto; | |
} | |
p { | |
margin-top: 20px; | |
font-size: 18px; | |
color: #333; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>База синзронизации с Getcurse</h1> | |
<p>Total users: <span id="total-users">{{ total_users }}</span></p> | |
<div id="table"></div> | |
<script src="https://unpkg.com/tabulator-tables/dist/js/tabulator.min.js"></script> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
var table = new Tabulator("#table", { | |
height: "400px", // устанавливаем высоту таблицы | |
layout: "fitColumns", // автоматически подгоняем ширину колонок | |
columns: [ | |
{title: "Имя", field: "name"}, | |
{title: "Телефон", field: "phone"}, | |
{title: "Почта", field: "email"} | |
], | |
ajaxURL: "https://dmtuit-gc-api-ras.hf.space/data_gc?api_sys=fasSd345D", // URL для загрузки данных | |
ajaxConfig: "GET" // метод запроса | |
}); | |
}); | |
document.addEventListener('DOMContentLoaded', function() { | |
var table = new Tabulator("#table", { | |
height: "400px", | |
layout: "fitColumns", | |
columns: [ | |
{title: "Имя", field: "name", headerFilter: "input"}, | |
{title: "Телефон", field: "phone", headerFilter: "input"}, | |
{title: "Почта", field: "email", headerFilter: "input"} | |
], | |
ajaxURL: "/data_gc", | |
ajaxConfig: "GET" | |
}); | |
}); | |
</script> | |
</body> | |
</html> |