Mermaid chart JIRA plugin
Set up environment variables:
NODE_ENV=production
MC_CLIENT_ID=6643413f-36fe-41f5-83b6-18674ec599f0
MC_BASE_URL=https://test.mermaidchart.com
Configure application with config.json
file (set up domain and DB connection) for production env
Run npm run start
How to add plugin into atlassian marketplace
Configure diagram selection page
Attach plugin js to the page
< script src ="https://[jira plugin domain]/js/plugin.js "> </ script >
Call function window.CP.saveData(data)
on diagram selection (iframe will be closed automatically after execution). Example
window . CP . saveData ( {
documentID : "c2f481f9-433f-4491-a9d4-811d7150122f" ,
major : "0" ,
minor : "1" ,
} ) ;
Call function window.CP.cancel()
if you want close iframe without selecting diagram
Function window.CP.getData()
returns current selection diagram data.
Example file /example/index.html
Configure your local environment with following
guide (steps 1-3)
Add a credentials.json (copy from sample) file in your app directory with your information:
Set up environment variables:
MC_CLIENT_ID=6643413f-36fe-41f5-83b6-18674ec599f0
MC_BASE_URL=https://jiratest.mermaidchart.com
Start application npm run start