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
a89858db
Commit
a89858db
authored
Oct 29, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: improve GUI responses; closes #1009
parent
569bc3fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
FirmwareController.php
.../app/controllers/OPNsense/Core/Api/FirmwareController.php
+3
-7
firmware.volt
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
+5
-1
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php
View file @
a89858db
...
...
@@ -55,10 +55,10 @@ class FirmwareController extends ApiControllerBase
$response
[
'status_msg'
]
=
gettext
(
'Connection error.'
);
$response
[
'status'
]
=
'error'
;
}
elseif
(
array_key_exists
(
'repository'
,
$response
)
&&
$response
[
'repository'
]
==
'error'
)
{
$response
[
'status_msg'
]
=
gettext
(
'
Repository problem
.'
);
$response
[
'status_msg'
]
=
gettext
(
'
Could not find the repository on the selected mirror
.'
);
$response
[
'status'
]
=
'error'
;
}
elseif
(
array_key_exists
(
'updates'
,
$response
)
&&
$response
[
'updates'
]
==
0
)
{
$response
[
'status_msg'
]
=
gettext
(
'There are no updates available.'
);
$response
[
'status_msg'
]
=
gettext
(
'There are no updates available
on the selected mirror
.'
);
$response
[
'status'
]
=
'none'
;
}
elseif
((
array_key_exists
(
0
,
$response
[
'upgrade_packages'
])
&&
$response
[
'upgrade_packages'
][
0
][
'name'
]
==
'pkg'
)
||
...
...
@@ -66,11 +66,7 @@ class FirmwareController extends ApiControllerBase
$response
[
'reinstall_packages'
][
0
][
'name'
]
==
'pkg'
))
{
$response
[
'status_upgrade_action'
]
=
'pkg'
;
$response
[
'status'
]
=
'ok'
;
$response
[
'status_msg'
]
=
gettext
(
'There is a mandatory update for the package manager available. '
.
'Please install and fetch updates again.'
);
$response
[
'status_msg'
]
=
gettext
(
'There is a mandatory update for the package manager available.'
);
}
elseif
(
array_key_exists
(
'updates'
,
$response
))
{
$response
[
'status_upgrade_action'
]
=
'all'
;
$response
[
'status'
]
=
'ok'
;
...
...
src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt
View file @
a89858db
...
...
@@ -160,7 +160,11 @@ POSSIBILITY OF SUCH DAMAGE.
}
if (data['status'] == 'done') {
$("#upgrade_progress").removeClass("fa fa-spinner fa-pulse");
$('#updatestatus').html("{{ lang._('Upgrade done!') }}");
if ($.upgrade_action != 'pkg') {
$('#updatestatus').html("{{ lang._('Upgrade done!') }}");
} else {
$('#updatestatus').html("{{ lang._('Package manager update done. Please check for more updates.') }}");
}
$("#upgrade").attr("style","display:none");
packagesInfo();
} else if (data['status'] == 'reboot') {
...
...
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