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
b46bbe02
Commit
b46bbe02
authored
Jul 02, 2015
by
Jos Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(proxy) wip adding download option
parent
a8b9a6bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletion
+52
-1
ServiceController.php
.../app/controllers/OPNsense/Proxy/Api/ServiceController.php
+17
-0
index.volt
src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt
+35
-1
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Proxy/Api/ServiceController.php
View file @
b46bbe02
...
...
@@ -148,4 +148,21 @@ class ServiceController extends ApiControllerBase
return
array
(
"status"
=>
"failed"
);
}
}
/**
* fetch acls
* @return array
*/
public
function
fetchaclsAction
()
{
if
(
$this
->
request
->
isPost
())
{
$backend
=
new
Backend
();
$response
=
$backend
->
configdRun
(
"proxy fetchacls"
,
true
);
return
array
(
"response"
=>
$response
);
}
else
{
return
array
(
"response"
=>
array
());
}
}
}
src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt
View file @
b46bbe02
...
...
@@ -69,7 +69,39 @@ POSSIBILITY OF SUCH DAMAGE.
if (status != "success" || data['status'] != 'ok') {
BootstrapDialog.show({
type: BootstrapDialog.TYPE_WARNING,
title: "Error reconfiguring cron",
title: "Error reconfiguring proxy",
message: data['status'],
draggable: true
});
}
});
});
/**
*
* Download ACLs and reconfigure poxy - activate changes
*/
$("#fetchandreconfigureAct").click(function(){
$("#fetchandreconfigureAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/proxy/service/fetchacls", sendData={}, callback=function(data,status) {
if (status != "success" || data['status'] != 'ok') {
BootstrapDialog.show({
type: BootstrapDialog.TYPE_WARNING,
title: "Error fetching remote acls",
message: data['status'],
draggable: true
});
}
});
ajaxCall(url="/api/proxy/service/reconfigure", sendData={}, callback=function(data,status) {
// when done, disable progress animation.
$("#fetchandreconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
if (status != "success" || data['status'] != 'ok') {
BootstrapDialog.show({
type: BootstrapDialog.TYPE_WARNING,
title: "Error reconfiguring proxy",
message: data['status'],
draggable: true
});
...
...
@@ -228,6 +260,8 @@ POSSIBILITY OF SUCH DAMAGE.
<div class="col-md-12">
<hr/>
<button class="btn btn-primary" id="reconfigureAct" type="button"><b>Apply</b><i id="reconfigureAct_progress" class=""></i></button>
<button class="btn btn-primary" id="fetchandreconfigureAct" type="button"><b>Download ACLs & Apply</b><i id="fetchandreconfigureAct_progress" class=""></i></button>
<button class="btn btn-primary" id="ScheduleAct" type="button"><b>Schedule with Cron</b><i id="scheduleAct_progress" class=""></i></button>
</div>
</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