fix: align logging.enabled default to schema (true)
dashboardapiConfig.json declares `logging.enabled.default: true` but: - dashboardapi.html defaulted `enableLog: false` - src/specificClass.js `_buildConfig` used `Boolean(...)` which coerced undefined to false, overriding the schema default. Aligned both to the schema: HTML default = true; _buildConfig now uses `?? true` so an unspecified config follows the schema. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
color: '#4f8582',
|
color: '#4f8582',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value: '' },
|
name: { value: '' },
|
||||||
enableLog: { value: false },
|
enableLog: { value: true },
|
||||||
logLevel: { value: 'info' },
|
logLevel: { value: 'info' },
|
||||||
|
|
||||||
protocol: { value: 'http' },
|
protocol: { value: 'http' },
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class DashboardApi {
|
|||||||
general: {
|
general: {
|
||||||
name: config?.general?.name || 'dashboardapi',
|
name: config?.general?.name || 'dashboardapi',
|
||||||
logging: {
|
logging: {
|
||||||
enabled: Boolean(config?.general?.logging?.enabled),
|
enabled: config?.general?.logging?.enabled ?? true,
|
||||||
logLevel: config?.general?.logging?.logLevel || 'info',
|
logLevel: config?.general?.logging?.logLevel || 'info',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user