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

Task #9351 #9353 #9355: disabled legend. handle undefined disk_usage. show...

Task #9351 #9353 #9355: disabled legend. handle undefined disk_usage. show alert when no disk_usage found
parent a0679a2f
No related branches found
No related tags found
No related merge requests found
......@@ -154,6 +154,9 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
type: 'pie',
animation: {
duration: 200
},
legend: {
enabled: false
}
},
plotOptions: {
......@@ -163,7 +166,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
dataLabels: {
enabled: true
},
showInLegend: true
showInLegend: false
},
series: {
point: {
......@@ -203,7 +206,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
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});
$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;
......@@ -212,6 +215,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate($scope.leastRecentCacheTimestamp);
}else {
$scope.ok();
$scope.$evalAsync(function() { alert("Could not find disk usage for task " + otdb_id); });
}
});
};
......@@ -230,7 +234,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
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,
y:sub_dir_result.disk_usage || 0,
otdb_id: parseInt(sub_dir_result.name.slice(1)) });
if(sub_dir_result.cache_timestamp < $scope.leastRecentCacheTimestamp) {
......@@ -240,6 +244,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
$scope.leastRecentCacheTimestamp = dataService.convertDatestringToLocalUTCDate($scope.leastRecentCacheTimestamp);
}else {
$scope.ok();
$scope.$evalAsync(function() { alert("Could not find disk usage for project " + project_name); });
}
});
};
......@@ -258,7 +263,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
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,
y:sub_dir_result.disk_usage || 0,
project_name: sub_dir_result.name });
if(sub_dir_result.cache_timestamp < $scope.leastRecentCacheTimestamp) {
......@@ -268,6 +273,7 @@ cleanupControllerMod.controller('CleanupController', ['$scope', '$uibModal', '$h
$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