mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
extrahd.cgi: Display mount status next to the corresponding drive
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
0aa77c2fd5
commit
fd815c36ea
@@ -302,14 +302,31 @@ END
|
||||
|
||||
print <<END
|
||||
</select></td>
|
||||
<td align="center"><input type='text' name='PATH' value=$mountpoint $disabled></td>
|
||||
<td align="center"><input type='text' name='PATH' value='$mountpoint' $disabled></td>
|
||||
<td align="center">
|
||||
<input type='hidden' name='DEVICE' value='/dev/$partition' />
|
||||
<input type='hidden' name='UUID' value='$uuids{$partition}' />
|
||||
<input type='hidden' name='ACTION' value='$Lang::tr{'add'}' />
|
||||
END
|
||||
; unless($disabled) {
|
||||
print"<input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/add.gif' />\n";
|
||||
;
|
||||
# Check if the mountpoint refers to a known configured drive.
|
||||
if(&is_configured($mountpoint)) {
|
||||
print "<input type='hidden' name='ACTION' value='$Lang::tr{'delete'}'>\n";
|
||||
print "<input type='hidden' name='PATH' value='$mountpoint'>\n";
|
||||
|
||||
# Check if the device is mounted properly.
|
||||
if(&is_mounted($mountpoint)) {
|
||||
print "<img src='/images/updbooster/updxl-led-green.gif' alt='MOUNTED' title='MOUNTED'> \n";
|
||||
} else {
|
||||
print "<img src='/images/updbooster/updxl-led-red.gif' alt='NOT MOUNTED' title='NOT MOUNTED'> \n";
|
||||
}
|
||||
|
||||
print "<input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/delete.gif'>\n";
|
||||
} else {
|
||||
unless($disabled) {
|
||||
print "<input type='hidden' name='ACTION' value='$Lang::tr{'add'}'>\n";
|
||||
print "<img src='/images/updbooster/updxl-led-gray.gif' alt='UNCONFIGURED' title='UNCONFIGURED'> \n";
|
||||
print "<input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/add.gif'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
print <<END
|
||||
|
||||
Reference in New Issue
Block a user