archiver-appliance / svg_viewer

Move the web based viewer to SVG; support for many features requested by ops
0 stars 7 forks source link

Executing script on server side ? #2

Closed agaget closed 6 years ago

agaget commented 6 years ago

Hi Murali, We've installed the viewer as shown in this figure : svgviewerexample

The idea is that the client 04 is not on the same network as the appliance and we use the gateway 03 to access to the archiver. I can access to the svg_viewer from the clients (01 and 04) but from the client 04 i can't access to the PVs in the first screen, it works fine for the client 01.

I looked into the javascript in the searchForPVsMatchingPattern and add log to investigate. I don't have clear message error but i think that the script archViewer.js is launched from the client is not executed through the gateway and so the client 04 try to execute request directly to the appliance 02 which it don't have access.

Javascript is not my area but I've tried to add some runat="server" in the HTML without success.

Is there a way to execute the script on the server side ?

Thanks for your consideration

Alexis GAGET CEA France

slacmshankar commented 6 years ago

This should work just fine....

we use the gateway 03 to access to the archiver

What would this mean? Are you referring to Apache as a proxy on PC 003? If so, what does the config look like?

I don't have clear message error but i think that the script archViewer.js is launched from the client is not executed through the gateway and so the client 04

Something like this is what I'd expect.

To rephrase what you said, I'd assume

1) You have Apache running on PC003.

2) You have a viewer setup with its server URL something like so http://PC003/archiveviewer...

3) You can try to reach the data and the BPL directly from PC004 to make sure the setup is working correctly.

For example, I have on my Apache machine; two lines

Alias "/archiveviewer/retrieval/ui/viewer" "/scratch/Work/workspace/svg_viewer"

RewriteRule "^/archiveviewer/retrieval/(data|bpl)/(.+)" "http://tst.psdn:17668/retrieval/$1/$2" [P]

The first line points to an unaltered version of the svg_viewer.

The second proxies the bpl and data to my test instance.

With this setup

1) My viewer URL is http://mshankar/archiveviewer/retrieval/ui/viewer/archViewer.html

2) This makes uses of bpl http://mshankar/archiveviewer/retrieval/bpl/getMatchingPVs?pv=VPIO:*

3) And fetches data using http://mshankar/archiveviewer/retrieval/data/getData.txt?pv=VPIO:IN20:111:VRAW

All 3 URL's can be tested directly in the browser.

So, in your case I would expect some version of these URL's to work directly in the browser.

http://pc003/archiveviewer/retrieval/data/getData.txt?pv=somePV

http://pc003/archiveviewer/retrieval/bpl/getMatchingPVs?pv=VPIO:*

http://pc003/archiveviewer/retrieval/ui/viewer/archViewer.html

Regards.

Murali


From: agaget notifications@github.com Sent: Monday, January 8, 2018 6:25:06 AM To: slacmshankar/svg_viewer Cc: Subscribed Subject: [slacmshankar/svg_viewer] Executing script on server side ? (#2)

Hi Murali, We've installed the viewer as shown in this figure : [svgviewerexample]https://user-images.githubusercontent.com/25428659/34674402-0d05e634-f486-11e7-9742-8f19a6adff7f.png

[https://user-images.githubusercontent.com/25428659/34674402-0d05e634-f486-11e7-9742-8f19a6adff7f.png]

The idea is that the client 04 is not on the same network as the appliance and we use the gateway 03 to access to the archiver. I can access to the svg_viewer from the clients (01 and 04) but from the client 04 i can't access to the PVs in the first screen, it works fine for the client 01.

I looked into the javascript in the searchForPVsMatchingPattern and add log to investigate. I don't have clear message error but i think that the script archViewer.js is launched from the client is not executed through the gateway and so the client 04 try to execute request directly to the appliance 02 which it don't have access.

Javascript is not my area but I've tried to add some runat="server" in the HTML without success.

Is there a way to execute the script on the server side ?

Thanks for your consideration

Alexis GAGET CEA France

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/slacmshankar/svg_viewer/issues/2, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACeVso9wKAbCbqSt4oQ7DlIeM9LfTBekks5tIiVCgaJpZM4RWcRI.

agaget commented 6 years ago

Hi Murali, Thanks for your explanation. I'm not very comfortable with the web and apache tool so I didn't consider proxy. I configured it and now it works well. I just had to find that I have to change in my system the following variable httpd_can_connect_network to true. Thanks again for your responsiveness Alexis