Skip to content

Dashboard

Defined in: src/plugins/application/dashboard/plugin.ts:221

The Dashboard plugin provides a web interface for monitoring and debugging the Shokupan application. It allows you to view request logs, metrics, and other debugging information. Additionally, this plugin shows the scalar, asyncapi and openapi plugins if they are enabled. It uses WebSockets to push updates to the dashboard in real-time.

This plugin will automatically enable the metrics plugin and the fetch interceptor. These are required for the dashboard to function. The fetch interceptor will track all requests and responses for use in the dashboard and Network tab.

When enabled, enableMiddlewareTracking will automatically be enabled on the application.

new Dashboard(dashboardConfig): Dashboard

Defined in: src/plugins/application/dashboard/plugin.ts:255

DashboardConfig = {}

Dashboard

readonly metadata: object

Defined in: src/plugins/application/dashboard/plugin.ts:222

pluginName: string = 'Dashboard'

get db(): DatastoreAdapter

Defined in: src/plugins/application/dashboard/plugin.ts:251

DatastoreAdapter

getHooks(): ShokupanHooks

Defined in: src/plugins/application/dashboard/plugin.ts:1279

ShokupanHooks


onInit(app, options?): void

Defined in: src/plugins/application/dashboard/plugin.ts:258

any

string

void

ShokupanPlugin.onInit


recordEdgeMetric(from, to): void

Defined in: src/plugins/application/dashboard/plugin.ts:1270

string

string

void


recordNodeMetric(id, type, duration, isError): void

Defined in: src/plugins/application/dashboard/plugin.ts:1253

string

string

number

boolean

void


static validateReplayUrl(url, mountPath, allowedReplayHosts?): object

Defined in: src/plugins/application/dashboard/plugin.ts:1699

Validates a URL for the replay endpoint to prevent SSRF attacks. Returns an object with an error property if the URL is unsafe.

string

string

string[] | (hostname) => boolean

object

optional error: string