mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/freeradius: rework status UI (#1265)
This commit is contained in:
@@ -19,6 +19,7 @@ Plugin Changelog
|
||||
|
||||
* Add DHCP support, serving only for DHCP relays
|
||||
* Allow usage of remote MySQL server
|
||||
* Rework service status UI
|
||||
|
||||
|
||||
WWW: https://www.freeradius.org
|
||||
|
||||
@@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
/*************************************************************************************************************
|
||||
* link grid actions
|
||||
*************************************************************************************************************/
|
||||
@@ -56,7 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function(data,status) {
|
||||
// when done, disable progress animation.
|
||||
$("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
|
||||
updateServiceControlUI('freeradius');
|
||||
if (status != "success" || data['status'] != 'ok') {
|
||||
BootstrapDialog.show({
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
|
||||
@@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
/*************************************************************************************************************
|
||||
* link grid actions
|
||||
*************************************************************************************************************/
|
||||
@@ -56,7 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function(data,status) {
|
||||
// when done, disable progress animation.
|
||||
$("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
|
||||
updateServiceControlUI('freeradius');
|
||||
if (status != "success" || data['status'] != 'ok') {
|
||||
BootstrapDialog.show({
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
|
||||
@@ -42,18 +42,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
formatTokenizersUI();
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
ajaxCall(url="/api/freeradius/service/status", sendData={}, callback=function (data, status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
// link save button to API set action
|
||||
$("#saveAct").click(function () {
|
||||
saveFormToEndpoint(url="/api/freeradius/eap/set", formid='frm_eap_settings',callback_ok=function () {
|
||||
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function (data,status) {
|
||||
ajaxCall(url="/api/freeradius/service/status", sendData={}, callback=function (data,status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
updateServiceControlUI('freeradius');
|
||||
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -42,18 +42,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
formatTokenizersUI();
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
ajaxCall(url="/api/freeradius/service/status", sendData={}, callback=function (data, status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
// link save button to API set action
|
||||
$("#saveAct").click(function () {
|
||||
saveFormToEndpoint(url="/api/freeradius/general/set", formid='frm_general_settings',callback_ok=function () {
|
||||
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function (data,status) {
|
||||
ajaxCall(url="/api/freeradius/service/status", sendData={}, callback=function (data,status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
updateServiceControlUI('freeradius');
|
||||
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -42,18 +42,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
formatTokenizersUI();
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
ajaxCall(url="/api/freeradius/service/status", sendData={}, callback=function (data, status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
// link save button to API set action
|
||||
$("#saveAct").click(function () {
|
||||
saveFormToEndpoint(url="/api/freeradius/ldap/set", formid='frm_ldap_settings',callback_ok=function () {
|
||||
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function (data,status) {
|
||||
ajaxCall(url="/api/freeradius/service/status", sendData={}, callback=function (data,status) {
|
||||
updateServiceStatusUI(data['status']);
|
||||
});
|
||||
updateServiceControlUI('freeradius');
|
||||
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
/*************************************************************************************************************
|
||||
* link grid actions
|
||||
*************************************************************************************************************/
|
||||
@@ -56,7 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function(data,status) {
|
||||
// when done, disable progress animation.
|
||||
$("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
|
||||
updateServiceControlUI('freeradius');
|
||||
if (status != "success" || data['status'] != 'ok') {
|
||||
BootstrapDialog.show({
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
|
||||
@@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
<script>
|
||||
|
||||
$( document ).ready(function() {
|
||||
updateServiceControlUI('freeradius');
|
||||
|
||||
/*************************************************************************************************************
|
||||
* link grid actions
|
||||
*************************************************************************************************************/
|
||||
@@ -56,7 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
ajaxCall(url="/api/freeradius/service/reconfigure", sendData={}, callback=function(data,status) {
|
||||
// when done, disable progress animation.
|
||||
$("#reconfigureAct_progress").removeClass("fa fa-spinner fa-pulse");
|
||||
|
||||
updateServiceControlUI('freeradius');
|
||||
if (status != "success" || data['status'] != 'ok') {
|
||||
BootstrapDialog.show({
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
|
||||
Reference in New Issue
Block a user