mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/siproxd: fixed model and save buttons (#309)
This commit is contained in:
@@ -79,14 +79,14 @@
|
||||
<field>
|
||||
<id>general.rtp_input_dejitter</id>
|
||||
<label>RTP input dejitter</label>
|
||||
<type>checkbox</type>
|
||||
<help>De-Jitter inbound packets (defaults to 0).</help>
|
||||
<type>text</type>
|
||||
<help>De-Jitter inbound packets in ms (default is disabled).</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.rtp_output_dejitter</id>
|
||||
<label>RTP output dejitter</label>
|
||||
<type>checkbox</type>
|
||||
<help>De-Jitter outbound packets (defaults to 0).</help>
|
||||
<type>text</type>
|
||||
<help>De-Jitter outbound packets in ms (default is disabled).</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.proxy_auth_enable</id>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<model>
|
||||
<mount>//OPNsense/siproxd/general</mount>
|
||||
<description>Siproxd configuration</description>
|
||||
<version>1.0.0</version>
|
||||
<version>1.1.0</version>
|
||||
<items>
|
||||
<enabled type="BooleanField">
|
||||
<default>0</default>
|
||||
@@ -76,13 +76,17 @@
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>64</MaximumValue>
|
||||
</sip_dscp>
|
||||
<rtp_input_dejitter type="BooleanField">
|
||||
<rtp_input_dejitter type="IntegerField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
<Required>Y</Required>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>5000</MaximumValue>
|
||||
</rtp_input_dejitter>
|
||||
<rtp_output_dejitter type="BooleanField">
|
||||
<rtp_output_dejitter type="IntegerField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
<Required>Y</Required>
|
||||
<MinimumValue>0</MinimumValue>
|
||||
<MaximumValue>5000</MaximumValue>
|
||||
</rtp_output_dejitter>
|
||||
<proxy_auth_enable type="BooleanField">
|
||||
<default>0</default>
|
||||
|
||||
@@ -64,6 +64,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="col-md-12">
|
||||
<hr />
|
||||
<button class="btn btn-primary" id="saveAct_user" type="button"><b>{{ lang._('Save') }}</b><i id="saveAct_user_progress" class=""></i></button>
|
||||
<br /><br />
|
||||
</div>
|
||||
</div>
|
||||
<div id="domains" class="tab-pane fade in">
|
||||
<table id="grid-domains" class="table table-responsive" data-editDialog="dialogEditSiproxdDomain">
|
||||
@@ -86,6 +91,11 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div class="col-md-12">
|
||||
<hr />
|
||||
<button class="btn btn-primary" id="saveAct_domain" type="button"><b>{{ lang._('Save') }}</b><i id="saveAct_domain_progress" class=""></i></button>
|
||||
<br /><br />
|
||||
</div>
|
||||
</div>
|
||||
<div id="showregistrations" class="tab-pane fade in">
|
||||
<pre id="showregistrations-cmd"></pre>
|
||||
@@ -143,5 +153,29 @@ $( document ).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
$("#saveAct_user").click(function(){
|
||||
saveFormToEndpoint(url="/api/siproxd/user/set", formid='frm_general_settings',callback_ok=function(){
|
||||
$("#saveAct_user_progress").addClass("fa fa-spinner fa-pulse");
|
||||
ajaxCall(url="/api/siproxd/service/reconfigure", sendData={}, callback=function(data,status) {
|
||||
ajaxCall(url="/api/siproxd/service/status", sendData={}, callback=function(data,status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
$("#saveAct_user_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$("#saveAct_domain").click(function(){
|
||||
saveFormToEndpoint(url="/api/siproxd/domain/set", formid='frm_general_settings',callback_ok=function(){
|
||||
$("#saveAct_domain_progress").addClass("fa fa-spinner fa-pulse");
|
||||
ajaxCall(url="/api/siproxd/service/reconfigure", sendData={}, callback=function(data,status) {
|
||||
ajaxCall(url="/api/siproxd/service/status", sendData={}, callback=function(data,status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
$("#saveAct_domain_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -52,13 +52,13 @@ rtp_dscp = {{ OPNsense.siproxd.general.rtp_dscp }}
|
||||
{% if helpers.exists('OPNsense.siproxd.general.sip_dscp') and OPNsense.siproxd.general.sip_dscp != '' %}
|
||||
sip_dscp = {{ OPNsense.siproxd.general.sip_dscp }}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.siproxd.general.rtp_input_dejitter') and OPNsense.siproxd.general.rtp_input_dejitter == '1' %}
|
||||
rtp_input_dejitter = 1
|
||||
{% if helpers.exists('OPNsense.siproxd.general.rtp_input_dejitter') and OPNsense.siproxd.general.rtp_input_dejitter != '' %}
|
||||
rtp_input_dejitter = {{ OPNsense.siproxd.general.rtp_input_dejitter }}
|
||||
{% else %}
|
||||
rtp_input_dejitter = 0
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.siproxd.general.rtp_output_dejitter') and OPNsense.siproxd.general.rtp_output_dejitter == '1' %}
|
||||
rtp_output_dejitter = 1
|
||||
{% if helpers.exists('OPNsense.siproxd.general.rtp_output_dejitter') and OPNsense.siproxd.general.rtp_output_dejitter != '' %}
|
||||
rtp_output_dejitter = {{ OPNsense.siproxd.general.rtp_output_dejitter }}
|
||||
{% else %}
|
||||
rtp_output_dejitter = 0
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user