updated js syntax and resolved merge conflicts
commit
ef5fc1862e
|
@ -1,4 +1,4 @@
|
||||||
version: 2
|
version: 2.1
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
|
@ -68,7 +68,6 @@ jobs:
|
||||||
when: on_success
|
when: on_success
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
|
||||||
build:
|
build:
|
||||||
jobs:
|
jobs:
|
||||||
- build
|
- build
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
|
"name": "Debug Docs (console-based)",
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Open Docs on localhost:1313",
|
|
||||||
"url": "http://localhost:1313",
|
"url": "http://localhost:1313",
|
||||||
"webRoot": "${workspaceFolder}",
|
"webRoot": "${workspaceFolder}",
|
||||||
"skipFiles": [
|
"skipFiles": [
|
||||||
"<node_internals>/**",
|
"<node_internals>/**"
|
||||||
"${workspaceFolder}/node_modules/**"
|
],
|
||||||
]
|
"sourceMaps": false,
|
||||||
|
"trace": true,
|
||||||
|
"smartStep": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -82,13 +82,16 @@ function getPreferences() {
|
||||||
//////////// MANAGE INFLUXDATA DOCS URLS IN LOCAL STORAGE //////////////////////
|
//////////// MANAGE INFLUXDATA DOCS URLS IN LOCAL STORAGE //////////////////////
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
const defaultUrls = {};
|
const defaultUrls = {};
|
||||||
// Guard against pageParams being null/undefined and safely access nested properties
|
// Guard against pageParams being null/undefined and safely access nested properties
|
||||||
if (pageParams && pageParams.influxdb_urls) {
|
if (pageParams && pageParams.influxdb_urls) {
|
||||||
Object.entries(pageParams.influxdb_urls).forEach(([product, {providers}]) => {
|
Object.entries(pageParams.influxdb_urls).forEach(
|
||||||
defaultUrls[product] = providers.filter(provider => provider.name === 'Default')[0]?.regions[0]?.url || 'https://cloud2.influxdata.com';
|
([product, { providers }]) => {
|
||||||
});
|
defaultUrls[product] =
|
||||||
|
providers.filter((provider) => provider.name === 'Default')[0]
|
||||||
|
?.regions[0]?.url || 'https://cloud2.influxdata.com';
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DEFAULT_STORAGE_URLS = {
|
export const DEFAULT_STORAGE_URLS = {
|
||||||
|
@ -177,7 +180,10 @@ const defaultNotificationsObj = {
|
||||||
function getNotifications() {
|
function getNotifications() {
|
||||||
// Initialize notifications data if it doesn't already exist
|
// Initialize notifications data if it doesn't already exist
|
||||||
if (localStorage.getItem(notificationStorageKey) === null) {
|
if (localStorage.getItem(notificationStorageKey) === null) {
|
||||||
initializeStorageItem('notifications', JSON.stringify(defaultNotificationsObj));
|
initializeStorageItem(
|
||||||
|
'notifications',
|
||||||
|
JSON.stringify(defaultNotificationsObj)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve and parse the notifications data as JSON
|
// Retrieve and parse the notifications data as JSON
|
||||||
|
@ -221,7 +227,10 @@ function setNotificationAsRead(notificationID, notificationType) {
|
||||||
readNotifications.push(notificationID);
|
readNotifications.push(notificationID);
|
||||||
notificationsObj[notificationType + 's'] = readNotifications;
|
notificationsObj[notificationType + 's'] = readNotifications;
|
||||||
|
|
||||||
localStorage.setItem(notificationStorageKey, JSON.stringify(notificationsObj));
|
localStorage.setItem(
|
||||||
|
notificationStorageKey,
|
||||||
|
JSON.stringify(notificationsObj)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export functions as a module and make the file backwards compatible for non-module environments until all remaining dependent scripts are ported to modules
|
// Export functions as a module and make the file backwards compatible for non-module environments until all remaining dependent scripts are ported to modules
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* Helper functions for debugging without source maps
|
||||||
|
* Example usage:
|
||||||
|
* In your code, you can use these functions like this:
|
||||||
|
* ```javascript
|
||||||
|
* import { debugLog, debugBreak, debugInspect } from './debug-helpers.js';
|
||||||
|
*
|
||||||
|
* const data = debugInspect(someData, 'Data');
|
||||||
|
* debugLog('Processing data', 'myFunction');
|
||||||
|
*
|
||||||
|
* function processData() {
|
||||||
|
* // Add a breakpoint that works with DevTools
|
||||||
|
* debugBreak();
|
||||||
|
*
|
||||||
|
* // Your existing code...
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @fileoverview DEVELOPMENT USE ONLY - Functions should not be committed to production
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* eslint-disable no-debugger */
|
||||||
|
/* eslint-disable-next-line */
|
||||||
|
// NOTE: These functions are detected by ESLint rules to prevent committing debug code
|
||||||
|
|
||||||
|
export function debugLog(message, context = '') {
|
||||||
|
const contextStr = context ? `[${context}]` : '';
|
||||||
|
console.log(`DEBUG${contextStr}: ${message}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function debugBreak() {
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function debugInspect(value, label = 'Inspect') {
|
||||||
|
console.log(`DEBUG[${label}]:`, value);
|
||||||
|
return value;
|
||||||
|
}
|
|
@ -15,29 +15,6 @@ preserveTaxonomyNames: true
|
||||||
# Generate a robots.txt
|
# Generate a robots.txt
|
||||||
enableRobotsTXT: true
|
enableRobotsTXT: true
|
||||||
|
|
||||||
# Override settings for testing
|
|
||||||
buildFuture: true
|
|
||||||
|
|
||||||
# Configure what content is built in testing env
|
|
||||||
params:
|
|
||||||
env: testing
|
|
||||||
environment: testing
|
|
||||||
buildTestContent: true
|
|
||||||
|
|
||||||
# Server configuration for testing
|
|
||||||
server:
|
|
||||||
port: 1315
|
|
||||||
baseURL: 'http://localhost:1315/'
|
|
||||||
watchChanges: true
|
|
||||||
disableLiveReload: false
|
|
||||||
|
|
||||||
# Keep your shared content exclusions
|
|
||||||
ignoreFiles:
|
|
||||||
- "content/shared/.*"
|
|
||||||
|
|
||||||
# Ignore specific warning logs
|
|
||||||
ignoreLogs:
|
|
||||||
- warning-goldmark-raw-html
|
|
||||||
|
|
||||||
# Markdown rendering options
|
# Markdown rendering options
|
||||||
blackfriday:
|
blackfriday:
|
||||||
|
@ -55,7 +32,6 @@ taxonomies:
|
||||||
influxdb3/enterprise/tag: influxdb3/enterprise/tags
|
influxdb3/enterprise/tag: influxdb3/enterprise/tags
|
||||||
flux/v0/tag: flux/v0/tags
|
flux/v0/tag: flux/v0/tags
|
||||||
|
|
||||||
# Markup configuration
|
|
||||||
markup:
|
markup:
|
||||||
goldmark:
|
goldmark:
|
||||||
renderer:
|
renderer:
|
||||||
|
@ -66,7 +42,6 @@ markup:
|
||||||
attribute:
|
attribute:
|
||||||
block: true
|
block: true
|
||||||
|
|
||||||
# Privacy settings
|
|
||||||
privacy:
|
privacy:
|
||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
anonymizeIP: false
|
anonymizeIP: false
|
||||||
|
@ -77,7 +52,6 @@ privacy:
|
||||||
disable: false
|
disable: false
|
||||||
privacyEnhanced: true
|
privacyEnhanced: true
|
||||||
|
|
||||||
# Output formats
|
|
||||||
outputFormats:
|
outputFormats:
|
||||||
json:
|
json:
|
||||||
mediaType: application/json
|
mediaType: application/json
|
||||||
|
@ -86,11 +60,43 @@ outputFormats:
|
||||||
|
|
||||||
# Asset processing for testing (disable minification)
|
# Asset processing for testing (disable minification)
|
||||||
build:
|
build:
|
||||||
writeStats: true
|
writeStats: false
|
||||||
useResourceCacheWhen: "fallback"
|
useResourceCacheWhen: "fallback"
|
||||||
buildOptions:
|
noJSConfigInAssets: false
|
||||||
sourcemap: "inline"
|
|
||||||
target: "es2020"
|
# Asset processing configuration
|
||||||
|
assetDir: "assets"
|
||||||
|
|
||||||
|
module:
|
||||||
|
mounts:
|
||||||
|
- source: assets
|
||||||
|
target: assets
|
||||||
|
- source: node_modules
|
||||||
|
target: assets/node_modules
|
||||||
|
|
||||||
|
# Override settings for testing
|
||||||
|
buildFuture: true
|
||||||
|
|
||||||
|
# Configure what content is built in testing env
|
||||||
|
params:
|
||||||
|
env: testing
|
||||||
|
environment: testing
|
||||||
|
buildTestContent: true
|
||||||
|
|
||||||
|
# Configure the server for testing
|
||||||
|
server:
|
||||||
|
port: 1315
|
||||||
|
baseURL: 'http://localhost:1315/'
|
||||||
|
watchChanges: true
|
||||||
|
disableLiveReload: false
|
||||||
|
|
||||||
|
# Keep your shared content exclusions
|
||||||
|
ignoreFiles:
|
||||||
|
- "content/shared/.*"
|
||||||
|
|
||||||
|
# Ignore specific warning logs
|
||||||
|
ignoreLogs:
|
||||||
|
- warning-goldmark-raw-html
|
||||||
|
|
||||||
# Disable minification for testing
|
# Disable minification for testing
|
||||||
minify:
|
minify:
|
||||||
|
@ -98,14 +104,3 @@ minify:
|
||||||
disableCSS: true
|
disableCSS: true
|
||||||
disableHTML: true
|
disableHTML: true
|
||||||
minifyOutput: false
|
minifyOutput: false
|
||||||
|
|
||||||
# Asset processing configuration
|
|
||||||
assetDir: "assets"
|
|
||||||
|
|
||||||
# Module mounts
|
|
||||||
module:
|
|
||||||
mounts:
|
|
||||||
- source: assets
|
|
||||||
target: assets
|
|
||||||
- source: node_modules
|
|
||||||
target: assets/node_modules
|
|
|
@ -9,6 +9,22 @@ aliases:
|
||||||
- /kapacitor/v1/about_the_project/releasenotes-changelog/
|
- /kapacitor/v1/about_the_project/releasenotes-changelog/
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## v1.7.7 {date="2025-05-27"}
|
||||||
|
|
||||||
|
> [!Warning]
|
||||||
|
> #### Python 2 UDFs deprecated
|
||||||
|
>
|
||||||
|
> Python 2-based UDFs are deprecated** as of Kapacitor 1.7.7 and will be removed in **Kapacitor 1.8.0**.
|
||||||
|
>
|
||||||
|
> In preparation for Kapacitor 1.8.0, update your User-Defined Functions (UDFs) to be Python 3-compatible.
|
||||||
|
> This required change aligns with modern security practices and ensures your custom functions will continue to work after upgrading.
|
||||||
|
|
||||||
|
### Dependency updates
|
||||||
|
|
||||||
|
- Upgrade Go to 1.22.12.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## v1.7.6 {date="2024-10-28"}
|
## v1.7.6 {date="2024-10-28"}
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -172,7 +172,7 @@ kapacitor:
|
||||||
versions: [v1]
|
versions: [v1]
|
||||||
latest: v1.7
|
latest: v1.7
|
||||||
latest_patches:
|
latest_patches:
|
||||||
v1: 1.7.6
|
v1: 1.7.7
|
||||||
ai_sample_questions:
|
ai_sample_questions:
|
||||||
- How do I configure Kapacitor for InfluxDB v1?
|
- How do I configure Kapacitor for InfluxDB v1?
|
||||||
- How do I write a custom Kapacitor task?
|
- How do I write a custom Kapacitor task?
|
||||||
|
|
|
@ -106,6 +106,33 @@ export default [
|
||||||
files: ['assets/js/**/*.js'],
|
files: ['assets/js/**/*.js'],
|
||||||
rules: {
|
rules: {
|
||||||
// Rules specific to JavaScript in Hugo assets
|
// Rules specific to JavaScript in Hugo assets
|
||||||
|
// Prevent imports from debug-helpers.js
|
||||||
|
'no-restricted-imports': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
paths: [
|
||||||
|
{
|
||||||
|
name: './utils/debug-helpers.js',
|
||||||
|
message:
|
||||||
|
'Remove debugging functions before committing. Debug helpers should not be used in production code.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '/utils/debug-helpers.js',
|
||||||
|
message:
|
||||||
|
'Remove debugging functions before committing. Debug helpers should not be used in production code.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// Prevent use of debug functions in production code
|
||||||
|
'no-restricted-syntax': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
selector: 'CallExpression[callee.name=/^debug(Log|Break|Inspect)$/]',
|
||||||
|
message:
|
||||||
|
'Remove debugging functions before committing. Debug helpers should not be used in production code.',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
15
hugo.yml
15
hugo.yml
|
@ -49,6 +49,7 @@ privacy:
|
||||||
youtube:
|
youtube:
|
||||||
disable: false
|
disable: false
|
||||||
privacyEnhanced: true
|
privacyEnhanced: true
|
||||||
|
|
||||||
outputFormats:
|
outputFormats:
|
||||||
json:
|
json:
|
||||||
mediaType: application/json
|
mediaType: application/json
|
||||||
|
@ -57,13 +58,8 @@ outputFormats:
|
||||||
|
|
||||||
# Asset processing configuration for development
|
# Asset processing configuration for development
|
||||||
build:
|
build:
|
||||||
writeStats: true
|
writeStats: false
|
||||||
useResourceCacheWhen: "fallback"
|
useResourceCacheWhen: "fallback"
|
||||||
# Enable source maps for debugging
|
|
||||||
buildOptions:
|
|
||||||
sourcemap: "inline"
|
|
||||||
target: "es2020"
|
|
||||||
# Disable asset bundling in development
|
|
||||||
noJSConfigInAssets: false
|
noJSConfigInAssets: false
|
||||||
|
|
||||||
# Asset processing configuration
|
# Asset processing configuration
|
||||||
|
@ -82,14 +78,17 @@ params:
|
||||||
environment: development
|
environment: development
|
||||||
|
|
||||||
# Configure the server for development
|
# Configure the server for development
|
||||||
# Specify the port for development to avoid conflicts with testing
|
|
||||||
server:
|
server:
|
||||||
port: 1313
|
port: 1313
|
||||||
baseURL: 'http://localhost:1313/'
|
baseURL: 'http://localhost:1313/'
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
disableLiveReload: false
|
disableLiveReload: false
|
||||||
|
|
||||||
# Disable minification and bundling for development
|
# Ignore specific warning logs
|
||||||
|
ignoreLogs:
|
||||||
|
- warning-goldmark-raw-html
|
||||||
|
|
||||||
|
# Disable minification for development
|
||||||
minify:
|
minify:
|
||||||
disableJS: true
|
disableJS: true
|
||||||
disableCSS: true
|
disableCSS: true
|
||||||
|
|
|
@ -23,17 +23,15 @@
|
||||||
{{ $mainJS := resources.Get "js/main.js" }}
|
{{ $mainJS := resources.Get "js/main.js" }}
|
||||||
{{ if $mainJS }}
|
{{ if $mainJS }}
|
||||||
{{ $opts := dict
|
{{ $opts := dict
|
||||||
"minify" false
|
|
||||||
"sourceMap" "external"
|
"sourceMap" "external"
|
||||||
|
"sourcesContent" true
|
||||||
"targetPath" "js/main.js"
|
"targetPath" "js/main.js"
|
||||||
"params" $sharedParams
|
|
||||||
"format" "esm"
|
"format" "esm"
|
||||||
"external" (slice "*")
|
"bundle" false
|
||||||
"define" (dict
|
"minify" false
|
||||||
"process.env.NODE_ENV" "\"development\""
|
"target" "es2017"
|
||||||
)
|
"write" true
|
||||||
"splitting" false
|
"params" $sharedParams
|
||||||
"bundle" true
|
|
||||||
}}
|
}}
|
||||||
{{ $processed := $mainJS | js.Build $opts }}
|
{{ $processed := $mainJS | js.Build $opts }}
|
||||||
{{ if $processed }}
|
{{ if $processed }}
|
||||||
|
@ -47,25 +45,26 @@
|
||||||
{{ range $file := (readDir $jsDir) }}
|
{{ range $file := (readDir $jsDir) }}
|
||||||
{{ if and (strings.HasSuffix $file.Name ".js") (ne $file.Name "main.js") }}
|
{{ if and (strings.HasSuffix $file.Name ".js") (ne $file.Name "main.js") }}
|
||||||
{{ $jsPath := printf "js/%s" $file.Name }}
|
{{ $jsPath := printf "js/%s" $file.Name }}
|
||||||
{{ $jsResource := resources.Get $jsPath }}
|
{{ $jsRes := resources.Get $jsPath }}
|
||||||
{{ if $jsResource }}
|
{{ with $jsRes }}
|
||||||
{{ $opts := dict
|
{{ $opts := dict
|
||||||
"minify" false
|
"sourceMap" ""
|
||||||
"sourceMap" "external"
|
|
||||||
"targetPath" $jsPath
|
"targetPath" $jsPath
|
||||||
"params" $sharedParams
|
|
||||||
"format" "esm"
|
"format" "esm"
|
||||||
"external" (slice "*")
|
"bundle" false
|
||||||
"define" (dict
|
"minify" false
|
||||||
"process.env.NODE_ENV" "\"development\""
|
"target" "es2015"
|
||||||
)
|
"write" true
|
||||||
"splitting" false
|
"params" $sharedParams
|
||||||
"bundle" true
|
|
||||||
}}
|
}}
|
||||||
{{ $processed := $jsResource | js.Build $opts }}
|
{{ $out := . | js.Build $opts }}
|
||||||
{{ if $processed }}
|
|
||||||
<script type="module" src="{{ $processed.RelPermalink }}"></script>
|
{{/* Add descriptive debug comments at the beginning of each file */}}
|
||||||
{{ end }}
|
{{ $debugHeader := printf "// DEBUG MODE: %s\n// Original file: assets/js/%s\n\n" $file.Name $file.Name }}
|
||||||
|
{{ $modifiedContent := printf "%s%s" $debugHeader $out.Content }}
|
||||||
|
{{ $out = resources.FromString $jsPath $modifiedContent }}
|
||||||
|
|
||||||
|
<script type="module" src="{{ $out.RelPermalink }}"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -82,6 +81,7 @@
|
||||||
"targetPath" "js/main.js"
|
"targetPath" "js/main.js"
|
||||||
"params" $sharedParams
|
"params" $sharedParams
|
||||||
"format" "iife"
|
"format" "iife"
|
||||||
|
"target" "es2019"
|
||||||
"splitting" false
|
"splitting" false
|
||||||
"external" (slice "*")
|
"external" (slice "*")
|
||||||
"define" (dict
|
"define" (dict
|
||||||
|
|
Loading…
Reference in New Issue