update README et al.
This commit is contained in:
parent
1b14856bba
commit
c8df59722c
47
README.md
Normal file
47
README.md
Normal file
@ -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.
|
2
main.go
2
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() {
|
||||
|
97
table.tmpl
Normal file
97
table.tmpl
Normal file
@ -0,0 +1,97 @@
|
||||
|
||||
<html>
|
||||
<head><title>GNU Taler Dashboard</title></head>
|
||||
<style>
|
||||
body {
|
||||
margin-left:1%;
|
||||
margin-right:1%;
|
||||
font-family:sans-serif;
|
||||
}
|
||||
table {
|
||||
background: white;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
td {
|
||||
min-width: 10em;
|
||||
}
|
||||
th.side {
|
||||
color: brown;
|
||||
text-align: right;
|
||||
}
|
||||
tr:hover {
|
||||
background: #efe;
|
||||
}
|
||||
.normal {
|
||||
font-weight: normal;
|
||||
}
|
||||
.data {
|
||||
background: #cde;
|
||||
border-radius: 5px;
|
||||
padding: 8px;
|
||||
}
|
||||
details {
|
||||
max-width: 30em;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.over {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<h1>GNU Taler Dashboard</h1>
|
||||
<a href="/list">List view</a>
|
||||
<h2>Table View</h2>
|
||||
Data from {{ .Timestamp.Format "02 Jan 06 15:04 MST"}}
|
||||
{{ with .Lasterror }}, Last error: {{ . }} {{end}}
|
||||
|
||||
{{ $issues := .Issues }}
|
||||
<p>
|
||||
{{ range $issues.Tags }}
|
||||
<button>{{ . }}</button>
|
||||
{{ end }}
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="side"></th>
|
||||
{{ range $issues.TargetVersions }}
|
||||
<th>
|
||||
<details>
|
||||
<summary>{{ . }}</summary>
|
||||
<div class="normal">
|
||||
TODO: more
|
||||
</div>
|
||||
</details>
|
||||
</th>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ range $cat := $issues.Categories }}
|
||||
<tr>
|
||||
<th class="side">{{ . }}</th>
|
||||
{{ range $tar := $issues.TargetVersions }}
|
||||
<td>
|
||||
{{ with $issues.ByCategoryAndTarget $cat $tar }}
|
||||
<details class="data">
|
||||
<summary>{{ $l := len .}} {{ if lt 1 $l }} {{ $l }} issues {{ else }} 1 issue {{ end }} </summary>
|
||||
{{ range . }}
|
||||
<a href="https://bugs.gnunet.org/view.php?id={{.Id}}" target="_blank">{{.Id}}</a> {{.Summary}}<br>
|
||||
{{ end }}
|
||||
</details>
|
||||
{{ end }}
|
||||
</td>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
|
||||
<i>end of dashboard</i>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user