File size: 3,412 Bytes
5813704 f95adb8 5813704 f95adb8 5813704 d059411 f95adb8 5813704 27648bc f95adb8 d059411 9cc7451 f95adb8 4ff0571 cd87846 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tabulator Example</title>
<link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script>
<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;
font-size: 28px;
}
.container {
padding: 20px;
}
#contacts-table {
margin: 0 auto;
background-color: white;
border: 1px solid #ddd;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
</style>
</head>
<body>
<h1>Контакты</h1>
<div class="container">
<div id="contacts-table"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
const apiKeySys = "<%= api_key_sys %>";
async function fetchData() {
const response = await fetch(`/data_gc_tab_out?api_sys=${apiKeySys}`);
return response.json();
}
fetchData().then(contacts => {
const table = new Tabulator("#contacts-table", {
data: contacts,
layout: "fitColumns",
columns: [
{title: "ID", field: "id", headerFilter: true},
{title: "Имя", field: "name", headerFilter: true},
{title: "Телефон", field: "phone", headerFilter: true},
{title: "Email", field: "email", headerFilter: true},
{title: "VK ID", field: "vk_id", headerFilter: true},
{title: "Chat ID", field: "chat_id", headerFilter: true},
{title: "WS Status", field: "ws_statys", headerFilter: true},
{title: "WS Stop", field: "ws_stop", headerFilter: true},
{title: "Web Status", field: "web_statys", headerFilter: true},
{title: "Fin Progress", field: "fin_progress", headerFilter: true},
{title: "Shop Status Full", field: "shop_statys_full", headerFilter: true},
{title: "PR1", field: "pr1", headerFilter: true},
{title: "PR2", field: "pr2", headerFilter: true},
{title: "PR3", field: "pr3", headerFilter: true},
{title: "PR4", field: "pr4", headerFilter: true},
{title: "PR5", field: "pr5", headerFilter: true},
{title: "Ad URL", field: "ad_url", headerFilter: true},
{title: "Curator", field: "curator", headerFilter: true}
],
});
}).catch(error => {
console.error("Error fetching data:", error);
});
});
</script>
</body>
</html>
|