1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

Fix a bug: unable to switch OpenLab projets

This commit is contained in:
Du Peng 2022-04-19 18:28:31 +02:00
parent 516018254c
commit ff230b5451

View File

@ -287,7 +287,7 @@ Application.Controllers.controller('ProjectsController', ['$scope', '$state', 'P
// Is openLab enabled on the instance?
$scope.openlab = {
projectsActive: openLabActive.isPresent,
searchOverWholeNetwork: false
searchOverWholeNetwork: settingsPromise.openlab_default === 'true'
};
// default search parameters
@ -405,8 +405,10 @@ Application.Controllers.controller('ProjectsController', ['$scope', '$state', 'P
const initialize = function () {
if ($location.$$search.whole_network === 'f') {
$scope.openlab.searchOverWholeNetwork = false;
} else if ($location.$$search.whole_network === undefined) {
$scope.openlab.searchOverWholeNetwork = $scope.openlab.projectsActive && settingsPromise.openlab_default === 'true';
} else {
$scope.openlab.searchOverWholeNetwork = ($scope.openlab.projectsActive && settingsPromise.openlab_default === 'true') || false;
$scope.openlab.searchOverWholeNetwork = $scope.openlab.projectsActive;
}
return $scope.triggerSearch();
};