diff --git a/static/js/src/public/details/channelMap.ts b/static/js/src/public/details/channelMap.ts index ca7dcf8f7..3e6098d57 100644 --- a/static/js/src/public/details/channelMap.ts +++ b/static/js/src/public/details/channelMap.ts @@ -26,6 +26,10 @@ const init = (packageName: string, channelMapButton: HTMLElement) => { "[data-channel-map-channel]" ) as NodeListOf; + const supportedBases = channelMap?.querySelectorAll( + "[data-base-revision-supported]" + ) as NodeListOf; + const selectChannel = (track: string, channel: string) => { const page = window.location.pathname; @@ -132,6 +136,18 @@ const init = (packageName: string, channelMapButton: HTMLElement) => { } }); + supportedBases.forEach((el) => { + const matchesBase = + el?.getAttribute("data-base-revision-supported") === "True" || + baseValue === "any"; + + if (matchesBase) { + el.classList.remove("u-hide"); + } else { + el.classList.add("u-hide"); + } + }); + hideOlderChannels(); } diff --git a/templates/partial/_channel-map.html b/templates/partial/_channel-map.html index efce04062..3d3399169 100644 --- a/templates/partial/_channel-map.html +++ b/templates/partial/_channel-map.html @@ -62,7 +62,7 @@
{% for base in channel_data.all_bases %} - {{ base }} + {{ base }} {% endfor %}