diff --git a/gui.go b/gui.go index 7c4c7059..51de3f58 100644 --- a/gui.go +++ b/gui.go @@ -75,6 +75,7 @@ func restGetConnections(m *model.Model, w http.ResponseWriter) { func restGetConfig(w http.ResponseWriter) { var res = make(map[string]interface{}) + res["myID"] = myID res["repository"] = config.OptionMap("repository") res["nodes"] = config.OptionMap("nodes") w.Header().Set("Content-Type", "application/json") diff --git a/gui/index.html b/gui/index.html index 41dee585..c50d2174 100644 --- a/gui/index.html +++ b/gui/index.html @@ -54,7 +54,7 @@ html, body {
- {{100 * model.inSyncBytes / model.globalBytes | alwaysNumber | number:0}}% + {{100 * model.inSyncBytes / model.globalBytes | alwaysNumber | number:0}}%

Need {{model.needFiles | alwaysNumber}} files, {{model.needBytes | binary}}B

@@ -99,25 +99,33 @@ html, body {

Cluster

- + diff --git a/main.go b/main.go index 9cb25d3b..f5c845eb 100644 --- a/main.go +++ b/main.go @@ -68,6 +68,7 @@ const ( ) var ( + myID string config ini.Config nodeAddrs = make(map[string][]string) ) @@ -113,7 +114,7 @@ func main() { fatalErr(err) } - myID := string(certId(cert.Certificate[0])) + myID = string(certId(cert.Certificate[0])) infoln("My ID:", myID) if opts.Debug.Profiler != "" {
{{node | short}} - + + + (this node) + + {{connections[node].Address}} - + {{address}} - {{connections[node].inbps | metric}}b/s - + + {{connections[node].inbps | metric}}b/s + + - {{connections[node].outbps | metric}}b/s - + + {{connections[node].outbps | metric}}b/s + +