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

Component "link" takes the absolute address of a page, which does not work with remote accesses #2597

Closed
fabiodurao opened this issue Jun 30, 2023 · 4 comments

Comments

@fabiodurao
Copy link

Describe the bug
Accessing the links does not work when accessing from computers other than the server, because the link shows the absolute value of the link (http://localhost:8080/Scada-LTS/views.shtm?viewId=2).

To Play
Steps to reproduce the behavior:

  1. Go to the graphics screen and create a "link" component
  2. Place the mouse over the component and access "Edit static content".
  3. Select one of the "Views" to create the link to access it and in the "Link (href)" field the complete address will appear (http://localhost:8080/Scada-LTS/views.shtm?viewId=2) , and the best thing would be to show the relative address (views.shtm?viewId=2), which would allow the link to work for anyone accessing Scada-LTS from other computers.

Expected behavior
It was expected that after saving the screen, when clicking on the link, the page would lead to the link, which only happened if we were accessing it from the server.

Screenshots
Captura de tela 2023-06-30 170254

Desktop (please complete the following information):

  • OS: Windows 11 64 bit
  • Browser: Chrome 114.0.5735.199 (Official version) 64 bits
  • Version: SLTS 2.7.5.3
@Limraj
Copy link
Collaborator

Limraj commented Jun 30, 2023

Hi @fabiodurao,
Why don't you consult these topics? You think that if the address is absolute, then from another computer this link cannot be opened? After all, in this context, it doesn't matter if the link is absolute or relative... If the client computer has access to the application, it doesn't matter what address it has. Absolute or relative address leads to the "same location of the server".
If the user has access to this place, it doesn't matter if the address is absolute or relative.

The situation is different from the configuration side, it's about portability of configuration between different servers (import/export), here we can see the advantages of relative addresses. You need to create an issue with this content, or modify it.

It's best to write in, instead of creating an issue right away:
https://github.com/SCADA-LTS/Scada-LTS/discussions

Regards,
Kamil Jarmusik

@fabiodurao
Copy link
Author

We can discuss the matter further, but I believe that in this case there is no need and maybe I was not clear in the description of the problem.

Scenario:
2 computers

  • Server (Scada-LTS installed): 192.168.1.100
  • PC (client access to Scada-LTS)

If during the configuration of the link component the url is kept as "http://localhost:8080/Scada-LTS/views.shtm?viewId=2", when the PC accesses the application using the address 192.168.1.100:8080/Scada -LTS and click on the link, the PC browser will look for a page inside his computer (localhost) and will not open the desired address, result, error 404.

If the component's url is changed to "views.shtm?viewId=2", when the PC accesses the application and clicks on the link, its browser will automatically fill in the application address and complete it with the link address 192.168.1.100: 8080/Scada-LTS/views.shtm?viewId=2.

Please test and let me know if you have a different result.

@Limraj
Copy link
Collaborator

Limraj commented Jul 1, 2023

Hi @fabiodurao,
So you are saying that you connect from your computer to the Scada-LTS application that is hosted on this server, you configure the links and then you get localhost there(?), so the link does not work for other computers? Do you think if it worked like that, could this feature be of any use that someone wouldn't have noticed before?

Again, this is a question of configuration portability, here from localhost, to another server. If as a client you connect to an application hosted on that server and set up links there, you get absolute links to that server, then as long as the client machine has access to that application on that server it must work. It doesn't matter if the link is relative or absolute.

There is also a situation where you configure it directly from the server, then you could get localhost there, the solution here is not to configure the application from the server, but from the client's computer, most clients use the application this way and have not reported this problem. So this is unusual usage.

Relative addresses, on the other hand, would be helpful, but in the problem of configuration portability between servers, i.e. by configuring links on one server, they would work on another, you could import this configuration from this other server and we could deal with it, because it is important.

I created an issue for this problem:
#2600

Everything that has been planned for version 2.7.5.4 is done, so we can add it to this version.

Regards,
Kamil Jarmusik

@Limraj
Copy link
Collaborator

Limraj commented Jul 1, 2023

This topic can be closed, setting relative addresses will also solve the problem of configuring the application directly on the server.

@Limraj Limraj closed this as completed Jul 1, 2023
@Limraj Limraj added this to the 2.7.5.4 milestone Aug 7, 2023
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

2 participants