Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

## @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>
  • No labels