This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use the REST API to search for a term | |
function searchCustomer(term) { | |
// Configure and send the Ajax query asynchronously. | |
$.ajax({ | |
type: "GET", | |
// REST method url | |
url: "http://localhost:3000/api/1cf9e65b/search/nodes/full", | |
// Define the authentication information. | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use the REST API to get the shortest path between two customers and render in Ogma | |
function shortestPath(customer1, customer2) { | |
// Configure and send the Ajax query asynchronously. | |
$.ajax({ | |
type: "GET", | |
// Define the authentication information. | |
headers: { | |
"Content-Type": "application/json", | |
"Authorization": "Basic " + btoa('root@root.com:6160b54b872459ce1c06c1a8ccdd9019') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="./lib/ogma.min.js"></script> | |
<script src="./lib/jquery-3.1.1.min.js"></script> | |
<style> | |
#graph-container { | |
width: 300px; |
NewerOlder