Merge pull request #208 from jgor20/fix/webui-console-errors-and-logging
fix(webui): resolve console errors and misleading server logs
This commit is contained in:
@@ -6,6 +6,21 @@
|
|||||||
window.Components = window.Components || {};
|
window.Components = window.Components || {};
|
||||||
|
|
||||||
window.Components.models = () => ({
|
window.Components.models = () => ({
|
||||||
|
editingModelId: null,
|
||||||
|
newMapping: '',
|
||||||
|
|
||||||
|
isEditing(modelId) {
|
||||||
|
return this.editingModelId === modelId;
|
||||||
|
},
|
||||||
|
|
||||||
|
startEditing(modelId) {
|
||||||
|
this.editingModelId = modelId;
|
||||||
|
},
|
||||||
|
|
||||||
|
stopEditing() {
|
||||||
|
this.editingModelId = null;
|
||||||
|
},
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
// Ensure data is fetched when this tab becomes active (skip initial trigger)
|
// Ensure data is fetched when this tab becomes active (skip initial trigger)
|
||||||
this.$watch('$store.global.activeTab', (val, oldVal) => {
|
this.$watch('$store.global.activeTab', (val, oldVal) => {
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
<span x-show="deletingPreset" class="loading loading-spinner loading-xs"></span>
|
<span x-show="deletingPreset" class="loading loading-spinner loading-xs"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-[10px] text-gray-600 mt-2" x-text="$store.global.t('presetHint') || 'Select a preset to load it. Click \"Apply to Claude CLI\" to save changes.'">Select a preset to load it. Click "Apply to Claude CLI" to save changes.</p>
|
<p class="text-[10px] text-gray-600 mt-2" x-text="$store.global.t('presetHint') || 'Select a preset to load it. Click "Apply to Claude CLI" to save changes.'">Select a preset to load it. Click "Apply to Claude CLI" to save changes.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Base URL -->
|
<!-- Base URL -->
|
||||||
@@ -625,7 +625,7 @@
|
|||||||
<p class="py-4 text-gray-300">
|
<p class="py-4 text-gray-300">
|
||||||
<span x-text="$store.global.t('unsavedChangesMessage') || 'Your current configuration doesn\'t match any saved preset.'">Your current configuration doesn't match any saved preset.</span>
|
<span x-text="$store.global.t('unsavedChangesMessage') || 'Your current configuration doesn\'t match any saved preset.'">Your current configuration doesn't match any saved preset.</span>
|
||||||
<br><br>
|
<br><br>
|
||||||
<span class="text-yellow-400/80" x-text="'Load \"' + pendingPresetName + '\" and lose current changes?'"></span>
|
<span class="text-yellow-400/80" x-text="'Load "' + pendingPresetName + '" and lose current changes?'"></span>
|
||||||
</p>
|
</p>
|
||||||
<div class="modal-action">
|
<div class="modal-action">
|
||||||
<button class="btn btn-ghost text-gray-400" @click="cancelLoadPreset()"
|
<button class="btn btn-ghost text-gray-400" @click="cancelLoadPreset()"
|
||||||
@@ -681,7 +681,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Tab 3: Models Configuration -->
|
<!-- Tab 3: Models Configuration -->
|
||||||
<div x-show="activeTab === 'models'" x-data="window.Components.modelManager()"
|
<div x-show="activeTab === 'models'" x-data="window.Components.models()"
|
||||||
class="space-y-6 max-w-3xl animate-fade-in">
|
class="space-y-6 max-w-3xl animate-fade-in">
|
||||||
|
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
|
|||||||
@@ -186,10 +186,10 @@ app.use((req, res, next) => {
|
|||||||
res.on('finish', () => {
|
res.on('finish', () => {
|
||||||
const duration = Date.now() - start;
|
const duration = Date.now() - start;
|
||||||
const status = res.statusCode;
|
const status = res.statusCode;
|
||||||
const logMsg = `[${req.method}] ${req.path} ${status} (${duration}ms)`;
|
const logMsg = `[${req.method}] ${req.originalUrl} ${status} (${duration}ms)`;
|
||||||
|
|
||||||
// Skip standard logging for event logging batch unless in debug mode
|
// Skip standard logging for event logging batch unless in debug mode
|
||||||
if (req.path === '/api/event_logging/batch' || req.path === '/v1/messages/count_tokens') {
|
if (req.originalUrl === '/api/event_logging/batch' || req.originalUrl === '/v1/messages/count_tokens' || req.originalUrl.startsWith('/.well-known/')) {
|
||||||
if (logger.isDebugEnabled) {
|
if (logger.isDebugEnabled) {
|
||||||
logger.debug(logMsg);
|
logger.debug(logMsg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user