mirror of
https://github.com/iFargle/headscale-webui.git
synced 2026-03-21 07:14:53 +01:00
syntax
This commit is contained in:
@@ -285,8 +285,7 @@ def thread_machine_content(machine, machine_content, idx, all_routes):
|
||||
|
||||
# Print the button for the Exit routes:
|
||||
if exit_route_found:
|
||||
routes = routes+"""
|
||||
<p
|
||||
routes = routes+""" <p
|
||||
class='waves-effect waves-light btn-small """+exit_enabled_color+""" lighten-2 tooltipped'
|
||||
data-position='top' data-tooltip='Click to """+exit_tooltip+"""'
|
||||
id='"""+machine["id"]+"""-exit'
|
||||
@@ -304,8 +303,7 @@ def thread_machine_content(machine, machine_content, idx, all_routes):
|
||||
if route["enabled"]:
|
||||
route_enabled = "green"
|
||||
route_tooltip = 'disable'
|
||||
routes = routes+"""
|
||||
<p
|
||||
routes = routes+""" <p
|
||||
class='waves-effect waves-light btn-small """+route_enabled+""" lighten-2 tooltipped'
|
||||
data-position='top' data-tooltip='Click to """+route_tooltip+"""'
|
||||
id='"""+route['id']+"""'
|
||||
@@ -313,7 +311,7 @@ def thread_machine_content(machine, machine_content, idx, all_routes):
|
||||
"""+route['prefix']+"""
|
||||
</p>
|
||||
"""
|
||||
routes = routes+"</li>"
|
||||
routes = routes+"</li>"
|
||||
|
||||
# Get machine tags
|
||||
tag_array = ""
|
||||
|
||||
@@ -788,12 +788,12 @@ function toggle_exit(route1, route2, exit_id, current_state) {
|
||||
element.className = enabledClass
|
||||
var action_taken = "enabled."
|
||||
element.setAttribute('data-tooltip', enabledTooltip)
|
||||
element.setAttribute('onclick', 'toggle_exit('+route1+', '+route2+', '+exit_id+', "'+enableState+'")')
|
||||
element.setAttribute('onclick', 'toggle_exit('+route1+', '+route2+', "'+exit_id+'", "'+enableState+'")')
|
||||
} else if (element.className == enabledClass) {
|
||||
element.className = disabledClass
|
||||
var action_taken = "disabled."
|
||||
element.setAttribute('data-tooltip', disabledTooltip)
|
||||
element.setAttribute('onclick', 'toggle_exit('+route1+', '+route2+', '+exit_id+', "'+disableState+'")')
|
||||
element.setAttribute('onclick', 'toggle_exit('+route1+', '+route2+', "'+exit_id+'", "'+disableState+'")')
|
||||
}
|
||||
M.toast({html: 'Exit Route '+action_taken});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user