Fix ui, hide report date
This commit is contained in:
@@ -32,8 +32,6 @@ angular.module('syncthing.core')
|
||||
$scope.protocolChanged = false;
|
||||
$scope.reportData = {};
|
||||
$scope.reportDataPreview = '';
|
||||
$scope.reportDataPreviewVersion = '';
|
||||
$scope.reportDataPreviewDiff = false;
|
||||
$scope.reportPreview = false;
|
||||
$scope.folders = {};
|
||||
$scope.seenError = '';
|
||||
@@ -2322,13 +2320,13 @@ angular.module('syncthing.core')
|
||||
$scope.reportPreview = true;
|
||||
};
|
||||
|
||||
$scope.refreshReportDataPreview = function () {
|
||||
$scope.refreshReportDataPreview = function (ver, diff) {
|
||||
$scope.reportDataPreview = '';
|
||||
if (!$scope.reportDataPreviewVersion) {
|
||||
if (!ver) {
|
||||
return;
|
||||
}
|
||||
var version = parseInt($scope.reportDataPreviewVersion);
|
||||
if ($scope.reportDataPreviewDiff && version > 2) {
|
||||
var version = parseInt(ver);
|
||||
if (diff && version > 2) {
|
||||
$q.all([
|
||||
$http.get(urlbase + '/svc/report?version=' + version),
|
||||
$http.get(urlbase + '/svc/report?version=' + (version - 1)),
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<p translate>The aggregated statistics are publicly available at the URL below.</p>
|
||||
<p><a href="https://data.syncthing.net/" target="_blank">https://data.syncthing.net/</a></p>
|
||||
<label translate>Version</label>
|
||||
<select id="urPreviewVersion" class="form-control" ng-model="$parent.$parent.reportDataPreviewVersion" ng-change="refreshReportDataPreview()">
|
||||
<select id="urPreviewVersion" class="form-control" ng-model="reportDataPreviewVersion" ng-change="refreshReportDataPreview(reportDataPreviewVersion, reportDataPreviewDiff)">
|
||||
<option selected value translate>Select a version</option>
|
||||
<option ng-repeat="n in urVersions()" value="{{n}}">{{'Version' | translate}} {{n}}</option>
|
||||
</select>
|
||||
<div class="checkbox" ng-if="$parent.$parent.reportDataPreviewVersion > 2">
|
||||
<div class="checkbox" ng-if="reportDataPreviewVersion > 2">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="$parent.$parent.$parent.reportDataPreviewDiff" ng-change="refreshReportDataPreview()" />
|
||||
<input type="checkbox" ng-model="reportDataPreviewDiff" ng-change="refreshReportDataPreview(reportDataPreviewVersion, reportDataPreviewDiff)" />
|
||||
<span translate>Show diff with previous version</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user