From 58d9c30ce7d503621dde689aeb4a0ca28f3b303b Mon Sep 17 00:00:00 2001 From: iFargle Date: Thu, 30 Mar 2023 11:38:53 +0900 Subject: [PATCH] test --- static/js/custom.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/custom.js b/static/js/custom.js index f86c64c..271019d 100644 --- a/static/js/custom.js +++ b/static/js/custom.js @@ -855,18 +855,18 @@ function toggle_route(route_id, current_state, page) { function get_routes() { console.log("Getting info for all routes") - var all_routes = "" + var data $.ajax({ - type:"POST", async: false, + type:"POST", url: "api/get_routes", contentType: "application/json", success: function(response) { console.log("Got all routes.") - all_routes = JSON.stringify(response) + data = response } }) - return all_routes + return data } function toggle_failover_route_routespage(routeid, current_state, prefix, route_id_list) { @@ -913,7 +913,7 @@ function toggle_failover_route_routespage(routeid, current_state, prefix, route_ var enabled_status = "False" // Debug. - console.log("in toggle_failover_state_routespage: Routes: "+routes) + console.log("in toggle_failover_state_routespage: Routes: "+JSON.stringify(routes)) // Get the primary and enabled displays for the prefix: for (let i=0; i < route_id_list.length; i++) {