5 <meta charset=
"utf-8"/>
6 <title>erdiag tool
</title>
10 <h2>Graph description
</h2>
11 <button onClick=
"processGraphDesc()">Send
</button>
13 <span>MCD graph type:
</span>
14 <input type=
"radio" name=
"mcd" value=
"compact" checked
/> compact
15 <input type=
"radio" name=
"mcd" value=
"bubble"/> bubble
18 <span>Output type:
</span>
19 <input type=
"radio" name=
"output" value=
"graph" checked
/> drawn graph
20 <input type=
"radio" name=
"output" value=
"text"/> graphviz input
23 <textarea id=
"graphDesc" rows=
"15" style=
"width:100%"></textarea>
24 <div id=
"result" style=
"display:none">
29 <h2>SQL instructions:
</h2>
33 <script src=
"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
34 <script src=
"parser.js"></script>
36 const result = document.getElementById("result");
37 function getRadioValue(name) {
38 for (let el of document.getElementsByName(name))
44 function processGraphDesc() {
45 const graphDesc = document.getElementById("graphDesc").value;
46 const mcdType = getRadioValue("mcd");
47 const outputType = getRadioValue("output");
48 const er = new ErDiags(graphDesc, outputType);
49 er.drawMcd("mcd", mcdType);
52 result.style.display = "block";
53 //document.location.href = "#result"; //TODO: not working (auto-scroll)