Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary (??) ngRest request when changing states #670

Open
Antikon opened this issue Oct 2, 2021 · 4 comments
Open

Unnecessary (??) ngRest request when changing states #670

Antikon opened this issue Oct 2, 2021 · 4 comments
Assignees

Comments

@Antikon
Copy link
Contributor

Antikon commented Oct 2, 2021

What steps will reproduce the problem?

1. Navigate to Settings -> Layouts.

At least two XHR requests performed:

2. Navigate to Themes

There are 5 XHR request perfomed:

As far as I understand, the second request releases the lock from the current user, if any.
But what the purpose of the first request?

Additional infos

Q A
LUYA Admin Version 4.1.0 (before to replacement in menu)
PHP Version 7.4.13
Platform Apache
Operating system Windows
@nadar nadar assigned boehsermoe and unassigned boehsermoe Oct 2, 2021
@nadar
Copy link
Member

nadar commented Oct 6, 2021

You mean the second GET http://luyadev/admin/api-cms-layout/list?ngrestCallType=list&fields=id,id,name,json_config,view_file&sort=-id&page=1:

This is very hard to debug, and yes what you are saying is absolute true, this second requests makes no sense at all. This is maybe because when leaving this angular controller the state changes somewhere which triggers a final $scope.loadList something like this:

https://github.com/luyadev/luya-module-admin/blob/master/src/resources/js/controllers.js#L521-L527

@Antikon
Copy link
Contributor Author

Antikon commented Oct 7, 2021

Yes, that's exactly what I meant ("first" refers to queries after navigating to "Themes").

@nadar
Copy link
Member

nadar commented Oct 27, 2021

Do you have time for some "console.logs"? I would then try to fix it.

@Antikon
Copy link
Contributor Author

Antikon commented Oct 27, 2021

Yes.
What do you want me to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants