Skip to content

Commit be8e141

Browse files
authored
Fix filebrowser infinite loading and update deps 20240529 (#2312)
* Fix filebrowser infinite loading and update deps 20240529 * Revert coverage from 7.5.3 to 7.5.2 * Sleep 10 sec before test login
1 parent 135551e commit be8e141

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

ESSArch_Core/frontend/static/frontend/scripts/controllers/FilebrowserController.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default class FilebrowserController {
3131
vm.$onChanges = function (changes) {
3232
if (changes.user) {
3333
$scope.previousGridArrays = [];
34+
$scope.initLoad = true;
35+
$scope.initExpanded = false;
3436
$scope.dirPipe($scope.tableState);
3537
}
3638
if (changes.ip) {
@@ -77,9 +79,6 @@ export default class FilebrowserController {
7779
vm.browserstate.path = $scope.previousGridArraysString();
7880
}
7981
$scope.gridArrayLoading = true;
80-
if ($scope.deckGridData.length == 0) {
81-
$scope.initLoad = true;
82-
}
8382
if (!angular.isUndefined(tableState)) {
8483
$scope.tableState = tableState;
8584
const paginationParams = listViewService.getPaginationParams(tableState.pagination, $scope.filesPerPage);
@@ -124,12 +123,19 @@ export default class FilebrowserController {
124123
$scope.ip.state == 'Prepared'
125124
) {
126125
for (let i = 0; i < dir.data.length; i++) {
127-
if (dir.data[i].name == 'content') {
126+
if (dir.data[i].name == 'content' || dir.data[i].name == 'c') {
128127
$scope.expandFile($scope.ip, dir.data[i]);
129128
$scope.initExpanded = true;
130129
break;
131130
}
132131
}
132+
if (!$scope.initExpanded) {
133+
$scope.deckGridData = dir.data;
134+
tableState.pagination.numberOfPages = dir.numberOfPages; //set the number of pages so the pagination can update
135+
$scope.gridArrayLoading = false;
136+
$scope.initLoad = false;
137+
$scope.openingNewPage = false;
138+
}
133139
} else {
134140
$scope.deckGridData = dir.data;
135141
tableState.pagination.numberOfPages = dir.numberOfPages; //set the number of pages so the pagination can update
@@ -149,6 +155,8 @@ export default class FilebrowserController {
149155
$scope.deckGridInit = function (ip) {
150156
$scope.previousGridArrays = [];
151157
if ($scope.tableState) {
158+
$scope.initLoad = true;
159+
$scope.initExpanded = false;
152160
$scope.dirPipe($scope.tableState);
153161
$scope.selectedCards = [];
154162
}

ESSArch_Core/frontend/tests/test_login.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ def test_login(self):
2626
old_url = self.selenium.current_url
2727
self.selenium.find_element("xpath", '//button[@type="submit"]').click()
2828
try:
29+
sleep(10)
2930
WebDriverWait(self.selenium, 15).until(EC.title_is('Info | ESSArch'))
3031
except TimeoutException:
31-
sleep(10)
32+
sleep(30)
3233
WebDriverWait(self.selenium, 15).until(EC.title_is('Info | ESSArch'))
3334
self.assertTrue(EC.url_changes(old_url))
3435

requirements/base.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
asgiref==3.7.2
2-
boto3==1.34.113
2+
boto3==1.34.114
33
celery[tblib]==5.4.0
44
cffi==1.16.0
55
channels==4.1.0
@@ -8,9 +8,9 @@ chardet==5.1.0
88
click==8.1.3
99
cryptography==42.0.7
1010
daphne==4.1.2
11-
dj-rest-auth[with_social]==5.0.2
11+
dj-rest-auth[with_social]==6.0.0
1212
django==5.0.6
13-
django-allauth==0.57.0
13+
django-allauth==0.61.1
1414
django-cors-headers==4.3.1
1515
django-countries-plus==2.2.0
1616
django-csp==3.7

requirements/optional.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ unoconv==0.9.0
77
comtypes==1.4.2 ; platform_system=='Windows'
88
wfastcgi==3.0.0
99
mod-wsgi==5.0.0
10-
mssql-django==1.4.2
10+
mssql-django==1.5
1111
mysqlclient==2.2.4
1212
psycopg2==2.9.9
1313
python-logstash-async==1.6.4

0 commit comments

Comments
 (0)