Skip to content

Commit 3a44b1e

Browse files
authored
Merge branch 'master' into inceberg
2 parents f5d465b + d7a2754 commit 3a44b1e

File tree

7 files changed

+79
-50
lines changed

7 files changed

+79
-50
lines changed

assets/js/flux-influxdb-versions.js

Lines changed: 57 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,77 @@
1+
import $ from 'jquery';
2+
import { toggleModal } from './modals.js';
3+
14
/*
25
Interactions related to the Flux/InfluxDB version modal
36
*/
47

5-
const fluxInfluxDBModal = '.modal-content#flux-influxdb-versions'
6-
const pageType = ($(document).attr('title')).includes("package") ? "package" : "function";
8+
const fluxInfluxDBModal = '.modal-content#flux-influxdb-versions';
79

810
// Check for deprecated or pending versions
911
function keysPresent() {
10-
var list = $(fluxInfluxDBModal + ' .version-list')
12+
var list = $(fluxInfluxDBModal + ' .version-list');
1113

1214
return {
1315
pending: list.find('.pending').length !== 0,
1416
deprecated: list.find('.deprecated').length !== 0,
1517
supported: list.find('.supported').length !== 0,
16-
}
18+
};
1719
}
1820

19-
// Only execute if the Flux/InfluxDB modal is present in the DOM
20-
if ($(fluxInfluxDBModal).length > 0) {
21-
var presentKeys = keysPresent()
21+
function openFluxVersionModal(queryParams) {
22+
const anchor = window.location.hash;
23+
toggleModal('#flux-influxdb-versions');
24+
queryParams?.set('view', 'influxdb-support');
25+
window.history.replaceState(
26+
{},
27+
'',
28+
`${location.pathname}?${queryParams}${anchor}`
29+
);
30+
}
2231

23-
// Remove color key list items if the colors/states are present in the version list
24-
if (presentKeys.pending === false) { $(fluxInfluxDBModal + ' .color-key #pending-key' ).remove() }
25-
if (presentKeys.deprecated === false) { $(fluxInfluxDBModal + ' .color-key #deprecated-key' ).remove() }
26-
if (presentKeys.pending === false && presentKeys.deprecated === false) { $(fluxInfluxDBModal + ' .color-key' ).remove() }
32+
export default function FluxInfluxDBVersionsTrigger({ component }) {
33+
const $component = $(component);
2734

28-
// If no versions are supported, remove and replace InfluxDB version tables
29-
if (Object.values(presentKeys).every(value => !value)) {
30-
$(fluxInfluxDBModal + ' .influxdb-versions > :not(".more-info")').remove();
31-
$(fluxInfluxDBModal + ' .influxdb-versions').prepend(`<p class="no-support">No versions of InfluxDB currently support this ${pageType}.</p>`)
32-
}
33-
}
35+
const pageType = $(document).attr('title').includes('package')
36+
? 'package'
37+
: 'function';
3438

39+
// Only execute if the Flux/InfluxDB modal is present in the DOM
40+
if ($(fluxInfluxDBModal).length > 0) {
41+
var presentKeys = keysPresent();
3542

36-
// Open version modal and add query param
37-
const queryParams = new URLSearchParams(window.location.search);
43+
// Remove color key list items if the colors/states are present in the version list
44+
if (presentKeys.pending === false) {
45+
$(fluxInfluxDBModal + ' .color-key #pending-key').remove();
46+
}
47+
if (presentKeys.deprecated === false) {
48+
$(fluxInfluxDBModal + ' .color-key #deprecated-key').remove();
49+
}
50+
if (presentKeys.pending === false && presentKeys.deprecated === false) {
51+
$(fluxInfluxDBModal + ' .color-key').remove();
52+
}
3853

39-
function openFluxVersionModal() {
40-
const anchor = window.location.hash;
54+
// If no versions are supported, remove and replace InfluxDB version tables
55+
if (Object.values(presentKeys).every((value) => !value)) {
56+
$(
57+
fluxInfluxDBModal + ' .influxdb-versions > :not(".more-info")'
58+
).remove();
59+
$(fluxInfluxDBModal + ' .influxdb-versions').prepend(
60+
`<p class="no-support">No versions of InfluxDB currently support this ${pageType}.</p>`
61+
);
62+
}
63+
}
4164

42-
toggleModal('#flux-influxdb-versions');
43-
queryParams.set('view', 'influxdb-support');
44-
window.history.replaceState({}, '', `${location.pathname}?${queryParams}${anchor}`);
45-
};
46-
47-
// Check for the modal query param and open the modal if it exists
48-
if (queryParams.get('view') !== null) {
49-
openFluxVersionModal();
50-
};
65+
// Open version modal and add query param
66+
const queryParams = new URLSearchParams(window.location.search);
67+
68+
// // Check for the modal query param and open the modal if it exists
69+
if (queryParams.get('view') !== null) {
70+
openFluxVersionModal(queryParams);
71+
}
72+
73+
// Open modal window on click
74+
$component
75+
.find('a[data-action="open"]:first')
76+
.on('click', () => openFluxVersionModal(queryParams));
77+
}

assets/js/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import ThemeSwitch from './theme-switch.js';
4949
// import CustomTimestamps from './custom-timestamps.js';
5050
// import Diagram from './Diagram.js';
5151
// import FluxGroupKeysExample from './FluxGroupKeysExample.js';
52-
// import FluxInfluxDBVersionsModal from './flux-influxdb-versions.js';
52+
import FluxInfluxDBVersionsTrigger from './flux-influxdb-versions.js';
5353
// import PageFeedback from './page-feedback.js';
5454
// import SearchInput from './SearchInput.js';
5555
// import Sidebar from './Sidebar.js';
@@ -101,6 +101,10 @@ document.addEventListener('DOMContentLoaded', function () {
101101
CustomTimeTrigger({ component });
102102
window.influxdatadocs[componentName] = CustomTimeTrigger;
103103
break;
104+
case 'flux-influxdb-versions-trigger':
105+
FluxInfluxDBVersionsTrigger({ component });
106+
window.influxdatadocs[componentName] = FluxInfluxDBVersionsTrigger;
107+
break;
104108
case 'search-button':
105109
SearchButton({ component });
106110
window.influxdatadocs[componentName] = SearchButton;

content/influxdb/v1/introduction/get-started.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,4 @@ To learn more about the InfluxDB write protocol,
209209
check out the guide on [Writing Data](/influxdb/v1/guides/writing_data/).
210210
To further explore the query language,
211211
check out the guide on [Querying Data](/influxdb/v1/guides/querying_data/).
212-
For more information on InfluxDB concepts, check out the [Key Concepts]
213-
(/influxdb/v1/concepts/key_concepts/) page.
212+
For more information on InfluxDB concepts, check out the [Key Concepts](/influxdb/v1/concepts/key_concepts/) page.

content/shared/influxdb3-cli/create/table.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ influxdb3 create table [OPTIONS] \
1818

1919
## Options
2020

21-
| Option | | Description |
22-
| :----- | :-------------- | :--------------------------------------------------------------------------------------- |
23-
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
24-
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
25-
| | `--token` | Authentication token |
26-
| | `--tags` | _({{< req >}})_ Space-separated list of tag columns to include in the table |
27-
| | `--fields` | Space-separated list of field columns to include in the table |
28-
| `-h` | `--help` | Print help information |
21+
| Option | | Description |
22+
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
23+
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
24+
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
25+
| | `--token` | Authentication token |
26+
| | `--tags` | _({{< req >}})_ Comma-separated list of tag columns to include in the table |
27+
| | `--fields` | Comma-separated list of field columns and their types to include in the table |
28+
| `-h` | `--help` | Print help information |
2929

3030
> [!Important]
3131
>
@@ -62,8 +62,8 @@ In the examples below, replace the following:
6262

6363
```bash
6464
influxdb3 create table \
65-
--tags tag1 tag2 tag3 \
66-
--database DATABASE_NAME
65+
--tags tag1,tag2,tag3 \
66+
--database DATABASE_NAME \
6767
TABLE_NAME
6868
```
6969

@@ -73,9 +73,9 @@ influxdb3 create table \
7373

7474
```bash
7575
influxdb3 create table \
76-
--tags room sensor_id \
77-
--fields temp:float64 hum:float64 co:int64 \
78-
--database DATABASE_NAME
76+
--tags room,sensor_id \
77+
--fields temp:float64,hum:float64,co:int64 \
78+
--database DATABASE_NAME \
7979
TABLE_NAME
8080
```
8181

content/shared/v3-core-plugins/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ You can copy example plugins from the [influxdb3_plugins repository](https://git
6363
git clone https://github.com/influxdata/influxdb3_plugins.git
6464

6565
# Copy example plugins to your plugin directory
66-
cp -r influxdb3_plugins/examples/write/* /path/to/plugins/
66+
cp -r influxdb3_plugins/examples/wal_plugin/* /path/to/plugins/
6767
```
6868

6969
#### Directly from GitHub

layouts/partials/article/supported-versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{ $productName }} {{ .Page.Params.introduced }}{{ if .Page.Params.deprecated }}{{ print " – " .Page.Params.deprecated }}{{ else if .Page.Params.removed }}{{ print " – " .Page.Params.removed }}{{ else }}+{{ end }}
1111
</li>
1212
{{ if $inStdlib }}
13-
<li class="flux-influxdb"><a onclick="openFluxVersionModal()">View InfluxDB support</a></li>
13+
<li class="flux-influxdb" data-component="flux-influxdb-versions-trigger"><a data-action="open">View InfluxDB support</a></li>
1414
{{ end }}
1515
</ul>
1616
{{ end }}

layouts/partials/footer/javascript.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
{{ $fluxGroupKeys := resources.Get "js/flux-group-keys.js" }}
88
{{ $dateTime := resources.Get "js/datetime.js" }}
99
{{ $homepageInteractions := resources.Get "js/home-interactions.js" }}
10-
{{ $fluxInfluxDBVersions := resources.Get "/js/flux-influxdb-versions.js" }}
1110
{{ $codePlaceholders := resources.Get "/js/code-placeholders.js" }}
1211
{{ $releaseTOC := resources.Get "/js/release-toc.js" }}
13-
{{ $footerjs := slice $versionSelector $searchInteractions $listFilters $featureCallouts $keybindings $homepageInteractions $fluxInfluxDBVersions | resources.Concat "js/footer.bundle.js" | resources.Fingerprint }}
12+
{{ $footerjs := slice $versionSelector $searchInteractions $listFilters $featureCallouts $keybindings $homepageInteractions | resources.Concat "js/footer.bundle.js" | resources.Fingerprint }}
1413
{{ $fluxGroupKeyjs := $fluxGroupKeys | resources.Fingerprint }}
1514
{{ $dateTimejs := $dateTime | resources.Fingerprint }}
1615
{{ $codePlaceholdersjs := $codePlaceholders | resources.Fingerprint }}

0 commit comments

Comments
 (0)