Compare commits
2 commits
4bae8bc64a
...
7dd9881943
Author | SHA1 | Date | |
---|---|---|---|
Edward Betts | 7dd9881943 | ||
Edward Betts | e29c5899aa |
6
build.py
6
build.py
|
@ -7,10 +7,8 @@ import json
|
|||
import os
|
||||
import sys
|
||||
import typing
|
||||
from collections import Counter
|
||||
from datetime import date, datetime, timedelta
|
||||
from datetime import datetime, timezone
|
||||
|
||||
import pytz
|
||||
import requests
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
|
@ -70,7 +68,7 @@ def parse_date(date_str: str | None) -> datetime | None:
|
|||
return None
|
||||
|
||||
fmt = "%Y-%m-%dT%H:%M:%SZ" if date_str.endswith("Z") else "%Y-%m-%dT%H:%M:%S%z"
|
||||
return datetime.strptime(date_str, fmt).astimezone(pytz.utc)
|
||||
return datetime.strptime(date_str, fmt).astimezone(timezone.utc)
|
||||
|
||||
|
||||
def count_open_bugs(bug_reports: list[Bug]) -> list[tuple[str, int]]:
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<title>Open bugs over time</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -31,7 +33,20 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
data: data
|
||||
}]
|
||||
},
|
||||
|
||||
options: {
|
||||
plugins: {
|
||||
zoom: {
|
||||
pan: {
|
||||
enabled: true,
|
||||
},
|
||||
zoom: {
|
||||
wheel: { enabled: true },
|
||||
pinch: { enabled: true },
|
||||
mode: 'xy',
|
||||
}
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
type: 'time',
|
||||
|
|
Loading…
Reference in a new issue