[40/54] samba: Refactor status area

Message ID 20201013160812.27754-40-michael.tremer@ipfire.org
State Accepted
Commit 1aa4ecb1300069929c150ff389731225049bafc6
Headers show
Series [01/54] samba: Migrate configuration from Samba 3.6 to 4.x | expand

Commit Message

Michael Tremer Oct. 13, 2020, 4:07 p.m. UTC
There is no need to double-wrap the status output in tables.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 html/cgi-bin/samba.cgi | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

Patch

diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi
index a64fc9177..66043f15b 100644
--- a/html/cgi-bin/samba.cgi
+++ b/html/cgi-bin/samba.cgi
@@ -37,9 +37,6 @@  my %mainsettings = ();
 my $message = "";
 my $errormessage = "";
 
-my $Status = qx(/usr/local/bin/sambactrl smbstatus);
-$Status = &Header::cleanhtml($Status);
-
 my $userentry = "";
 my @user = ();
 my @userline = ();
@@ -746,16 +743,17 @@  if ($sambasettings{'ACTION'} eq 'smbsharechange')
 ############################################################################################################################
 ############################################### Anzeige des Sambastatus ####################################################
 
-&Header::openbox('100%', 'center', 'Status');
+&Header::openbox('100%', 'left', $Lang::tr{'status'});
 
-print <<END
-<br />
-<table class="tbl" width='95%' cellspacing='0'>
-<tr><td bgcolor='$color{'color20'}' colspan='3' align='left'><b>$Lang::tr{'samba status'}</b></td></tr>
-<tr><td  align='left'><small><pre>$Status</pre></small></td></tr>
-</table>
+my $status = qx(/usr/local/bin/sambactrl smbstatus);
+$status = &Header::cleanhtml($status);
+
+print <<END;
+	<small>
+		<pre>$status</pre>
+	</small>
 END
-;
+
 &Header::closebox();
 
 &Header::closebigbox();