mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-20 06:28:16 +03:00
Change data to csv, harmonize REST API editflow
This commit is contained in:
@@ -58,7 +58,7 @@ p {font-size: 1em;}
|
||||
|
||||
function doAnalog(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_analog";
|
||||
url = basepath + "/editflow?task=test_analog";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ p {font-size: 1em;}
|
||||
|
||||
function doDigits(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_digits";
|
||||
url = basepath + "/editflow?task=test_digits";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ p {font-size: 1em;}
|
||||
|
||||
function doAlign(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_align";
|
||||
url = basepath + "/editflow?task=test_align";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ p {font-size: 1em;}
|
||||
|
||||
function doTake(){
|
||||
var xhttp = new XMLHttpRequest();
|
||||
url = basepath + "/editflow.html?task=test_take";
|
||||
url = basepath + "/editflow?task=test_take";
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
}
|
||||
|
||||
@@ -126,12 +126,12 @@ table {
|
||||
_brightness = document.getElementById("MakeImage_Brightness_value1").value;
|
||||
_contrast = document.getElementById("MakeImage_Contrast_value1").value;
|
||||
_saturation = document.getElementById("MakeImage_Saturation_value1").value;
|
||||
url = basepath + "/editflow.html?task=test_take&bri=" + _brightness;
|
||||
url = basepath + "/editflow?task=test_take&bri=" + _brightness;
|
||||
url = url + "&con=" + _saturation + "&sat=" + _saturation + "&int=" + _intensity;
|
||||
}
|
||||
else
|
||||
{
|
||||
url = basepath + "/editflow.html?task=test_take";
|
||||
url = basepath + "/editflow?task=test_take";
|
||||
}
|
||||
if (basepath.length > 0){
|
||||
url = url + "&host=" + basepath;
|
||||
|
||||
@@ -59,10 +59,10 @@ fetch(_basepath + '/fileserver/log/data/' + datefile)
|
||||
for (let line of lines) {
|
||||
{
|
||||
console.log(line);
|
||||
if (line.split("\t")[1] == numbername)
|
||||
if (line.split(",")[1] == numbername)
|
||||
{
|
||||
var value = line.split("\t")[datatype];
|
||||
var time = line.split("\t")[0];
|
||||
var value = line.split(",")[datatype];
|
||||
var time = line.split(",")[0];
|
||||
console.log("> "+time+" "+value+"\n");
|
||||
trace.x.push(time);
|
||||
// timex += 1;
|
||||
|
||||
@@ -141,7 +141,7 @@ function dataURLtoBlob(dataurl) {
|
||||
}
|
||||
|
||||
function FileCopyOnServer(_source, _target, _basepath = ""){
|
||||
url = _basepath + "/editflow.html?task=copy&in=" + _source + "&out=" + _target;
|
||||
url = _basepath + "/editflow?task=copy&in=" + _source + "&out=" + _target;
|
||||
var xhttp = new XMLHttpRequest();
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
@@ -225,7 +225,7 @@ function SaveCanvasToImage(_canvas, _filename, _delete = true, _basepath = ""){
|
||||
|
||||
function MakeContrastImageZW(zw, _enhance, _basepath){
|
||||
_filename = zw["name"].replace("/config/", "/img_tmp/");
|
||||
url = _basepath + "/editflow.html?task=cutref&in=/config/reference.jpg&out=" + _filename + "&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
|
||||
url = _basepath + "/editflow?task=cutref&in=/config/reference.jpg&out=" + _filename + "&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
|
||||
if (_enhance == true){
|
||||
url = url + "&enhance=true";
|
||||
}
|
||||
@@ -245,7 +245,7 @@ function MakeContrastImageZW(zw, _enhance, _basepath){
|
||||
function MakeRefZW(zw, _basepath){
|
||||
_filetarget = zw["name"].replace("/config/", "/img_tmp/");
|
||||
_filetarget = _filetarget.replace(".jpg", "_org.jpg");
|
||||
url = _basepath + "/editflow.html?task=cutref&in=/config/reference.jpg&out="+_filetarget+"&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
|
||||
url = _basepath + "/editflow?task=cutref&in=/config/reference.jpg&out="+_filetarget+"&x=" + zw["x"] + "&y=" + zw["y"] + "&dx=" + zw["dx"] + "&dy=" + zw["dy"];
|
||||
var xhttp = new XMLHttpRequest();
|
||||
try {
|
||||
xhttp.open("GET", url, false);
|
||||
|
||||
@@ -25,7 +25,7 @@ function getNUMBERSList() {
|
||||
});
|
||||
|
||||
try {
|
||||
url = _basepath + '/editflow.html?task=namenumbers';
|
||||
url = _basepath + '/editflow?task=namenumbers';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
|
||||
@@ -56,7 +56,7 @@ function getDATAList() {
|
||||
});
|
||||
|
||||
try {
|
||||
url = _basepath + '/editflow.html?task=data';
|
||||
url = _basepath + '/editflow?task=data';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
|
||||
@@ -87,7 +87,7 @@ function getTFLITEList() {
|
||||
});
|
||||
|
||||
try {
|
||||
url = _basepath + '/editflow.html?task=tflite';
|
||||
url = _basepath + '/editflow?task=tflite';
|
||||
xhttp.open("GET", url, false);
|
||||
xhttp.send();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user