diff --git a/front-generator/template/common/widgets.j2 b/front-generator/template/common/widgets.j2 index ccaf772..647f718 100644 --- a/front-generator/template/common/widgets.j2 +++ b/front-generator/template/common/widgets.j2 @@ -78,22 +78,16 @@ {% endmacro %} {% macro build_getter_js(param_group, widget) %}{% if widget.widget in ['flex-container', 'settings-container', 'h2', 'h3', 'submit', 'watch', 'watch-expr'] %}null{% -elif widget.widget == 'checkbox' or widget.widget == 'number' or widget.widget == 'select' or widget.widget == 'ip-address' %}this.param{{ param_group | title }}.{{ widget.name }}{% -elif widget.widget == 'modulation-modcod' %}this.param{{ param_group | title }}.{{ widget.name }}Modulation{% -elif widget.widget == 'modulation-speed' %}this.param{{ param_group | title }}.{{ widget.name }}Speed{% +elif widget.widget in ['checkbox', 'number', 'select', 'ip-address', 'modulation-modcod', 'modulation-speed'] %}this.param{{ param_group | title }}.{{ widget.name }}{% elif widget.widget == 'number-int' %}parseInt(this.param{{ param_group | title }}.{{ widget.name }}.replace(/[^0-9]/g, '')){% else %}

Widget '{{ widget.widget }}' not defined!

{{ widget }}

{% endif %}{% endmacro %} {% macro build_setter_js(param_group, widget, expr) %}{% if widget.widget in ['flex-container', 'settings-container', 'h2', 'h3', 'submit', 'watch', 'watch-expr'] %}null{% -elif widget.widget in ['checkbox', 'number', 'select', 'ip-address'] %}this.param{{ param_group | title }}.{{ widget.name }} = {{ expr }}{% -elif widget.widget == 'modulation-modcod' %}this.param{{ param_group | title }}.{{ widget.name }}Modulation = {{ expr }}{% -elif widget.widget == 'modulation-speed' %}this.param{{ param_group | title }}.{{ widget.name }}Speed = {{ expr }}{% +elif widget.widget in ['checkbox', 'number', 'select', 'ip-address', 'modulation-modcod', 'modulation-speed'] %}this.param{{ param_group | title }}.{{ widget.name }} = {{ expr }}{% elif widget.widget == 'number-int' %}this.param{{ param_group | title }}.{{ widget.name }} = this.inputFormatInt({{ expr }}, {{ js_build_number_int_validator(widget) }}){% else %}

Widget '{{ widget.widget }}' not defined!

{{ widget }}

{% endif %}{% endmacro %} {% macro build_setter(param_group, widget, expr) %}{% if widget.widget in ['flex-container', 'settings-container', 'h2', 'h3', 'submit', 'watch', 'watch-expr'] %}null{% -elif widget.widget in ['checkbox', 'number', 'select', 'ip-address'] %}param{{ param_group | title }}.{{ widget.name }} = {{ expr }}{% -elif widget.widget == 'modulation-modcod' %}param{{ param_group | title }}.{{ widget.name }}Modulation = {{ expr }}{% -elif widget.widget == 'modulation-speed' %}param{{ param_group | title }}.{{ widget.name }}Speed = {{ expr }}{% +elif widget.widget in ['checkbox', 'number', 'select', 'ip-address', 'modulation-modcod', 'modulation-speed'] %}param{{ param_group | title }}.{{ widget.name }} = {{ expr }}{% elif widget.widget == 'number-int' %}param{{ param_group | title }}.{{ widget.name }} = ({{ expr }}).toString(){% else %}

Widget '{{ widget.widget }}' not defined!

{{ widget }}

{% endif %}{% endmacro %} diff --git a/static/main-scpc.html b/static/main-scpc.html index 8fa70bc..66873ff 100644 --- a/static/main-scpc.html +++ b/static/main-scpc.html @@ -782,12 +782,12 @@ "dvbServicePacketPeriod": this.paramRxtx.dvbServicePacketPeriod, "dvbIsAcm": this.paramRxtx.dvbIsAcm, "txFrameSizeNormal": this.paramRxtx.txFrameSizeNormal, - "dvbCcmModulation": this.paramRxtx.dvbCcmModulationModulation, - "dvbCcmSpeed": this.paramRxtx.dvbCcmSpeedSpeed, - "dvbAcmMinModulation": this.paramRxtx.dvbAcmMinModulationModulation, - "dvbAcmMinSpeed": this.paramRxtx.dvbAcmMinSpeedSpeed, - "dvbAcmMaxModulation": this.paramRxtx.dvbAcmMaxModulationModulation, - "dvbAcmMaxSpeed": this.paramRxtx.dvbAcmMaxSpeedSpeed, + "dvbCcmModulation": this.paramRxtx.dvbCcmModulation, + "dvbCcmSpeed": this.paramRxtx.dvbCcmSpeed, + "dvbAcmMinModulation": this.paramRxtx.dvbAcmMinModulation, + "dvbAcmMinSpeed": this.paramRxtx.dvbAcmMinSpeed, + "dvbAcmMaxModulation": this.paramRxtx.dvbAcmMaxModulation, + "dvbAcmMaxSpeed": this.paramRxtx.dvbAcmMaxSpeed, "dvbSnrReserve": this.paramRxtx.dvbSnrReserve, "aupcEn": this.paramRxtx.aupcEn, "aupcMinAttenuation": this.paramRxtx.aupcMinAttenuation, @@ -893,12 +893,12 @@ this.paramRxtx.dvbServicePacketPeriod = vals["settings"]["dvbServicePacketPeriod"] this.paramRxtx.dvbIsAcm = vals["settings"]["dvbIsAcm"] this.paramRxtx.txFrameSizeNormal = vals["settings"]["txFrameSizeNormal"] - this.paramRxtx.dvbCcmModulationModulation = vals["settings"]["dvbCcmModulation"] - this.paramRxtx.dvbCcmSpeedSpeed = vals["settings"]["dvbCcmSpeed"] - this.paramRxtx.dvbAcmMinModulationModulation = vals["settings"]["dvbAcmMinModulation"] - this.paramRxtx.dvbAcmMinSpeedSpeed = vals["settings"]["dvbAcmMinSpeed"] - this.paramRxtx.dvbAcmMaxModulationModulation = vals["settings"]["dvbAcmMaxModulation"] - this.paramRxtx.dvbAcmMaxSpeedSpeed = vals["settings"]["dvbAcmMaxSpeed"] + this.paramRxtx.dvbCcmModulation = vals["settings"]["dvbCcmModulation"] + this.paramRxtx.dvbCcmSpeed = vals["settings"]["dvbCcmSpeed"] + this.paramRxtx.dvbAcmMinModulation = vals["settings"]["dvbAcmMinModulation"] + this.paramRxtx.dvbAcmMinSpeed = vals["settings"]["dvbAcmMinSpeed"] + this.paramRxtx.dvbAcmMaxModulation = vals["settings"]["dvbAcmMaxModulation"] + this.paramRxtx.dvbAcmMaxSpeed = vals["settings"]["dvbAcmMaxSpeed"] this.paramRxtx.dvbSnrReserve = vals["settings"]["dvbSnrReserve"] this.paramRxtx.aupcEn = vals["settings"]["aupcEn"] this.paramRxtx.aupcMinAttenuation = vals["settings"]["aupcMinAttenuation"]