Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Mermaid in Markdown #643

Closed
ctanno opened this issue Mar 5, 2024 · 0 comments · Fixed by #748
Closed

Dynamic Mermaid in Markdown #643

ctanno opened this issue Mar 5, 2024 · 0 comments · Fixed by #748
Assignees
Labels
bug Something isn't working size:S - 2 Sizing estimation point

Comments

@ctanno
Copy link

ctanno commented Mar 5, 2024

Description

This is mentioned on: https://discourse.nodered.org/t/dynamic-mermaid-in-markdown/86151

Im trying to use the dynamic Mermaid function to get our user some more information about the state of the machine.

What i'm trying to achieve looks like:
c52a5975c304142ee39cdc8575f08475d0b597fe_2_391x500

However if change the page( other page in the dashboard) or deploy i end up with
d6fd0f0c99e49f9373126a3668bfda6fbc9b12e6

If i press then F5 i get the result i shared above.

Workflow to reproduce:

  • open Dashboard
  • Mermaid loads correct
  • open Other Page from Menu
  • open Page Home from Menu
  • Mermaid fails
  • Press F5
  • _Mermaid loads correct

f5c8c6c27001dc56010c6b30794c3bb9c176a33f

2e493403ba8f2c525d3b33ccf596ed5ea2af3794

[ { "id": "ab49282181c8c397", "type": "ui-markdown", "z": "520e94a25e7b10ea", "group": "9614977e4849f0e2", "name": "", "order": 0, "width": 0, "height": 0, "content": "# Overview\n```mermaid\n{{ msg.payload }}\n```\n\n", "className": "", "x": 690, "y": 560, "wires": [ [] ] }, { "id": "563062f8a24a42bb", "type": "inject", "z": "520e94a25e7b10ea", "name": "", "props": [ { "p": "dut1", "v": "0.75", "vt": "num" }, { "p": "topic", "vt": "str" } ], "repeat": "5", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "x": 170, "y": 560, "wires": [ [ "1c71554f81e9c2e7" ] ] }, { "id": "10029222fc7aa3b3", "type": "template", "z": "520e94a25e7b10ea", "name": "", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "flowchart TD\n vc(((Vacuum Chamber)))\n dut1((DUT1 <br/> U: {{global.Dut1Voltage}} ))\n dut2((DUT2 <br/> U: {{global.Dut2Voltage}} ))\n dut3((DUT3 <br/> U: {{global.Dut3Voltage}} ))\n dut4((DUT4 <br/> U: {{global.Dut4Voltage}} ))\n dut5((DUT5 <br/> U: {{global.Dut5Voltage}} ))\n mfc\n turbo((turbo))\n pendulum\n inline\n bypass\n rootPump(rootpump)\n \n dut1 --- vc\n dut2 --- vc\n dut3 --- vc\n dut4 --- vc\n dut5 --- vc\n vc --- pendulum\n pendulum --- turbo\n turbo --- inline\n inline --- rootPump\n bypass --- rootPump\n vc --- bypass\n\n vc --- mfc\n\n", "output": "str", "x": 500, "y": 560, "wires": [ [ "ab49282181c8c397" ] ] }, { "id": "1c71554f81e9c2e7", "type": "function", "z": "520e94a25e7b10ea", "name": "set Dut1", "func": "if (msg.dut1 != null){\n global.set(\"Dut1Voltage\", msg.dut1);\n return [ msg ];\n\n} \n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "if (global.get(\"Dut1Voltage\") === undefined) {\n global.set(\"Dut1Voltage\", 0.0)\n}", "finalize": "", "libs": [], "x": 320, "y": 600, "wires": [ [ "10029222fc7aa3b3" ] ] }, { "id": "573fa16e5c889ba3", "type": "inject", "z": "520e94a25e7b10ea", "name": "", "props": [ { "p": "dut1", "v": "1.5", "vt": "num" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "x": 170, "y": 660, "wires": [ [ "1c71554f81e9c2e7" ] ] }, { "id": "9614977e4849f0e2", "type": "ui-group", "name": "Bastelbereich", "page": "f65a7107e6d35ffb", "width": "6", "height": "1", "order": -1, "showTitle": true, "className": "", "visible": "true", "disabled": "false" }, { "id": "f65a7107e6d35ffb", "type": "ui-page", "name": "Home", "ui": "9a08a70171034e49", "path": "/", "icon": "", "layout": "grid", "theme": "2f45c2be539b2d4f", "order": -1, "className": "", "visible": true, "disabled": false }, { "id": "9a08a70171034e49", "type": "ui-base", "name": "Home", "path": "/dashboard", "showPathInSidebar": true }, { "id": "2f45c2be539b2d4f", "type": "ui-theme", "name": "Default", "colors": { "surface": "#ffffff", "primary": "#294478", "bgPage": "#ffffff", "groupBg": "#f2f2f3", "groupOutline": "#cccccc" }, "sizes": { "pagePadding": "12px", "groupGap": "12px", "groupBorderRadius": "4px", "widgetGap": "12px" } } ]

Epic/Story

No response

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

@ctanno ctanno added the task A piece of work that isn't necessarily tied to a specific Epic or Story. label Mar 5, 2024
@joepavitt joepavitt added size:S - 2 Sizing estimation point bug Something isn't working and removed task A piece of work that isn't necessarily tied to a specific Epic or Story. labels Mar 6, 2024
@joepavitt joepavitt self-assigned this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size:S - 2 Sizing estimation point
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants