Skip to content

Commit ef5fc18

Browse files
committed
updated js syntax and resolved merge conflicts
2 parents 451fb58 + cd57b49 commit ef5fc18

File tree

10 files changed

+168
-86
lines changed

10 files changed

+168
-86
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
build:
44
docker:
@@ -68,7 +68,6 @@ jobs:
6868
when: on_success
6969

7070
workflows:
71-
version: 2
7271
build:
7372
jobs:
7473
- build

.vscode/launch.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
5+
"name": "Debug Docs (console-based)",
86
"type": "chrome",
97
"request": "launch",
10-
"name": "Open Docs on localhost:1313",
118
"url": "http://localhost:1313",
129
"webRoot": "${workspaceFolder}",
1310
"skipFiles": [
14-
"<node_internals>/**",
15-
"${workspaceFolder}/node_modules/**"
16-
]
11+
"<node_internals>/**"
12+
],
13+
"sourceMaps": false,
14+
"trace": true,
15+
"smartStep": false
1716
}
1817
]
1918
}

assets/js/local-storage.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@ function getPreferences() {
8282
//////////// MANAGE INFLUXDATA DOCS URLS IN LOCAL STORAGE //////////////////////
8383
////////////////////////////////////////////////////////////////////////////////
8484

85-
8685
const defaultUrls = {};
8786
// Guard against pageParams being null/undefined and safely access nested properties
8887
if (pageParams && pageParams.influxdb_urls) {
89-
Object.entries(pageParams.influxdb_urls).forEach(([product, {providers}]) => {
90-
defaultUrls[product] = providers.filter(provider => provider.name === 'Default')[0]?.regions[0]?.url || 'https://cloud2.influxdata.com';
91-
});
88+
Object.entries(pageParams.influxdb_urls).forEach(
89+
([product, { providers }]) => {
90+
defaultUrls[product] =
91+
providers.filter((provider) => provider.name === 'Default')[0]
92+
?.regions[0]?.url || 'https://cloud2.influxdata.com';
93+
}
94+
);
9295
}
9396

9497
export const DEFAULT_STORAGE_URLS = {
@@ -177,7 +180,10 @@ const defaultNotificationsObj = {
177180
function getNotifications() {
178181
// Initialize notifications data if it doesn't already exist
179182
if (localStorage.getItem(notificationStorageKey) === null) {
180-
initializeStorageItem('notifications', JSON.stringify(defaultNotificationsObj));
183+
initializeStorageItem(
184+
'notifications',
185+
JSON.stringify(defaultNotificationsObj)
186+
);
181187
}
182188

183189
// Retrieve and parse the notifications data as JSON
@@ -221,7 +227,10 @@ function setNotificationAsRead(notificationID, notificationType) {
221227
readNotifications.push(notificationID);
222228
notificationsObj[notificationType + 's'] = readNotifications;
223229

224-
localStorage.setItem(notificationStorageKey, JSON.stringify(notificationsObj));
230+
localStorage.setItem(
231+
notificationStorageKey,
232+
JSON.stringify(notificationsObj)
233+
);
225234
}
226235

227236
// Export functions as a module and make the file backwards compatible for non-module environments until all remaining dependent scripts are ported to modules

assets/js/utils/debug-helpers.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Helper functions for debugging without source maps
3+
* Example usage:
4+
* In your code, you can use these functions like this:
5+
* ```javascript
6+
* import { debugLog, debugBreak, debugInspect } from './debug-helpers.js';
7+
*
8+
* const data = debugInspect(someData, 'Data');
9+
* debugLog('Processing data', 'myFunction');
10+
*
11+
* function processData() {
12+
* // Add a breakpoint that works with DevTools
13+
* debugBreak();
14+
*
15+
* // Your existing code...
16+
* }
17+
* ```
18+
*
19+
* @fileoverview DEVELOPMENT USE ONLY - Functions should not be committed to production
20+
*/
21+
22+
/* eslint-disable no-debugger */
23+
/* eslint-disable-next-line */
24+
// NOTE: These functions are detected by ESLint rules to prevent committing debug code
25+
26+
export function debugLog(message, context = '') {
27+
const contextStr = context ? `[${context}]` : '';
28+
console.log(`DEBUG${contextStr}: ${message}`);
29+
}
30+
31+
export function debugBreak() {
32+
debugger;
33+
}
34+
35+
export function debugInspect(value, label = 'Inspect') {
36+
console.log(`DEBUG[${label}]:`, value);
37+
return value;
38+
}

config/testing/config.yml

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,6 @@ preserveTaxonomyNames: true
1515
# Generate a robots.txt
1616
enableRobotsTXT: true
1717

18-
# Override settings for testing
19-
buildFuture: true
20-
21-
# Configure what content is built in testing env
22-
params:
23-
env: testing
24-
environment: testing
25-
buildTestContent: true
26-
27-
# Server configuration for testing
28-
server:
29-
port: 1315
30-
baseURL: 'http://localhost:1315/'
31-
watchChanges: true
32-
disableLiveReload: false
33-
34-
# Keep your shared content exclusions
35-
ignoreFiles:
36-
- "content/shared/.*"
37-
38-
# Ignore specific warning logs
39-
ignoreLogs:
40-
- warning-goldmark-raw-html
4118

4219
# Markdown rendering options
4320
blackfriday:
@@ -55,7 +32,6 @@ taxonomies:
5532
influxdb3/enterprise/tag: influxdb3/enterprise/tags
5633
flux/v0/tag: flux/v0/tags
5734

58-
# Markup configuration
5935
markup:
6036
goldmark:
6137
renderer:
@@ -66,7 +42,6 @@ markup:
6642
attribute:
6743
block: true
6844

69-
# Privacy settings
7045
privacy:
7146
googleAnalytics:
7247
anonymizeIP: false
@@ -77,7 +52,6 @@ privacy:
7752
disable: false
7853
privacyEnhanced: true
7954

80-
# Output formats
8155
outputFormats:
8256
json:
8357
mediaType: application/json
@@ -86,26 +60,47 @@ outputFormats:
8660

8761
# Asset processing for testing (disable minification)
8862
build:
89-
writeStats: true
63+
writeStats: false
9064
useResourceCacheWhen: "fallback"
91-
buildOptions:
92-
sourcemap: "inline"
93-
target: "es2020"
94-
95-
# Disable minification for testing
96-
minify:
97-
disableJS: true
98-
disableCSS: true
99-
disableHTML: true
100-
minifyOutput: false
65+
noJSConfigInAssets: false
10166

10267
# Asset processing configuration
10368
assetDir: "assets"
10469

105-
# Module mounts
10670
module:
10771
mounts:
10872
- source: assets
10973
target: assets
11074
- source: node_modules
111-
target: assets/node_modules
75+
target: assets/node_modules
76+
77+
# Override settings for testing
78+
buildFuture: true
79+
80+
# Configure what content is built in testing env
81+
params:
82+
env: testing
83+
environment: testing
84+
buildTestContent: true
85+
86+
# Configure the server for testing
87+
server:
88+
port: 1315
89+
baseURL: 'http://localhost:1315/'
90+
watchChanges: true
91+
disableLiveReload: false
92+
93+
# Keep your shared content exclusions
94+
ignoreFiles:
95+
- "content/shared/.*"
96+
97+
# Ignore specific warning logs
98+
ignoreLogs:
99+
- warning-goldmark-raw-html
100+
101+
# Disable minification for testing
102+
minify:
103+
disableJS: true
104+
disableCSS: true
105+
disableHTML: true
106+
minifyOutput: false

content/kapacitor/v1/reference/about_the_project/release-notes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ aliases:
99
- /kapacitor/v1/about_the_project/releasenotes-changelog/
1010
---
1111

12+
## v1.7.7 {date="2025-05-27"}
13+
14+
> [!Warning]
15+
> #### Python 2 UDFs deprecated
16+
>
17+
> Python 2-based UDFs are deprecated** as of Kapacitor 1.7.7 and will be removed in **Kapacitor 1.8.0**.
18+
>
19+
> In preparation for Kapacitor 1.8.0, update your User-Defined Functions (UDFs) to be Python 3-compatible.
20+
> This required change aligns with modern security practices and ensures your custom functions will continue to work after upgrading.
21+
22+
### Dependency updates
23+
24+
- Upgrade Go to 1.22.12.
25+
26+
---
27+
1228
## v1.7.6 {date="2024-10-28"}
1329

1430
### Features

data/products.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ kapacitor:
172172
versions: [v1]
173173
latest: v1.7
174174
latest_patches:
175-
v1: 1.7.6
175+
v1: 1.7.7
176176
ai_sample_questions:
177177
- How do I configure Kapacitor for InfluxDB v1?
178178
- How do I write a custom Kapacitor task?

eslint.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,33 @@ export default [
106106
files: ['assets/js/**/*.js'],
107107
rules: {
108108
// Rules specific to JavaScript in Hugo assets
109+
// Prevent imports from debug-helpers.js
110+
'no-restricted-imports': [
111+
'error',
112+
{
113+
paths: [
114+
{
115+
name: './utils/debug-helpers.js',
116+
message:
117+
'Remove debugging functions before committing. Debug helpers should not be used in production code.',
118+
},
119+
{
120+
name: '/utils/debug-helpers.js',
121+
message:
122+
'Remove debugging functions before committing. Debug helpers should not be used in production code.',
123+
},
124+
],
125+
},
126+
],
127+
// Prevent use of debug functions in production code
128+
'no-restricted-syntax': [
129+
'error',
130+
{
131+
selector: 'CallExpression[callee.name=/^debug(Log|Break|Inspect)$/]',
132+
message:
133+
'Remove debugging functions before committing. Debug helpers should not be used in production code.',
134+
},
135+
],
109136
},
110137
},
111138
{

hugo.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ privacy:
4949
youtube:
5050
disable: false
5151
privacyEnhanced: true
52+
5253
outputFormats:
5354
json:
5455
mediaType: application/json
@@ -57,13 +58,8 @@ outputFormats:
5758

5859
# Asset processing configuration for development
5960
build:
60-
writeStats: true
61+
writeStats: false
6162
useResourceCacheWhen: "fallback"
62-
# Enable source maps for debugging
63-
buildOptions:
64-
sourcemap: "inline"
65-
target: "es2020"
66-
# Disable asset bundling in development
6763
noJSConfigInAssets: false
6864

6965
# Asset processing configuration
@@ -82,14 +78,17 @@ params:
8278
environment: development
8379

8480
# Configure the server for development
85-
# Specify the port for development to avoid conflicts with testing
8681
server:
8782
port: 1313
8883
baseURL: 'http://localhost:1313/'
8984
watchChanges: true
9085
disableLiveReload: false
9186

92-
# Disable minification and bundling for development
87+
# Ignore specific warning logs
88+
ignoreLogs:
89+
- warning-goldmark-raw-html
90+
91+
# Disable minification for development
9392
minify:
9493
disableJS: true
9594
disableCSS: true

0 commit comments

Comments
 (0)