diff --git a/system_status/server.py b/system_status/server.py index 49a24c5..26937aa 100644 --- a/system_status/server.py +++ b/system_status/server.py @@ -125,7 +125,8 @@ def get_prometheus_data() -> list[PrometheusData]: timestamps_and_values = [] for epoch_time, value in maybe_values: - timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(epoch_time)) + pacific_dt = datetime.datetime.fromtimestamp(epoch_time, tz=ZoneInfo("America/Los_Angeles")) + timestamp = pacific_dt.strftime("%Y-%m-%d %H:%M:%S") timestamps_and_values.append(TimestampAndValuePair(timestamp, value)) # the service is up if the maximum timestamp's value is "1" diff --git a/system_status/templates/my_template.html b/system_status/templates/my_template.html index 44a2049..b07e716 100644 --- a/system_status/templates/my_template.html +++ b/system_status/templates/my_template.html @@ -3,189 +3,467 @@
+| ✅ Up | ❌ Down | ⚠️ No Data | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Job Name | -Status | -Detail | -
- Prev. Day
- ◀➖➖➖➖➖➖➖➖
- History of past 24 Hours
- ➖➖➖➖➖➖➖➖▶
- Now
- |
- |||||||||||||
| {{ job }} | -{{ status }} | {# This TD is for the "Status" column #} -{{ detail }} | - {# THIS IS THE CORRECTED SECTION for the EMOJI HISTORY #} -
- {% for value in item.values %}
- {% if value.value == "1" %}
- ✅
- {% else %}
- ❌
- {% endif %}
- {# the below if-statement adds a vertical line for every four entries #}
- {% if (not loop.index % 4) and loop.index < 24%}
- |
- {% endif %}
+
+
+
+
|