From d161385a91f72bd66099e2149893c1c0fb955596 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 17 Oct 2019 15:40:53 +0200 Subject: [PATCH] Modified badges to redirect to latest run for environment --- .../templates/servervalidation/server-run_detail.html | 6 +++--- .../templates/servervalidation/server-run_list.html | 2 +- .../templates/servervalidation/table/row-server-run.html | 7 ------- .../servervalidation/table/row-test-scenario.html | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/vng/servervalidation/templates/servervalidation/server-run_detail.html b/src/vng/servervalidation/templates/servervalidation/server-run_detail.html index 09d29a54..6c50fd95 100644 --- a/src/vng/servervalidation/templates/servervalidation/server-run_detail.html +++ b/src/vng/servervalidation/templates/servervalidation/server-run_detail.html @@ -50,7 +50,7 @@ {% endblocktrans %}

- + @@ -383,10 +383,10 @@
HTML snippet
function setBadgeInfo() { document.getElementById("badge-description").innerHTML = "Shown below is the badge of the most recent provider run with the environment {{ server_run.environment }} that was started by the user {{ object.user }}."; document.getElementById("badge").src = "https://img.shields.io/endpoint.svg?style=for-the-badge&url={{changing_badge_url|urlencode}}"; - var gitSnippet = '[![Status badge](https://img.shields.io/endpoint.svg?style=for-the-badge&url={{changing_badge_url|urlencode}})]({{changing_badge_url}})' + var gitSnippet = '[![Status badge](https://img.shields.io/endpoint.svg?style=for-the-badge&url={{changing_badge_url|urlencode}})]({{request.scheme}}://{{request.get_host}}{% url 'server_run:server-run_latest' object.test_scenario.uuid object.environment.uuid %})' var htmlSnippet = '\n' - + '\n' + + '\n' + '' // this page's own source code diff --git a/src/vng/servervalidation/templates/servervalidation/server-run_list.html b/src/vng/servervalidation/templates/servervalidation/server-run_list.html index 1af43f09..d3ac8482 100644 --- a/src/vng/servervalidation/templates/servervalidation/server-run_list.html +++ b/src/vng/servervalidation/templates/servervalidation/server-run_list.html @@ -48,7 +48,7 @@ - + diff --git a/src/vng/servervalidation/templates/servervalidation/table/row-server-run.html b/src/vng/servervalidation/templates/servervalidation/table/row-server-run.html index dd514fa0..869a687f 100644 --- a/src/vng/servervalidation/templates/servervalidation/table/row-server-run.html +++ b/src/vng/servervalidation/templates/servervalidation/table/row-server-run.html @@ -71,12 +71,5 @@ {{server_run.status_exec}} {% endif %} - {% comment %} - - - - - - {% endcomment %} {% endspaceless %} diff --git a/src/vng/servervalidation/templates/servervalidation/table/row-test-scenario.html b/src/vng/servervalidation/templates/servervalidation/table/row-test-scenario.html index c238d7c8..7e9f15a7 100644 --- a/src/vng/servervalidation/templates/servervalidation/table/row-test-scenario.html +++ b/src/vng/servervalidation/templates/servervalidation/table/row-test-scenario.html @@ -15,7 +15,7 @@ {% if last_run %} - +