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
469fae47
Commit
469fae47
authored
May 15, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(firmware) UI template updates
parent
bcd89930
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
firmware.volt
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
+12
-8
No files found.
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
View file @
469fae47
...
@@ -32,11 +32,15 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -32,11 +32,15 @@ POSSIBILITY OF SUCH DAMAGE.
* retrieve update status from backend
* retrieve update status from backend
*/
*/
function updateStatus() {
function updateStatus() {
// update UI
$('#maintabs li:eq(0) a').tab('show');
$('#maintabs li:eq(0) a').tab('show');
$("#checkupdate_progress").addClass("fa fa-spinner fa-pulse");
$("#checkupdate_progress").addClass("fa fa-spinner fa-pulse");
$('#updatestatus').attr('class', 'text-info');
$('#updatestatus').attr('class', 'text-info');
$('#updatestatus').html("{{ lang._('Updating.... (may take up to 30 seconds)') }}");
$('#updatestatus').html("{{ lang._('Updating.... (may take up to 30 seconds)') }}");
// request status
ajaxGet('/api/core/firmware/status',{},function(data,status){
ajaxGet('/api/core/firmware/status',{},function(data,status){
// update UI
if (data['status'] == 'unknown') {
if (data['status'] == 'unknown') {
$('#updatestatus').attr('class', 'text-warning');
$('#updatestatus').attr('class', 'text-warning');
} else if (data['status'] == 'error') {
} else if (data['status'] == 'error') {
...
@@ -53,19 +57,19 @@ POSSIBILITY OF SUCH DAMAGE.
...
@@ -53,19 +57,19 @@ POSSIBILITY OF SUCH DAMAGE.
$("#upgrade").attr("style","");
$("#upgrade").attr("style","");
// show upgrade list
// show upgrade list
$("#updatelist").html("<tr><th>{{ lang._('Package Name') }}</th>" +
$("#updatelist").html("<tr><th>{{ lang._('Package Name') }}</th>" +
"<th>{{ lang._('Current Version') }}</th><th>{{ lang._('New Version') }}</th><
th></th><
/tr>");
"<th>{{ lang._('Current Version') }}</th><th>{{ lang._('New Version') }}</th></tr>");
$.each(['upgrade_packages','new_packages','reinstall_packages'], function(type_idx,type_name){
$.each(['upgrade_packages','new_packages','reinstall_packages'], function(type_idx,type_name){
$.each(data[type_name],function(index,row){
$.each(data[type_name],function(index,row){
var txt_info = "" ;
if (type_name == "new_packages") {
if (type_name == "new_packages") {
txt_info = "<strong>{{ lang._('NEW') }}</strong>";
$('#updatelist').append('<tr><td>'+row['name']+'</td>' +
"<td><strong>{{ lang._('NEW') }}</strong></td><td>"+row['version']+"</td></tr>");
} else if (type_name == "reinstall_packages") {
} else if (type_name == "reinstall_packages") {
txt_info = "<strong>{{ lang._('REINSTALL') }}</strong>";
}
$('#updatelist').append('<tr><td>'+row['name']+'</td>' +
$('#updatelist').append('<tr><td>'+row['name']+'</td>' +
'<td>'+row['current_version']+'</td><td>'+row['new_version']+'</td><td>'+txt_info+'</td></tr>');
"<td>"+row['version']+"</td><td><strong>{{ lang._('REINSTALL') }}</strong></td></tr>");
} else {
$('#updatelist').append('<tr><td>'+row['name']+'</td>' +
'<td>'+row['current_version']+'</td><td>'+row['new_version']+'</td></tr>');
}
});
});
});
});
...
...
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