Changeset 193

Show
Ignore:
Timestamp:
01/23/07 16:01:47 (2 years ago)
Author:
ludo
Message:

group menu changes must be confirmed (from r3937)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/webmin/lbs/cron/index.cgi

    r138 r193  
    5656                        $donehead = 1; 
    5757                        } 
     58                if (!($job->{'command'} =~ /\/wake/)) { next; } 
    5859                print "<tr $cb>\n"; 
    5960                if ($i == 0 && @ulist != 1) { 
  • trunk/webmin/lbs/debian/changelog

    r170 r193  
    1 webmin-lbs (2.6.7) stable; urgency=low 
     1webmin-lbs (2.6.8) stable; urgency=low 
    22 
    33  * New release. 
  • trunk/webmin/lbs/details.cgi

    r162 r193  
    5252 
    5353$conf =~ s/[^a-z0-9_\/-]//gi; 
    54 if ($conf =~ /imgbase/) { 
    55         lbs_common::print_html_tabs(['system_backup', 'details']); 
     54if ($in{'full'} && $in{'full'} == 1) { 
     55        lbs_common::print_html_tabs(['system_backup', 'logs']); 
    5656} else { 
    57         lbs_common::print_html_tabs(['system_backup', 'details']); 
    58         # tabs(1);      # FIXME 
     57        lbs_common::print_html_tabs(['system_backup', 'shared_images']); 
     58 
     59        bootmenu_save_edit_conf($conf, $lbs_home); 
     60        bootmenu_save_postinst($conf, $lbs_home); 
    5961} 
    60  
    61 bootmenu_save_edit_conf($conf, $lbs_home); 
    62 bootmenu_save_postinst($conf, $lbs_home); 
    6362 
    6463$conf =~ m|([^/]+)/?$|; 
     
    134133                 
    135134                if ($lrsgznbd) { 
    136                     if ($type == 131 || $type == 7) { 
     135                    if ($type == 131 || $type == 7 || $type eq "LVM") { 
    137136                        push @view, "<a href=\"mountpart.cgi?part=$in{conf}/$file\">View !</a>"; 
    138137                    } else { 
  • trunk/webmin/lbs/lang/en

    r170 r193  
    181181msg_sync_ok=Synchronization or every client from the profile / group <b>$1</b> done. 
    182182msg_synchro_warn=WARNING: the menu for every client of this profile / group will be reset ! 
     183msg_menu_warn=WARNING: the menu for every client of this profile / group will be modified ! Are you sure to continue ? 
    183184 
    184185postinst_autogenerated=Auto-generated from the webmin interface on $1 
  • trunk/webmin/lbs/lang/fr

    r170 r193  
    182182msg_synchro_ok=Synchronisation des machines du profil / groupe <b>$1</b> effectuée. 
    183183msg_synchro_warn=ATTENTION: le menu de chaque machine de ce profil / groupe sera remis à zéro ! 
     184msg_menu_warn=ATTENTION: le menu de chaque client de ce profil / groupe sera modifié ! Etes-vous sûr de vouloir continuer ? 
    184185 
    185186postinst_autogenerated=Auto-généré par l'interface webmin le $1 
  • trunk/webmin/lbs/lbs.pl

    r162 r193  
    8787 
    8888                $mvmac = ""; 
    89                 if ($size == 0 && $k ne "Base-0") {                   # if there are no images attached 
     89                if ($size == 0 && $k ne "Base-0" && $k ne "Postinst") {                       # if there are no images attached 
    9090                        $delicon = "trash.gif"; 
    9191                        $mvicon = "up1.gif"; 
     
    107107                } 
    108108 
    109                 if ($size == 1 && $k ne "Base-0") { 
     109                if ($size == 1 && $k ne "Base-0" && $k ne "Postinst") { 
    110110                        my $sname = $first; 
    111111                        $sname =~ s/.*\///; 
     
    440440        'border'    => "border=1 width='100%'", 
    441441); 
    442         print "<script type=\"text/javascript\" src=\"/lbs_common/js/tooltip.js\"></script>\n"; 
     442        print<<EOF; 
     443<script type="text/javascript" src="/lbs_common/js/tooltip.js"></script> 
     444<script language="JavaScript"> 
     445<!-- 
     446function confirmSub() 
     447
     448if (confirm("$text{'msg_menu_warn'}")) 
     449return true; 
     450else 
     451return false; 
     452
     453// --> 
     454</script>        
     455EOF 
    443456        print "<div id=\"tooltip\" style=\" position: absolute; visibility: hidden;\"></div>\n"; 
    444457        # Le tableau des menus   
     
    494507        print lbs_common::make_html_table( "", \@toprow, \@lol, \%tabattr ); 
    495508         
     509        my $confirm = ""; 
    496510        if ($mac) { 
    497511                print "<input type=hidden name=mac value=\"$mac\">\n"; 
     
    499513                print "<input type=hidden name=group value=\"$group\">\n"; 
    500514                print "<input type=hidden name=profile value=\"$profile\">\n"; 
     515                $confirm = "onclick=\"return confirmSub()\">"; 
    501516        } 
    502517        print "<input type=hidden name=form value=\"bootmenu\">\n"; 
    503         print "<input type=submit name=apply value=\"$text{'but_apply'}\">\n"; 
     518        print "<input type=submit name=apply value=\"$text{'but_apply'}\" $confirm\n"; 
    504519        print "<input type=submit name=sync value=\"$text{'but_sync'}\">\n"; 
    505520        print "<input type=submit name=cancel value=\"$text{'but_return'}\">\n"; 
  • trunk/webmin/lbs/log.cgi

    r162 r193  
    3434lbs_common::InClean(); 
    3535 
    36 use vars qw (%in %text $root_directory %gconfig $VERSION $LRS_HERE @LRS_MODULES %config %lbsconf $lbs_home $current_lang); 
     36use vars qw (%in %text $root_directory %gconfig $VERSION $LRS_HERE @LRS_MODULES %config %lbsconf $lbs_home $current_lang $last_st); 
    3737 
    3838cookie_send_group(%in); 
     
    112112        my $all = read_file_lines($file); 
    113113        my $num = @$all; 
     114        $last_st = ""; 
    114115        my $last1 = &logfile2txt(@$all[$num-1]) if ($num >= 1); 
    115116        my $last2 = &logfile2txt(@$all[$num-2]) if ($num >= 2); 
     
    153154      $log .= " ".$text{'lab_partition'}." ".$$l[0]; 
    154155    } 
     156    if (-r $dir."/log.txt") { 
     157      $dir =~ s/$lbs_home//; 
     158      $log .= " <a href='details.cgi?mac=$mac&full=1&conf=$dir/'><img src='images/detail-small.gif'></a>"; 
     159    } 
    155160  } 
    156161 
     
    183188  foreach my $key (keys %trans) { 
    184189    if ($log =~ /($key) ?(.*)/) { 
    185       return "<img align='middle' src='images/$trans{$1}[1]'>&nbsp;".$trans{$1}[0]."&nbsp;".$2; 
    186     } 
    187   } 
     190      my $msg = $1; 
     191      my $rem = $2; 
     192      my $img = $trans{$msg}[1]; 
     193       
     194      if ($last_st =~ /completed/ and $msg =~ /started/) { 
     195        # if a completed follows a started state then, then change the started  
     196        # state color to green 
     197        $img = "led-green.gif"; 
     198      } 
     199      if ($msg ne "default set to") { $last_st = $msg; } 
     200      return "<img align='middle' src='images/$img'>&nbsp;".$trans{$msg}[0]."&nbsp;".$rem; 
     201    } 
     202  } 
     203   
    188204  return $log; 
    189205} 
     
    271287      my $all = read_file_lines($file); 
    272288      #my $num = @$all; 
     289      $last_st = ""; 
    273290 
    274291      print "<h2>$text{lab_status}:</h2>"; 
  • trunk/webmin/lbs/module.info

    r170 r193  
    77 
    88depends=0.94 lbs_common proc at 
    9 version=2.6.7 
     9version=2.6.8