mirror of
https://github.com/unraid/webgui.git
synced 2026-03-07 10:30:37 -06:00
Fixed missing action when Retry button is shown. And added info text to Retry button
This commit is contained in:
@@ -17,6 +17,7 @@ Tabs="true"
|
||||
?>
|
||||
|
||||
<?
|
||||
$empty = "<tr><td colspan='6' style='text-align:center;padding-top:12px'><i class='fa fa-spinner fa-spin icon'></i><em>Please wait, retrieving and updating plugin information ...</em></td><tr>";
|
||||
// Remove stale /tmp/plugin/*.plg entries
|
||||
$stale = ($path != $prev);
|
||||
if ($stale) foreach (glob("/tmp/plugins/*.{plg,txt}", GLOB_NOSORT+GLOB_BRACE) as $entry) if (!file_exists("/var/log/plugins/".basename($entry))) @unlink($entry);
|
||||
@@ -27,6 +28,13 @@ if ($stale) foreach (glob("/tmp/plugins/*.{plg,txt}", GLOB_NOSORT+GLOB_BRACE) as
|
||||
</style>
|
||||
<script src="/webGui/javascript/jquery.filetree.js"></script>
|
||||
<script>
|
||||
function update_table() {
|
||||
$('#plugin_list').html("<?=$empty?>");
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{},function(data) {
|
||||
if (data) $('#plugin_list').html(data);
|
||||
$('#plugin_table').trigger('update',true);
|
||||
});
|
||||
}
|
||||
<?if ($display['resize']):?>
|
||||
function resize(bind) {
|
||||
var width = [];
|
||||
@@ -55,5 +63,5 @@ $(function() {
|
||||
</script>
|
||||
<table class='tablesorter plugins shift' id='plugin_table'>
|
||||
<thead><tr><th></th><th>Plugin</th><th>Author</th><th>Version</th><th>Status</th><th>Uninstall</th></tr></thead>
|
||||
<tbody id="plugin_list"><tr><td colspan='6' style='text-align:center;padding-top:12px'><i class="fa fa-spinner fa-spin icon"></i><em>Please wait, retrieving and updating plugin information ...</em></td><tr></tbody>
|
||||
<tbody id="plugin_list"><?=$empty?></tbody>
|
||||
</table>
|
||||
|
||||
@@ -18,7 +18,7 @@ Title="Update OS"
|
||||
<script>
|
||||
var original = null;
|
||||
|
||||
function change_release(release) {
|
||||
function update_table(release) {
|
||||
$('#os_list').html("<?=$empty?>");
|
||||
if (original) {
|
||||
if (release != original) release = '';
|
||||
|
||||
@@ -114,7 +114,7 @@ foreach (glob("/var/log/plugins/*.plg",GLOB_NOSORT) as $plugin_link) {
|
||||
echo "<td>";
|
||||
if ($system) {
|
||||
if ($os) {
|
||||
echo "<select id='change_release' class='auto' onchange='change_release(this.value)'>";
|
||||
echo "<select id='change_release' class='auto' onchange='update_table(this.value)'>";
|
||||
echo mk_options($cat,'stable');
|
||||
echo mk_options($cat,'next');
|
||||
echo "</select>";
|
||||
@@ -128,5 +128,5 @@ foreach (glob("/var/log/plugins/*.plg",GLOB_NOSORT) as $plugin_link) {
|
||||
@unlink("/var/log/plugins/$tmp_plg");
|
||||
}
|
||||
if ($empty) echo "<tr><td colspan='6' style='text-align:center;padding-top:12px'><i class='fa fa-check-square-o icon'></i> No plugins installed</td><tr>";
|
||||
elseif ($nofetch) echo "<tr><td colspan='4'></td><td><input type='button' value='Retry' onclick='change_release()'></td><td></td><tr>";
|
||||
elseif ($nofetch) echo "<tr><td></td><td><input type='button' value='Retry' onclick='update_table()'><em>Communication failed for one or more updates!</em></td><td></td><td></td><td></td><td></td><tr>";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user