diff --git a/cts/templates/index.html b/cts/templates/index.html index 29918ee7..af511976 100644 --- a/cts/templates/index.html +++ b/cts/templates/index.html @@ -21,6 +21,16 @@ font-size: 20px; } + .version { + position: fixed; + right: 16px; + bottom: 16px; + font-family: "Red Hat Text"; + font-size: 12px; + color: #6a6e73; + margin: 0; + } + .button { display: inline-block; margin: 24px 0px 0px 0px; /*top, right, bottom, and left*/ @@ -71,6 +81,7 @@
+Version {{ version }}
diff --git a/cts/views.py b/cts/views.py index e61d7223..89d20f0f 100644 --- a/cts/views.py +++ b/cts/views.py @@ -1187,7 +1187,7 @@ class Index(View): methods = ["GET"] def dispatch_request(self): - return render_template("index.html") + return render_template("index.html", version=version) class APIDoc(View): diff --git a/tests/test_views.py b/tests/test_views.py index 404ca737..0c2f4c80 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -163,6 +163,7 @@ def test_index(self): data = rv.get_data(as_text=True) self.assertEqual(rv.status, "200 OK") self.assertIn("Compose Tracking Service (CTS)", data) + self.assertIn(f"Version {version}", data) def test_about_get(self): rv = self.client.get("/api/1/about/")