Branch
Hash :
d0f8128e
Author :
Thomas de Grivel
Date :
2025-09-03T13:23:59
show securelevel in system dashboard
## kc3
## Copyright from 2022 to 2025 kmx.io <contact@kmx.io>
##
## Permission is hereby granted to use this software granted the above
## copyright notice and this permission paragraph are included in all
## copies and substantial portions of this software.
##
## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
## THIS SOFTWARE.
require Time
defmodule SystemController do
def dashboard = fn (url) {
slug = "system system-dashboard"
title = "System dashboard"
securelevel_str = "#{securelevel(0)}"
uptime_str = Time.diff_to_str(Time.uptime())
page = SystemView.render_dashboard(securelevel_str, uptime_str)
body = SystemView.render_layout(slug, title, page, url)
%HTTP.Response{body: body}
}
def route = fn (request) {
dashboard(request.url)
}
end