Node-RED UIBuilder - Part 4 - New Data Form (Axios)

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น • 6

  • @nightmareside808
    @nightmareside808 2 ปีที่แล้ว

    Hello! Thank you for the lovely project!
    By the way, could we do this add method to add a filter to the database?
    I'm trying to sort the database by a certain filter. Successfully sent the payload from uibulder to node-red and send it to mysql node but I still confused on how to show the result on the very same page of uibulder.

    • @codemechanic2024
      @codemechanic2024  2 ปีที่แล้ว +1

      Hi thank you for your comment.
      There are two ways you can do it.
      1. you can pass parameters to GET then in Node-RED mysql , create a query with where clause. There you assign the parameters passed to where clause. This means you are filtering the result using the MySQL query. To pass parameters to GET endpoint you just add like example: localhost:5050/endpoint?username=user01. parameter username will be added as JSON object in node-red's msg.Payload.
      Note: changing the contents of items will update the table this means doing it asynchronously (using axios) will update the table without refreshing page. Of course this needs to triggered like button click.
      2. You can retrieve all the data same like the video and let bootstrap vue handle the filtering. See link: bootstrap-vue.org/docs/components/table, find the section: "Complete example" . That is a complete example of table with filter and search.
      Hope this helps.

    • @nightmareside808
      @nightmareside808 ปีที่แล้ว

      ​@@codemechanic2024 Thanks for the reply! I'm sorry for the late respond. After a several trial, It looks like what I didnt know is
      how to include it in the vue of the table.vue. Yeah, it seems I am able to do the method on a normal html page, but when I tried to do it in the vue script the script just wont show up. I have to admit that I am new to vue.js, while using this video as a head start references 😅
      Is it possible for you to add some example for the edited table.vue as well?
      I'm sorry for all of this and thank you for the awesome lesson. This is literally the only channel that bring up vue and node-red potential as a new open-source for SCADA development.

  • @danielefederico7435
    @danielefederico7435 ปีที่แล้ว

    excuse me, but the part 3 where is?

    • @codemechanic2024
      @codemechanic2024  ปีที่แล้ว

      th-cam.com/video/ca39xPYu7Xw/w-d-xo.html this is the link