How to Embed File Path Explorer in Open OnDemand Passenger App

How to Embed File Path Explorer in Open OnDemand Passenger App

I’m developing an app using Open OnDemand that allows users to submit their Gaussian scripts to SLURM via a custom wrapper we use at our HPC center called GBatch. My goal is to create a Passenger app that enables users to upload their G16 files, which GBatch will then parse and submit to SLURM.

For interactive apps, Open OnDemand offers a file_path form option that includes an embedded file path explorer and selector. I would like to use this existing functionality in my Passenger app to avoid reinventing the wheel. It seems the modals source code is located here.

My Development Stack:

  • HTML
  • ERB
  • JQuery
  • Bootstrap

My Questions:

  1. Is it possible to embed or add the file_path form option/modal from Open OnDemand’s interactive apps into my Passenger app?
  2. If so, what are the steps or required code snippets to integrate this feature?

What I Tried

I tried making it an interactive app, but I couldn’t achieve the desired workflow. The interactive apps in Open OnDemand seemed to immediately submit the job to SLURM, whereas I need to submit the G16 files to GBatch first, which then handles the submission to SLURM.

I expected to find a way to embed the file_path form option/modal into my Passenger app to provide users with a convenient file explorer and selector. However, I couldn’t find documentation or examples on how to integrate this specific feature into a Passenger app, leading me to ask for guidance.

I appreciate any guidance or examples from those who have experience with Open OnDemand Passenger apps and integrating existing components like the file path explorer.

Hello and welcome!

If you are building your own passenger app, you do not have OOD code to work off of unfortunately. So trying to call the file_path from that app won’t make any sense given the app doesn’t have any of the OOD dashboard code you linked to. Passenger apps are isolated and have to have the libraries and code you want pulled in by your setup. Here’s a quick overview of phusion passenger that may help clear this up: Fundamental concepts - Passenger + Node.js basics - Passenger Library

You would have to pull the OOD code you want into that project to use, but even then that modal code is not an isolated API to just hit and use, but is deeply embedded in OOD and relies on other parts of the back-end code and logic to work correctly.

So, it’s possible but through a whole lot of work and rewriting and not something I’d recommend. It is probably going to be easier for you to find a third-party file browser to throw into your app and use.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.