diff --git a/cmd/strelaypoolsrv/gui/index.html b/cmd/strelaypoolsrv/gui/index.html index 8b6ca622..ad893603 100644 --- a/cmd/strelaypoolsrv/gui/index.html +++ b/cmd/strelaypoolsrv/gui/index.html @@ -56,32 +56,32 @@ Address - + Sessions - - + + - + Connections - - + + - + Data relayed - - + + Transfer rate in the last period - + Uptime hours - - + + @@ -94,51 +94,51 @@ - + 10s - - + + - + 1m - - + + - + 5m - - + + - + 15m - - + + - + 30m - - + + - + 60m - - + + - + {{ relay.address }} Looking up... {{ relay.status.numActiveSessions }} @@ -185,7 +185,7 @@ - + @@ -235,10 +235,22 @@ $scope.mapBounds = new google.maps.LatLngBounds(); $scope.tooltipTemplate = $('#infoTemplate').html(); $scope.usedLocations = {}; - $scope.sortType = 'status.numActiveSessions || -1'; + $scope.sortType = 'status.numActiveSessions'; $scope.sortReverse = true; + $scope.sortCompare = function(a, b) { + if (a.value == b.value) { + return 0; + } + if (a.type == "undefined") { + return -1; + } + if (b.type == "undefined") { + return 1; + } + return a.value > b.value ? 1 : -1; + } - $http.get("/endpoint").then(function(response) { + $http.get("http://relays.syncthing.net/endpoint").then(function(response) { $scope.relays = response.data.relays; var promises = []; angular.forEach($scope.relays, function(relay) { diff --git a/cmd/strelaypoolsrv/main.go b/cmd/strelaypoolsrv/main.go index 23ddf4d9..16356f07 100644 --- a/cmd/strelaypoolsrv/main.go +++ b/cmd/strelaypoolsrv/main.go @@ -1,6 +1,6 @@ // Copyright (C) 2015 Audrius Butkevicius and Contributors (see the CONTRIBUTORS file). -//go:generate go run genassets.go gui auto/gui.go +//go:generate go run ../../script/genassets.go gui >auto/gui.go package main