diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2017-12-03 21:34:57 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2017-12-03 21:34:57 +0000 |
commit | 44bd405b8a2a8867b7e00a525da0dfdbdda6be70 (patch) | |
tree | 263effe851c47ff808bb016afaca3c1db7f89092 /generate-html.lua | |
parent | d08df21ec13a372ce8fbb04423d6e3a62b897303 (diff) | |
download | alpine-mirror-status-44bd405b8a2a8867b7e00a525da0dfdbdda6be70.tar.bz2 alpine-mirror-status-44bd405b8a2a8867b7e00a525da0dfdbdda6be70.tar.xz |
add links to status tables and add status description
Diffstat (limited to 'generate-html.lua')
-rwxr-xr-x | generate-html.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/generate-html.lua b/generate-html.lua index f6d3f63..19f4756 100755 --- a/generate-html.lua +++ b/generate-html.lua @@ -135,6 +135,10 @@ function get_mirrors() for a,mirror in pairs(mirrors) do mirrors[a].location = mirror.location or "Unknown" mirrors[a].bandwidth = mirror.bandwidth or "Unknown" + mirrors[a].num = a + if mirror.name:len() > 32 then + mirrors[a].name = ("%s..."):format(mirror.name:sub(1,32)) + end for b,url in pairs(mirror.urls) do local scheme = url:match("(.*)://*.") mirrors[a].urls[b] = {url = url, scheme = scheme} @@ -164,7 +168,7 @@ function build_status_tables(indexes) table.insert(rows, { row = row }) end res[idx] = { - url = mirror.url, thead = thead, tbody = rows, + url = mirror.url, thead = thead, tbody = rows, num = idx, duration = mirror.duration, count = mirror.count } end |