MCPcopy Create free account
hub / github.com/adobe/Marinus / fetch_docs

Function fetch_docs

web_server/public/javascripts/draw_graph.js:93–107  ·  view source on GitHub ↗
(zoneVal)

Source from the content-addressed store, hash-verified

91});
92
93function fetch_docs(zoneVal) {
94 var xmlhttp = new XMLHttpRequest();
95
96 var url = "/api/v1.0/graphs/" + zoneVal + "?dataType=docs";
97
98 xmlhttp.onreadystatechange = function () {
99 if (this.readyState === 4 && this.status === 200) {
100 remoteDocs = (JSON.parse(this.responseText))['docs'][0];
101 } else if (this.readyState === 4 && this.status !== 200) {
102 displayErrorMessage("Error: Could not fetch docs file!");
103 }
104 };
105 xmlhttp.open("GET", url, true);
106 xmlhttp.send();
107}
108
109function find_by_name(arr, value) {
110 var result = arr.filter(function (obj) { return obj.name === value; })

Callers 1

draw_graph.jsFile · 0.85

Calls 1

displayErrorMessageFunction · 0.70

Tested by

no test coverage detected