]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: disable eol-warning based on "is_release_eol"
authorKefu Chai <kchai@redhat.com>
Tue, 1 Dec 2020 07:00:54 +0000 (15:00 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 1 Dec 2020 16:25:16 +0000 (00:25 +0800)
enable/disable #eol-warning based on "is_release_eol" context variable.
this allows us to generate a more static web page. and pave the road to
a releases.json-free doc build process.

Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/_static/js/ceph.js
doc/_templates/page.html

index c608ceaaea57364ad25aebc99cb90b604b759dd3..1d22a8b9e9eaca576ddb1cf16d22247737b1ba05 100644 (file)
@@ -15,10 +15,7 @@ $(function() {
     if (branch === "master") {
       $("#dev-warning").show();
     } else if (data && data.releases && branch in data.releases) {
-      var eol = ("actual_eol" in data.releases[branch]);
-      if (eol) {
-        $("#eol-warning").show();
-      }
+      return;
     } else {
       $("#dev-warning").show();
     }
index 5ba55c3e5d2a6f557e1367a2881ee253515ea8d7..a4d4236a3c273437197bf3d787dbdf3424d632e7 100644 (file)
@@ -6,10 +6,12 @@
   <p class="last">This document is for a development version of Ceph.</p>
 </div>
 
-<div id="eol-warning" class="admonition warning" style="display:none;">
+{%- if is_release_eol %}
+<div id="eol-warning" class="admonition warning">
   <p class="first admonition-title">Warning</p>
   <p class="last">This document is for an unsupported version of Ceph.</p>
 </div>
+{%- endif %}
 
 {%- if not is_release_eol %}
   <div id="docubetter" align="right" style="padding: 15px; font-weight: bold;">