net/frr: Integrate layout_partials/base_apply_button (#4542)

This commit is contained in:
Monviech
2025-02-13 11:08:30 +01:00
committed by GitHub
parent 7a72050636
commit f9dbcde25e
12 changed files with 23 additions and 139 deletions
@@ -35,7 +35,7 @@ class BfdController extends \OPNsense\Base\IndexController
$this->view->bfdForm = $this->getForm("bfd");
$this->view->formDialogEditBFDNeighbor = $this->getForm("dialogEditBFDNeighbor");
$this->view->formGridEditBFDNeighbor = $this->getFormGrid("dialogEditBFDNeighbor", null, "BFDChangeMessage");
$this->view->formGridEditBFDNeighbor = $this->getFormGrid("dialogEditBFDNeighbor");
$this->view->pick('OPNsense/Quagga/bfd');
}
@@ -35,22 +35,22 @@ class BgpController extends \OPNsense\Base\IndexController
$this->view->bgpForm = $this->getForm("bgp");
$this->view->formDialogEditBGPNeighbor = $this->getForm("dialogEditBGPNeighbor");
$this->view->formGridEditBGPNeighbor = $this->getFormGrid("dialogEditBGPNeighbor", null, "BGPChangeMessage");
$this->view->formGridEditBGPNeighbor = $this->getFormGrid("dialogEditBGPNeighbor");
$this->view->formDialogEditBGPASPaths = $this->getForm("dialogEditBGPASPath");
$this->view->formGridEditBGPASPaths = $this->getFormGrid("dialogEditBGPASPath", null, "BGPChangeMessage");
$this->view->formGridEditBGPASPaths = $this->getFormGrid("dialogEditBGPASPath");
$this->view->formDialogEditBGPPrefixLists = $this->getForm("dialogEditBGPPrefixLists");
$this->view->formGridEditBGPPrefixLists = $this->getFormGrid("dialogEditBGPPrefixLists", null, "BGPChangeMessage");
$this->view->formGridEditBGPPrefixLists = $this->getFormGrid("dialogEditBGPPrefixLists");
$this->view->formDialogEditBGPCommunityLists = $this->getForm("dialogEditBGPCommunityLists");
$this->view->formGridEditBGPCommunityLists = $this->getFormGrid("dialogEditBGPCommunityLists", null, "BGPChangeMessage");
$this->view->formGridEditBGPCommunityLists = $this->getFormGrid("dialogEditBGPCommunityLists");
$this->view->formDialogEditBGPRouteMaps = $this->getForm("dialogEditBGPRouteMaps");
$this->view->formGridEditBGPRouteMaps = $this->getFormGrid("dialogEditBGPRouteMaps", null, "BGPChangeMessage");
$this->view->formGridEditBGPRouteMaps = $this->getFormGrid("dialogEditBGPRouteMaps");
$this->view->formDialogEditBGPPeergroups = $this->getForm("dialogEditBGPPeergroups");
$this->view->formGridEditBGPPeergroups = $this->getFormGrid("dialogEditBGPPeergroups", null, "BGPChangeMessage");
$this->view->formGridEditBGPPeergroups = $this->getFormGrid("dialogEditBGPPeergroups");
$this->view->pick('OPNsense/Quagga/bgp');
}
@@ -32,16 +32,16 @@ class Ospf6Controller extends \OPNsense\Base\IndexController
$this->view->ospf6Form = $this->getForm("ospf6");
$this->view->formDialogEditNetwork = $this->getForm("dialogEditOSPF6Network");
$this->view->formGridEditNetwork = $this->getFormGrid("dialogEditOSPF6Network", null, "OSPF6ChangeMessage");
$this->view->formGridEditNetwork = $this->getFormGrid("dialogEditOSPF6Network");
$this->view->formDialogEditInterface = $this->getForm("dialogEditOSPF6Interface");
$this->view->formGridEditInterface = $this->getFormGrid("dialogEditOSPF6Interface", null, "OSPF6ChangeMessage");
$this->view->formGridEditInterface = $this->getFormGrid("dialogEditOSPF6Interface");
$this->view->formDialogEditPrefixLists = $this->getForm("dialogEditOSPF6PrefixLists");
$this->view->formGridEditPrefixLists = $this->getFormGrid("dialogEditOSPF6PrefixLists", null, "OSPF6ChangeMessage");
$this->view->formGridEditPrefixLists = $this->getFormGrid("dialogEditOSPF6PrefixLists");
$this->view->formDialogEditRouteMaps = $this->getForm("dialogEditOSPF6RouteMaps");
$this->view->formGridEditRouteMaps = $this->getFormGrid("dialogEditOSPF6RouteMaps", null, "OSPF6ChangeMessage");
$this->view->formGridEditRouteMaps = $this->getFormGrid("dialogEditOSPF6RouteMaps");
$this->view->pick('OPNsense/Quagga/ospf6');
}
@@ -35,16 +35,16 @@ class OspfController extends \OPNsense\Base\IndexController
$this->view->generalForm = $this->getForm("ospf");
$this->view->formDialogEditNetwork = $this->getForm("dialogEditOSPFNetwork");
$this->view->formGridEditNetwork = $this->getFormGrid("dialogEditOSPFNetwork", null, "OSPFChangeMessage");
$this->view->formGridEditNetwork = $this->getFormGrid("dialogEditOSPFNetwork");
$this->view->formDialogEditInterface = $this->getForm("dialogEditOSPFInterface");
$this->view->formGridEditInterface = $this->getFormGrid("dialogEditOSPFInterface", null, "OSPFChangeMessage");
$this->view->formGridEditInterface = $this->getFormGrid("dialogEditOSPFInterface");
$this->view->formDialogEditPrefixLists = $this->getForm("dialogEditOSPFPrefixLists");
$this->view->formGridEditPrefixLists = $this->getFormGrid("dialogEditOSPFPrefixLists", null, "OSPFChangeMessage");
$this->view->formGridEditPrefixLists = $this->getFormGrid("dialogEditOSPFPrefixLists");
$this->view->formDialogEditRouteMaps = $this->getForm("dialogEditOSPFRouteMaps");
$this->view->formGridEditRouteMaps = $this->getFormGrid("dialogEditOSPFRouteMaps", null, "OSPFChangeMessage");
$this->view->formGridEditRouteMaps = $this->getFormGrid("dialogEditOSPFRouteMaps");
$this->view->pick('OPNsense/Quagga/ospf');
}
@@ -38,7 +38,7 @@ class StaticController extends \OPNsense\Base\IndexController
$this->view->staticForm = $this->getForm("static");
$this->view->formDialogEditSTATICRoute = $this->getForm("dialogEditSTATICRoute");
$this->view->formGridEditSTATICRoute = $this->getFormGrid("dialogEditSTATICRoute", null, "STATICChangeMessage");
$this->view->formGridEditSTATICRoute = $this->getFormGrid("dialogEditSTATICRoute");
$this->view->pick('OPNsense/Quagga/static');
}
@@ -74,23 +74,5 @@ POSSIBILITY OF SUCH DAMAGE.
{{ partial('layout_partials/base_bootgrid_table', formGridEditBFDNeighbor)}}
</div>
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<br/>
<button class="btn btn-primary" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring BFD') }}"
type="button"
></button>
<br/><br/>
</div>
</div>
<div id="BFDChangeMessage" class="alert alert-info" style="display: none" role="alert">
{{ lang._('After changing settings, please remember to apply them.') }}
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditBFDNeighbor,'id':formGridEditBFDNeighbor['edit_dialog_id'],'label':lang._('Edit Neighbor')])}}
@@ -138,25 +138,7 @@ POSSIBILITY OF SUCH DAMAGE.
{{ partial('layout_partials/base_bootgrid_table', formGridEditBGPPeergroups)}}
</div>
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<br/>
<button class="btn btn-primary" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring BGP') }}"
type="button"
></button>
<br/><br/>
</div>
</div>
<div id="BGPChangeMessage" class="alert alert-info" style="display: none" role="alert">
{{ lang._('After changing settings, please remember to apply them.') }}
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditBGPNeighbor,'id':formGridEditBGPNeighbor['edit_dialog_id'],'label':lang._('Edit Neighbor')])}}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditBGPASPaths,'id':formGridEditBGPASPaths['edit_dialog_id'],'label':lang._('Edit AS Paths')])}}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditBGPPrefixLists,'id':formGridEditBGPPrefixLists['edit_dialog_id'],'label':lang._('Edit Prefix Lists')])}}
@@ -51,18 +51,4 @@ POSSIBILITY OF SUCH DAMAGE.
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<br/>
<button class="btn btn-primary" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring BFD') }}"
type="button"
></button>
<br/><br/>
</div>
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
@@ -116,24 +116,7 @@ POSSIBILITY OF SUCH DAMAGE.
{{ partial('layout_partials/base_bootgrid_table', formGridEditRouteMaps)}}
</div>
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<button class="btn btn-primary __mb __mt" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring OSPFv3') }}"
data-service-widget="quagga"
type="button"
></button>
</div>
</div>
<div id="OSPFChangeMessage" class="alert alert-info" style="display: none" role="alert">
{{ lang._('After changing settings, please remember to apply them.') }}
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditNetwork,'id':formGridEditNetwork['edit_dialog_id'],'label':lang._('Edit Network')])}}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditInterface,'id':formGridEditInterface['edit_dialog_id'],'label':lang._('Edit Interface')])}}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditPrefixLists,'id':formGridEditPrefixLists['edit_dialog_id'],'label':lang._('Edit Prefix Lists')])}}
@@ -122,24 +122,7 @@
{{ partial('layout_partials/base_bootgrid_table', formGridEditRouteMaps)}}
</div>
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<button class="btn btn-primary __mb __mt" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring OSPFv3') }}"
data-service-widget="quagga"
type="button"
></button>
</div>
</div>
<div id="OSPF6ChangeMessage" class="alert alert-info" style="display: none" role="alert">
{{ lang._('After changing settings, please remember to apply them.') }}
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditNetwork,'id':formGridEditNetwork['edit_dialog_id'],'label':lang._('Edit Network')])}}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditInterface,'id':formGridEditInterface['edit_dialog_id'],'label':lang._('Edit Interface')])}}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditPrefixLists,'id':formGridEditPrefixLists['edit_dialog_id'],'label':lang._('Edit Prefix Lists')])}}
@@ -51,18 +51,4 @@ POSSIBILITY OF SUCH DAMAGE.
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':ripForm,'id':'frm_rip_settings'])}}
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<br/>
<button class="btn btn-primary" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring BFD') }}"
type="button"
></button>
<br/><br/>
</div>
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
@@ -71,23 +71,5 @@
{{ partial('layout_partials/base_bootgrid_table', formGridEditSTATICRoute)}}
</div>
</div>
<section class="page-content-main">
<div class="content-box">
<div class="col-md-12">
<br/>
<button class="btn btn-primary" id="reconfigureAct"
data-endpoint='/api/quagga/service/reconfigure'
data-label="{{ lang._('Apply') }}"
data-error-title="{{ lang._('Error reconfiguring STATIC') }}"
type="button"
></button>
<br/><br/>
</div>
</div>
<div id="STATICChangeMessage" class="alert alert-info" style="display: none" role="alert">
{{ lang._('After changing settings, please remember to apply them.') }}
</div>
</section>
{{ partial('layout_partials/base_apply_button', {'data_endpoint': '/api/quagga/service/reconfigure', 'data_service_widget': 'quagga'}) }}
{{ partial("layout_partials/base_dialog",['fields':formDialogEditSTATICRoute,'id':formGridEditSTATICRoute['edit_dialog_id'],'label':lang._('Edit Routes')])}}