From c8df59722c75f298eaebe64288146482e607594d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Wed, 27 Dec 2023 03:16:48 +0100 Subject: [PATCH] update README et al. --- README.md | 47 ++++++++++++++++++++++++++ main.go | 2 +- table.tmpl | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 README.md create mode 100644 table.tmpl diff --git a/README.md b/README.md new file mode 100644 index 0000000..a8cf50f --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# taler-dashboard + +A dashboard for the GNU Taler project, giving an overview about the state of the +development. + +This is **alpha** software. + +It is written in go and compiles into a standalone program with all templates as embedded +components. + +## Compilation + +To compile, you need the latest version of [https://go.dev](the go programming language) + +Then, simple download the code from this repository and compile it: + +``` +git clone https://git.kesim.org/taler/taler-dashboard +cd taler-dashboard +go build +``` + +## Mantis API-Token + +You need an API-token to be able to access the REST-API of https://bugs.taler.net. +The token can be provided via the environment variable `MANTIS_API_TOKEN` or at +the commandline. + +## Execution + + +``` +Usage of ./taler-dashboard: + -min string + minimum version we care for (default "0.9.3") + -num int + number of issues to retrieve at once (default 100) + -port string + [ip]:port to serve (default ":8080") + -token string + API-Token (default "") + -url string + URL to the issues (default "https://bugs.gnunet.org/api/rest/issues") +``` + +**Note**: We assume that this service runs behind a reverse-proxy which deals +and terminates TLS. diff --git a/main.go b/main.go index f93cbda..9c4030f 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ var ( fl_token = flag.String("token", os.Getenv("MANTIS_API_TOKEN"), "API-Token") fl_port = flag.String("port", ":8080", "[ip]:port to serve") fl_num = flag.Int("num", 100, "number of issues to retrieve at once") - fl_min = flag.String("min", "0.9.3", "minimum version for data") + fl_min = flag.String("min", "0.9.3", "minimum version we care for") ) func main() { diff --git a/table.tmpl b/table.tmpl new file mode 100644 index 0000000..cc715fb --- /dev/null +++ b/table.tmpl @@ -0,0 +1,97 @@ + + + GNU Taler Dashboard + + +

GNU Taler Dashboard

+ List view +

Table View

+ Data from {{ .Timestamp.Format "02 Jan 06 15:04 MST"}} + {{ with .Lasterror }}, Last error: {{ . }} {{end}} + + {{ $issues := .Issues }} +

+ {{ range $issues.Tags }} + + {{ end }} +

+ + + + + {{ range $issues.TargetVersions }} + + {{ end }} + + {{ range $cat := $issues.Categories }} + + + {{ range $tar := $issues.TargetVersions }} + + {{ end }} + + {{ end }} +
+
+ {{ . }} +
+ TODO: more +
+
+
{{ . }} + {{ with $issues.ByCategoryAndTarget $cat $tar }} +
+ {{ $l := len .}} {{ if lt 1 $l }} {{ $l }} issues {{ else }} 1 issue {{ end }} + {{ range . }} + {{.Id}} {{.Summary}}
+ {{ end }} +
+ {{ end }} +
+ + end of dashboard + +