From: Tom Powell Date: Thu, 1 Nov 2018 07:02:25 +0000 (-0700) Subject: filter runners by sponsor name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24ec254f5a8b900c3ec5423aabd282145f67b253;p=GitLab%2Fstricted-build%2Flineage_builder.git filter runners by sponsor name --- diff --git a/test.py b/test.py index ea4b189..40121fa 100644 --- a/test.py +++ b/test.py @@ -113,5 +113,14 @@ class TestWeb(UsesModels): response = self.client.get("/") assert response.status_code == 200 + response = self.client.get("/runners/") + assert response.status_code == 200 + + response = self.client.get("/runners/foobar") + assert response.status_code == 200 + + response = self.client.get("/?status=success&device=mako") + assert response.status_code == 200 + if __name__ == "__main__": unittest.main() diff --git a/ui/app.py b/ui/app.py index 1bfbdff..ed67d7c 100644 --- a/ui/app.py +++ b/ui/app.py @@ -66,7 +66,7 @@ def runner(runner): @app.route("/runners/") def runners(): - runners = models.Runner.query.all() + runners = models.Runner.query.order_by(models.Runner.runner_sponsor).all() return render_template('runners.html', runners=runners) @app.route("/webhook", methods=('POST',))