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
443c9342
Commit
443c9342
authored
Aug 07, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: second pass for #304; UX tweaks mostly
parent
4d5e67cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
FirmwareController.php
.../app/controllers/OPNsense/Core/Api/FirmwareController.php
+1
-1
firmware.volt
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
+9
-17
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php
View file @
443c9342
...
...
@@ -56,7 +56,7 @@ class FirmwareController extends ApiControllerBase
$response
[
"status_msg"
]
=
"Repository Problem"
;
}
elseif
(
array_key_exists
(
"updates"
,
$response
)
&&
$response
[
'updates'
]
==
0
)
{
$response
[
"status"
]
=
"none"
;
$response
[
"status_msg"
]
=
"
n
o updates found"
;
$response
[
"status_msg"
]
=
"
N
o updates found"
;
}
elseif
(
array_key_exists
(
0
,
$response
[
"upgrade_packages"
])
&&
$response
[
"upgrade_packages"
][
0
][
"name"
]
==
"pkg"
)
{
$response
[
"status"
]
=
"ok"
;
...
...
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
View file @
443c9342
...
...
@@ -36,25 +36,16 @@ POSSIBILITY OF SUCH DAMAGE.
$('#updatelist').empty();
$('#maintabs li:eq(1) a').tab('show');
$("#checkupdate_progress").addClass("fa fa-spinner fa-pulse");
$('#updatebox').attr('class', 'alert alert-info');
$('#updatestatus').html("{{ lang._('Updating.... (may take up to 30 seconds)') }}");
// request status
ajaxGet('/api/core/firmware/status',{},function(data,status){
// update UI
if (data['status'] == 'unknown') {
$('#updatebox').attr('class', 'alert alert-warning');
} else if (data['status'] == 'error') {
$('#updatebox').attr('class', 'alert alert-danger');
} else if (data['status'] == 'none' || data['status'] == 'ok') {
$('#updatesbox').attr('class', 'alert alert-info');
}
status_msg = data['status_msg'];
if (data['upgrade_needs_reboot'] == "1") {
status_msg = status_msg + " This update requires a reboot.";
}
$('#updatestatus').html(status_msg);
$("#checkupdate_progress").removeClass("fa fa-spinner fa-pulse");
$('#updatestatus').html(status_msg);
if (data['status'] == "ok") {
$.upgrade_action = data['status_upgrade_action'];
...
...
@@ -95,11 +86,10 @@ POSSIBILITY OF SUCH DAMAGE.
*/
function upgrade(){
$('#maintabs li:eq(2) a').tab('show');
$('#updatestatus').html("{{ lang._('
Starting Upgrade.
. Please do not leave this page while upgrade is in progress.') }}");
$('#updatestatus').html("{{ lang._('
Running upgrade
. Please do not leave this page while upgrade is in progress.') }}");
$("#upgrade_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall('/api/core/firmware/upgrade',{upgrade:$.upgrade_action},function() {
$("#upgrade_progress").removeClass("fa fa-spinner fa-pulse");
$('#updatelist').empty();
setTimeout(trackStatus, 500);
});
...
...
@@ -156,7 +146,9 @@ POSSIBILITY OF SUCH DAMAGE.
$('#update_status').scrollTop($('#update_status')[0].scrollHeight);
}
if (data['status'] == 'done') {
$("#upgrade_progress").removeClass("fa fa-spinner fa-pulse");
$('#updatestatus').html("{{ lang._('Upgrade done!') }}");
$("#upgrade").attr("style","display:none");
packagesInfo();
} else if (data['status'] == 'reboot') {
// reboot required, tell the user to wait until this is finished and redirect after 5 minutes
...
...
@@ -212,10 +204,10 @@ POSSIBILITY OF SUCH DAMAGE.
<div class="container-fluid">
<div class="row">
<div class="alert alert-info" role="alert" style="min-height: 65px;"
id="updatebox"
>
<button class='btn btn-primary pull-right' id="upgrade" style="display:none"><i id="upgrade_progress" class=""></i> {{ lang._('Upgrade now') }}
</button>
<button class='btn btn-default pull-right' id="checkupdate"><i id="checkupdate_progress" class=""></i> {{ lang._('Fetch updates')}}</button>
<
strong><div style="margin-top: 8px;" id="updatestatus">{{ lang._('Click to check for updates')}}</div></strong
>
<div class="alert alert-info" role="alert" style="min-height: 65px;">
<button class='btn btn-primary pull-right' id="upgrade" style="display:none"><i id="upgrade_progress" class=""></i> {{ lang._('Upgrade now') }}</button>
<button class='btn btn-default pull-right' id="checkupdate"
style="margin-right: 8px;"
><i id="checkupdate_progress" class=""></i> {{ lang._('Fetch updates')}}</button>
<
div style="margin-top: 8px;" id="updatestatus">{{ lang._('Click to check for updates')}}</div
>
</div>
</div>
<div class="row">
...
...
@@ -235,7 +227,7 @@ POSSIBILITY OF SUCH DAMAGE.
</table>
</div>
<div id="progress" class="tab-pane fade in">
<textarea name="output" id="update_status" class="form-control" rows="
1
0" wrap="hard" readonly style="max-width:100%; font-family: monospace;"></textarea>
<textarea name="output" id="update_status" class="form-control" rows="
2
0" wrap="hard" readonly style="max-width:100%; font-family: monospace;"></textarea>
</div>
</div>
</div>
...
...
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