Skip to content

Commit

Permalink
Resolved merge conflicts (#6194) (#6201)
Browse files Browse the repository at this point in the history
(cherry picked from commit f441f13)

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 4783951 commit 9ad4b4e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions _about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ redirect_from:
{%- comment -%}The `/docs/opensearch/` redirect is specifically to support the UI links in OpenSearch Dashboards 1.0.0.{%- endcomment -%}

# OpenSearch and OpenSearch Dashboards
**Version {{site.opensearch_major_minor_version}}**
{: .label .label-blue }

This section contains documentation for OpenSearch and OpenSearch Dashboards.

Expand Down
14 changes: 11 additions & 3 deletions assets/js/_version-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,19 @@ class VersionSelector extends HTMLElement {
const {shadowRoot} = this;
const frag = this._makeFragment(tpl);

frag.querySelector('#selected').textContent = `${PREFIX}${this.getAttribute('selected')}.x`;
frag.querySelector('#selected').textContent = `${PREFIX}${this.getAttribute('selected')}`;

const pathName = location.pathname.replace(/\/docs(\/((latest|\d+\.\d+)\/?)?)?/, '');
const versionsDOMText = DOC_VERSIONS.map((v, idx) => `<a href="/docs/${v}/${pathName}"${v === DOC_VERSION_LATEST ? ' class="latest"' : ''}>${PREFIX}${v}.x</a>`)
.join('');
const versionsDOMNodes = DOC_VERSIONS.map((v, idx) => `<a href="/docs/${v}/${pathName}"${v === DOC_VERSION_LATEST ? ' class="latest"' : ''}>${PREFIX}${v}</a>`);
if (Array.isArray(DOC_VERSIONS_ARCHIVED) && DOC_VERSIONS_ARCHIVED.length) {
versionsDOMNodes.push(
`<a class="show-archived"><span>Show archived</span><svg xmlns="http://www.w3.org/2000/svg" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6l6-6"/></g></svg></a>`,
`<a class="archived">Archived</a>`,
...DOC_VERSIONS_ARCHIVED.map((v, idx) => `<a href="/docs/${v}/${pathName}">${PREFIX}${v}</a>`)
);
}

const versionsDOMText = versionsDOMNodes.join('');

frag.querySelector('#dropdown').appendChild(this._makeFragment(versionsDOMText));
frag.querySelector('#spacer').appendChild(this._makeFragment(versionsDOMText));
Expand Down

0 comments on commit 9ad4b4e

Please sign in to comment.