Skip to content

Account names with special characters break the auto_accounts/auto_queues form widget #3919

@tw0flower

Description

@tw0flower

Hi,

We use the auto_accounts and auto_qos widgets to generate a form for a Jupyter interactive application, and the account names that we use seem to break the web page.

Our Slurm accounts names include "." and "_" characters, which get brought directly into the HTML code. For instance, one of the attributes in the auto_account menu will have value=faculty_name.surname, and the corresponding data-option-for-auto-accounts attribute in the QoS menu will be data-option-for-auto-accounts-faculty_name.surname.

The Javascript code for the form page does not find the entries to hide because of these special characters, which results in incompatible QoS options being displayed. The image below presents the case of a user that has access to 3 Slurm accounts. With the faculty_name.surname account selected, some QoS options that belong to other accounts are displayed. This does not happen with accounts that do not have special characters in their names: only QoS options that belong to the account are showed.

Changing the attribute names in the HTML code to faculty-name-surname and data-option-for-auto-accounts-faculty-name-surname in the browser's developer tools fixes the issue.

The code generating the HTML page seems to belong to this file:

hash["data-option-for-auto-accounts-#{account}"] = false

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Reviewed, Scheduled

Status

Closed Completed for Release

Relationships

None yet

Development

No branches or pull requests

Issue actions