Show warning if any zones are not in a view

This commit is contained in:
Jamie Cameron
2008-12-03 23:37:27 +00:00
parent 3cbd3f9c9e
commit 0e3abe62b5
2 changed files with 13 additions and 0 deletions

View File

@@ -316,6 +316,17 @@ if ($access{'views'} && $bind_version >= 9) {
# Display list of views
print &ui_hr();
print &ui_subheading($text{'index_views'});
# Show a warning if any zones are not in a view
@notinview = grep { !$_->{'viewidx'} } @zones;
if (@notinview && @views) {
print "<b>",&text('index_viewwarn',
join(" , ", map { "<tt>".&ip6int_to_net(
&arpa_to_ip($_->{'name'}))."</tt>" }
@notinview)),"</b><p>\n";
print "<b>$text{'index_viewwarn2'}</b><p>\n";
}
@views = grep { &can_edit_view($_) } @views;
foreach $v (@views) {
push(@vlinks, "edit_view.cgi?index=$v->{'index'}");

View File

@@ -43,6 +43,8 @@ index_search=Search
index_view=(In view $1)
index_inview=In View $1
index_views=Existing Client Views
index_viewwarn=Warning - the following zones are not in any view : $1
index_viewwarn2=BIND may not be able to start until they are moved to a view.
index_vnone=There are no client views defined on this server.
index_addview=Create client view.
index_root=Root zone