IBM i Node-Red Admin Dashboard (example)

I contributed my first ever piece of open source code to GitHub for the community to enjoy. I built upon an example that IBM made available on their oss-examples on GitHub and came up with this. This was very easy to setup and can be used for a host of different things. You can have multiple tabs with charts, data, tables, etc on them. Hopefully this will encourage some people that are wanting to check out open source or specifically Node-Red on IBM i to go ahead and do just that. Most all of what you see here is driven by SQL but you are not limited to using that as your data source. Get creative and have fun!

All you need to get started is to check out my previous blog post and then visit the GitHub link below to download the .json file and follow the instructions on GitHub to import it into Node-Red.

As always if you have any questions, feel free to reach out to me!

https://github.com/thebeardedgeek/noderedexamples/tree/main/admin-dashboard

UPDATE: I forgot to mention that each component on the dashboard can be refreshed on it’s own interval. Super Cool! More on this to come…

12 Replies to “IBM i Node-Red Admin Dashboard (example)”

  • This looks really cool. I’m trying to follow instructions, but when i import the .json file, it tells me Error: Input not a JSON Array.

    If i open the .json file, i see HTML tags in it. I’m not overly familiar with JSON so not sure what exactly i would try to remove from this file
    Any ideas.

    Mike

  • Well, i figured out that problem and i have the .json file imported. I have the application deployed, it displays the dashboard, but no data for any of the functions.
    When i look at the flow the ‘Local_DB’ shows disconnected, but i don’t know how to make it connect.

    • Michael,
      Thank you for the comments. Great question! I will go back and add this into the post but for now to resolve this do the following:
      1. Double-click on the Local_DB node
      2. Click on the pencil next to the Database field
      3. Complete the Connection Name, User, Password, and Database = *LOCAL form (this user can have restricted access to the system – I would recommend setting up a node user service account for this access)
      4. Click Update
      5. Click Done
      6. Update all of the Local_DB nodes (or any other database nodes that you have with this new connection)
      7. Hit Deploy
      8. View the ui to see if data is showing now

      • Fantastic
        i’m still getting the ‘cannot read property ‘group-textColor’ of undefined’
        but it seems to be working .
        Thanks for the help.

        • I’m glad you got this working. I am not sure what the ‘cannot read property ‘group-textColor’ of undefined’ means. It everything displaying the same way it looks in the screen shot that I provided? Maybe the Work Problem section or other section is not loading properly.

      • I added the instructions on making the database connection to the GitHub repository readme.

  • i see why its not displaying, not sure how to fix
    TypeError: Cannot read property ‘Group-textColor’ of undefined at ListNode (/home/SMITHMIA/.node-red/node_modules/node-red-node-ui-list/ui_list.js:129:40)

    [DB2 for i:c79faa62.eb105] TypeError: Cannot read property ‘user’ of undefined
    19 Nov 11:30:26 – [error] [DB2 for i:Local_DB] TypeError: Cannot read property ‘user’ of undefined

  • i’m having one other issue, that i cannot figure out.
    the subsytems active is not displaying anything other than a blank table. I don’t think i screwed it up, but i suppose i could have.
    How do you debug these things?
    On the bright side, i did manage to add ‘Jobs in MSGW’ to the dashboard and it is working.

    • When you are designing the flow you can pull a debug node from the left hand side and drop it into the flow. Connect whatever node you want to debug to the left side of the debug node and then deploy or execute the node. Then click to the debug pane on the right-hand side of the Node-Red flow builder.

      You could also take the SQL statement from the first blue-gray box on the left and put it into Run SQL Scripts to see if it will execute. Depending on what version on IBM i you are running and what TR you might not have the tables available to you.

      • Thanks

        I finally got the subsystems flow to work. I ended up disabling each piece of it and then reenabling 1 piece of it at a time. After i got them all reenabled, it started working.

        This is really cool stuff but a bit overwhelming trying to figure it out.
        Maybe a more detailed walkthrough on creating flows on a follow up blog post

Comments are closed.