File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ socket.on('data', function(data) {
1919 // console.log("Message received " + data.message);
2020 var decodedData = JSON . parse ( data . message ) ;
2121
22-
2322 if ( ElementExists ( decodedData . device ) ) {
2423 // table exists
2524 // console.log ("table exists: " + decodedData.device);
@@ -41,9 +40,18 @@ socket.on('data', function(data) {
4140 } else {
4241 // no table, create one
4342 console . log ( "creating table: " + decodedData . device ) ;
43+ var div = document . createElement ( "div" ) ;
44+ div . className = "row well " ;
45+ var div2 = document . createElement ( "div" ) ;
46+ var title = document . createElement ( "h4" ) ;
47+ title . innerHTML = decodedData . device ;
4448 var tbl = document . createElement ( "TABLE" ) ;
4549 tbl . id = decodedData . device ;
46- document . getElementById ( "tables" ) . appendChild ( tbl ) ;
50+
51+ document . getElementById ( "tables" ) . appendChild ( div ) ;
52+ div . appendChild ( div2 ) ;
53+ div2 . appendChild ( title ) ;
54+ div2 . appendChild ( tbl )
4755 }
4856
4957 // print the time the refresh happened
Original file line number Diff line number Diff line change @@ -7,8 +7,7 @@ block content
77
88 div.container
99 div.row
10- div.col-md-12.well
11- #tables
10+ #tables
1211
1312 div.row
1413 div.col-md-6
You can’t perform that action at this time.
0 commit comments