Updated web table

This commit is contained in:
Igor Nurullaev
2019-08-27 21:48:43 +03:00
parent 53ee657620
commit 30ea2d6ab3
3 changed files with 41 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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"},
]
],
});