Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
31e26e23
Commit
31e26e23
authored
Nov 30, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: auto-rerun on package manager update
parent
4c68e8c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
firmware.volt
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
+22
-14
No files found.
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
View file @
31e26e23
...
...
@@ -32,9 +32,11 @@ POSSIBILITY OF SUCH DAMAGE.
/**
* prepare for checking update status
*/
function updateStatusPrepare() {
$('#update_status').hide();
$('#updatelist').show();
function updateStatusPrepare(rerun) {
if ($rerun = false) {
$('#update_status').hide();
$('#updatelist').show();
}
$("#checkupdate_progress").addClass("fa fa-spinner fa-pulse");
$('#updatestatus').html("{{ lang._('Checking... (may take up to 30 seconds)') }}");
}
...
...
@@ -44,7 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
function updateStatus() {
// update UI
updateStatusPrepare();
updateStatusPrepare(
false
);
// request status
ajaxGet('/api/core/firmware/status',{},function(data,status){
...
...
@@ -91,6 +93,8 @@ POSSIBILITY OF SUCH DAMAGE.
// update list so plugins sync as well (no logs)
packagesInfo(false);
} else {
$('#update_status').hide();
$('#updatelist').show();
$("#upgrade").attr("style","display:none");
$("#audit").attr("style","");
...
...
@@ -251,18 +255,22 @@ POSSIBILITY OF SUCH DAMAGE.
if (data['status'] == 'done') {
$("#upgrade_progress").removeClass("fa fa-spinner fa-pulse");
$("#audit_progress").removeClass("fa fa-spinner fa-pulse");
$("#upgrade").attr("style","display:none");
$("#audit").attr("style","");
if ($.upgrade_action == 'pkg') {
$('#updatestatus').html("{{ lang._('Package manager update done. Please check for more updates.') }}");
} else if ($.upgrade_action == 'audit') {
$('#updatestatus').html("{{ lang._('Audit done.') }}");
} else if ($.upgrade_action == 'action') {
$('#updatestatus').html("{{ lang._('Done.') }}");
// update UI and delay update to avoid races
updateStatusPrepare(true);
setTimeout(updateStatus, 1000);
} else {
$('#updatestatus').html("{{ lang._('Upgrade done.') }}");
if ($.upgrade_action == 'audit') {
$('#updatestatus').html("{{ lang._('Audit done.') }}");
} else if ($.upgrade_action == 'action') {
$('#updatestatus').html("{{ lang._('Done.') }}");
} else {
$('#updatestatus').html("{{ lang._('Upgrade done.') }}");
}
packagesInfo(true);
}
$("#upgrade").attr("style","display:none");
$("#audit").attr("style","");
packagesInfo(true);
} else if (data['status'] == 'reboot') {
BootstrapDialog.show({
type:BootstrapDialog.TYPE_INFO,
...
...
@@ -458,7 +466,7 @@ POSSIBILITY OF SUCH DAMAGE.
// dashboard link: run check automatically
} else if (window.location.hash == '#checkupdate') {
// update UI and delay update to avoid races
updateStatusPrepare();
updateStatusPrepare(
false
);
setTimeout(updateStatus, 1000);
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment