summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-05-04 01:07:46 +0200
committerMax Magorsch <arzano@gentoo.org>2020-05-04 01:07:46 +0200
commit65aa6442fc6d8cc3d5688255911667bd133b97fc (patch)
tree72d224c0a6708efb7ce0856abc619150b2b366e9
parentUse separate folder for the html pages (diff)
downloadgentoo-mirrorstats-65aa6442fc6d8cc3d5688255911667bd133b97fc.tar.gz
gentoo-mirrorstats-65aa6442fc6d8cc3d5688255911667bd133b97fc.tar.bz2
gentoo-mirrorstats-65aa6442fc6d8cc3d5688255911667bd133b97fc.zip
Use index.html instead of all.html for the landing page
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rwxr-xr-xhtml/generate.py4
-rw-r--r--html/help.jinja22
-rw-r--r--html/stats.jinja22
3 files changed, 5 insertions, 3 deletions
diff --git a/html/generate.py b/html/generate.py
index abb7100..8ab5898 100755
--- a/html/generate.py
+++ b/html/generate.py
@@ -69,12 +69,14 @@ def getIp(hostname):
def renderStatsTemplate(templateEnv, page):
if page == "all":
mirrorstatsList = mirrorstats
+ page_name = "index"
else:
mirrorstatsList = ['https://mirrorstats.gentoo.org/' + page + '/state.json']
+ page_name = page
lastUpdate, hostList = getHostList(mirrorstatsList)
template = templateEnv.get_template("stats.jinja2")
- template.stream(lastUpdate=lastUpdate, type=page, mirrors=hostList, locations=json.dumps(hostList)).dump(html_folder + page + ".html")
+ template.stream(lastUpdate=lastUpdate, type=page, mirrors=hostList, locations=json.dumps(hostList)).dump(html_folder + page_name + ".html")
return lastUpdate
diff --git a/html/help.jinja2 b/html/help.jinja2
index 6e08363..678e649 100644
--- a/html/help.jinja2
+++ b/html/help.jinja2
@@ -55,7 +55,7 @@
</div>
<div class="collapse navbar-collapse navbar-main-collapse" id="navbar-main-collapse">
<ul class="navbar-nav mr-auto">
- <li class="nav-item"><a class="nav-link" href="all.html">Home</a></li>
+ <li class="nav-item"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link" href="rsync.html">Rsync</a></li>
<li class="nav-item"><a class="nav-link" href="distfiles.html">Distfiles</a></li>
<li class="nav-item"><a class="nav-link" href="snapshots.html">Snapshots</a></li>
diff --git a/html/stats.jinja2 b/html/stats.jinja2
index e13cd45..35f012a 100644
--- a/html/stats.jinja2
+++ b/html/stats.jinja2
@@ -57,7 +57,7 @@
</div>
<div class="collapse navbar-collapse navbar-main-collapse" id="navbar-main-collapse">
<ul class="navbar-nav mr-auto">
- <li class="nav-item {%if type == 'all'%}active{%endif%}"><a class="nav-link" href="all.html">Home</a></li>
+ <li class="nav-item {%if type == 'all'%}active{%endif%}"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item {%if type == 'rsync'%}active{%endif%}"><a class="nav-link" href="rsync.html">Rsync</a></li>
<li class="nav-item {%if type == 'distfiles'%}active{%endif%}"><a class="nav-link" href="distfiles.html">Distfiles</a></li>
<li class="nav-item {%if type == 'snapshots'%}active{%endif%}"><a class="nav-link" href="snapshots.html">Snapshots</a></li>