Orthanc Explorer 2 (OE2) {pre-login-configuration}

I am looking to add a function that enables doctors to write a report and attach it as a PDF to the study. I plan to add a button in Orthanc Explorer 2 (OE2) that opens report.html. I downloaded the OE2 “dist” directory to add the button and tried to load it using the serveFolder plugin, but it fails.

Here is my current configuration:
{
“ServeFolders”: {
“Extensions”: {
“.ico”: “image/png”
},

"Folders": {
  "/oe": "/etc/orthanc/oe2/dist"
}

}
When I open domain/ui/app/index.html, it works perfectly.
However, when I try to open domain/oe/index.html, it gets stuck and shows the following errors [inspection mode]:

https://domain.com/api/pre-login-configuration 404 not found

It was supposed to be https://domain.com/oe/api/pre-login-configuration, but it doesn’t work.

Hi,

Check the development setup in the repo and more specifically the nginx config

HTH,

Alain

Hello gents,
Apologies for reaching out again, but I’m still facing challenges with adding a textbox in OE2 to store it in a metadata field.

To avoid the compiling process, I downloaded the “dist” folder from the on-shelf repository: https://orthanc.uclouvain.be/downloads/linux-standard-base/orthanc-explorer-2/mainline/dist.zip

Here are the steps I’ve taken so far:

  • I placed the directory in a local path on the server at “/etc/orthanc/oe2”.

  • I activated the serverfolder plugin with the following configuration:

    "Folders": {
      "/oe": "/etc/orthanc/oe2"
    }
    
  • I configured Nginx as follows:

      location / {
          root   /usr/share/nginx/html;
          index  index.html index.htm;
        }
      
      location /medikalz/ {
          proxy_pass http://orthanc_01:8042;
          rewrite /medikalz(.*) $1 break;
          proxy_set_header Host $http_host;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_request_buffering off;
          proxy_max_temp_file_size 0;
          client_max_body_size 0;
      }
      
      location /medikalz {
          return 301 /medikalz/ui/app/;
      }
      
      location /oe {
          return 301 /medikalz/oe/index.html;
      }
    
  • Initially, Nginx routes correctly and serverfolder enables the new route. However, it seems to have become stuck and I’m unsure of what might be causing the issue.
    Any suggestions or ideas would be greatly appreciated.
    Thank you.

Hi,

/ui/app/.. must be redirected to the static content (the one served by serve folder)
/ui/api/.. must be redirected to the Orthanc API

In this nginx file, we have one block for each subroute

Hope this helps,

Alain

Thanks, Alain!

It works now, but I want to share my experience with this issue.

  • NGINX Trailing Slash Issue: NGINX has a problem resolving variables with trailing slashes. For example, set $orthnc_explorer http://orthanc_01:8042/oe; doesn’t resolve correctly.

  • Proxy Pass Routing: NGINX was able to route proxy_pass for all blocks except for location /ui/api/. This route doesn’t go to NGINX to obtain the path. I had to manually fix it by replacing any instances of ../api with ..ui/api.

Thanks a lot!