From 83ed1d5ffd9830bea39647893fa4258cb130b76d Mon Sep 17 00:00:00 2001 From: Raven Rothkopf Date: Wed, 30 Nov 2022 14:47:42 -0500 Subject: [PATCH 1/3] post requests --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 5dd4f64..1de3ff2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,7 +12,7 @@ function callSynth() { let tslSpec = document.getElementById("specBox").value; let targetLang = document.getElementById("targetLang").value; - $.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", {tsl: tslSpec, target: targetLang, id: userID}, function(data){ + $.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", {tsl: tslSpec, target: targetLang}, function(data){ document.getElementById("codeBox").value = data; }); } From 5df10f343d1215ef1df27fd3b61c6e4a8dd662f7 Mon Sep 17 00:00:00 2001 From: Raven Rothkopf Date: Tue, 21 Feb 2023 15:35:37 -0500 Subject: [PATCH 2/3] fix error messages --- docs/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 1de3ff2..d313450 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,7 +14,11 @@ let targetLang = document.getElementById("targetLang").value; $.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", {tsl: tslSpec, target: targetLang}, function(data){ document.getElementById("codeBox").value = data; - }); + }) + .fail(function(response) { + document.getElementById("codeBox").value = response.responseText; + }); + } From a29c173f40f9bf66a56541ee89dfbd8bde1e4f21 Mon Sep 17 00:00:00 2001 From: Mark Santolucito Date: Mon, 24 Apr 2023 17:21:00 -0400 Subject: [PATCH 3/3] format --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 336b83b..336ae63 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,20 @@ Follow the directions here: https://cloud.google.com/run/docs/tutorials/system-p To test locally +``` docker build -t tsl/api . docker run -d -p 8080:8080 tsl/api +``` then go to localhost:8080. note that this only works with port 8080 to deploy +``` docker build -t tsl/api . gcloud builds submit --tag gcr.io/tslapi-2/tsl --timeout=1h gcloud run deploy graphviz-web --image gcr.io/tslapi-2/tsl +``` you need to set a longer time out since it takes so long to build (30 min maybe?).