Skip to content
Snippets Groups Projects
Commit 01b13cbf authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #10009: display cache update timestamp of shown data, not min of sub directories.

parent 4b80f4c1
No related branches found
No related tags found
No related merge requests found
......@@ -320,7 +320,8 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
events: {
click: $scope.onPieClicked
}
}
},
turboThreshold:0
}
},
tooltip: {
......@@ -374,7 +375,8 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
},
series: {
stacking: 'normal',
pointWidth: 32
pointWidth: 32,
turboThreshold:0
},
},
yAxis: {
......@@ -411,19 +413,14 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
var path_parts = result.task_directory.path.split('/');
$scope.diskUsageChartSeries[0].project_name = path_parts[path_parts.length-2];
$scope.diskUsageChartSeries[0].data.splice(0, $scope.diskUsageChartSeries[0].data.length);
$scope.leastRecentCacheTimestamp = result.task_directory.cache_timestamp;
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate(result.task_directory.cache_timestamp);
var sub_directory_names = Object.keys(result.sub_directories);
sub_directory_names.sort(function(a, b) { return ((a.name < b.name) ? -1 : ((a.name > b.name) ? 1 : 0)); });
for(var sub_dir of sub_directory_names) {
var sub_dir_result = result.sub_directories[sub_dir];
$scope.diskUsageChartSeries[0].data.push({name:sub_dir_result.name + ' ' + sub_dir_result.disk_usage_readable,y:sub_dir_result.disk_usage || 0});
if(sub_dir_result.cache_timestamp < $scope.leastRecentCacheTimestamp) {
$scope.leastRecentCacheTimestamp = sub_dir_result.cache_timestamp;
}
}
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate($scope.leastRecentCacheTimestamp);
}else {
$scope.ok();
$scope.$evalAsync(function() { alert("Could not find disk usage for task " + otdb_id); });
......@@ -467,7 +464,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
$scope.diskUsageChartConfig.title.text = result.projectdir.name + ' ' + result.projectdir.disk_usage_readable;
$scope.diskUsageChartSeries[0].name = $scope.diskUsageChartConfig.title.text;
$scope.diskUsageChartSeries[0].data.splice(0, $scope.diskUsageChartSeries[0].data.length);
$scope.leastRecentCacheTimestamp = result.projectdir.cache_timestamp;
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate(result.projectdir.cache_timestamp);
var sub_directory_names = Object.keys(result.sub_directories);
sub_directory_names.sort(function(a, b) { return ((a.name < b.name) ? -1 : ((a.name > b.name) ? 1 : 0)); });
......@@ -476,12 +473,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
$scope.diskUsageChartSeries[0].data.push({name:sub_dir_result.name + ' ' + sub_dir_result.disk_usage_readable,
y:sub_dir_result.disk_usage || 0,
otdb_id: parseInt(sub_dir_result.name.slice(1)) });
if(sub_dir_result.cache_timestamp < $scope.leastRecentCacheTimestamp) {
$scope.leastRecentCacheTimestamp = sub_dir_result.cache_timestamp;
}
}
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate($scope.leastRecentCacheTimestamp);
}else {
$scope.ok();
$scope.$evalAsync(function() { alert("Could not find disk usage for project " + project_name); });
......@@ -496,7 +488,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
$scope.diskUsageChartConfig.title.text = result.projectdir.name + ' ' + result.projectdir.disk_usage_readable;
$scope.diskUsageChartSeries[0].name = $scope.diskUsageChartConfig.title.text;
$scope.diskUsageChartSeries[0].data.splice(0, $scope.diskUsageChartSeries[0].data.length);
$scope.leastRecentCacheTimestamp = result.projectdir.cache_timestamp;
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate(result.projectdir.cache_timestamp);
var sub_directory_names = Object.keys(result.sub_directories);
sub_directory_names.sort(function(a, b) { return ((a.name < b.name) ? -1 : ((a.name > b.name) ? 1 : 0)); });
......@@ -505,12 +497,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$m
$scope.diskUsageChartSeries[0].data.push({name:sub_dir_result.name + ' ' + sub_dir_result.disk_usage_readable,
y:sub_dir_result.disk_usage || 0,
project_name: sub_dir_result.name });
if(sub_dir_result.cache_timestamp < $scope.leastRecentCacheTimestamp) {
$scope.leastRecentCacheTimestamp = sub_dir_result.cache_timestamp;
}
}
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate($scope.leastRecentCacheTimestamp);
}else {
$scope.ok();
$scope.$evalAsync(function() { alert("Could not find disk usage for all projects"); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment