mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 18:41:59 -07:00
Fix GUI
This commit is contained in:
parent
ab25cd09ed
commit
68ff4f3842
@ -293,11 +293,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span class="glyphicon glyphicon-cloud-download"></span> <span translate>Download Rate</span></th>
|
<th><span class="glyphicon glyphicon-cloud-download"></span> <span translate>Download Rate</span></th>
|
||||||
<td class="text-right">{{connections['total'].inbps | binary}}B/s ({{connections['total'].inBytesTotal | binary}}B)</td>
|
<td class="text-right">{{connections_total.inbps | binary}}B/s ({{connections_total.inBytesTotal | binary}}B)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span class="glyphicon glyphicon-cloud-upload"></span> <span translate>Upload Rate</span></th>
|
<th><span class="glyphicon glyphicon-cloud-upload"></span> <span translate>Upload Rate</span></th>
|
||||||
<td class="text-right">{{connections['total'].outbps | binary}}B/s ({{connections['total'].outBytesTotal | binary}}B)</td>
|
<td class="text-right">{{connections_total.outbps | binary}}B/s ({{connections_total.outBytesTotal | binary}}B)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span class="glyphicon glyphicon-th"></span> <span translate>RAM Utilization</span></th>
|
<th><span class="glyphicon glyphicon-th"></span> <span translate>RAM Utilization</span></th>
|
||||||
|
@ -24,6 +24,7 @@ angular.module('syncthing.core')
|
|||||||
$scope.config = {};
|
$scope.config = {};
|
||||||
$scope.configInSync = true;
|
$scope.configInSync = true;
|
||||||
$scope.connections = {};
|
$scope.connections = {};
|
||||||
|
$scope.connections_total = {};
|
||||||
$scope.errors = [];
|
$scope.errors = [];
|
||||||
$scope.model = {};
|
$scope.model = {};
|
||||||
$scope.myID = '';
|
$scope.myID = '';
|
||||||
@ -367,6 +368,8 @@ angular.module('syncthing.core')
|
|||||||
id;
|
id;
|
||||||
|
|
||||||
prevDate = now;
|
prevDate = now;
|
||||||
|
$scope.connections_total = data['total'];
|
||||||
|
data = data.connections;
|
||||||
for (id in data) {
|
for (id in data) {
|
||||||
if (!data.hasOwnProperty(id)) {
|
if (!data.hasOwnProperty(id)) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -8,7 +8,7 @@ angular.module('syncthing.core')
|
|||||||
// we shouldn't validate
|
// we shouldn't validate
|
||||||
ctrl.$setValidity('validDeviceid', true);
|
ctrl.$setValidity('validDeviceid', true);
|
||||||
} else {
|
} else {
|
||||||
$http.get(urlbase + '/deviceid?id=' + viewValue).success(function (resp) {
|
$http.get(urlbase + '/svc/deviceid?id=' + viewValue).success(function (resp) {
|
||||||
if (resp.error) {
|
if (resp.error) {
|
||||||
ctrl.$setValidity('validDeviceid', false);
|
ctrl.$setValidity('validDeviceid', false);
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,7 +28,7 @@ angular.module('syncthing.core')
|
|||||||
function readBrowserLocales() {
|
function readBrowserLocales() {
|
||||||
// @TODO: check if there is nice way to utilize window.navigator.languages or similiar api.
|
// @TODO: check if there is nice way to utilize window.navigator.languages or similiar api.
|
||||||
|
|
||||||
return $http.get(urlbase + "/lang");
|
return $http.get(urlbase + "/svc/lang");
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoConfigLocale() {
|
function autoConfigLocale() {
|
||||||
@ -84,7 +84,7 @@ angular.module('syncthing.core')
|
|||||||
function useLocale(language, save2Storage) {
|
function useLocale(language, save2Storage) {
|
||||||
if (language) {
|
if (language) {
|
||||||
$translate.use(language).then(function () {
|
$translate.use(language).then(function () {
|
||||||
if (save2Storage && typeof(localStorage) != 'undefined')
|
if (save2Storage && typeof(localStorage) != 'undefined')
|
||||||
localStorage[_SYNLANG] = language;
|
localStorage[_SYNLANG] = language;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user