Add RepositoryForm for tracking repository config options and state.
Review Request #12754 — Created Dec. 9, 2022 and updated
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
andTOOLS_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 |
---|---|
70f59fdb6ddc06ea4c6567acab8efc3d9d3f12a5 |
Description | From | Last Updated |
---|---|---|
'django.http.HttpRequest' imported but unused Column: 1 Error code: F401 |
reviewbot |
- Change Summary:
-
Renamed some variables, functions, and payload keys to make it clear that the SCMTools and hosting services are options for the form, not data.
- Commits:
-
Summary ID 1d11b66ba4f534ca6157a1baa86989acc7f292c8 d871c607f4953b1b28057b83629d07e44c463de5 - Diff:
-
Revision 2 (+1290 -202)
Checks run (2 succeeded)
- Change Summary:
-
Missed a function rename.
- Commits:
-
Summary ID d871c607f4953b1b28057b83629d07e44c463de5 aedce9856a515ff8c44a6dbb912f3417b61ddc3e - Diff:
-
Revision 3 (+1290 -202)
Checks run (2 succeeded)
- Change Summary:
-
- Converted collection loops from
.forEach()
tofor..of
. - Fixed bad variable references.
- Converted collection loops from
- Commits:
-
Summary ID aedce9856a515ff8c44a6dbb912f3417b61ddc3e 1c5383d473237eb58b45a941eaae93ed032c919e - Diff:
-
Revision 4 (+1288 -210)
Checks run (2 succeeded)
- Change Summary:
-
Updated a couple references to old key names to new equivalents.
- Commits:
-
Summary ID 1c5383d473237eb58b45a941eaae93ed032c919e d38d098c9d1d3c9d9a89a7c7582a8d28bd424776 - Diff:
-
Revision 5 (+1288 -210)
Checks run (2 succeeded)
- Change Summary:
-
Attempt 2: Updated a couple references to old key names to new equivalents.
- Commits:
-
Summary ID d38d098c9d1d3c9d9a89a7c7582a8d28bd424776 70f59fdb6ddc06ea4c6567acab8efc3d9d3f12a5 - Diff:
-
Revision 6 (+1294 -216)