mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Option to show just database names:
This commit is contained in:
@@ -66,3 +66,5 @@ When there are too many databases, huge lists of all databases and tables are no
|
||||
System variables can now be searched using a new field, making it easier to find the one you want from the large list on some systems.
|
||||
Re-designed the Execute SQL page to use tabs.
|
||||
Converted all user interface code to use the new Webmin UI library, for a more consistent look.
|
||||
---- Changes since 1.400 ----
|
||||
Added a Module Config option to show databases and tables using just their names, which is much faster under MySQL 5 as it avoids the need to count their tables, fields and rows.
|
||||
|
||||
@@ -2,7 +2,7 @@ line1=Configurable options,11
|
||||
login=Administration login,0
|
||||
pass=Administration password,12
|
||||
perpage=Number of rows to display per page,0,5
|
||||
style=Show databases and tables as,1,1-List,0-Icons
|
||||
style=Show databases and tables as,1,1-List,0-Icons,2-Names only
|
||||
add_mode=Use vertical row editing interface,1,1-Yes,0-No
|
||||
blob_mode=Show blob and text fields as,1,0-Data in table,1-Links to download
|
||||
nodbi=Use DBI to connect if available?,1,0-Yes,1-No
|
||||
|
||||
@@ -64,6 +64,10 @@ elsif (@titles || @indexes) {
|
||||
( map { "edit_view.cgi?db=$in{'db'}&view=".&urlize($_) }
|
||||
@views ),
|
||||
);
|
||||
@descs = ( ( map { "" } @titles ),
|
||||
( map { " ($text{'dbase_index'})" } @indexes),
|
||||
( map { " ($text{'dbase_view'})" } @views),
|
||||
);
|
||||
#&show_buttons();
|
||||
print &ui_form_start("drop_tables.cgi");
|
||||
print &ui_hidden("db", $in{'db'});
|
||||
@@ -74,7 +78,8 @@ elsif (@titles || @indexes) {
|
||||
( map { "!".$_ } @indexes ),
|
||||
( map { "*".$_ } @views ),
|
||||
);
|
||||
if ($displayconfig{'style'}) {
|
||||
if ($displayconfig{'style'} == 1) {
|
||||
# Show table names, fields and row counts
|
||||
foreach $t (@titles) {
|
||||
local $c = &execute_sql($in{'db'},
|
||||
"select count(*) from ".quotestr($t));
|
||||
@@ -98,7 +103,19 @@ elsif (@titles || @indexes) {
|
||||
\@checks, \@links, \@dtitles,
|
||||
\@rows, \@fields) if (@titles);
|
||||
}
|
||||
elsif ($displayconfig{'style'} == 2) {
|
||||
# Just show table names
|
||||
@grid = ( );
|
||||
@all = ( @titles, @indexes, @views );
|
||||
for(my $i=0; $i<@links; $i++) {
|
||||
push(@grid, &ui_checkbox("d", $checks[$i]).
|
||||
" <a href='$links[$i]'>".
|
||||
&html_escape($all[$i])." ".$descs[$i]."</a>");
|
||||
}
|
||||
print &ui_grid_table(\@grid, 4, 100, undef, undef, "");
|
||||
}
|
||||
else {
|
||||
# Show table icons
|
||||
@checks = map { &ui_checkbox("d", $_) } @checks;
|
||||
@titles = map { &html_escape($_) } ( @titles, @indexes, @views);
|
||||
&icons_table(\@links, \@titles, \@icons, 5, undef, undef, undef,
|
||||
|
||||
@@ -165,7 +165,8 @@ else {
|
||||
}
|
||||
print &ui_links_row(\@rowlinks);
|
||||
@checks = @titles;
|
||||
if ($config{'style'}) {
|
||||
if ($displayconfig{'style'} == 1) {
|
||||
# Show as DB names and table counts
|
||||
@tables = map { @t = &list_tables($_); scalar(@t) }
|
||||
@titles;
|
||||
@titles = map { &html_escape($_) } @titles;
|
||||
@@ -174,7 +175,18 @@ else {
|
||||
\@checks, \@links, \@titles, \@tables)
|
||||
if (@titles);
|
||||
}
|
||||
elsif ($displayconfig{'style'} == 2) {
|
||||
# Show just DB names
|
||||
@grid = ( );
|
||||
for(my $i=0; $i<@links; $i++) {
|
||||
push(@grid, &ui_checkbox("d", $titles[$i]).
|
||||
" <a href='$links[$i]'>".
|
||||
&html_escape($titles[$i])."</a>");
|
||||
}
|
||||
print &ui_grid_table(\@grid, 4, 100, undef, undef, "");
|
||||
}
|
||||
else {
|
||||
# Show name icons
|
||||
@checks = map { &ui_checkbox("d", $_) } @checks;
|
||||
@titles = map { &html_escape($_) } @titles;
|
||||
&icons_table(\@links, \@titles, \@icons, 5,
|
||||
|
||||
Reference in New Issue
Block a user