Skip to content

Commit 58a02cf

Browse files
authored
Merge branch 'master' into chore/update-kapacitor-python2-examples
2 parents b5a9312 + 48b7025 commit 58a02cf

File tree

3 files changed

+42
-30
lines changed

3 files changed

+42
-30
lines changed

assets/js/release-toc.js

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
* release notes pages.
66
*/
77

8-
// Use jQuery filter to get an array of all the *release* h2 elements
9-
const releases = $('h2').filter(
10-
(_i, el) => !el.id.match(/checkpoint-releases/)
8+
// Get all h2 elements that are not checkpoint-releases
9+
const releases = Array.from(document.querySelectorAll('h2')).filter(
10+
el => !el.id.match(/checkpoint-releases/)
1111
);
1212

1313
// Extract data about each release from the array of releases
14-
releaseData = releases.map((_i, el) => ({
14+
const releaseData = releases.map(el => ({
1515
name: el.textContent,
1616
id: el.id,
1717
class: el.getAttribute('class'),
1818
date: el.getAttribute('date')
1919
}));
2020

2121
// Use release data to generate a list item for each release
22-
getReleaseItem = (releaseData) => {
23-
var li = document.createElement("li");
22+
function getReleaseItem(releaseData) {
23+
const li = document.createElement("li");
2424
if (releaseData.class !== null) {
2525
li.className = releaseData.class;
2626
}
@@ -29,30 +29,41 @@ getReleaseItem = (releaseData) => {
2929
return li;
3030
}
3131

32-
// Use jQuery each to build the release table of contents
33-
releaseData.each((_i, release) => {
34-
$('#release-toc ul')[0].appendChild(getReleaseItem(release));
32+
// Build the release table of contents
33+
const releaseTocUl = document.querySelector('#release-toc ul');
34+
releaseData.forEach(release => {
35+
releaseTocUl.appendChild(getReleaseItem(release));
3536
});
3637

3738
/*
3839
* This script is used to expand the release notes table of contents by the
3940
* number specified in the `show` attribute of `ul.release-list`.
4041
* Once all the release items are visible, the "Show More" button is hidden.
4142
*/
42-
$('#release-toc .show-more').click(function () {
43-
const itemHeight = 1.885; // Item height in rem
44-
const releaseNum = releaseData.length;
45-
const maxHeight = releaseNum * itemHeight;
46-
const releaseIncrement = Number($('#release-list')[0].getAttribute('show'));
47-
const currentHeight = Number(
48-
$('#release-list')[0].style.height.match(/\d+\.?\d+/)[0]
49-
);
50-
const potentialHeight = currentHeight + releaseIncrement * itemHeight;
51-
const newHeight = potentialHeight > maxHeight ? maxHeight : potentialHeight;
52-
53-
$('#release-list')[0].style.height = `${newHeight}rem`;
54-
55-
if (newHeight >= maxHeight) {
56-
$('#release-toc .show-more').fadeOut(100);
57-
}
58-
});
43+
const showMoreBtn = document.querySelector('#release-toc .show-more');
44+
if (showMoreBtn) {
45+
showMoreBtn.addEventListener('click', function () {
46+
const itemHeight = 1.885; // Item height in rem
47+
const releaseNum = releaseData.length;
48+
const maxHeight = releaseNum * itemHeight;
49+
const releaseList = document.getElementById('release-list');
50+
const releaseIncrement = Number(releaseList.getAttribute('show'));
51+
const currentHeightMatch = releaseList.style.height.match(/\d+\.?\d+/);
52+
const currentHeight = currentHeightMatch
53+
? Number(currentHeightMatch[0])
54+
: 0;
55+
const potentialHeight = currentHeight + releaseIncrement * itemHeight;
56+
const newHeight = potentialHeight > maxHeight ? maxHeight : potentialHeight;
57+
58+
releaseList.style.height = `${newHeight}rem`;
59+
60+
if (newHeight >= maxHeight) {
61+
// Simple fade out
62+
showMoreBtn.style.transition = 'opacity 0.1s';
63+
showMoreBtn.style.opacity = 0;
64+
setTimeout(() => {
65+
showMoreBtn.style.display = 'none';
66+
}, 100);
67+
}
68+
});
69+
}

assets/jsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"baseUrl": ".",
44
"paths": {
55
"*": [
6-
"*"
6+
"*",
7+
"../node_modules/*"
78
]
89
}
910
}

content/influxdb3/clustered/admin/upgrade.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:PACKAGE_VERSION
6666

6767
### Identify the version to upgrade to
6868

69-
All available InfluxDB Clustered package versions are provided at
70-
[oci.influxdata.com](https://oci.influxdata.com).
69+
All available InfluxDB Clustered package versions are provided in the
70+
[InfluxDB Clustered release notes](/influxdb3/clustered/reference/release-notes/clustered/).
7171
Find the package version you want to upgrade to and copy the version number.
7272

7373

@@ -76,7 +76,7 @@ Find the package version you want to upgrade to and copy the version number.
7676
Some InfluxDB Clustered releases are _checkpoint releases_ that introduce a
7777
breaking change to an InfluxDB component.
7878
Checkpoint releases are only made when absolutely necessary and are clearly
79-
identified at [oci.influxdata.com](https://oci.influxdata.com).
79+
identified in the [InfluxDB Clustered release notes](/influxdb3/clustered/reference/release-notes/clustered/).
8080

8181
**When upgrading, always upgrade to each checkpoint release first, before proceeding
8282
to newer versions.**

0 commit comments

Comments
 (0)