diff --git a/hyperglass/configuration/__init__.py b/hyperglass/configuration/__init__.py
index eb802be..3dc9438 100644
--- a/hyperglass/configuration/__init__.py
+++ b/hyperglass/configuration/__init__.py
@@ -309,6 +309,14 @@ class brand:
else:
return t["color_bg"]
+ def color_danger():
+ list = []
+ for t in branding:
+ if len(t["color_danger"]) == 0:
+ return "#ff3860"
+ else:
+ return t["color_danger"]
+
def logo_path():
list = []
for t in branding:
diff --git a/hyperglass/configuration/configuration.toml.example b/hyperglass/configuration/configuration.toml.example
index d84c468..11ac3af 100644
--- a/hyperglass/configuration/configuration.toml.example
+++ b/hyperglass/configuration/configuration.toml.example
@@ -25,12 +25,12 @@ subtitle = ""
enable_footer = true
enable_credit = true
color_bg = ""
+color_danger = ""
color_btn_submit = ""
color_tag_loctitle = ""
color_tag_cmdtitle = ""
color_tag_cmd = ""
color_tag_loc = ""
-color_hero = ""
color_progressbar = ""
logo_path = ""
logo_width = ""
diff --git a/hyperglass/hyperglass.py b/hyperglass/hyperglass.py
index 00d8a3c..f20a5bc 100644
--- a/hyperglass/hyperglass.py
+++ b/hyperglass/hyperglass.py
@@ -141,26 +141,28 @@ def lg():
cache_value = execute.execute(lg_data)
value_output = cache_value[0]
value_code = cache_value[1]
+ value_entry = cache_value[0:2]
value_params = cache_value[2:]
logger.info(f"No cache match for: {cache_key}")
# If it doesn't, create a cache entry
try:
- cache.set(cache_key, value_output)
+ cache.set(cache_key, value_entry)
logger.info(f"Added cache entry: {value_params}")
except:
raise RuntimeError("Unable to add output to cache.", 415, *value_params)
# If 200, return output
response = cache.get(cache_key)
if value_code == 200:
- return Response(cache.get(cache_key), value_code)
+ return Response(response[0], response[1])
# If 400 error, return error message and code
elif value_code in [405, 415]:
- return Response(cache.get(cache_key), value_code)
+ return Response(response[0], response[1])
# If it does, return the cached entry
else:
logger.info(f"Cache match for: {cache_key}, returning cached entry...")
+ response = cache.get(cache_key)
try:
- return Response(cache.get(cache_key))
+ return Response(response[0], response[1])
except:
raise
# Upon exception, render generic error
diff --git a/hyperglass/render/__init__.py b/hyperglass/render/__init__.py
index bf290bd..b37fa2b 100644
--- a/hyperglass/render/__init__.py
+++ b/hyperglass/render/__init__.py
@@ -34,7 +34,7 @@ class html:
elif t == "415":
template = env.get_template("templates/415.html")
elif t == "test":
- template = env.get_template("templates/429.html")
+ template = env.get_template("templates/415.html")
return template.render(
# General
primary_asn=configuration.gen.primary_asn(),
@@ -53,6 +53,7 @@ class html:
subtitle=configuration.brand.subtitle(),
title_mode=configuration.brand.title_mode(),
color_bg=configuration.brand.color_bg(),
+ color_danger=configuration.brand.color_danger(),
color_btn_submit=configuration.brand.color_btn_submit(),
color_progressbar=configuration.brand.color_progressbar(),
color_tag_loctitle=configuration.brand.color_tag_loctitle(),
@@ -100,6 +101,7 @@ class css:
color_tag_cmd=configuration.brand.color_tag_cmd(),
color_tag_loc=configuration.brand.color_tag_loc(),
color_bg=configuration.brand.color_bg(),
+ color_danger=configuration.brand.color_danger(),
primary_font_url=configuration.brand.primary_font_url(),
primary_font_name=configuration.brand.primary_font_name(),
mono_font_url=configuration.brand.mono_font_url(),
diff --git a/hyperglass/render/templates/415.html b/hyperglass/render/templates/415.html
index bd64969..acad370 100644
--- a/hyperglass/render/templates/415.html
+++ b/hyperglass/render/templates/415.html
@@ -1,29 +1,28 @@
{% extends "templates/base.html" %}
+
-
- {% block content %}
+{% block content %}
-
-
-