Skip to content

Commit

Permalink
Use <table> instead of <ul>
Browse files Browse the repository at this point in the history
  • Loading branch information
numbaa committed Mar 13, 2024
1 parent fa3990f commit 31e6f09
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A naive [breakpad](https://chromium.googlesource.com/breakpad/breakpad) server.

## Usage
1. Download from Github Release or build it yourself.
1. Download from Github Releases or build it yourself.
```bash
$> ./bp-server -c /path/to/bp-server.xml
$> # or just
Expand Down Expand Up @@ -53,12 +53,17 @@ static bool minidump_callback(
}
```
5. Get dump list `http://your-host:17001/list/{page}`
5. Visit `http://your-host:17001/list/{page}`
```
http://your-host:17001/list/0
```
And you get
| Program | Version | Build Time | Crash Time | Dump |
| ----------- | ----------- | ----------- | ----------- | ----------- |
| your-app.exe| v3.2.1 |Mar 13 2024 02:16:47| 2024-03-13 03:47:46.8633922| [12345678-1234-5678-9876-123456789abc.dmp]() |
| your-app.exe| v3.2.1 |Mar 13 2024 02:16:47| 2024-03-13 10:31:12.6846541| [87654321-4321-8765-6789-cba987654321.dmp]() |
6. Click the link on the page and you get something like this
6. Click the dump links and you get something like this
```plaintext
Operating system: Windows NT
10.0.22621
Expand Down
30 changes: 25 additions & 5 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,35 @@ const listTemplate = `
<head>
<meta charset="UTF-8">
<title>Dumps</title>
<style>
th, td {
padding: 20px;
}
</style>
</head>
<body>
<ul>
<table>
<thead>
<tr>
<th>Program</th>
<th>Version</th>
<th>Build Time</th>
<th>Crash Time</th>
<th>Dump</th>
</tr>
</thead>
<tbody>
{{range . }}
<li>
{{ .Program }} {{ .Version }} Build: {{ .Build }} Crash: {{ .CreatedAt }} <a href="%s/view/ {{- .ID -}} "> {{ .Filename }} </a>
</li>
<tr>
<td>{{ .Program }}</td>
<td>{{ .Version }}</td>
<td>{{ .Build }}</td>
<td>{{ .CreatedAt }}</td>
<td><a href="%s/view/ {{- .ID -}} "> {{ .Filename }} </a></td>
</tr>
{{end}}
</ul>
</tbody>
</table>
</body>
</html>`

Expand Down

0 comments on commit 31e6f09

Please sign in to comment.