From 1a8426a71d47a6c4947f4a8a00bcf74bbd599040 Mon Sep 17 00:00:00 2001 From: jamesread Date: Mon, 31 May 2021 21:16:30 +0100 Subject: [PATCH] Initial work --- Makefile | 2 +- OliveTin.proto | 17 +++++++++++++++++ webui/index.html | 21 +++++++++++++++++++-- webui/js/ActionButton.js | 8 ++++++++ webui/main.js | 16 ++++++++++++++++ webui/style.css | 39 +++++++++++++++++++++++++++++++++++++-- 6 files changed, 98 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 35febe8..850f7e4 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ daemon-unittests: go tool cover -html=reports/unittests.out -o reports/unittests.html grpc: - protoc -I.:$(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/ --go_out=. --go-grpc_out=. --grpc-gateway_out=. OliveTin.proto + protoc -I.:/home/xconspirisist/sandbox/go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.16.0/third_party/googleapis/ --go_out=. --go-grpc_out=. --grpc-gateway_out=. OliveTin.proto podman-image: buildah bud -t olivetin diff --git a/OliveTin.proto b/OliveTin.proto index 15cd1e6..a6bd883 100644 --- a/OliveTin.proto +++ b/OliveTin.proto @@ -27,6 +27,17 @@ message StartActionResponse { int32 exitCode = 4; } +message GetLogsRequest{}; + +message LogEntry { + string datetime = 1; + string content = 2; +} + +message GetLogsResponse { + repeated LogEntry logs = 1; +} + service OliveTinApi { rpc GetButtons(GetButtonsRequest) returns (GetButtonsResponse) { option (google.api.http) = { @@ -40,4 +51,10 @@ service OliveTinApi { }; } + rpc GetLogs(GetLogsRequst) returns (GetLogsResponse) { + option (google.api.http) = { + get: "/api/GetLogs" + } + } + } diff --git a/webui/index.html b/webui/index.html index b9878f4..2bd7f77 100644 --- a/webui/index.html +++ b/webui/index.html @@ -12,9 +12,26 @@
-
- OliveTin Actions +
+ +
+ + + +