[Netpass-devel] NetPass/www/htdocs/Admin/reports byclient.mhtml,1.4,1.5
Brought to you by:
jeffmurphy
From: jeff m. <jef...@us...> - 2005-08-22 19:26:18
|
Update of /cvsroot/netpass/NetPass/www/htdocs/Admin/reports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3124/www/htdocs/Admin/reports Modified Files: byclient.mhtml Log Message: appstarter changes Index: byclient.mhtml =================================================================== RCS file: /cvsroot/netpass/NetPass/www/htdocs/Admin/reports/byclient.mhtml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- byclient.mhtml 3 Aug 2005 18:02:21 -0000 1.4 +++ byclient.mhtml 22 Aug 2005 19:26:08 -0000 1.5 @@ -18,8 +18,13 @@ $macs => ''; </%args> -<script><!-- +<script language="JavaScript"><!-- setWhereAmI('Reports'); +function ldap_popup(url, w, h) { + var opts="top=0,left=0,scrollbars,status=no,menubar=no,location=no,toolbar=no,resizable=yes,fullsize=no,width=" + + w + ",height=" + h; + window.open(url, "LDAP Query", opts); +} --></script> <%perl> @@ -153,11 +158,24 @@ foreach my $m (sort @$neis) { next if ($m eq $mac); + my $ldap_url = $np->cfg->policy(-key => 'LDAP_USER_QUERY', -network => $ri->{$m}->{'ipAddress'} ); + my $ldap_puh = $np->cfg->policy(-key => 'LDAP_POPUP_HEIGHT', -network => $ri->{$m}->{'ipAddress'} ); + my $ldap_puw = $np->cfg->policy(-key => 'LDAP_POPUP_WIDTH', -network => $ri->{$m}->{'ipAddress'} ); + my $ldap_ref = ''; + if ($ldap_url) { + $ldap_puh ||= 480; + $ldap_puw ||= 640; + $ldap_ref = sprintf(qq{<a href="javascript:ldap_popup('$ldap_url', %d, %d);">}, + $ri->{$m}->{'username'}, + $ldap_puw, $ldap_puh); + } + my $row = ""; if (exists $ri->{$m}) { $row .= - $q->td($ri->{$m}->{'status'}) . - $q->td($ri->{$m}->{'username'}) . + $q->td(qq{<a href="/Admin/qc.mhtml?mac=$m&submit=search">}. + $ri->{$m}->{'status'}."</a>") . + $q->td($ldap_ref.$ri->{$m}->{'username'}.($ldap_ref?"</a>":"")) . $q->td($ri->{$m}->{'ipAddress'}) . $q->td($ri->{$m}->{'OS'}); } else { @@ -204,12 +222,26 @@ my $rn = 0; foreach my $ma (keys %$mi) { + + my $ldap_url = $np->cfg->policy(-key => 'LDAP_USER_QUERY', -network => $mi->{$ma}->{'ipAddress'} ); + my $ldap_puh = $np->cfg->policy(-key => 'LDAP_POPUP_HEIGHT', -network => $mi->{$ma}->{'ipAddress'} ); + my $ldap_puw = $np->cfg->policy(-key => 'LDAP_POPUP_WIDTH', -network => $mi->{$ma}->{'ipAddress'} ); + my $ldap_ref = ''; + if ($ldap_url) { + $ldap_puh ||= 480; + $ldap_puw ||= 640; + $ldap_ref = sprintf(qq{<a href="javascript:ldap_popup('$ldap_url', %d, %d);">}, + $mi->{$ma}->{'username'}, + $ldap_puw, $ldap_puh); + } + push @rows, $q->TR( { -id => $rl[$rn % 2].$rn, -class => $rl[$rn % 2] }, $q->td({-class => 'mono', -id => 'macCell'.$rn}, NetPass::padMac($ma)), - $q->td($mi->{$ma}->{'status'}), - $q->td($mi->{$ma}->{'username'}), + $q->td(qq{<a href="/Admin/qc.mhtml?mac=$ma&submit=search">}. + $mi->{$ma}->{'status'}."</a>"), + $q->td($ldap_ref.$mi->{$ma}->{'username'}.($ldap_ref?"</a>":"")), $q->td($mi->{$ma}->{'ipAddress'}), $q->td($mi->{$ma}->{'OS'}), $q->td($mi->{$ma}->{'switchIP'}), |