2 # Shows all zones, with links to add more
4 require './zones-lib.pl';
7 $p = new Webmin::Page(undef, $module_info{'desc'}, "intro", 1, 1);
8 $zn = &get_current_zone();
9 if (!&has_command("zoneadm")) {
10 $p->set_errormsg(&text('index_ecmd', "<tt>zoneadm</tt>"));
12 elsif ($zn ne "global") {
13 $p->set_errormsg(&text('index_eglobal', "<tt>$zn</tt>"));
18 @zones = sort { $a->{'name'} cmp $b->{'name'} } &list_zones();
19 $form = new Webmin::Form();
20 $form->set_input(\%in);
22 $table = new Webmin::Table([ $text{'list_name'},
26 $text{'list_actions'} ], "100%");
27 $form->add_section($table);
30 foreach $a (&zone_status_actions($z)) {
31 push(@actions, new Webmin::TableAction("save_zone.cgi", $a->[1], [ [ "zone", $z->{'name'} ], [ $a->[0], 1 ], [ "list", 1 ] ]));
34 "<a href='edit_zone.cgi?zone=$z->{'name'}'>$z->{'name'}</a>",
37 &nice_status($z->{'status'}),
41 $table->set_emptymsg($text{'index_none'});
42 $table->add_link("create_form.cgi", $text{'index_add'});
43 $p->add_footer("/", $text{'index'});