{%- // travelmate mail template (ucode), variables: banner, board (ubus system // board), status (as 'travelmate status'), station_id; html() escapes them function html(s) { return replace('' + (s ?? ''), /[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]); } let info = []; for (let l in split(banner ?? '', '\n')) if (length(trim(l)) >= 4) push(info, rtrim(l)); for (let k in [ 'kernel', 'hostname', 'system', 'model' ]) if (board?.[k] != null) push(info, sprintf(' + %-12s: %s', k, board[k])); if (board?.release?.description != null) push(info, sprintf(' + %-12s: %s', 'description', board.release.description)); -%}
++
++ System Information ++
++
{{ html(length(info) ? join('\n', info) : '-') }}

++
++ Travelmate Status ++
++
{{ html(rtrim(status ?? '') || '-') }}
{%- if (length(station_id ?? '')): %}


++
++ Connection Status ++
++
travelmate connection to {{ html(station_id) }}
{%- endif %}