mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Rename sub name to be more intuitive
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -34,12 +34,12 @@ sub list_system_info
|
||||
my $free_percent_html;
|
||||
|
||||
if ($free_percent > 49) {
|
||||
$free_percent_html = ui_text_type("$free_percent%", 'success');
|
||||
$free_percent_html = ui_text_color("$free_percent%", 'success');
|
||||
} elsif ($free_percent > 9) {
|
||||
$free_percent_html = ui_text_type("$free_percent%", 'warn');
|
||||
$free_percent_html = ui_text_color("$free_percent%", 'warn');
|
||||
} else {
|
||||
$open = 1;
|
||||
$free_percent_html = ui_text_type("$free_percent%", 'danger');
|
||||
$free_percent_html = ui_text_color("$free_percent%", 'danger');
|
||||
}
|
||||
$html .= ui_columns_row([$dir, $type, $free_percent_html . " ($free_nice)", $total_nice, $dev_id,]);
|
||||
}
|
||||
|
||||
10
ui-lib.pl
10
ui-lib.pl
@@ -2448,7 +2448,7 @@ $rv .= "</center>\n";
|
||||
return $rv;
|
||||
}
|
||||
|
||||
=head2 ui_text_type(text, type)
|
||||
=head2 ui_text_color(text, type)
|
||||
|
||||
Returns HTML for a text string, with its color determined by $type.
|
||||
|
||||
@@ -2458,13 +2458,13 @@ Returns HTML for a text string, with its color determined by $type.
|
||||
|
||||
=cut
|
||||
|
||||
sub ui_text_type
|
||||
sub ui_text_color
|
||||
{
|
||||
my ($text, $type) = @_;
|
||||
my ($rv, $color);
|
||||
|
||||
if (defined (&theme_ui_text_type)) {
|
||||
return &theme_ui_text_type(@_);
|
||||
if (defined (&theme_ui_text_color)) {
|
||||
return &theme_ui_text_color(@_);
|
||||
}
|
||||
|
||||
if ($type eq "success") { $color = "3c763d"; }
|
||||
@@ -2472,7 +2472,7 @@ elsif ($type eq "info") { $color = "31708f"; }
|
||||
elsif ($type eq "warn") { $color = "8a6d3b"; }
|
||||
elsif ($type eq "danger") { $color = "a94442"; }
|
||||
|
||||
$rv .= "<span class='ui_text_type text_type_$type' style='color: #$color'>$text</span>\n";
|
||||
$rv .= "<span class='ui_text_color text_type_$type' style='color: #$color'>$text</span>\n";
|
||||
|
||||
return $rv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user