Skip to content

Commit 4c6bec9

Browse files
authored
Merge pull request #60434 from gabriel-rh/SRVCOM-2431-version-drop-down-serverless
SRVCOM-2431 Add versions, history, bug reporting for Serverless to templates
2 parents 67a8685 + d31875b commit 4c6bec9

File tree

1 file changed

+75
-44
lines changed

1 file changed

+75
-44
lines changed

_templates/_page_openshift.html.erb

Lines changed: 75 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
unsupported_versions_acs = ["3.65", "3.66", "3.67", "3.68", "3.69", "3.70", "3.71", "3.72"];
4747

48+
unsupported_versions_serverless = [];
49+
4850
unsupported_versions_origin = ["3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.9", "3.10", "3.11", "4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", "4.10", "4.11", "4.12"];
4951

5052
%>
@@ -87,6 +89,16 @@
8789

8890
<% end %>
8991

92+
<% if ((unsupported_versions_serverless.include? version) && (distro_key == "openshift-serverless")) %>
93+
94+
<span>
95+
<div class="alert alert-danger" role="alert" id="support-alert">
96+
<strong>You are viewing documentation for a release that is no longer maintained.</strong> To view the documentation for the most recent version, see the <a href="https://docs.openshift.com/serverless/latest/about/about-serverless.html" style="color: #545454 !important" class="link-primary">latest Serverless docs</a>.
97+
</div>
98+
</span>
99+
100+
<% end %>
101+
90102
<% if ((unsupported_versions_origin.include? version) && (distro_key == "openshift-origin")) %>
91103

92104
<span>
@@ -138,8 +150,7 @@
138150
<option value="3.1">3.1</option>
139151
<option value="3.0">3.0</option>
140152
</select>
141-
<% else %>
142-
<% if (distro_key == "openshift-acs") %>
153+
<% elsif (distro_key == "openshift-acs") %>
143154
<a href="https://docs.openshift.com/acs/<%= version %>/welcome/index.html">
144155
<%= distro %>
145156
</a>
@@ -156,31 +167,36 @@
156167
<option value="3.66">3.66</option>
157168
<option value="3.65">3.65</option>
158169
</select>
159-
<% else %>
160-
<% if (distro_key == "openshift-origin") %>
161-
<a href="https://docs.okd.io/<%= version %>/welcome/index.html">
170+
<% elsif (distro_key == "openshift-serverless") %>
171+
<a href="https://docs.openshift.com/serverless/<%= version %>/about/about-serverless.html">
162172
<%= distro %>
163-
</a>
164-
<select id="version-selector" onchange="versionSelector(this);">
165-
<option value="latest">latest</option>
166-
<option value="4.13">4.13</option>
167-
<option value="4.12">4.12</option>
168-
<option value="4.11">4.11</option>
169-
<option value="4.10">4.10</option>
170-
<option value="4.9">4.9</option>
171-
<option value="4.8">4.8</option>
172-
<option value="4.7">4.7</option>
173-
<option value="4.6">4.6</option>
174-
<option value="3.11">3.11</option>
175-
<option value="3.10">3.10</option>
176-
<option value="3.9">3.9</option>
177-
<option value="3.7">3.7</option>
178-
<option value="3.6">3.6</option>
179-
</select>
180-
<% else %>
181-
<%= breadcrumb_root %>
182-
<% end %>
183-
<% end %>
173+
</a>
174+
<select id="version-selector" onchange="versionSelector(this);">
175+
<option value="1.29">1.29</option>
176+
<option value="1.28">1.28</option>
177+
</select>
178+
<% elsif (distro_key == "openshift-origin") %>
179+
<a href="https://docs.okd.io/<%= version %>/welcome/index.html">
180+
<%= distro %>
181+
</a>
182+
<select id="version-selector" onchange="versionSelector(this);">
183+
<option value="latest">latest</option>
184+
<option value="4.13">4.13</option>
185+
<option value="4.12">4.12</option>
186+
<option value="4.11">4.11</option>
187+
<option value="4.10">4.10</option>
188+
<option value="4.9">4.9</option>
189+
<option value="4.8">4.8</option>
190+
<option value="4.7">4.7</option>
191+
<option value="4.6">4.6</option>
192+
<option value="3.11">3.11</option>
193+
<option value="3.10">3.10</option>
194+
<option value="3.9">3.9</option>
195+
<option value="3.7">3.7</option>
196+
<option value="3.6">3.6</option>
197+
</select>
198+
<% else %>
199+
<%= breadcrumb_root %>
184200
<% end %>
185201
</li>
186202
<li class="hidden-xs active">
@@ -191,7 +207,7 @@
191207
<li class="hidden-xs active">
192208
<%= breadcrumb_topic %>
193209
</li>
194-
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs") %>
210+
<% if (distro_key != "openshift-origin" && distro_key != "openshift-aro" && distro_key != "openshift-acs" && distro_key != "openshift-serverless") %>
195211
<span text-align="right" style="float: right !important">
196212
<a href="https://github.com/openshift/openshift-docs/commits/<%=
197213
((distro_key == "openshift-enterprise") ? "enterprise-#{version}"
@@ -222,24 +238,38 @@
222238
<% end %>
223239
<% end %>
224240
</span>
225-
<% else %>
226-
<% if (distro_key == "openshift-acs") %>
227-
<span text-align="right" style="float: right !important">
228-
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-acs") ? "rhacs-docs-#{version}" : "rhacs-docs" %>/<%= repo_path %>">
229-
<span class="material-icons-outlined" title="Page history">history
241+
<% elsif (distro_key == "openshift-acs") %>
242+
<span text-align="right" style="float: right !important">
243+
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-acs") ? "rhacs-docs-#{version}" : "rhacs-docs" %>/<%= repo_path %>">
244+
<span class="material-icons-outlined" title="Page history">history
245+
</span>
246+
</a>
247+
<% unless (unsupported_versions_acs.include? version) %>
248+
<a href="https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12331224&issuetype=1&components=12366876&priority=4&summary=<%= "[rhacs-docs-#{version}]+Issue+in+file+#{repo_path}"%>">
249+
<span class="material-icons-outlined" title="Open an issue">bug_report
230250
</span>
231251
</a>
232-
<% unless (unsupported_versions_acs.include? version) %>
233-
<a href="https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12331224&issuetype=1&components=12366876&priority=4&summary=<%= "[rhacs-docs-#{version}]+Issue+in+file+#{repo_path}"%>">
234-
<span class="material-icons-outlined" title="Open an issue">bug_report
235-
</span>
236-
</a>
237-
<a href="javascript: void(0);" onclick="window.print()">
238-
<span class="material-icons-outlined" title="Print page (Save as PDF)">picture_as_pdf</span>
239-
</a>
240-
<% end %>
241-
</span>
242-
<% end %>
252+
<a href="javascript: void(0);" onclick="window.print()">
253+
<span class="material-icons-outlined" title="Print page (Save as PDF)">picture_as_pdf</span>
254+
</a>
255+
<% end %>
256+
</span>
257+
<% elsif (distro_key == "openshift-serverless") %>
258+
<span text-align="right" style="float: right !important">
259+
<a href="https://github.com/openshift/openshift-docs/commits/<%= (distro_key == "openshift-serverless") ? "serverless-docs-#{version}" : "serverless-docs" %>/<%= repo_path %>">
260+
<span class="material-icons-outlined" title="Page history">history
261+
</span>
262+
</a>
263+
<% unless (unsupported_versions_serverless.include? version) %>
264+
<a href="https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12323143&issuetype=1&components=12334030&priority=4&summary=<%= "[serverless-docs-#{version}]+Issue+in+file+#{repo_path}"%>">
265+
<span class="material-icons-outlined" title="Open an issue">bug_report
266+
</span>
267+
</a>
268+
<a href="javascript: void(0);" onclick="window.print()">
269+
<span class="material-icons-outlined" title="Print page (Save as PDF)">picture_as_pdf</span>
270+
</a>
271+
<% end %>
272+
</span>
243273
<% end %>
244274
</ol>
245275
<div class="row row-offcanvas row-offcanvas-left">
@@ -319,7 +349,8 @@
319349
'openshift-enterprise': ['docs_cp', version],
320350
'openshift-aro' : ['docs_aro', version],
321351
'openshift-rosa' : ['docs_rosa'],
322-
'openshift-acs' : ['docs_acs', version]
352+
'openshift-acs' : ['docs_acs', version],
353+
'openshift-serverless' : ['docs_serverless', version]
323354
};
324355

325356
// only OSD v3 docs have the version variable specified

0 commit comments

Comments
 (0)