I’m running Virtualmin 3.80gpl on Webmin 1.520 and Debian Lenny.
On the ‘dashboard’ type page - the one you hit first on logon - there’s a drop-down box at the top of the left-hand-pane from which you can pick domains to fiddle with.
This has now stopped being a drop-down box and is now a text-entry.
This appears to have happened following the addition of another domain. I think we’re up to 102 domains (going on a file count of /etc/webmin/virtual-server/domains).
I tried clicking through to ‘configure this page’, where the ‘Maximum servers to show’ was set to the default of 10. I tried bumping this up to 150 and then 300 (remembering that each domain has an alias which also shows up in this list) to no effect.
Entering a domain in the text box and clicking the arrow button next to it doesn’t appear to do much, either - I was expecting this to be somewhat equivalent to having selected the domain from the drop-down.
Whoa, that sounds odd. Never had that happen… then again, I’ve not yet dealt with 100 domains yet.
A few things to go through from my end:
Can you make a screenshot of what this effect looks like?
Can you tell whether it started after you created the 101st domain? If so, that’d be an odd coincidence if it didn’t have anything to do with the domain count.
Can you take a look at the page source for the left frame? The part in question should look something like this:
To make sure it’s not a browser issue: Did you try it with another browser?
Does List virtual servers still show them all?
What happens when you - if that’s possible and feasible - delete a few domains again? You should be able to do that by checking out their ID in the server list… Link would be like
Not for certain. I’m not the main user of the system, I just run the rest of the server it runs on. This was pointed out to me and the only thing the user could say had changed it was the addition of the last domain
That div doesn’t include a dropdown definition, making me think it’s a concious decision on the part of virtualmin:
if ($mode eq "virtualmin" && @doms) {
# Show Virtualmin servers this user can edit, plus links for various
# functions within each
print "<div class='domainmenu'>\n";
print &ui_hidden("mode", $mode);
if ($virtual_server::config{'display_max'} &&
@doms > $virtual_server::config{'display_max'}) {
# Show text field for domain name
print $text{'left_dname'},
&ui_textbox("dname", $d ? $d->{'dom'} : $in{'dname'}, 15);
}
else {
# Show menu of domains
print &ui_select("dom", $did,
[ map { [ $_->{'id'},
(" " x $_->{'indent'}).
&virtual_server::shorten_domain_name($_),
$_->{'disabled'} ?
"style='font-style:italic'" : "" ] }
@doms ],
1, 0, 0, 0,
"onChange='form.submit()' style='width:$selwidth'");
}
in /usr/share/webmin/virtual-server-theme/left.cgi
I tried setting display_max in /usr/share/webmin/virtual-server/config to 1000 with no effect. Guess I’ll have to actually check where that variable comes from, but might just hack that page up for now and get back to this if/when it’s quieter.
It is now at least an intentional change, apparently.
Aah, okay, I see it now, and can reproduce the behavior.
When I set System Settings -> Virtualmin Configuration -> User Interface Settings : Maximum number of domains to display to “2”, I also get the text field instead of a dropdown box.
Setting it back to 100, and reloading the whole page (it contains frames, also make sure to clear your cache), it shows the dropdown box again.
Jamie’s thought process there was that at a certain point, that dropdown list becomes huge and difficult to manage. It also takes resources to generate that dropdown list.
With that in mind, he made it so that after 100 domains, it turned into a text box that allows you to search for domains, rather than scroll through a list of them.
Now, between you and me… I hate that text box And I’m not sure I’ve actually run into a case where somewhere preferred it.
With having 100+ domains on one server becoming more common, it might be a great time to re-think whether that’s the right way to do things
What do you think – is there a time when N domains becomes unmanageable in a dropdown list? If so, what should “N” be?
Hmm… I think it’s quite hard to denominate a concrete N there. I’d say the user should decide for themselves what the N is, just like it’s set up now.
But I certainly agree that depending on the number of domains, a dropdown list becomes less and less feasible. But a text box with Search button I’d probably use even less. It is a nice addition, but the main means of switching domains should probably be a dedicated “selection page” to which a link appears instead of the combobox, when the configured N is exceeded.
That selection page sure needs some nice ordering/grouping then. Maybe, introduce another level of hierarchy, just for grouping purposes, into the server configuration? A “server group” caption, allowing display/hiding/showing per-group and maybe per-subgroup.
I personally e.g. would then group my domains into “personal stuff”, “customer stuff”, “testing stuff”, to have a top level of distinguishing. Below that, maybe group by topic or TLD.
Okay, after speaking with Jamie, it sounds like the limitations here were setup some time ago… back when browsers didn’t like having hundreds of items in a dropdown list It had been set to 100 to prevent strange things from happening.
I believe he’s looking to make it unlimited by default, with an option to put the search box back if it become unruly.
From experience, let me tell you that nowadays, on a moderately powerful system, having about 1000 entries in a combobox should work fine concerning performance of the browser. I’m witnessing that in the admin backend of an online radio station, which has several multi-thousand comboboxes on specific pages.
Time to download the page, and clearness of the box contents is a different thing of course.
So did I get this right? The length of the combobox is determined by the “Maximum number of domains to display” setting (which my test seemed to imply), but right now is furthermore hard-limited to 100?
So did I get this right? The length of the combobox is determined by the “Maximum number of domains to display” setting (which my test seemed to imply), but right now is furthermore hard-limited to 100?
Well, the limit is setup so that no more than 100 domains would show up in that dropdown list by default.
Once you edit the Maximum Domains to Display setting in Server Configuration -> Virtualmin Configuration -> User Interface Settings, that overrides the default.
Personally, I have it set to unlimited.
All Jamie is doing is changing the default to be “Unlimited”.
It didn’t appear to on my install - even setting it north of 1000 had little effect.
I’ll check whether there’s a good time to have another test of it. I’d much rather have it configured ‘properly’ than my current method of just commenting out half of that if statement…
Yeah, that should completely do the trick for you.
If not, let us know, that would imply a problem of some sort.
I have one here set to unlimited that has more than a 100 domains in it, so it definitely can work… if it’s not for you, we may just need to do some digging to find out why