{%- from 'jinja2_macros.html' import construct_toggle_link with context -%} {# set this to 'false' for debug purposes, to see the offline state, set it to 'server_is_online' or remove the line for regular use #} {%- set server_is_online = server_is_online -%} {%- set online_status_string = "online" if server_is_online else "offline" -%}
The server is {{ online_status_string }} {% if shutdown_in_seconds == none -%} {{ construct_toggle_link( server_is_online, "shutdown", ['widget_event', ['game_environment', ['schedule_shutdown', { "action": "schedule_shutdown", "shutdown_in_seconds": '900' }]]] )}} {%- else -%} {{ construct_toggle_link( server_is_online, "cancel", ['widget_event', ['game_environment', ['cancel_shutdown', { "action": "cancel_shutdown" }]]] )}} {{ shutdown_in_seconds }} seconds to {{ construct_toggle_link( server_is_online, "shutdown", ['widget_event', ['game_environment', ['force_shutdown', { "action": "force_shutdown" }]]] )}} {%- endif -%}