summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
28f2a35)
- /api/info.json doesn't need to return slogan while it can be taken directly
from configuration
- exclude empty origins, not software
"supported_instances": row[1],
"blocks_recorded" : row[2],
"erroneous_instances": row[3],
"supported_instances": row[1],
"blocks_recorded" : row[2],
"erroneous_instances": row[3],
- "slogan" : config.get("slogan"),
}
@router.get(config.get("base_url") + "/api/scoreboard.json", response_class=JSONResponse)
}
@router.get(config.get("base_url") + "/api/scoreboard.json", response_class=JSONResponse)
elif mode == "blocker":
database.cursor.execute("SELECT blocker, COUNT(blocker) AS score FROM blocks GROUP BY blocker ORDER BY score DESC LIMIT ?", [amount])
elif mode == "reference":
elif mode == "blocker":
database.cursor.execute("SELECT blocker, COUNT(blocker) AS score FROM blocks GROUP BY blocker ORDER BY score DESC LIMIT ?", [amount])
elif mode == "reference":
- database.cursor.execute("SELECT origin, COUNT(domain) AS score FROM instances WHERE software IS NOT NULL GROUP BY origin ORDER BY score DESC LIMIT ?", [amount])
+ database.cursor.execute("SELECT origin, COUNT(domain) AS score FROM instances WHERE origin IS NOT NULL GROUP BY origin ORDER BY score DESC LIMIT ?", [amount])
elif mode == "software":
database.cursor.execute("SELECT software, COUNT(domain) AS score FROM instances WHERE software IS NOT NULL GROUP BY software ORDER BY score DESC, software ASC LIMIT ?", [amount])
elif mode == "command":
elif mode == "software":
database.cursor.execute("SELECT software, COUNT(domain) AS score FROM instances WHERE software IS NOT NULL GROUP BY software ORDER BY score DESC, software ASC LIMIT ?", [amount])
elif mode == "command":
return templates.TemplateResponse("views/index.html", {
"request": request,
"theme" : config.get("theme"),
return templates.TemplateResponse("views/index.html", {
"request": request,
"theme" : config.get("theme"),
- "info" : response.json()
+ "info" : response.json(),
+ "slogan" : config.get("slogan"),
})
@router.get(config.get("base_url") + "/top")
})
@router.get(config.get("base_url") + "/top")
{% block footer %}
Source code:
<a href="https://git.mxchange.org/?p=fba.git;a=summary" rel="source" target="_blank">git.mxchange.org</a><br /><br />
{% block footer %}
Source code:
<a href="https://git.mxchange.org/?p=fba.git;a=summary" rel="source" target="_blank">git.mxchange.org</a><br /><br />
- {% if info %}
- {{info.slogan}}
- {% elif slogan %}
{{slogan}}
{% else %}
<b>No slogan was found!</b>
{{slogan}}
{% else %}
<b>No slogan was found!</b>