mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
GUI version string includes OS and Arch
(Useful when debugging via screenshots...)
This commit is contained in:
parent
e41e58e781
commit
4b07609458
@ -326,7 +326,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span class="glyphicon glyphicon-tag"></span> <span translate>Version</span></th>
|
<th><span class="glyphicon glyphicon-tag"></span> <span translate>Version</span></th>
|
||||||
<td class="text-right">{{version}}</td>
|
<td class="text-right">{{versionString()}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -40,6 +40,7 @@ angular.module('syncthing.core')
|
|||||||
$scope.deviceStats = {};
|
$scope.deviceStats = {};
|
||||||
$scope.folderStats = {};
|
$scope.folderStats = {};
|
||||||
$scope.progress = {};
|
$scope.progress = {};
|
||||||
|
$scope.version = {};
|
||||||
|
|
||||||
$(window).bind('beforeunload', function () {
|
$(window).bind('beforeunload', function () {
|
||||||
navigatingAway = true;
|
navigatingAway = true;
|
||||||
@ -76,7 +77,7 @@ angular.module('syncthing.core')
|
|||||||
refreshFolderStats();
|
refreshFolderStats();
|
||||||
|
|
||||||
$http.get(urlbase + '/system/version').success(function (data) {
|
$http.get(urlbase + '/system/version').success(function (data) {
|
||||||
$scope.version = data.version;
|
$scope.version = data;
|
||||||
}).error($scope.emitHTTPError);
|
}).error($scope.emitHTTPError);
|
||||||
|
|
||||||
$http.get(urlbase + '/svc/report').success(function (data) {
|
$http.get(urlbase + '/svc/report').success(function (data) {
|
||||||
@ -1204,6 +1205,30 @@ angular.module('syncthing.core')
|
|||||||
}).error($scope.emitHTTPError);
|
}).error($scope.emitHTTPError);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.versionString = function () {
|
||||||
|
if (!$scope.version.version) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
var os = {
|
||||||
|
'darwin': 'Mac OS X',
|
||||||
|
'dragonfly': 'DragonFly BSD',
|
||||||
|
'freebsd': 'FreeBSD',
|
||||||
|
'openbsd': 'OpenBSD',
|
||||||
|
'netbsd': 'NetBSD',
|
||||||
|
'linux': 'Linux',
|
||||||
|
'windows': 'Windows',
|
||||||
|
'solaris': 'Solaris',
|
||||||
|
}[$scope.version.os];
|
||||||
|
|
||||||
|
var arch ={
|
||||||
|
'386': '32 bit',
|
||||||
|
'amd64': '64 bit',
|
||||||
|
}[$scope.version.arch];
|
||||||
|
|
||||||
|
return $scope.version.version + ', ' + os + ' (' + arch + ')';
|
||||||
|
};
|
||||||
|
|
||||||
// pseudo main. called on all definitions assigned
|
// pseudo main. called on all definitions assigned
|
||||||
initController();
|
initController();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user