diff --git a/packit_dashboard/app.py b/packit_dashboard/app.py index cf14f415..bbaa3be7 100644 --- a/packit_dashboard/app.py +++ b/packit_dashboard/app.py @@ -98,6 +98,19 @@ def projects(): ) return render_template("main_frame.html", header="Project", content=content) +@app.route("/builds/") +def builds(): + # Only display recent builds for now + # Fetching everything takes too long + # TODO Add button/table navigation to load more + json_url = f"{API_URL}/copr-builds?page=1&per_page=20" + api_data = requests.get(url=json_url).json() + content = render_template( + "builds.html", + builds_list = api_data + ) + return render_template("main_frame.html", header="Builds", content=content) + if __name__ == "__main__": app.run(debug=True) diff --git a/templates/builds.html b/templates/builds.html new file mode 100644 index 00000000..4064ef33 --- /dev/null +++ b/templates/builds.html @@ -0,0 +1,77 @@ +
+ + | ++ + | ++ + | ++ + | ++ + | + +
---|---|---|---|---|
{{ build["project"] }} | +{{ build["owner"] }} | +{{ build["status"] }} | +
+ {% for os in build["chroots"] %}
+ |
+ {{ build["build_id"] }} | +