Files
windmill/frontend/src/lib/components/toast.ts
T
Diego Imbert 5cdecd795c fix: fix DB Manager not working with db resources with 4+ path segments (#7809)
* support more than 3 path segments

* Fix explore db resource not working with 4+ path segments

* don't assume 3 segments

* ?table= syntax impl

* update parsers

* more nit fixes

* fix sql query

* claude nit

* Update SQLx metadata

---------

Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
2026-02-05 14:00:15 +00:00

13 lines
412 B
TypeScript

const pathRegex = /\b(u|f)(\/[^\/\s]+){2,}\b/g
export function processMessage(message: string | undefined): string {
let msg = !message
? 'Error without message'
: typeof message != 'string'
? JSON.stringify(message, null, 2)
: message
return msg.replaceAll(pathRegex, (path) => {
return `<span class="bg-surface-secondary p-1 text-xs font-mono whitespace-nowrap rounded-md">${path}</span>`
})
}