diff --git a/assets/js/flux-influxdb-versions.js b/assets/js/flux-influxdb-versions.js index 0424f965d..4e6f66afe 100644 --- a/assets/js/flux-influxdb-versions.js +++ b/assets/js/flux-influxdb-versions.js @@ -3,6 +3,7 @@ Interactions related to the Flux/InfluxDB version modal */ const fluxInfluxDBModal = '.modal-content#flux-influxdb-versions' +const pageType = ($(document).attr('title')).includes("package") ? "package" : "function"; // Check for deprecated or pending versions function keysPresent() { @@ -11,6 +12,7 @@ function keysPresent() { return { pending: list.find('.pending').length !== 0, deprecated: list.find('.deprecated').length !== 0, + supported: list.find('.supported').length !== 0, } } @@ -22,6 +24,12 @@ if ($(fluxInfluxDBModal).length > 0) { if (presentKeys.pending === false) { $(fluxInfluxDBModal + ' .color-key #pending-key' ).remove() } if (presentKeys.deprecated === false) { $(fluxInfluxDBModal + ' .color-key #deprecated-key' ).remove() } if (presentKeys.pending === false && presentKeys.deprecated === false) { $(fluxInfluxDBModal + ' .color-key' ).remove() } + + // If no versions are supported, remove and replace InfluxDB version tables + if (Object.values(presentKeys).every(value => !value)) { + $(fluxInfluxDBModal + ' .influxdb-versions > :not(".more-info")').remove(); + $(fluxInfluxDBModal + ' .influxdb-versions').prepend(`

No versions of InfluxDB currently support this ${pageType}.

`) + } } diff --git a/assets/styles/layouts/modals/_flux-versions.scss b/assets/styles/layouts/modals/_flux-versions.scss index 302763867..4844e07c8 100644 --- a/assets/styles/layouts/modals/_flux-versions.scss +++ b/assets/styles/layouts/modals/_flux-versions.scss @@ -85,4 +85,12 @@ .more-info { margin-top: 1.5rem; } + + .no-support { + margin: 1rem 1rem 3rem; + text-align: center; + font-size: 1.15rem; + font-style: italic; + color: rgba($article-text, .65); + } } \ No newline at end of file diff --git a/data/flux_influxdb_versions.yml b/data/flux_influxdb_versions.yml index 48775a545..920033bb5 100644 --- a/data/flux_influxdb_versions.yml +++ b/data/flux_influxdb_versions.yml @@ -1,7 +1,8 @@ -# This file is automatically generated by update-flux-versions.js. +# This file is auto-generated by flux-build-scripts/update-flux-versions.js. # It is used to identify what versions of Flux are installed with each version # of InfluxDB. You are welcome to make changes to this file, but they will be -# overwritten whenever update-flux-versions.js runs in the build/deploy process. +# overwritten whenever flux-build-scripts/update-flux-versions.js runs in the +# build/deploy process. flux: latest: 0.175.0 diff --git a/layouts/partials/footer/modals/flux-influxdb-versions.html b/layouts/partials/footer/modals/flux-influxdb-versions.html index 3aa535d7d..97a7ade59 100644 --- a/layouts/partials/footer/modals/flux-influxdb-versions.html +++ b/layouts/partials/footer/modals/flux-influxdb-versions.html @@ -33,7 +33,7 @@

{{ if $cloudExcluded }} {{ else if $cloudDeprecated }} - {{ else if $cloudSupported }} + {{ else if $cloudSupported }} {{ end }}

@@ -51,7 +51,7 @@

{{ if $excluded }} {{ else if $deprecated }} - {{ else if $supported }} + {{ else if $supported }} {{ end }}

@@ -70,7 +70,7 @@

{{ if $excluded }} {{ else if $deprecated }} - {{ else if $supported }} + {{ else if $supported }} {{ end }}