mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 15:13:26 +00:00
Updated web table
This commit is contained in:
@@ -5,3 +5,32 @@ html, body, .container {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
height: 100%;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.button {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.command-container {
|
||||
height: 100%;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.action-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.action-container button {
|
||||
margin: 10px;
|
||||
}
|
||||
@@ -8,11 +8,11 @@ function updateData() {
|
||||
tabledata = JSON.parse(req.response);
|
||||
}
|
||||
|
||||
var table = new Tabulator("#example-table", {
|
||||
var table = new Tabulator("#copters-table", {
|
||||
data: tabledata,
|
||||
reactiveData: true,
|
||||
layout: "fitColumns",
|
||||
columns: [ //Define Table Columns
|
||||
columns: [
|
||||
{title: "Name", field: "name"},
|
||||
{title: "IP", field: "ip"},
|
||||
{title: "Animation id", field: "anim_id"},
|
||||
@@ -20,5 +20,5 @@ var table = new Tabulator("#example-table", {
|
||||
{title: "Cell voltage", field: "cell_voltage"},
|
||||
{title: "Selfcheck", field: "selfcheck"},
|
||||
{title: "Time", field: "time"},
|
||||
]
|
||||
],
|
||||
});
|
||||
|
||||
@@ -9,11 +9,16 @@
|
||||
<script lang="js" src="/static/js/tabulator.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="table-container">
|
||||
<div id="example-table"></div>
|
||||
<div class="table-container">
|
||||
<div id="copters-table"></div>
|
||||
</div>
|
||||
<div class="command-container col">
|
||||
<div class="action-container">
|
||||
<button type="button" class="btn btn-dark">Set animation</button>
|
||||
<button type="button" class="btn btn-dark">Set configuration</button>
|
||||
<button type="button" class="btn btn-dark">Set aruco map</button>
|
||||
</div>
|
||||
<div class="command-container"></div>
|
||||
<div class="action-container"></div>
|
||||
</div>
|
||||
<script lang="js" src="/static/js/main.js"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user