Repository navigation
fix(domains): a new domain is offered in "Show configs of" at once - #155
Merged
Merged
Conversation
…once The edit dialog's "Show configs of" list came only with the options call, which takes seconds (it works out the proxies that fit each kind of domain: about 5 s on the test server) and was asked again after every change. A domain just added (e.g. a CDN domain with valid TLS) was missing from the list, or the list was empty, when the dialog was opened before that answer. The list is quick to build (10 ms), so it now comes with every domains list (load, add, edit, delete, reorder) and the dialog uses it; the options call still sends it for older pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Admins add a domain (e.g. CDN with valid TLS), open a domain's edit dialog to limit its sub link to it, and the new domain is not in Show configs of. Often the list is empty ("No available options").
Root cause: that list only came with
domains-page/options/, which also works out the compatible proxies for every mode × TLS mode. That takes about 5 s on the test server. The page asks for it again after every change, so a dialog opened in the meantime shows the old list or none._show_optionsitself was always complete: CDN domains were never filtered.Change
domains_page_api.py:_list_outaddsshow_options, which takes about 10 ms. It goes with every domains list: load, add, edit, delete and reorder. The options call still returns it too.api.ts,DomainDialog.vue,DomainsView.vue: the dialog, and the "Show configs of" labels on the rows, readstate.show_optionsfirst and fall back to the options call.Screenshots
The edit dialog opened right after the page loaded, with a test CDN domain (valid TLS) present:
Tested
vue-tsc: no errors in the changed files._compatible_proxies. Until it answers, the custom-proxies choice offers every proxy, which was already the case.Review
🤖 Generated with Claude Code