Clone
1
grafana badge reference
CJ_Clippy edited this page 2025-02-13 20:55:00 +00:00

We use Grafana text visualization to display gitea Actions status. We use this code to reload every 30s. @see https://community.grafana.com/t/refreshing-gif-image/49507/11

<img src="https://gitea.futureporn.net/futureporn/fp/actions/workflows/tests.yaml/badge.svg" id="tests" />
<img src="https://gitea.futureporn.net/futureporn/fp/actions/workflows/builder.yaml/badge.svg" id="builder" />
<script language="javascript">
function updateImages() {
   image0 = document.getElementById("tests");
   image1 = document.getElementById("builder");
   image0.src = "https://gitea.futureporn.net/futureporn/fp/actions/workflows/tests.yaml/badge.svg" + "?r=" + Math.random();
   image1.src = "https://gitea.futureporn.net/futureporn/fp/actions/workflows/builder.yaml/badge.svg" + "?r=" + Math.random();
   setTimeout(updateImages, 30000);
}
updateImages();
</script>