Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jb] Split the Job Browser mako into a regular and mini version and extract inline js #3646

Merged
merged 3 commits into from
Mar 11, 2024

Commits on Mar 7, 2024

  1. [jb] Split the Job Browser mako into a regular and mini version and e…

    …xtract inline js
    
    In order to be able to extract all job browser inline JS I had to split the job_browser.mako in two, one for the regular job browser and one for the mini version (used in the upper right jobs panel throughout Hue). Apart from separating it into two mako files there's also two corresponding webpack entries added. In short there was a mako page variable, is_mini, from a URL parameter that decided how to render the page and having that variable around would require inline JS.
    
    Common Knockout templates, shared between the main Job Browser and the mini version, are now included in the main hue.mako and shared between the two instances, this reduces the time to load the main Job Browser slightly but the main benefit is that there's no duplication.
    
    As part of this effort I've modernized a large chunk of the JS, a huge win is that this code is now under webpack control. I've fixed multiple bugs that became apparent in the IDE and linter once the mako inline js ended up in proper .js files. While testing I also improved some error handling throughout.
    
    Note that there are no unit tests as part of this commit, the Job Browser had zero coverage when I started and I feel the effort would be considerable to bring it up to a reasonable level. It makes more sense to me to introduce tests once we convert these pages to React.
    JohanAhlen committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    d08aea8 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2024

  1. Configuration menu
    Copy the full SHA
    d7b8b6e View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Whitespace fix

    JohanAhlen committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    8ef590a View commit details
    Browse the repository at this point in the history