AdminDataSource
Defined in: js-api/src/dapi.ts:508
Constructors
Constructor
new AdminDataSource(
dart):AdminDataSource
Defined in: js-api/src/dapi.ts:511
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
AdminDataSource
Properties
| Property | Type | Defined in |
|---|---|---|
dart | any | js-api/src/dapi.ts:509 |
Methods
getGrowthMetrics()
getGrowthMetrics(
options?):Promise<GrowthMetrics>
Defined in: js-api/src/dapi.ts:549
How the platform's data grows: per database table and category (events by source, entities by type, ...), per
storage location and nature, per disk and per garbage collector key, the value now, its change over 1, 7 and 30
days, a daily trend, what the garbage collector deleted and has pending, and the metric alerts that cover it.
The server samples them on a schedule; a fresh server answers no rows until its first collection.
Needs the ViewTelemetry permission: without it, rejects with an Error whose status is 403; a bad area or
days rejects with status 400. An alert's problemId and alertStatus also need ManageAlerts, else they
are null. Sample: https://public.datagrok.ai/js/samples/dapi/admin
Parameters
| Parameter | Type |
|---|---|
options? | GrowthMetricsOptions |
Returns
Promise<GrowthMetrics>
getMetrics()
getMetrics(
options?):Promise<ServerMetrics>
Defined in: js-api/src/dapi.ts:524
Server metrics for a time window: HTTP request latency per route, the errors, the function-call queue,
and database statistics. Needs the ViewTelemetry permission: without it, rejects with an Error whose status
is 403. Sample: https://public.datagrok.ai/js/samples/dapi/admin
Parameters
| Parameter | Type |
|---|---|
options? | ServerMetricsOptions |
Returns
Promise<ServerMetrics>
getProblem()
getProblem(
id):Promise<Problem|null>
Defined in: js-api/src/dapi.ts:561
A problem the platform detected and its current alert, by id or kind:key; null when there is none.
Needs the ManageAlerts permission: without it, rejects with an Error whose status is 403.
Sample: https://public.datagrok.ai/js/samples/dapi/problems
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<Problem | null>
getReportEmail()
getReportEmail():
Promise<string>
Defined in: js-api/src/dapi.ts:594
Returns the configured report email address from admin settings. Used as the default recipient for error reports and admin notifications.
Returns
Promise<string>
getServiceInfos()
getServiceInfos():
Promise<ServiceInfo[]>
Defined in: js-api/src/dapi.ts:517
Returns information about the services. Sample: https://public.datagrok.ai/js/samples/dapi/admin
Returns
Promise<ServiceInfo[]>
pushMessage()
pushMessage(
messageType,message,sessionIds):Promise<any>
Defined in: js-api/src/dapi.ts:624
Sends a message to the specified browser client See also ServerMessageTypes
Parameters
| Parameter | Type |
|---|---|
messageType | string |
message | object |
sessionIds | string[] |
Returns
Promise<any>
sendEmail()
sendEmail(
Promise<void>
Defined in: js-api/src/dapi.ts:601
Sends email
Parameters
| Parameter | Type | Description |
|---|---|---|
email | Email | message that will be sent using configured SMTP service |
Returns
Promise<void>