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 @@ +

Recent Builds

+ + + + + + + + + + + + + + + + {% for build in builds_list %} + + + + + + + + {% endfor %} + + +
+ + + + + + + + + +
{{ build["project"] }}{{ build["owner"] }}{{ build["status"] }} + {% for os in build["chroots"] %} +
  • {{ os }}
  • + {% endfor %} +
    {{ build["build_id"] }}
    + + + + + \ No newline at end of file diff --git a/templates/main_frame.html b/templates/main_frame.html index d3ee8dca..51291feb 100644 --- a/templates/main_frame.html +++ b/templates/main_frame.html @@ -1,48 +1,60 @@ - - - - - -
    - - -
    -
    -
    -

    Information

    -
    -
    -
    -
    - {{ content|safe }} -
    -
    -
    -
    - - - - - + +