MartijnVisser commented on code in PR #23730:
URL: https://github.com/apache/flink/pull/23730#discussion_r1395605205
##########
docs/layouts/shortcodes/connector_artifact.html:
##########
@@ -27,17 +27,35 @@
{{ $version := $connector.version }}
{{ $path := .Page.Path }}
+{{ $connector := index .Site.Data $name }}
+{{ $flink_compatibility := $connector.flink_compatibility }}
+{{ $flink_version := .Site.Params.VersionTitle }}
+
{{ $hash := md5 now }}
+{{ $containsVersion := false }}
+{{ range $flink_compatibility }}
+ {{ if in . $flink_version }}
+ {{ $containsVersion = true }}
+ {{ printf "Fine" }}
+ {{ break }}
+ {{ end }}
+{{ end }}
+
+
{{ if $.Site.Params.IsStable }}
-<div id="{{ $hash }}" onclick="selectTextAndCopy('{{ $hash
}}')"class="highlight"><pre class="chroma"><code class="language-xml"
data-lang="xml"><span class="nt"><dependency></span>
- <span class="nt"><groupId></span>org.apache.flink<span
class="nt"></groupId></span>
- <span class="nt"><artifactId></span>{{- $artifactId -}}<span
class="nt"></artifactId></span>
- <span class="nt"><version></span>{{- $version -}}-{{-
site.Params.VersionTitle -}}<span class="nt"></version></span>
-<span class="nt"></dependency></span></code></pre></div>
-<div class="book-hint info" style="text-align:center;display:none"
copyable="flink-module" copyattribute="{{ $hash }}">
- Copied to clipboard!
-</div>
+ {{ if $containsVersion }}
+ <div id="{{ $hash }}" onclick="selectTextAndCopy('{{ $hash
}}')"class="highlight"><pre class="chroma"><code class="language-xml"
data-lang="xml"><span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.flink<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>{{- $artifactId -}}<span
class="nt"></artifactId></span>
+ <span class="nt"><version></span>{{- $version -}}-{{-
site.Params.VersionTitle -}}<span class="nt"></version></span>
+ <span class="nt"></dependency></span></code></pre></div>
+ <div class="book-hint info" style="text-align:center;display:none"
copyable="flink-module" copyattribute="{{ $hash }}">
+ Copied to clipboard!
+ </div>
+ {{ else }}
+ <p style="font-weight: bold">There is no connector release (yet) available
for Flink version {{ printf $flink_version }}.</p>
Review Comment:
I'm going to remove the work "released" all together :D
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]