Skip to content

Commit 0185799

Browse files
author
robaho
committed
update web UI
1 parent 8361c99 commit 0185799

File tree

4 files changed

+27
-42
lines changed

4 files changed

+27
-42
lines changed

.gitignore

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,2 @@
1-
# Binaries for programs and plugins
2-
*.exe
3-
*.dll
4-
*.so
5-
*.dylib
6-
7-
# Test binary, build with `go test -c`
8-
*.test
9-
10-
# Output of the go coverage tool, specifically when used with LiteIDE
11-
*.out
12-
13-
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
14-
.glide/
15-
.idea/
16-
*.swp
1+
node_modules
2+
out

internal/exchange/webserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func bookToJSON(symbol string, book *Book) []byte {
194194
return msg
195195
}
196196

197-
func statsToJSON(symbol string, stats *Statistics) []byte {
197+
func statsToJSON(stats *Statistics) []byte {
198198
msg, _, _ := websocket.JSON.Marshal(*stats)
199199
return msg
200200
}
@@ -272,7 +272,7 @@ func apiStatsHandler(w http.ResponseWriter, r *http.Request) {
272272
if stats == nil {
273273
stats = &Statistics{}
274274
}
275-
s := statsToJSON(symbol, stats)
275+
s := statsToJSON(stats)
276276
w.Write(s)
277277
}
278278
}

web/assets/css/common.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
table {
2+
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
3+
border-collapse: collapse;
4+
width: 100%;
5+
}
6+
7+
table td, table th {
8+
border: 1px solid #ddd;
9+
padding: 8px;
10+
}
11+
12+
table tr:nth-child(even){background-color: #f2f2f2;}
13+
14+
table tr:hover {background-color: #ddd;}
15+
16+
table th {
17+
padding-top: 12px;
18+
padding-bottom: 12px;
19+
text-align: left;
20+
background-color: darkslategray;
21+
color: white;
22+
}

web/templates/instruments.html

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<title>GOT Exchange Web Interface</title>
6-
<style>
7-
table {
8-
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
9-
border-collapse: collapse;
10-
width: 100%;
11-
}
12-
13-
table td, table th {
14-
border: 1px solid #ddd;
15-
padding: 8px;
16-
}
17-
18-
table tr:nth-child(even){background-color: #f2f2f2;}
19-
20-
table tr:hover {background-color: #ddd;}
21-
22-
table th {
23-
padding-top: 12px;
24-
padding-bottom: 12px;
25-
text-align: left;
26-
background-color: darkslategray;
27-
color: white;
28-
}
29-
</style>
6+
<link rel="stylesheet" type="text/css" href="/assets/css/common.css">
307
</head>
318
<body>
329
Welcome to the GOT web interface...<br>

0 commit comments

Comments
 (0)