3 # Display a list of directories and their client(s)
6 require './exports-lib.pl';
7 &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
8 &help_search_link("nfs exports", "man", "howto"));
10 if (!&has_nfs_commands()) {
11 print $text{'index_eprog'},"<p>\n";
12 &ui_print_footer("/", $text{'index'});
16 # Display table of exports and clients
17 @exps = &list_exports();
19 print &ui_form_start("delete_exports.cgi", "post");
20 @dirs = &unique(map { $_->{'dir'} } @exps);
22 # Directory list heading
23 print &select_all_link("d"),"\n";
24 print &select_invert_link("d"),"\n";
25 print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <br>\n";
27 print &ui_columns_start([ "",
29 $text{'index_to'} ], 100, 0, \@tds);
31 # Rows for directories and clients
34 if ($d ne $nfsv4_root) {
35 push(@cols, &html_escape($d));
38 push(@cols, "<font color=#00ff00>".
39 &html_escape($d)." (".$text{'index_vr'}.")".
43 @cl = grep { $_->{'dir'} eq $d } @exps;
46 $dirs .= " | " if ($ccount++);
47 $dirs .= "<a href='edit_export.cgi?idx=$c->{'index'}'>".
48 &describe_host($c->{'host'})."</a>\n";
49 if (!$c->{'active'}) {
50 $dirs .= "<font color=#ff0000>(".
51 $text{'index_inactive'}.")</font>\n"
55 print &ui_checked_columns_row(\@cols, \@tds, "d", $d);
57 print &ui_columns_end();
58 print &select_all_link("d"),"\n";
59 print &select_invert_link("d"),"\n";
60 print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <br>\n";
61 print &ui_form_end([ [ "delete", $text{'index_delete'} ],
62 [ "disable", $text{'index_disable'} ],
63 [ "enable", $text{'index_enable'} ] ]);
66 print "<b>$text{'index_none'}</b> <p>\n";
67 print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <p>\n";
71 print "<table width=100%> <tr>\n";
72 print "<td><form action=restart_mountd.cgi>\n";
73 print "<input type=submit value=\"$text{'index_apply'}\">\n";
74 print "</form></td>\n";
75 print "<td valign=top>$text{'index_applymsg'}</td>\n";
76 print "</tr> <tr> </table>\n";
78 &ui_print_footer("/", $text{'index'});