[Fwd: Current development status]
Atif Ghaffar <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, Some of the users are getting into speed problems with the interface when the numbers of domains grow. I tried to import around 600 domains and I see the same effect. The admin panel (the one of the left) is too slow. It is slow because it tries to get all domains to list them in the select list. What I propose is a combination of old behaviour plus searching possibilities. By default you get zero domains is the list. If you want all .com domains, search for ".com", if you want all domains that have the word isp in it, search for "isp". If you really want alllllllll the domains, search for "*". This patch to HEAD implements the behaviour. Please test it and if it required we can bring it to current branch also. best regards
menu.tmpl.HEAD.patch
(text/plain, 1.8 KB)
Index: menu.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/menu.tmpl,v
retrieving revision 1.48
diff -b -B -u -r1.48 menu.tmpl
--- menu.tmpl 15 Jul 2004 08:24:12 -0000 1.48
+++ menu.tmpl 27 Dec 2004 16:08:52 -0000
@@ -12,9 +12,21 @@
var cgidomain="&ispmanDomain="+ispmanDomain
function selectDomain(domain){
+ if (domain=="__search__"){
+ var searchString= prompt('Please enter part of the domain that you want to search', ' ');
+ if (searchString!=""){
+ location=cgiurl+"?mode=menu&domainsearchfilter="+searchString;
+ } else {
+ return false;
+ }
+
+
+ } else {
location=cgiurl+"?mode=menu&ispmanDomain="+domain
}
+ }
+
function doThis(mode,param){
top.content.location=cgiurl+"?mode="+mode+cgidomain+"&"+param
}
@@ -80,7 +92,18 @@
my $groups;
my $thisDomainType;
-$domains=$ispman->makeDomainHash($ispman->getDomains());
+
+if ($r->param('domainsearchfilter')){
+ if ($r->param('domainsearchfilter') eq '*'){
+ $filter="";
+ } else {
+ $filter="ispmanDomain=*@{[$r->param('domainsearchfilter')]}*";
+ }
+ $domains=$ispman->makeDomainHash($ispman->getDomains($filter));
+
+}
+
+
if ($r->param("ispmanDomain")){
$thisDomain=$r->param("ispmanDomain");
@@ -106,7 +133,7 @@
<SELECT onChange="selectDomain(this.options[this.selectedIndex].value)">|;
$text.="<OPTION>" . _("Choose domain to manage") . "</option>\n";
-$text.="<OPTION>-------------------</option>\n";
+$text.="<OPTION value='__search__'> Search for a domain</option>\n";
for $domain( keys %$domains ) {
$domainInfo=$ispman->getDomainInfo($domain);
[SPAM] Current development status
(message/rfc822, 4.6 KB) - not displayed