From 7340f8a2b120f6ab9333de5884e4de5e4acb08ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Sj=C3=B6str=C3=B6m?= Date: Wed, 17 Apr 2024 13:52:40 +0200 Subject: [PATCH] feat(ui): add xhr request header and a xhr status button --- ui/vue.html | 345 +++++++++++++++++++++++++++++----------------------- 1 file changed, 194 insertions(+), 151 deletions(-) diff --git a/ui/vue.html b/ui/vue.html index e4c26d500..268edc336 100644 --- a/ui/vue.html +++ b/ui/vue.html @@ -1,165 +1,208 @@ - - {{.Title}} - - - - - - - - - -
- - -
- - - -

${ info.message }

-
Served by ${ info.hostname }
- + {{.Title}} + + + + + + + + + +
+ + +
+ - - ${ pings } - touch_app - - Ping - + + +

+ ${ info.message } +

+
+ Served by ${ info.hostname } +
+ + backend returned ${ xhrStatus }, click to reload + + + + ${ pings } + touch_app + + Ping + - + +
+
+
+ + + +
+ Powered by + podinfo + version ${ info.version } revision ${ info.revision } Swagger + docs +
+
+
+
+
+
+
-
-
-
- - - -
- Powered - by podinfo - version ${ info.version } revision ${ info.revision } - Swagger docs -
-
-
-
-
-
-
- - - - + + - + .then(function (response) { + self.pings++; + self.color = response.headers.get("X-Color"); + return response.json(); + }) + .then(function (json) { + console.log("Request successful", json); + }) + .catch(function (error) { + console.log("Request failed", error); + }); + }, + }, + }); + +