From 30ea2d6ab3a47c992db41a5c4422fdd8e97fcd0d Mon Sep 17 00:00:00 2001 From: Igor Nurullaev Date: Tue, 27 Aug 2019 21:48:43 +0300 Subject: [PATCH] Updated web table --- Server/static/css/main.css | 29 +++++++++++++++++++++++++++++ Server/static/js/main.js | 6 +++--- Server/templates/main.html | 13 +++++++++---- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/Server/static/css/main.css b/Server/static/css/main.css index 115df87..a84335e 100644 --- a/Server/static/css/main.css +++ b/Server/static/css/main.css @@ -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; +} \ No newline at end of file diff --git a/Server/static/js/main.js b/Server/static/js/main.js index 0c99832..a7258ec 100644 --- a/Server/static/js/main.js +++ b/Server/static/js/main.js @@ -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"}, - ] + ], }); diff --git a/Server/templates/main.html b/Server/templates/main.html index 44caa81..3da0ec6 100644 --- a/Server/templates/main.html +++ b/Server/templates/main.html @@ -9,11 +9,16 @@ -
-
-
+
+
+
+
+
+ + +
-
+