Change log: https://roxy-wi.org/changelog.py#6_1
pull/328/head
Pavel Loginov 2022-06-16 22:58:01 +03:00
parent 9853cb20cb
commit 82b2e25cb6
2 changed files with 5 additions and 5 deletions

View File

@ -123,7 +123,7 @@
<td>
{% if 'is not installed' not in s.3 and s.3 != '' %}
{% if is_need_update %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}')" title="Update {{service_name}}">Update</a>
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}', 'install')" title="Update {{service_name}}">Update</a>
{% endif %}
{% else %}
<a class="ui-button ui-widget ui-corner-all" onclick="updateService('{{s.0}}')" title="Install {{service_name}}">Install</a>

View File

@ -2316,7 +2316,7 @@ function ajaxActionServies(action, service) {
}
} );
}
function updateService(service) {
function updateService(service, action='update') {
$("#ajax-update").html('')
$("#ajax-update").html(wait_mess);
$.ajax( {
@ -2331,15 +2331,15 @@ function updateService(service) {
data = data.replace(/\s+/g,' ');
if (data.indexOf('error:') != '-1' || data.indexOf('Failed') != '-1') {
toastr.error(data);
} else if (data.indexOf('Complete!') != '-1'){
} else if (data.indexOf('Complete!') != '-1' || data.indexOf('Unpacking!') != '-1'){
toastr.clear();
toastr.success(service + ' has been updated');
toastr.success(service + ' has been '+action+'ed');
} else if (data.indexOf('Unauthorized') != '-1') {
toastr.clear();
toastr.error('It seems like Unauthorized in the Roxy-WI repository. How to get Roxy-WI auth you can read <b><a href="https://roxy-wi.org/installation.py" title="How to get Roxy-WI auth">hear</a></b>');
} else if (data.indexOf('but not installed') != '-1') {
toastr.clear();
toastr.error('There is settings for Roxy-WI repository, but Roxy-WI is installed without repository. Please reinstall with yum');
toastr.error('There is setting for Roxy-WI repository, but Roxy-WI is installed without repository. Please reinstall with package manager');
} else if (data.indexOf('No Match for argument') != '-1') {
toastr.clear();
toastr.error('It seems like Roxy-WI repository is not set. Please read docs for <b><a href="https://roxy-wi.org/updates.py">detail</a></b>');