Skip to content

Commit

Permalink
Add ability to control number of shown virtual servers on Dashboard #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Rostovtsev committed Oct 2, 2018
1 parent 806797c commit 007debe
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 5 deletions.
12 changes: 8 additions & 4 deletions authentic-lib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,8 @@ sub theme_settings
'8',
'settings_sysinfo_expand_all_accordions',
'false',
'settings_sysinfo_max_servers',
'10',

'__',
theme_settings('fa', 'bars', &theme_text('settings_right_navigation_menu_title')),
Expand Down Expand Up @@ -2282,8 +2284,8 @@ sub theme_settings
}

# Exclude list of settings for Virtualmin
my @s_vm_e =
('settings_right_virtualmin_default', 'settings_show_webmin_tab', 'settings_hotkey_toggle_key_virtualmin');
my @s_vm_e = ('settings_right_virtualmin_default', 'settings_show_webmin_tab',
'settings_hotkey_toggle_key_virtualmin', 'settings_sysinfo_max_servers');

if (!foreign_available("virtual-server")) {
foreach my $e (@s_vm_e) {
Expand Down Expand Up @@ -2434,7 +2436,8 @@ sub theme_settings
$k eq 'settings_sysinfo_real_time_timeout' ||
$k eq 'settings_sysinfo_easypie_charts_size' ||
$k eq 'settings_sysinfo_easypie_charts_width' ||
$k eq 'settings_sysinfo_easypie_charts_scale')
$k eq 'settings_sysinfo_easypie_charts_scale' ||
$k eq 'settings_sysinfo_max_servers')
{

my $width =
Expand All @@ -2446,7 +2449,8 @@ sub theme_settings
$k eq 'settings_hotkey_sysinfo' ||
$k eq 'settings_hotkey_favorites' ||
$k eq 'settings_sysinfo_easypie_charts_width' ||
$k eq 'settings_sysinfo_easypie_charts_scale') ? ' width: 36px; ' :
$k eq 'settings_sysinfo_easypie_charts_scale' ||
$k eq 'settings_sysinfo_max_servers') ? ' width: 36px; ' :
( ($k eq 'settings_sysinfo_real_time_timeout' || $k eq 'settings_sysinfo_easypie_charts_size') ?
' width: 50px; ' :
' width: 95%; ');
Expand Down
3 changes: 3 additions & 0 deletions lang/ca.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/cz.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -953,3 +953,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/da.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/de.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -945,3 +945,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/en.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/es.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/fr.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/id.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -956,3 +956,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/it.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/ja_JP.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -951,3 +951,6 @@ theme_xhred_find_in_config_files= 設定ファイルで検索
theme_xhred_find_in_config_files_result_found_single= $2のファイルに$3の結果が見つかりました
theme_xhred_find_in_config_files_result_found_multi= $2のファイルに$3の検索結果が見つかりました
theme_xhred_find_in_config_files_results_found= $2のファイルに$3の検索結果が見つかりました

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/nl.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/no.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -812,3 +812,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/pl.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/pt.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -954,3 +954,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/ro_RO.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -952,3 +952,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/ru.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -957,3 +957,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/sq.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -965,3 +965,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/sv.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -951,3 +951,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
3 changes: 3 additions & 0 deletions lang/zh_CN.UTF-8
Original file line number Diff line number Diff line change
Expand Up @@ -951,3 +951,6 @@ theme_xhred_find_in_config_files=Find in config files
theme_xhred_find_in_config_files_result_found_single=$1 result found in $2 file for $3
theme_xhred_find_in_config_files_result_found_multi=$1 results found in $2 file for $3
theme_xhred_find_in_config_files_results_found=$1 results found in $2 files for $3

theme_xhred_filemanager_context_symlink=Create new symbolic link
settings_sysinfo_max_servers=Maximum virtual servers to show
2 changes: 1 addition & 1 deletion sysinfo.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if ($get_user_level ne '4' && &foreign_available("system-status")
}

# Get system info to show
my @info = &list_combined_system_info({ 'qshow', 1 });
my @info = &list_combined_system_info({ 'qshow', 1, 'max' => $theme_config{'settings_sysinfo_max_servers'} });

if ($get_user_level eq '0' || $get_user_level eq '4') {

Expand Down

0 comments on commit 007debe

Please sign in to comment.