This commit is contained in:
iFargle
2023-03-24 11:29:33 +09:00
parent bfde3d337d
commit 2504b42806
2 changed files with 4 additions and 4 deletions

View File

@@ -726,8 +726,8 @@ def render_routes():
is_failover = False
is_exit = False
enabled = "<a href='#'><i id='"+route["id"]+"' onclick='toggle_route_routes_page("+route["id"]+", \"True\")' class='material-icons green-text text-lighten-2 tooltipped' data-tooltip='Click to disable'>fiber_manual_record</i></a>"
disabled = "<a href='#'><i id='"+route["id"]+"' onclick='toggle_route_routes_page("+route["id"]+", \"False\")' class='material-icons red-text text-lighten-2 tooltipped' data-tooltip='Click to enable' >fiber_manual_record</i></a>"
enabled = "<a href='#'><i id='"+route["id"]+"' onclick='toggle_route_routes_page("+route["id"]+", \'True\')' class='material-icons green-text text-lighten-2 tooltipped' data-tooltip='Click to disable'>fiber_manual_record</i></a>"
disabled = "<a href='#'><i id='"+route["id"]+"' onclick='toggle_route_routes_page("+route["id"]+", \'False\')' class='material-icons red-text text-lighten-2 tooltipped' data-tooltip='Click to enable' >fiber_manual_record</i></a>"
# Set the displays:
enabled_display = disabled

View File

@@ -848,8 +848,8 @@ function toggle_route_routes_page(route_id, current_state) {
success: function(response) {
// Response is a JSON object containing the Headscale API response of /v1/api/machines/<id>/route
var element = document.getElementById(route_id);
var disabledClass = "material-icons green-text text-lighten-2 tooltipped";
var enabledClass = "material-icons red-text text-lighten-2 tooltipped";
var disabledClass = "material-icons red-text text-lighten-2 tooltipped";
var enabledClass = "material-icons green-text text-lighten-2 tooltipped";
var disabledTooltip = "Click to enable"
var enabledTooltip = "Click to disable"
var disableState = "False"