From 56c891d833541f200cd3ec8323a1dc0418caa811 Mon Sep 17 00:00:00 2001 From: phelokazi_dube <pdube@ska.ac.za> Date: Mon, 26 Jul 2021 11:31:51 +0200 Subject: [PATCH] SAR-259 Replaced the github.js in the _static directory with the gitlab.js --- docs/src/_static/js/github.js | 26 -------------------------- docs/src/_static/js/gitlab.js | 10 ++++++++++ 2 files changed, 10 insertions(+), 26 deletions(-) delete mode 100644 docs/src/_static/js/github.js create mode 100644 docs/src/_static/js/gitlab.js diff --git a/docs/src/_static/js/github.js b/docs/src/_static/js/github.js deleted file mode 100644 index 5ecc698..0000000 --- a/docs/src/_static/js/github.js +++ /dev/null @@ -1,26 +0,0 @@ -jQuery(function(){ - var github_v3_endpoint = "https://api.github.com/orgs/ska-telescope/repos"; - var list = $("#list-of-projects > ul"); - if( list.length ){ - list.empty(); - $.getJSON(github_v3_endpoint, function(data){ - $.each(data, function(key, val){ - //console.log(val); - if(val["description"]) - description = val["description"]; - else - description = ""; - item = "<li><a href=\"" + - val["html_url"] + - "\">" + - val["name"] + - "</a> " + - description + - "</li>"; - $(item).appendTo(list); - }); //end each - }); //end getJSON - }else{ //if list not found - //console.log("list not found") - } -}); diff --git a/docs/src/_static/js/gitlab.js b/docs/src/_static/js/gitlab.js new file mode 100644 index 0000000..bb4314d --- /dev/null +++ b/docs/src/_static/js/gitlab.js @@ -0,0 +1,10 @@ +jQuery(function(){ + var ci_dashboard = "https://ska-telescope.gitlab.io/ska_ci_dashboard/"; + var dashboard_table = $("#ci-dashboard > table"); + if( dashboard_table.length ){ + $.get(ci_dashboard, function(data){ + dashboard_table.html($(data).find("#dataTable")); + }); + } +}); + -- GitLab