added SHOW_SHYNET_VERSION env var to control display of version info
This commit is contained in:
parent
c524325f0a
commit
101d26d356
@ -58,6 +58,9 @@ PERFORM_CHECKS_AND_SETUP=True
|
|||||||
# The port that Shynet should bind to. Don't set this if you're deploying on Heroku.
|
# The port that Shynet should bind to. Don't set this if you're deploying on Heroku.
|
||||||
PORT=8080
|
PORT=8080
|
||||||
|
|
||||||
|
# Set to "False" if you do not want the version to be displayed on the frontend.
|
||||||
|
SHOW_SHYNET_VERSION=True
|
||||||
|
|
||||||
# Redis, queue, and parellization settings; not necessary for single-instance deployments.
|
# Redis, queue, and parellization settings; not necessary for single-instance deployments.
|
||||||
# Don't uncomment these unless you know what you are doing!
|
# Don't uncomment these unless you know what you are doing!
|
||||||
# NUM_WORKERS=1
|
# NUM_WORKERS=1
|
||||||
|
21
app.json
21
app.json
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "Shynet",
|
"name": "Shynet",
|
||||||
"description":"Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.",
|
"description": "Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.",
|
||||||
"keywords":[
|
"keywords": [
|
||||||
"app.json",
|
"app.json",
|
||||||
"shynet",
|
"shynet",
|
||||||
"heroku",
|
"heroku",
|
||||||
"analytics",
|
"analytics",
|
||||||
"privacy",
|
"privacy",
|
||||||
"friendly"
|
"friendly"
|
||||||
],
|
],
|
||||||
"website": "https://github.com/milesmcc/shynet",
|
"website": "https://github.com/milesmcc/shynet",
|
||||||
"repository": "https://github.com/milesmcc/shynet",
|
"repository": "https://github.com/milesmcc/shynet",
|
||||||
@ -117,6 +117,11 @@
|
|||||||
"description": "Whether to perform checks and setup at startup. Recommended value is 'True' for Heroku users.",
|
"description": "Whether to perform checks and setup at startup. Recommended value is 'True' for Heroku users.",
|
||||||
"value": "True",
|
"value": "True",
|
||||||
"required": false
|
"required": false
|
||||||
|
},
|
||||||
|
"SHOW_SHYNET_VERSION": {
|
||||||
|
"description": "Set to 'False' if you do not want the version to be displayed on the frontend.",
|
||||||
|
"value": "True",
|
||||||
|
"required": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
import os
|
||||||
import flag
|
import flag
|
||||||
import pycountry
|
import pycountry
|
||||||
from django import template
|
from django import template
|
||||||
@ -84,7 +85,8 @@ def percent_change_display(start, end):
|
|||||||
|
|
||||||
@register.inclusion_tag("dashboard/includes/sidebar_footer.html")
|
@register.inclusion_tag("dashboard/includes/sidebar_footer.html")
|
||||||
def sidebar_footer():
|
def sidebar_footer():
|
||||||
return {"version": settings.VERSION}
|
return {"version": "" if settings.SHOW_SHYNET_VERSION
|
||||||
|
else settings.VERSION}
|
||||||
|
|
||||||
|
|
||||||
@register.inclusion_tag("dashboard/includes/stat_comparison.html")
|
@register.inclusion_tag("dashboard/includes/stat_comparison.html")
|
||||||
|
@ -315,3 +315,6 @@ SCRIPT_HEARTBEAT_FREQUENCY = int(os.getenv("SCRIPT_HEARTBEAT_FREQUENCY", "5000")
|
|||||||
# How much time can elapse between requests from the same user before a new
|
# How much time can elapse between requests from the same user before a new
|
||||||
# session is created, in seconds?
|
# session is created, in seconds?
|
||||||
SESSION_MEMORY_TIMEOUT = int(os.getenv("SESSION_MEMORY_TIMEOUT", "1800"))
|
SESSION_MEMORY_TIMEOUT = int(os.getenv("SESSION_MEMORY_TIMEOUT", "1800"))
|
||||||
|
|
||||||
|
# Should the Shynet version information be displayed?
|
||||||
|
SHOW_SHYNET_VERSION = os.getenv("SHOW_SHYNET_VERSION", "True") == "True"
|
||||||
|
Loading…
Reference in New Issue
Block a user