* "Delete Virtual Host" button (closes: #306771)

This commit is contained in:
Xavier Guimard 2007-03-13 06:46:23 +00:00
parent c97159cd2c
commit ce5759c83f
5 changed files with 47 additions and 2 deletions

View File

@ -47,6 +47,7 @@ example/imgs/tombs_mag.gif
example/lemonldap-ng-manager.js
example/lmConfig.mysql
example/index.pl
example/scripts/lmSessionDump
example/soapserver.pl
lib/Lemonldap/NG/Manager.pm
lib/Lemonldap/NG/Manager/Apache/Session/SOAP.pm

View File

@ -0,0 +1,2 @@
test.example.com http://test.example.com/reload

View File

@ -0,0 +1,29 @@
#!/usr/bin/perl
# Set here the session storage you use
$sessionStorage = 'Apache::Session::File';
$sessionStorageOptions = {
Directory => '/tmp',
};
############
usage() unless($ARGV[0]);
eval "use $sessionStorage";
die $@ if($@);
tie %h, $sessionStorage, $ARGV[0], $sessionStorageOptions;
print "Attributes and macros :\n";
my @t = sort keys(%h);
print "$_ " foreach(@t);
print "\n";
foreach my $k ( sort keys(%h) ) {
next if($k eq 'groups');
print "\t$k\t=> $h{$k}\n";
}
if( $h{groups} ) {
print "Groups :\n";
print "\t$_\n" foreach( sort split /\s+/, $h{groups} );
}

View File

@ -77,7 +77,8 @@ sub javascript {
deleteNode locationRules unableToSave confSaved saveFailure
newRule newHeader httpHeaders waitingResult unknownError
configurationWasChanged configLoaded warningConfNotApplied
applyConf prevConf lastConf nextConf)) {
applyConf prevConf lastConf nextConf deleteVirtualHost
areYouSure)) {
$text{$_} = &{"txt_$_"};
$text{$_} =~s/'/\\'/g;
}
@ -145,6 +146,7 @@ function onNodeSelect(nodeId) {
if(nodeIs(nodeId,"virtualHosts")){
but+=button('$text{newVirtualHost}','newVirtualHost',nodeId);
if(nodeIs(nodeId,"virtualHost")){
but+=button('$text{deleteVirtualHost}','deleteVirtualHost',nodeId);
but+=button('$text{newRule}','newRule',nodeId);
but+=button('$text{newHeader}','newHeader',nodeId);
}
@ -234,6 +236,11 @@ function newVirtualHost() {
}
}
function deleteVirtualHost(id) {
var vh=vhostId(id);
if(confirm('$text{areYouSure}')) tree.deleteItem(vh);
}
function newValue(id,text,type,value){
indice--;
insertNewChild(id,'j_'+indice,text);

View File

@ -57,7 +57,7 @@ sub fr {
httpHeaders => 'En-têtes HTTP',
locationRules => 'Règles',
# Warning: here, é wil not be understood by Firefox (msgBox)
# Attention: ici, é ne sera pas interprété par Firefox (msgBox)
newVirtualHost => 'Nouvel hote virtuel',
newMacro => 'Nouvelle macro',
newGroup => 'Nouveau groupe',
@ -84,6 +84,10 @@ sub fr {
prevConf => 'Précédente',
nextConf => 'Suivante',
lastConf => 'Dernière',
deleteVirtualHost => "Supprimer l'hôte virtuel",
# Attention: ici, Ê ne sera pas interprété par Firefox (msgBox)
areYouSure => 'Etes vous sur ?',
};
}
@ -139,5 +143,7 @@ sub en {
prevConf => 'Previous',
nextConf => 'Next',
lastConf => 'Last',
deleteVirtualHost => 'Delete virtual host',
areYouSure => 'Are you sure ?',
};
}