• 
      

    Add RepositoryForm for tracking repository config options and state.

    Review Request #12754 — Created Dec. 9, 2022 and updated

    Information

    Review Board
    release-6.x

    Reviewers

    This introduces RepositoryForm, which is now created when
    instantiating the repository configuration page. This parses model state
    from the server-side form, creating collections of SCMTool, hosting
    service, and account options for configuration.

    This will soon contain logic and additional configuration state, for the
    purpose of creating a more dynamic client-side-driven repository
    configuration experience.

    For now, little has changed, except some global variables
    (HOSTING_SERVICES and TOOLS_INFO) and some stored state from the DOM
    (the list of original SCMTools) have been updated to use the new form
    model capabilities.

    There's also some code removed for disabling form inputs when showing a
    SSL cert or SSH key confirmation. This hasn't worked since Review Board
    3, and this will all be replaced in time anyway. This code existed in a
    file that's now being removed, so for now, it's just going away.

    Repository form code now lives in the main "admin" bundle, and unit
    tests have been added for the form model.

    Unit tests passed.

    Tested that repository form loading worked, and that all operations that
    query hosting service information or tools and update configuration all
    behave as normal.

    Summary ID
    Add RepositoryForm for tracking repository config options and state.
    This introduces `RepositoryForm`, which is now created when instantiating the repository configuration page. This parses model state from the server-side form, creating collections of SCMTool, hosting service, and account options for configuration. This will soon contain logic and additional configuration state, for the purpose of creating a more dynamic client-side-driven repository configuration experience. For now, little has changed, except some global variables (`HOSTING_SERVICES` and `TOOLS_INFO`) and some stored state from the DOM (the list of original SCMTools) have been updated to use the new form model capabilities. There's also some code removed for disabling form inputs when showing a SSL cert or SSH key confirmation. This hasn't worked since Review Board 3, and this will all be replaced in time anyway. This code existed in a file that's now being removed, so for now, it's just going away. Repository form code now lives in the main "admin" bundle, and unit tests have been added for the form model.
    70f59fdb6ddc06ea4c6567acab8efc3d9d3f12a5
    Description From Last Updated

    'django.http.HttpRequest' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    chipx86
    david
    1. Ship It!
    2. 
        
    maubin
    1. Ship It!
    2. 
        
    chipx86
    chipx86
    chipx86
    chipx86
    Review request changed
    Change Summary:

    Attempt 2: Updated a couple references to old key names to new equivalents.

    Commits:
    Summary ID
    Add RepositoryForm for tracking repository config options and state.
    This introduces `RepositoryForm`, which is now created when instantiating the repository configuration page. This parses model state from the server-side form, creating collections of SCMTool, hosting service, and account options for configuration. This will soon contain logic and additional configuration state, for the purpose of creating a more dynamic client-side-driven repository configuration experience. For now, little has changed, except some global variables (`HOSTING_SERVICES` and `TOOLS_INFO`) and some stored state from the DOM (the list of original SCMTools) have been updated to use the new form model capabilities. There's also some code removed for disabling form inputs when showing a SSL cert or SSH key confirmation. This hasn't worked since Review Board 3, and this will all be replaced in time anyway. This code existed in a file that's now being removed, so for now, it's just going away. Repository form code now lives in the main "admin" bundle, and unit tests have been added for the form model.
    d38d098c9d1d3c9d9a89a7c7582a8d28bd424776
    Add RepositoryForm for tracking repository config options and state.
    This introduces `RepositoryForm`, which is now created when instantiating the repository configuration page. This parses model state from the server-side form, creating collections of SCMTool, hosting service, and account options for configuration. This will soon contain logic and additional configuration state, for the purpose of creating a more dynamic client-side-driven repository configuration experience. For now, little has changed, except some global variables (`HOSTING_SERVICES` and `TOOLS_INFO`) and some stored state from the DOM (the list of original SCMTools) have been updated to use the new form model capabilities. There's also some code removed for disabling form inputs when showing a SSL cert or SSH key confirmation. This hasn't worked since Review Board 3, and this will all be replaced in time anyway. This code existed in a file that's now being removed, so for now, it's just going away. Repository form code now lives in the main "admin" bundle, and unit tests have been added for the form model.
    70f59fdb6ddc06ea4c6567acab8efc3d9d3f12a5

    Checks run (2 succeeded)

    flake8 passed.
    JSHint passed.
    david
    1. Ship It!
    2.