JustinB
Coder
Hello people,
I'm currently working on a project with node-red. I implemented a tabulator-table inside the dashboard-template-node and filling it with data from a mysql database.
Everything worked fine, until I tested it with a bigger database. I realized that it isn't the best way to load the whole database inside the table (it wont load the 900.000 rows). So I read the docs of tabulator and got in love with progressive loading. So I set up a script to make the database available to ajax and tried to get it working. At least the table shows up but the content isn't loading. I have a feeling theres something wrong with my syntax (never worked very much with json). Maybe you guys can see whats wrong right here.
The content of the ajax looks like this:
And the settings of the tabulator-table looks like this:
EDIT: I just noticed tabulator seems to only accept an array.

What can I do?
I'm currently working on a project with node-red. I implemented a tabulator-table inside the dashboard-template-node and filling it with data from a mysql database.
Everything worked fine, until I tested it with a bigger database. I realized that it isn't the best way to load the whole database inside the table (it wont load the 900.000 rows). So I read the docs of tabulator and got in love with progressive loading. So I set up a script to make the database available to ajax and tried to get it working. At least the table shows up but the content isn't loading. I have a feeling theres something wrong with my syntax (never worked very much with json). Maybe you guys can see whats wrong right here.
The content of the ajax looks like this:
JSON:
{"payload":[{"Register":1,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":2,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":3,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":4,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":5,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":6,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":7,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":8,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":9,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":10,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":11,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":12,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":13,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":14,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":15,"Druck":59,"Zeitstempel":"13:37:41:967"},
{"Register":16,"Druck":59,"Zeitstempel":"13:37:41:967"}]}
And the settings of the tabulator-table looks like this:
JavaScript:
var tableM = new Tabulator("#table-messungen", {
height:"1000px",
placeholder:"Keine Daten verfügbar!",
layout:"fitColumns",
//groupBy:"Zeitstempel",
//groupToggleElement:"header",
ajaxURL:"http://10.207.48.36:5555/fetch-messungen",
progressiveLoad:"load",
progressiveLoadDelay:200,
/*
initialSort:[
{column:"Zeitstempel", dir:"asc"},
],
*/
columns:[
{title:"Register", field:"payload[0].Register", width:150},
{title:"Druck (Pascal)", field:"payload[0].Druck"},
{title:"Zeitstempel", field:"payload[0].Zeitstempel"},
],
});
EDIT: I just noticed tabulator seems to only accept an array.

What can I do?
Last edited: