Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Plantumlcloud
autoSizefalse
filenametest.png
datanVfhjtowDH4a/px0CMETcMBNk3Z3XYsm7WcIBiLapkvSu+3t59hpG6DtsUlASxrbn+3PsZtVuXIOTAbmXUl4fJwsNpssnf6qoYZp8pYlb+nU+k2TxfLhISxkybev24eHyXz2rHLAS8Y7niazZamdXzHqeHJ4RbH0ZYs3B95pQIJ6h71fMbrAC5rDX2H8U7Y0n6nSabrs1bva1yLHP2h4Mn9GBKxFm731cqVXVeVCkk5d+jX8kgOMCD/9LpG3yyT5snndpMst6u/18QWsFUdyU3jkA25uT3AnZHJV6tLWBYM+HPDXkTzjns92f9olRIi/RyjBCKeNDxNna4q332uwTrHbO117LO8iV3tBi4vnNgSxn/1pzpY/NuuLEPgFCkHsiB0LQqKtCnBUedDtdvTF/yl0edTrpzZvPlNFG97kJosM6dNs0rbxbLauZE4YR0EPSSmlylUIV79Tqy5VlBY08hing1yTuiiglHCrFelptEQvh3OxXWWElhD6Pz1KDPzyuR6kH0kpTzAp8pwrjOANwpnPYHqcNlJMtkpbr7Csix14YWGtlihJ+j6UO8U741SbolMPFkou4+BO4zjej6Yp3azeXldfv4VcDUbCVpgSGArFP3C+MzgCIw0AKAYNXQdsZ7X0sT3Uef7nWrSJmI/2UTc8J/Y0Zc8ZCwlS5XGY8x3G/ohy3baZNv/gQwP6EnUn13uIBeS+hAvOvjyBPMc+jNM+iUTTca6vdbyfiPxbEW8ZhTsRoxPdqBijXo/xcXql4GpDJ1TuD3lZG8OCfKYdanwMcSzuLfxlhV1JCtL1SbW3GKo4Cn3FWt0fhEv7nwWB8V1K7cEJlds2ESDk6YIVd1QmPvLcTtfTVbpZbkNl3qw2iEORmbt43SSuHzLPI/F5NYKqQb0WTmx+V9rgFDWGlJp4i7QtnAGovN1cOWZvJBljjIFwvfg+GyX2UpvFtnWfadvtDqf5S+jgjfXs5+vqani8iQhh4JWL7mN9K/5soPIGJu3Ig3dnJc9eOp6a4Fb5TtjLWcKpwuP5v6jxEeqMgpHhJwNh8NDrmilNOqESyJDYNUNw0PlxUlQh2Dxl11qlUYhJiVG0g5G+ynY8Do4cp2z5JK5lwqTEj7tZjboWIBXpqOOhvaNn8JOmJT/fj/nhXyFWBgLCxonwYiHbB/eRtWlLxU6V3diJrNjXRB52Y5X9mLRvJJwffgth9FVnET8xPgKcLZ5qeQZ3A7auci1ao9liCHTYTvFiGYilMG6sv6MHba2iwZX9yJ63SaiNiNo3gAeZgu4eVDO4DYB9hQ7ch+cl1ZY8N2txAYJpF9pYWB6IUP1f
width
compressedtrue
height
Code Block
languagejs
## @param 0:title=colour|type=string
## @param 1:title=size|type=string

<div>Release</div>
<div><input id="busipath" type="text" onChange="PlantUML()" /></div>
<br></br>
<div><input id="PLANTgrowth" type="button" value="Create UML" onClick="doPlantGrow()" /></div>
<div id="confirmationMessage">&nbsp;</div>

<h1>UML</h1>

<p id="UML">
    </p>


      <script src="https://unpkg.com/neo4j-driver">

      </script>

      <script>


        function doPlantGrow() {
            var v_pathname = AJS.$("#busipath").val();
          var v_params = {};
          console.log(' ');
          console.log('Ne04j Script');
          console.log(' ');
          var driver = neo4j.v1.driver("bolt://10:8081", neo4j.v1.auth.basic("neo4j", ""));
          console.log('Ne04j Driver acquired');
          console.log(' ');
          var session = driver.session();
          console.log('Ne04j Session created');
          console.log(' ');
          var v_query = 'match (n)-[k{pathname:"'+ v_pathname +'"}]->(m) return m.name as Target,k.api as api,k.message as Message, k.activeT as activeT, k.note as Note, k.branchstatus as BranchStatus,  k.activeS as activeS,n.name as Source order by k.sequence;'
          console.log('Ne04j Query: ' + v_query);
          console.log(' ');
          session
            .run(v_query, { param: '' })
            .then(function (result) {
              console.log('Ne04j Query run');
              console.log(' ');
              var v_table_body = document.getElementById("UML");
              console.log('Ne04j Record count: ' + result.records.length);
              console.log(' ');
              result.records.forEach(function (record) {
                if(record.get('BranchStatus')= ("" || 'end')) {}
                  else { v_table_body.insertAdjacentHTML('beforeend','<br>' + record.get('BranchStatus')+ ' ' + record.get('BranchName') + ';' )};
                  
                v_table_body.insertAdjacentHTML(
                  'beforeend', '<br>'+ record.get('Source') + '-->' + record.get('Target') + ':**' +record.get('api') + '** ' + record.get('Message') + ';'
                );
                if(record.get('activeT')=null) {}
                  else { v_table_body.insertAdjacentHTML('beforeend','<br>' + record.get('activeT')+ ' ' + record.get('Target') + ';' )};
                  if(record.get('Note')=null) {}
                  else { v_table_body.insertAdjacentHTML('beforeend','<br>note' + record.get('NotePosition')+ ' :' + record.get('Note') + ';' )};
                  
                  if(record.get('activeS')=null) {}
                  else { v_table_body.insertAdjacentHTML('beforeend','<br>' + record.get('activeS')+ ' ' + record.get('Source') + ';' )};
                  if(record.get('BranchStatus')= 'end') {v_table_body.insertAdjacentHTML('beforeend','<br>' + record.get('BranchStatus') + ';' )}
                  else { };
              });
              session.close()
        })};
    


      </script>