简体   繁体   English

服务器端仪表板构建(Node.JS)

[英]Serverside Dashboard buildup (Node.JS)

I´m sending some sensordata to my azure IoT-Hub and now I want to display them on different Dashboards. 我正在将一些传感器数据发送到我的天蓝色IoT-Hub,现在我想在不同的仪表板上显示它们。 To get started I used the template from a Microsoft Tutorial and it works fine: https://github.com/Azure-Samples/web-apps-node-iot-hub-data-visualization.git 首先,我使用了Microsoft教程中的模板,它可以正常工作: https : //github.com/Azure-Samples/web-apps-node-iot-hub-data-visualization.git

The only problem is, that the Dashboard only show the new data that comes in for the client. 唯一的问题是,仪表板仅显示客户端输入的新数据。 After every reload of the page (from the client side) the Dashboards are completely blank at first and then build up the data that comes up next. 每次从客户端重新加载页面后,仪表板首先完全空白,然后构建接下来要显示的数据。 (I think the client loads the script and builds the Dashboard up itself?) I load the index.html file and in the html-file are linked some js-files. (我认为客户端会加载脚本并自行构建仪表板吗?)我加载index.html文件,并且在html文件中链接了一些js文件。

My question is now if it´s possible to build up the Dashboards the whole time on the serverside in Node.js? 我的问题是,现在是否有可能在Node.js的服务器端始终构建仪表板? So if a client connects to my site, it automatically shows all saved data from my Dashboards (even from the past) 因此,如果客户端连接到我的网站,它会自动显示我的仪表盘中所有保存的数据(甚至是过去的数据)

TLTR: Can you generate data on Dashboards on the serverside and then just "mirror" the Dashboard to the Client? TLTR:您可以在服务器端的仪表板上生成数据,然后仅将仪表板“镜像”到客户端吗?

Probably you are looking for a solution with Dashboard that can show previous day data as well.If so you need to push data from IoT hub to some other storage like CosmosDB etc and built your custom dashboard on it. 也许您正在寻找一种能够同时显示前一天数据的仪表板解决方案,如果需要,则需要将数据从IoT中心推送到其他存储如CosmosDB等,并在其上构建自定义仪表板。 I had a similar requirement like that and used Azure Time Series Insights for that purpose.The API would return data to UI which has Dashboard build on Angular. 我有类似的要求,并为此使用了Azure时间序列见解.API会将数据返回到在Angular上构建了Dashboard的UI。 Have documented the same here : http://learniotwithzain.com/2019/03/near-real-time-iot-data-exploration-using-azure-time-series-insights/ 在这里已经记录了相同的内容: http : //learniotwithzain.com/2019/03/near-real-time-iot-data-exploration-using-azure-time-series-insights/

Azure Time Series Insights product has some ClientSide SDK as well. Azure Time Series Insights产品也具有一些ClientSide SDK。 Please do check the cost associated and see if this suits your requirement. 请检查相关费用,看看是否符合您的要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM