mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
Firmware update enhancements and System GUI pages cleanup
This commit is contained in:
parent
4a553914dd
commit
4f8cea3719
@ -37,6 +37,7 @@
|
||||
# download_size: none|<size_of_total_downloads>
|
||||
# extra_space_required: none|<size_of_total_extra_space_required>
|
||||
# new_packages: array with { name: <package_name>, version: <package_version> }
|
||||
# reinstall_packages: array with { name: <package_name>, version: <package_version> }
|
||||
# upgrade_packages: array with { name: <package_name>, current_version: <current_version>, new_version: <new_version> }
|
||||
|
||||
# TODO: Add object with items that will be removed or uninstalled
|
||||
@ -149,6 +150,34 @@ if [ "$pkg_running" == "" ]; then
|
||||
fi
|
||||
done
|
||||
|
||||
# Check if there are packages that need to be reinstalled
|
||||
for i in $(cat $tmp_pkg_output_file | cut -d '(' -f1); do
|
||||
#echo $i
|
||||
if [ "$itemcount" -gt "$linecount" ]; then
|
||||
#echo $i
|
||||
if [ `echo $linecount + 1 | bc` -eq "$itemcount" ]; then
|
||||
if [ "`echo $i | grep '-'`" == "" ]; then
|
||||
itemcount=0 # This is not a valid item so reset item count
|
||||
else
|
||||
name=`echo $i | cut -d '-' -f1`
|
||||
version=`echo $i | cut -d '-' -f2`
|
||||
itemcount=`echo $itemcount + 1 | bc` # Get ready for next item
|
||||
if [ "$packages_reinstall" == "" ]; then
|
||||
packages_reinstall=$packages_reinstall"{\"name\":\"$name\"," # If it is the first item then we do not want a seperator
|
||||
packages_reinstall=$packages_reinstall"\"version\":\"$version\"}"
|
||||
else
|
||||
packages_reinstall=$packages_reinstall", {\"name\":\"$name\","
|
||||
packages_reinstall=$packages_reinstall"\"version\":\"$version\"}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
linecount=`echo $linecount + 1 | bc`
|
||||
if [ "$i" == "REINSTALLED:" ]; then
|
||||
itemcount=`echo $linecount + 1 | bc`
|
||||
fi
|
||||
done
|
||||
|
||||
# Now check if there are upgrades to install
|
||||
for i in $(cat $tmp_pkg_output_file); do
|
||||
if [ "$itemcount" -gt "$linecount" ]; then
|
||||
@ -201,7 +230,7 @@ if [ "$pkg_running" == "" ]; then
|
||||
# Get date/timestamp
|
||||
last_check=`date`
|
||||
# Write our json structure to disk
|
||||
echo "{\"connection\":\"$connection\",\"repository\":\"$repository\",\"last_check\":\"$last_check\",\"updates\":\"$updates\",\"core_version\":\"$core_version\",\"download_size\":\"$download_size\",\"extra_space_required\":\"$required_space\",\"new_packages\":[$packages_new],\"upgrade_packages\":[$packages_upgraded]}" > $package_json_output
|
||||
echo "{\"connection\":\"$connection\",\"repository\":\"$repository\",\"last_check\":\"$last_check\",\"updates\":\"$updates\",\"core_version\":\"$core_version\",\"download_size\":\"$download_size\",\"extra_space_required\":\"$required_space\",\"new_packages\":[$packages_new],\"reinstall_packages\":[$packages_reinstall],\"upgrade_packages\":[$packages_upgraded]}" > $package_json_output
|
||||
else
|
||||
# pkg is already running, quitting
|
||||
fi
|
||||
|
||||
@ -457,7 +457,6 @@ function select_clicked() {
|
||||
|
||||
<?php if ($act == "new" || $act == "edit" || $input_errors): ?>
|
||||
<form id="iform" name="iform" action="system_authservers.php" method="post">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Descriptive name");?></td>
|
||||
@ -806,7 +805,7 @@ function select_clicked() {
|
||||
</form>
|
||||
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped table-sort">
|
||||
|
||||
<thead>
|
||||
@ -856,7 +855,7 @@ function select_clicked() {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@ -148,7 +148,7 @@ include("head.inc");
|
||||
<td>
|
||||
<div id="upgrades">
|
||||
<?php
|
||||
echo '<table>';
|
||||
echo '<table class="table table-striped">';
|
||||
echo '<tr>';
|
||||
echo '<th>Package Name</th>';
|
||||
echo '<th>Current Version</th>';
|
||||
@ -168,33 +168,35 @@ include("head.inc");
|
||||
echo '</tr>';
|
||||
|
||||
}
|
||||
echo '</table>';
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Required new Installs</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="new">
|
||||
<?php
|
||||
echo '<table>';
|
||||
echo '<tr>';
|
||||
echo '<th>Package Name</th>';
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
foreach ($pkg_status["new_packages"] as $upgrade_new) {
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>'.$upgrade_new["name"].'</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>'.$upgrade_new["name"].'</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>NEW</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>'.$upgrade_new["version"].'</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
foreach ($pkg_status["reinstall_packages"] as $upgrade_new) {
|
||||
echo '<tr>';
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>'.$upgrade_new["name"].'</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>'.$upgrade_new["version"].'</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '<td>';
|
||||
echo '<span class="text-info"><b>REINSTALL</b></span><br/>';
|
||||
echo '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -223,7 +223,6 @@ jQuery(function ($) {
|
||||
<div class="content-box-main col-xs-12">
|
||||
|
||||
<form action="system_gateway_groups_edit.php" method="post" name="iform" id="iform">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" summary="system groups edit">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Group Name"); ?></td>
|
||||
@ -265,7 +264,7 @@ jQuery(function ($) {
|
||||
echo "<td class='listlr'>";
|
||||
echo "<strong>{$gateway['name']} </strong>";
|
||||
echo "</td><td class='listr'>";
|
||||
echo "<select name='{$gwname}' class='gateway_tier_selector formfldselect' id='{$gwname}'>\n";
|
||||
echo "<select name='{$gwname}' class='gateway_tier_selector formfldselect selectpicker' data-style='btn-default' data-width='auto' id='{$gwname}'>\n";
|
||||
echo "<option value='0' $selected[0] >" . gettext("Never") . "</option>\n";
|
||||
echo "<option value='1' $selected[1] >" . gettext("Tier 1") . "</option>\n";
|
||||
echo "<option value='2' $selected[2] >" . gettext("Tier 2") . "</option>\n";
|
||||
@ -286,7 +285,7 @@ jQuery(function ($) {
|
||||
}
|
||||
}
|
||||
echo "<td class='listr'>";
|
||||
echo "<select name='{$gwname}_vip' class='gateway_vip_selector formfldselect' id='{$gwname}_vip'>\n";
|
||||
echo "<select name='{$gwname}_vip' class='gateway_vip_selector formfldselect selectpicker' data-style='btn-default' data-width='auto' id='{$gwname}_vip'>\n";
|
||||
echo "<option value='address' {$selected['address']} >" . gettext("Interface Address") . "</option>\n";
|
||||
foreach($carplist as $vip => $address) {
|
||||
echo "<!-- $vip - $address - $interface -->\n";
|
||||
@ -318,7 +317,7 @@ jQuery(function ($) {
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Trigger Level"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name='trigger' class='formfldselect trigger_level_selector' id='trigger'>
|
||||
<select name='trigger' class='formfldselect trigger_level_selector selectpicker' id='trigger' data-style='btn-default'>
|
||||
<?php
|
||||
foreach ($categories as $category => $categoryd) {
|
||||
echo "<option value=\"$category\"";
|
||||
@ -348,7 +347,6 @@ jQuery(function ($) {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -643,7 +643,6 @@ function enable_change() {
|
||||
echo "<input type='hidden' name='friendlyiface' id='friendlyiface' value=\"" . htmlspecialchars($pconfig['friendlyiface']) . "\" />\n";
|
||||
?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled");?></td>
|
||||
@ -656,7 +655,7 @@ function enable_change() {
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name='interface' class='formselect'>
|
||||
<select name='interface' class="selectpicker" data-style="btn-default" data-live-search="true">
|
||||
<?php
|
||||
$interfaces = get_configured_interface_with_descr(false, true);
|
||||
foreach ($interfaces as $iface => $ifacename) {
|
||||
@ -673,7 +672,7 @@ function enable_change() {
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Address Family"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name='ipprotocol' class='formselect' >
|
||||
<select name='ipprotocol' class="selectpicker" data-style="btn-default" >
|
||||
<?php
|
||||
$options = array("inet" => "IPv4", "inet6" => "IPv6");
|
||||
foreach ($options as $name => $string) {
|
||||
@ -868,7 +867,6 @@ function enable_change() {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -261,7 +261,6 @@ function presubmit() {
|
||||
<input type="hidden" id="groupid" name="groupid" value="<?=(isset($id) ? $id : '');?>" />
|
||||
<input type="hidden" id="privid" name="privid" value="" />
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<?php
|
||||
$ro = "";
|
||||
@ -424,7 +423,6 @@ function presubmit() {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
else:
|
||||
@ -435,7 +433,6 @@ function presubmit() {
|
||||
<input type="hidden" id="groupid" name="groupid" value="<?=(isset($id) ? $id : '');?>" />
|
||||
<input type="hidden" id="groupname" name="groupname" value="" />
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -527,7 +524,6 @@ function presubmit() {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
@ -322,8 +322,8 @@ if ($_POST['save']) {
|
||||
local_user_set($userent);
|
||||
write_config();
|
||||
|
||||
if(is_dir("/usr/local/etc/inc/privhooks"))
|
||||
run_plugins("/usr/local/etc/inc/privhooks");
|
||||
//if(is_dir("/usr/local/etc/inc/privhooks"))
|
||||
// run_plugins("/usr/local/etc/inc/privhooks");
|
||||
|
||||
conf_mount_ro();
|
||||
|
||||
@ -463,7 +463,6 @@ function sshkeyClicked(obj) {
|
||||
<input type="hidden" id="privid" name="privid" value="" />
|
||||
<input type="hidden" id="certid" name="certid" value="" />
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<?php
|
||||
$ro = "";
|
||||
@ -641,6 +640,7 @@ function sshkeyClicked(obj) {
|
||||
document.getElementById('act').value='<?php echo "delpriv";?>';
|
||||
return confirm('<?=gettext("Do you really want to delete this privilege?");?>');"
|
||||
title="<?=gettext("delete privilege");?>" data-toggle="tooltip" data-placement="left"><span class="glyphicon glyphicon-remove"></span>
|
||||
</button>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
@ -855,7 +855,6 @@ function sshkeyClicked(obj) {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
else:
|
||||
@ -866,20 +865,18 @@ function sshkeyClicked(obj) {
|
||||
<input type="hidden" id="username" name="username" value="" />
|
||||
<input type="hidden" id="privid" name="privid" value="" />
|
||||
<input type="hidden" id="certid" name="certid" value="" />
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="25%" class="listhdrr"><?=gettext("Username"); ?></th>
|
||||
<th width="25%" class="listhdrr"><?=gettext("Full name"); ?></th>
|
||||
<th width="5%" class="listhdrr"><?=gettext("Disabled"); ?></th>
|
||||
<th width="25%" class="listhdrr"><?=gettext("Groups"); ?></th>
|
||||
<th width="10%" class="list"></th>
|
||||
<th width="15%" class="list"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="list" colspan="4"></td>
|
||||
<td class="list" colspan="3"></td>
|
||||
<td class="list">
|
||||
<button type="submit" name="addcert"
|
||||
class="btn btn-default btn-xs"
|
||||
@ -889,7 +886,7 @@ function sshkeyClicked(obj) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<td colspan="4">
|
||||
<p class="col-xs-12 col-sm-10">
|
||||
<?=gettext("Additional users can be added here. User permissions for accessing " .
|
||||
"the webConfigurator can be assigned directly or inherited from group memberships. " .
|
||||
@ -913,12 +910,15 @@ function sshkeyClicked(obj) {
|
||||
<td class="listlr">
|
||||
<table border="0" cellpadding="0" cellspacing="0" summary="icons">
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<td width="30px" align="left" valign="middle">
|
||||
<?php
|
||||
if($userent['scope'] != "user")
|
||||
$usrimg = "glyphicon glyphicon-user text-muted";
|
||||
else
|
||||
$usrimg = "glyphicon glyphicon-user";
|
||||
if($userent['scope'] != "user") {
|
||||
$usrimg = "glyphicon glyphicon-user text-danger";
|
||||
} elseif (isset($userent['disabled'])) {
|
||||
$usrimg = "glyphicon glyphicon-user text-muted";
|
||||
} else {
|
||||
$usrimg = "glyphicon glyphicon-user text-info";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@ -931,7 +931,6 @@ function sshkeyClicked(obj) {
|
||||
</table>
|
||||
</td>
|
||||
<td class="listr"><?=htmlspecialchars($userent['descr']);?> </td>
|
||||
<td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
|
||||
<td class="listbg">
|
||||
<?=implode(",",local_user_get_groups($userent));?>
|
||||
|
||||
@ -963,7 +962,20 @@ function sshkeyClicked(obj) {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<table width="100%" cellspacing="0" celpadding="0" border="0" summary="icons">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td width="20px"></td>
|
||||
<td width="20px"><span class="glyphicon glyphicon-user text-danger"></span></td>
|
||||
<td width="200px">System Admininistrator</td>
|
||||
<td width="20px"><span class="glyphicon glyphicon-user text-muted"></span></td>
|
||||
<td width="200px">Disabled User</td>
|
||||
<td width="20px"><span class="glyphicon glyphicon-user text-info"></span></td>
|
||||
<td width="200px">Normal User</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
@ -118,7 +118,6 @@ include("head.inc");
|
||||
<div class="tab-content content-box col-xs-12">
|
||||
|
||||
<form id="iform" name="iform" action="system_usermanager_settings.php" method="post">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sort">
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Session Timeout"); ?></td>
|
||||
@ -132,7 +131,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Authentication Server"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<select name='authmode' id='authmode' class="form-control" >
|
||||
<select name='authmode' id='authmode' class="selectpicker" data-style="btn-default" >
|
||||
<?php
|
||||
$auth_servers = auth_get_authserver_list();
|
||||
foreach ($auth_servers as $auth_server):
|
||||
@ -157,7 +156,6 @@ include("head.inc");
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user