I am writing an interactive app which will generate a slurm accounting report from a bash script I wrote. I want to add a link to downloads the resulting file which is named dynamically based on date range.
Is there a way to query the status of the job to add logic to the info.html.erb file based on whether the job is complete or not?
I am not having success with accessing the session objects (ie. session.staged_root) using erb in the info.html.erb.
Is there a way to update the context objects while running the script or even add to the user_defined_context.json during the script? or are these objects defined on initialization and remain static through the process?
Ultimately I want a button which will download the file which is created by my script in the run dir. I assume it will look something like this in the end:
<h5>Once this job is completed you can download the csv file</h5>
<form action="https://portal.corvidhpc.com/pun/sys/dashboard/files/fs/...............?download=1">
<button class="btn btn-primary" type="submit">
<i class="fa fa-download"></i> Download csv file
</button>
</form>
I’m not sure, I don’t think so or at least not super easily. In any case, the card itself updates when the job completes so I’m not sure what you’re going for.
Yea there’s not that much that’s available in this view from the session. There appears to be very little available directly here. Though you could just read read user_defined_context.json here though.