Skip to content

Commit 4bbb182

Browse files
committed
feat: remove toast notifications for error and warning messages in Elasticsearch and MongoDB views
1 parent d367314 commit 4bbb182

2 files changed

Lines changed: 0 additions & 36 deletions

File tree

packages/frontend/src/datasources/elasticsearch/views/ElasticsearchBrowserView.vue

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ async function runSearchForIndex(index = selectedIndex.value) {
215215
title: `Search failed on ${index}`,
216216
message: detail,
217217
})
218-
toast.add({
219-
severity: 'error',
220-
summary: 'Search failed',
221-
detail,
222-
life: 3000,
223-
})
224218
} finally {
225219
isRunningSearch.value = false
226220
}
@@ -249,12 +243,6 @@ async function saveDocuments() {
249243
message: `${response.inserted} inserted, ${response.updated} updated, ${response.deleted} deleted.`,
250244
durationMs: response.tookMs ?? undefined,
251245
})
252-
toast.add({
253-
severity: 'success',
254-
summary: 'Documents saved',
255-
detail: `Saved changes to ${selectedIndex.value}`,
256-
life: 2200,
257-
})
258246
await runSearchForIndex()
259247
} catch (error) {
260248
const detail = getErrorMessage(error, 'The Elasticsearch documents could not be saved')
@@ -263,12 +251,6 @@ async function saveDocuments() {
263251
title: `Save failed on ${selectedIndex.value}`,
264252
message: detail,
265253
})
266-
toast.add({
267-
severity: 'error',
268-
summary: 'Save failed',
269-
detail,
270-
life: 3200,
271-
})
272254
} finally {
273255
isSaving.value = false
274256
}
@@ -297,12 +279,6 @@ function guardPendingChanges() {
297279
title: 'Unsaved changes',
298280
message,
299281
})
300-
toast.add({
301-
severity: 'warn',
302-
summary: 'Unsaved changes',
303-
detail: message,
304-
life: 2200,
305-
})
306282
return true
307283
}
308284

packages/frontend/src/datasources/mongodb/views/MongoDbBrowserView.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,6 @@ async function runQuery(options?: { keepPage?: boolean }) {
332332
message: detail,
333333
})
334334
logsVisible.value = true
335-
toast.add({
336-
severity: 'error',
337-
summary: 'MongoDB query failed',
338-
detail,
339-
life: 3200,
340-
})
341335
} finally {
342336
isRunningQuery.value = false
343337
}
@@ -417,12 +411,6 @@ async function changePage(nextPage: number) {
417411
title: 'Unsaved table changes',
418412
message: 'Save or discard your current MongoDB changes before changing pages.',
419413
})
420-
toast.add({
421-
severity: 'warn',
422-
summary: 'Unsaved changes',
423-
detail: 'Save or discard your current MongoDB changes before changing pages.',
424-
life: 2600,
425-
})
426414
return
427415
}
428416

0 commit comments

Comments
 (0)