vhost selection drop-down box replaced with text input

14 posts / 0 new
Last post
#1 Mon, 11/15/2010 - 02:49
BigRedS

vhost selection drop-down box replaced with text input

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.

Mon, 11/15/2010 - 04:00
Locutus

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:

1) Can you make a screenshot of what this effect looks like?

2) 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.

3) Can you take a look at the page source for the left frame? The part in question should look something like this:

<hr>
<div class='domainmenu'>
<input class='ui_hidden' type=hidden name="mode" value="virtualmin">
<select class='ui_select' name="dom" size=1 onChange='form.submit()' style='width:190px'>
<option value="128923809621722" selected >test.tianet.de
<option value="12897302603303" >&nbsp;&nbsp;test1.test.tianet.de
<option value="128966539027051" >test1.tianet.de
<option value="128976253720549" >test5.tianet.de
</select>
<input type='image' src='images/ok.gif' alt='' class='goArrow'>
</div>

4) To make sure it's not a browser issue: Did you try it with another browser?

5) Does List virtual servers still show them all?

6) 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

hostname:10000/virtual-server/edit_domain.cgi?dom={domain-id}

Then you should be able to do

hostname:10000/virtual-server/delete_domain.cgi?dom={domain-id}

Mon, 11/15/2010 - 05:15 (Reply to #2)
BigRedS

I'm almost glad this has someone else stumped so far :)

In order:

1) http://avi.co/stuff/virtualmin.png

2) 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

3) That div doesn't include a dropdown definition, making me think it's a concious decision on the part of virtualmin:

<div class='domainmenu'>
<input class='ui_hidden' type=hidden name="mode" value="virtualmin">
Server:<input class='ui_textbox' name="dname" value="150harleyst.com" size=15  ><input type='image' src='images/ok.gif' alt='' class='goArrow'>
</div>

4) Yeah, it was reported in some version of IE, I've checked it in FF3.x and Epiphany

5) It claims there are too many, and offers a search box instead. I can't find any that appear to have disappeared.

6) I don't think deletion is feasible, I'll check but I'd rather not.

Thank you! :)

Mon, 11/15/2010 - 05:21 (Reply to #3)
BigRedS

Just thought to peruse the code, found this

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'},
                                  ("&nbsp;&nbsp;" 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.

Mon, 11/15/2010 - 06:06
Locutus

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.

So this seems to be intended behavior.

Mon, 11/15/2010 - 09:08
andreychek

Hi guys!

Yeah, you're seeing intended behavior.

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?

-Eric

Mon, 11/15/2010 - 10:48
Locutus

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.

Tue, 11/16/2010 - 08:10
andreychek

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.

Thanks for your input!

-Eric

Tue, 11/16/2010 - 14:49
Locutus

You're welcome!

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?

Tue, 11/16/2010 - 15:00
andreychek

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".

-Eric

Wed, 11/17/2010 - 03:59 (Reply to #10)
BigRedS

[quote] Once you edit the Maximum Domains to Display setting in Server Configuration -> Virtualmin Configuration -> User Interface Settings, that overrides the default. [/quote]

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...

Wed, 11/17/2010 - 08:20 (Reply to #11)
andreychek

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 :-)

-Eric

Tue, 11/16/2010 - 15:09
Locutus

Aah okay, I see. Alright, changing the default isn't that much a biggie I'd say. Okay, it will maybe help avoid some support requests. :)

But what about the idea to introduce "vserver groups" for the purpose of, well, grouping them visibly in a selection list? :)

Fri, 04/08/2011 - 02:35
lvsys

Thanks guys for posting the solution - I just hit the issue, and was getting frustrated by the texbox

I will say that the option has moved, it's now under:

Virtual Min [ top tab] -> (secong group down below) System Settings -> Virtualmin Configuration

There, select the drop down option "User interface settings" and check unlimited.

--- I've had to look for a while before finding the option

Cheers

Topic locked