@peers-app/peers-ui 0.34.9 → 0.34.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps-home/apps-home.js +6 -4
- package/dist/components/router.d.ts +1 -1
- package/dist/components/router.js +1 -1
- package/dist/screens/identity/identity-routes.d.ts +2 -1
- package/dist/screens/identity/identity-routes.js +6 -1
- package/dist/screens/monitoring/alerts-tab.d.ts +13 -0
- package/dist/screens/monitoring/alerts-tab.js +68 -0
- package/dist/screens/monitoring/badges.d.ts +25 -0
- package/dist/screens/monitoring/badges.js +68 -0
- package/dist/screens/monitoring/calls-tab.d.ts +30 -0
- package/dist/screens/monitoring/calls-tab.js +104 -0
- package/dist/screens/monitoring/charts/chart-math.d.ts +103 -0
- package/dist/screens/monitoring/charts/chart-math.js +200 -0
- package/dist/screens/monitoring/charts/histogram-chart.d.ts +25 -0
- package/dist/screens/monitoring/charts/histogram-chart.js +74 -0
- package/dist/screens/monitoring/charts/line-chart.d.ts +33 -0
- package/dist/screens/monitoring/charts/line-chart.js +103 -0
- package/dist/screens/monitoring/charts/sparkline.d.ts +30 -0
- package/dist/screens/monitoring/charts/sparkline.js +61 -0
- package/dist/screens/monitoring/charts/use-width.d.ts +9 -0
- package/dist/screens/monitoring/charts/use-width.js +31 -0
- package/dist/screens/monitoring/definition-forms.d.ts +113 -0
- package/dist/screens/monitoring/definition-forms.js +341 -0
- package/dist/screens/monitoring/definitions-tab.d.ts +20 -0
- package/dist/screens/monitoring/definitions-tab.js +110 -0
- package/dist/screens/monitoring/device-picker.d.ts +23 -0
- package/dist/screens/monitoring/device-picker.js +30 -0
- package/dist/screens/monitoring/devices-tab.d.ts +6 -0
- package/dist/screens/monitoring/devices-tab.js +74 -0
- package/dist/screens/monitoring/form-fields.d.ts +76 -0
- package/dist/screens/monitoring/form-fields.js +65 -0
- package/dist/screens/monitoring/format.d.ts +51 -0
- package/dist/screens/monitoring/format.js +150 -0
- package/dist/screens/monitoring/log-lines.d.ts +74 -0
- package/dist/screens/monitoring/log-lines.js +138 -0
- package/dist/screens/monitoring/log-row.d.ts +12 -0
- package/dist/screens/monitoring/log-row.js +23 -0
- package/dist/screens/monitoring/logs-tab.d.ts +15 -0
- package/dist/screens/monitoring/logs-tab.js +256 -0
- package/dist/screens/monitoring/metric-definition-form.d.ts +15 -0
- package/dist/screens/monitoring/metric-definition-form.js +50 -0
- package/dist/screens/monitoring/metrics-tab.d.ts +37 -0
- package/dist/screens/monitoring/metrics-tab.js +149 -0
- package/dist/screens/monitoring/monitored-devices.d.ts +84 -0
- package/dist/screens/monitoring/monitored-devices.js +193 -0
- package/dist/screens/monitoring/monitoring-routes.d.ts +40 -0
- package/dist/screens/monitoring/monitoring-routes.js +82 -0
- package/dist/screens/monitoring/monitoring-screen.d.ts +18 -0
- package/dist/screens/monitoring/monitoring-screen.js +71 -0
- package/dist/screens/monitoring/overview-tab.d.ts +51 -0
- package/dist/screens/monitoring/overview-tab.js +136 -0
- package/dist/screens/monitoring/telemetry-client.d.ts +48 -0
- package/dist/screens/monitoring/telemetry-client.js +92 -0
- package/dist/screens/monitoring/trigger-form.d.ts +18 -0
- package/dist/screens/monitoring/trigger-form.js +71 -0
- package/dist/screens/monitoring/use-telemetry.d.ts +37 -0
- package/dist/screens/monitoring/use-telemetry.js +119 -0
- package/dist/screens/network-viewer/remote-logs-panel.d.ts +1 -1
- package/dist/screens/network-viewer/remote-logs-panel.js +5 -3
- package/dist/system-apps/index.d.ts +1 -1
- package/dist/system-apps/index.js +5 -5
- package/dist/system-apps/monitoring.app.d.ts +6 -0
- package/dist/system-apps/monitoring.app.js +13 -0
- package/dist/tabs-layout/tabs-state.d.ts +4 -2
- package/dist/tabs-layout/tabs-state.js +23 -11
- package/dist/theme.css +32 -0
- package/package.json +3 -3
- package/dist/screens/console-logs/console-logs-list.d.ts +0 -2
- package/dist/screens/console-logs/console-logs-list.js +0 -284
- package/dist/screens/console-logs/follow-newest.d.ts +0 -11
- package/dist/screens/console-logs/follow-newest.js +0 -17
- package/dist/screens/console-logs/log-display.d.ts +0 -12
- package/dist/screens/console-logs/log-display.js +0 -69
- package/dist/screens/console-logs/log-filters.d.ts +0 -10
- package/dist/screens/console-logs/log-filters.js +0 -8
- package/dist/screens/console-logs/mobile-log-card.d.ts +0 -8
- package/dist/screens/console-logs/mobile-log-card.js +0 -94
- package/dist/screens/console-logs/resizable-table-header.d.ts +0 -14
- package/dist/screens/console-logs/resizable-table-header.js +0 -62
- package/dist/system-apps/console-logs.app.d.ts +0 -2
- package/dist/system-apps/console-logs.app.js +0 -8
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DevicesTab = DevicesTab;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const device_picker_1 = require("./device-picker");
|
|
7
|
+
const form_fields_1 = require("./form-fields");
|
|
8
|
+
const format_1 = require("./format");
|
|
9
|
+
const monitored_devices_1 = require("./monitored-devices");
|
|
10
|
+
const overview_tab_1 = require("./overview-tab");
|
|
11
|
+
const telemetry_client_1 = require("./telemetry-client");
|
|
12
|
+
const use_telemetry_1 = require("./use-telemetry");
|
|
13
|
+
/** How long a device has to answer the All devices section before it shows as not reachable. */
|
|
14
|
+
const DEVICE_READ_TIMEOUT_MS = 15_000;
|
|
15
|
+
/**
|
|
16
|
+
* All devices: every device Monitoring can read, each with what's firing, its errors and call p95
|
|
17
|
+
* over the last 24 hours, and its telemetry database's size. A device's name opens its Overview.
|
|
18
|
+
*/
|
|
19
|
+
function DevicesTab(props) {
|
|
20
|
+
// Each refresh reads every device again, and asks other users' devices again.
|
|
21
|
+
const [round, setRound] = (0, react_1.useState)(0);
|
|
22
|
+
const devices = (0, use_telemetry_1.useMonitoredDevices)(round);
|
|
23
|
+
const open = (device) => props.navigate({
|
|
24
|
+
section: "overview",
|
|
25
|
+
deviceId: device.isThisDevice ? undefined : device.deviceId,
|
|
26
|
+
});
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "d-flex justify-content-end mb-2", children: (0, jsx_runtime_1.jsx)(form_fields_1.RefreshButton, { onClick: () => setRound((r) => r + 1), loading: !devices }) }), !devices ? ((0, jsx_runtime_1.jsx)("div", { className: "text-body-secondary", children: "Loading\u2026" })) : ((0, jsx_runtime_1.jsx)("div", { className: "table-responsive", children: (0, jsx_runtime_1.jsxs)("table", { className: "table table-sm align-middle", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { scope: "col", children: "Device" }), (0, jsx_runtime_1.jsx)("th", { scope: "col", children: "Alerts" }), (0, jsx_runtime_1.jsx)("th", { scope: "col", className: "text-end text-nowrap", children: "Errors, 24 h" }), (0, jsx_runtime_1.jsx)("th", { scope: "col", className: "text-end text-nowrap", children: "Call p95, 24 h" }), (0, jsx_runtime_1.jsx)("th", { scope: "col", className: "text-end", children: "Telemetry" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: devices.map((device) => ((0, jsx_runtime_1.jsx)(DeviceRow, { device: device, onOpen: () => open(device) }, `${device.isThisDevice ? "this" : device.deviceId}:${round}`))) })] }) })), (0, jsx_runtime_1.jsx)("p", { className: "small text-body-secondary", children: "Other people's devices show here while they're connected to this one and let you read them." })] }));
|
|
28
|
+
}
|
|
29
|
+
/** One device's row: its name, and what it answered or why it didn't. */
|
|
30
|
+
function DeviceRow(props) {
|
|
31
|
+
const { device } = props;
|
|
32
|
+
const deviceId = device.isThisDevice ? undefined : device.deviceId;
|
|
33
|
+
const [{ summary, error }, setResult] = (0, react_1.useState)({});
|
|
34
|
+
(0, react_1.useEffect)(() => {
|
|
35
|
+
// A row reads once per mount. Its deadline includes reconnecting to the local host.
|
|
36
|
+
let active = true;
|
|
37
|
+
const read = (0, telemetry_client_1.getTelemetry)(deviceId).then((telemetry) => {
|
|
38
|
+
if (active)
|
|
39
|
+
return (0, overview_tab_1.readOverview)(telemetry);
|
|
40
|
+
});
|
|
41
|
+
void (0, monitored_devices_1.withTimeout)(read, DEVICE_READ_TIMEOUT_MS)
|
|
42
|
+
.then((data) => {
|
|
43
|
+
if (active && data)
|
|
44
|
+
setResult({ summary: (0, overview_tab_1.summarizeOverview)(data) });
|
|
45
|
+
})
|
|
46
|
+
.catch((error) => {
|
|
47
|
+
if (active)
|
|
48
|
+
setResult({ error });
|
|
49
|
+
active = false;
|
|
50
|
+
});
|
|
51
|
+
return () => {
|
|
52
|
+
active = false;
|
|
53
|
+
};
|
|
54
|
+
}, [deviceId]);
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-link p-0 text-start", onClick: props.onOpen, "aria-label": `Open ${(0, device_picker_1.deviceLabel)(device)}'s Overview`, children: (0, device_picker_1.deviceLabel)(device) }), device.lastSeen && !summary ? ((0, jsx_runtime_1.jsxs)("div", { className: "small text-body-secondary", children: ["Last seen ", (0, format_1.formatAgo)(new Date(device.lastSeen).getTime())] })) : null] }), summary ? ((0, jsx_runtime_1.jsx)(SummaryCells, { summary: summary })) : error ? ((0, jsx_runtime_1.jsx)("td", { colSpan: 4, className: "small text-body-secondary", children: (0, jsx_runtime_1.jsx)("span", { title: (0, telemetry_client_1.describeTelemetryError)(error), children: problem(error) }) })) : ((0, jsx_runtime_1.jsx)("td", { colSpan: 4, className: "small text-body-secondary", children: "Reading\u2026" }))] }));
|
|
56
|
+
}
|
|
57
|
+
function SummaryCells(props) {
|
|
58
|
+
const { summary } = props;
|
|
59
|
+
const firing = summary.active?.filter((alert) => alert.state === "firing").length;
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("td", { children: firing === undefined ? ((0, jsx_runtime_1.jsx)("span", { className: "text-body-secondary", children: "\u2013" })) : firing > 0 ? ((0, jsx_runtime_1.jsxs)("span", { className: "badge text-bg-danger", children: [firing, " firing"] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "small text-success", children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-check-circle me-1", "aria-hidden": "true" }), "None"] })) }), (0, jsx_runtime_1.jsx)("td", { className: "text-end", children: summary.errors === undefined ? "–" : (0, format_1.formatNumber)(summary.errors) }), (0, jsx_runtime_1.jsx)("td", { className: "text-end", children: (0, format_1.formatDuration)(summary.p95) }), (0, jsx_runtime_1.jsx)("td", { className: "text-end text-nowrap", children: (0, format_1.formatBytes)(summary.databaseBytes) })] }));
|
|
61
|
+
}
|
|
62
|
+
/** A device's failed read, in a few words; the full sentence is its tooltip. */
|
|
63
|
+
function problem(error) {
|
|
64
|
+
switch ((0, telemetry_client_1.classifyTelemetryError)(error)) {
|
|
65
|
+
case "unavailable":
|
|
66
|
+
return "Runs a Peers version without telemetry";
|
|
67
|
+
case "unreachable":
|
|
68
|
+
return "Not reachable";
|
|
69
|
+
case "denied":
|
|
70
|
+
return "Doesn't let you read it";
|
|
71
|
+
default:
|
|
72
|
+
return "Couldn't read it";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** A labeled text input, for Monitoring's definition forms. */
|
|
3
|
+
export declare function TextField(props: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
hint?: ReactNode;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
monospace?: boolean;
|
|
12
|
+
list?: string;
|
|
13
|
+
inputMode?: "numeric" | "decimal" | "text";
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** A labeled multi-line input. */
|
|
16
|
+
export declare function TextAreaField(props: {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
onChange: (value: string) => void;
|
|
21
|
+
hint?: ReactNode;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
rows?: number;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/** A labeled select. */
|
|
26
|
+
export declare function SelectField<T extends string>(props: {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
value: T;
|
|
30
|
+
options: Array<{
|
|
31
|
+
value: T;
|
|
32
|
+
label: string;
|
|
33
|
+
}>;
|
|
34
|
+
onChange: (value: T) => void;
|
|
35
|
+
hint?: ReactNode;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/** A labeled checkbox. */
|
|
38
|
+
export declare function CheckField(props: {
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
checked: boolean;
|
|
42
|
+
onChange: (checked: boolean) => void;
|
|
43
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Read a section again. Sections that don't refresh on their own say when they last read, so a
|
|
46
|
+
* view left open doesn't pass for current.
|
|
47
|
+
*/
|
|
48
|
+
export declare function RefreshButton(props: {
|
|
49
|
+
onClick: () => void;
|
|
50
|
+
loading: boolean;
|
|
51
|
+
/** When the shown data was read; omit for a section that refreshes itself. */
|
|
52
|
+
readAt?: number;
|
|
53
|
+
className?: string;
|
|
54
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* The "Include Monitoring's own reads" switch: off, a view leaves out the calls Monitoring makes
|
|
57
|
+
* to System Telemetry as it refreshes.
|
|
58
|
+
*/
|
|
59
|
+
export declare function OwnReadsSwitch(props: {
|
|
60
|
+
id: string;
|
|
61
|
+
checked: boolean;
|
|
62
|
+
onChange: (checked: boolean) => void;
|
|
63
|
+
/** Where it sits in its row; centered by default. */
|
|
64
|
+
className?: string;
|
|
65
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
/**
|
|
67
|
+
* A filter's input. It applies what's typed once the person pauses, presses Enter or leaves it,
|
|
68
|
+
* so a filter doesn't read the logs again on every key.
|
|
69
|
+
*/
|
|
70
|
+
export declare function FilterInput(props: {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
onChange: (value: string) => void;
|
|
75
|
+
placeholder?: string;
|
|
76
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextField = TextField;
|
|
4
|
+
exports.TextAreaField = TextAreaField;
|
|
5
|
+
exports.SelectField = SelectField;
|
|
6
|
+
exports.CheckField = CheckField;
|
|
7
|
+
exports.RefreshButton = RefreshButton;
|
|
8
|
+
exports.OwnReadsSwitch = OwnReadsSwitch;
|
|
9
|
+
exports.FilterInput = FilterInput;
|
|
10
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
+
const react_1 = require("react");
|
|
12
|
+
const format_1 = require("./format");
|
|
13
|
+
/** A labeled text input, for Monitoring's definition forms. */
|
|
14
|
+
function TextField(props) {
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-2", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: props.id, className: "form-label small mb-1", children: props.label }), (0, jsx_runtime_1.jsx)("input", { id: props.id, className: `form-control form-control-sm ${props.monospace ? "font-monospace" : ""}`, value: props.value, placeholder: props.placeholder, disabled: props.disabled, list: props.list, inputMode: props.inputMode, onChange: (event) => props.onChange(event.target.value) }), props.hint ? (0, jsx_runtime_1.jsx)("div", { className: "form-text small mt-0", children: props.hint }) : null] }));
|
|
16
|
+
}
|
|
17
|
+
/** A labeled multi-line input. */
|
|
18
|
+
function TextAreaField(props) {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-2", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: props.id, className: "form-label small mb-1", children: props.label }), (0, jsx_runtime_1.jsx)("textarea", { id: props.id, className: "form-control form-control-sm font-monospace", rows: props.rows ?? 2, value: props.value, placeholder: props.placeholder, onChange: (event) => props.onChange(event.target.value) }), props.hint ? (0, jsx_runtime_1.jsx)("div", { className: "form-text small mt-0", children: props.hint }) : null] }));
|
|
20
|
+
}
|
|
21
|
+
/** A labeled select. */
|
|
22
|
+
function SelectField(props) {
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-2", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: props.id, className: "form-label small mb-1", children: props.label }), (0, jsx_runtime_1.jsx)("select", { id: props.id, className: "form-select form-select-sm", value: props.value, onChange: (event) => props.onChange(event.target.value), children: props.options.map((option) => ((0, jsx_runtime_1.jsx)("option", { value: option.value, children: option.label }, option.value))) }), props.hint ? (0, jsx_runtime_1.jsx)("div", { className: "form-text small mt-0", children: props.hint }) : null] }));
|
|
24
|
+
}
|
|
25
|
+
/** A labeled checkbox. */
|
|
26
|
+
function CheckField(props) {
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "form-check mb-2", children: [(0, jsx_runtime_1.jsx)("input", { id: props.id, type: "checkbox", className: "form-check-input", checked: props.checked, onChange: (event) => props.onChange(event.target.checked) }), (0, jsx_runtime_1.jsx)("label", { htmlFor: props.id, className: "form-check-label small", children: props.label })] }));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Read a section again. Sections that don't refresh on their own say when they last read, so a
|
|
31
|
+
* view left open doesn't pass for current.
|
|
32
|
+
*/
|
|
33
|
+
function RefreshButton(props) {
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `d-flex align-items-center gap-2 ${props.className ?? ""}`, children: [props.readAt ? ((0, jsx_runtime_1.jsxs)("span", { className: "small text-body-secondary text-nowrap", children: ["As of ", (0, format_1.formatClock)(props.readAt)] })) : null, (0, jsx_runtime_1.jsxs)("button", { type: "button", className: "btn btn-outline-secondary btn-sm text-nowrap", onClick: props.onClick, disabled: props.loading, children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-arrow-clockwise me-1", "aria-hidden": "true" }), "Refresh"] })] }));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The "Include Monitoring's own reads" switch: off, a view leaves out the calls Monitoring makes
|
|
38
|
+
* to System Telemetry as it refreshes.
|
|
39
|
+
*/
|
|
40
|
+
function OwnReadsSwitch(props) {
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `form-check form-switch mb-0 ${props.className ?? "align-self-center"}`, children: [(0, jsx_runtime_1.jsx)("input", { id: props.id, type: "checkbox", role: "switch", "aria-checked": props.checked, className: "form-check-input", checked: props.checked, onChange: (event) => props.onChange(event.target.checked) }), (0, jsx_runtime_1.jsx)("label", { htmlFor: props.id, className: "form-check-label small", children: "Include Monitoring's own reads" })] }));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A filter's input. It applies what's typed once the person pauses, presses Enter or leaves it,
|
|
45
|
+
* so a filter doesn't read the logs again on every key.
|
|
46
|
+
*/
|
|
47
|
+
function FilterInput(props) {
|
|
48
|
+
const [draft, setDraft] = (0, react_1.useState)(props.value);
|
|
49
|
+
const { value } = props;
|
|
50
|
+
// The parent re-renders as lines arrive; a ref keeps that from restarting the pause.
|
|
51
|
+
const onChangeRef = (0, react_1.useRef)(props.onChange);
|
|
52
|
+
onChangeRef.current = props.onChange;
|
|
53
|
+
const onChange = (next) => onChangeRef.current(next);
|
|
54
|
+
(0, react_1.useEffect)(() => setDraft(value), [value]);
|
|
55
|
+
(0, react_1.useEffect)(() => {
|
|
56
|
+
if (draft === value)
|
|
57
|
+
return;
|
|
58
|
+
const timer = setTimeout(() => onChangeRef.current(draft), 600);
|
|
59
|
+
return () => clearTimeout(timer);
|
|
60
|
+
}, [draft, value]);
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "col-6 col-md-4 col-xl-2", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: props.id, className: "form-label small text-body-secondary mb-0", children: props.label }), (0, jsx_runtime_1.jsx)("input", { id: props.id, className: "form-control form-control-sm", value: draft, placeholder: props.placeholder, onChange: (event) => setDraft(event.target.value), onBlur: () => draft !== value && onChange(draft), onKeyDown: (event) => {
|
|
62
|
+
if (event.key === "Enter" && draft !== value)
|
|
63
|
+
onChange(draft);
|
|
64
|
+
} })] }));
|
|
65
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How Monitoring writes numbers, durations, sizes and times: in full under 10,000, compact above
|
|
3
|
+
* (12.9K), durations in the unit that reads best (850 µs, 42 ms, 3.2 s, 4.5 min).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A count or plain value: in full under 10,000 (1,284), compact above (12.9K).
|
|
7
|
+
*
|
|
8
|
+
* @param value - The number; `undefined` reads as a dash.
|
|
9
|
+
*/
|
|
10
|
+
export declare function formatNumber(value: number | undefined): string;
|
|
11
|
+
/**
|
|
12
|
+
* A duration in milliseconds, in the unit that reads best.
|
|
13
|
+
*
|
|
14
|
+
* @param ms - Milliseconds; `undefined` reads as a dash.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatDuration(ms: number | undefined): string;
|
|
17
|
+
/**
|
|
18
|
+
* A size in bytes: B, KB, MB or GB (1,024 apart).
|
|
19
|
+
*
|
|
20
|
+
* @param bytes - Bytes; `undefined` reads as a dash.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatBytes(bytes: number | undefined): string;
|
|
23
|
+
/**
|
|
24
|
+
* A metric's value in its unit: durations for `ms`, sizes for `bytes` (and `MB`), otherwise the
|
|
25
|
+
* number with its unit after it.
|
|
26
|
+
*
|
|
27
|
+
* @param value - The value; `undefined` reads as a dash.
|
|
28
|
+
* @param unit - The metric's unit, if it has one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatValue(value: number | undefined, unit?: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* How long ago a moment was: "just now", "4 min ago", "3 h ago", "2 d ago".
|
|
33
|
+
*
|
|
34
|
+
* @param at - Epoch milliseconds.
|
|
35
|
+
* @param now - The current time (for tests).
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatAgo(at: number | undefined, now?: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* A log line's or call's time: `14:03:27.512` today, `11/28 14:03:27` on another day.
|
|
40
|
+
*
|
|
41
|
+
* @param at - Epoch milliseconds.
|
|
42
|
+
* @param now - The current time (for tests).
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatTime(at: number, now?: number): string;
|
|
45
|
+
/**
|
|
46
|
+
* A clock time to the minute: "14:00" today, "yesterday 22:00", or "Mon 14:00" further back.
|
|
47
|
+
*
|
|
48
|
+
* @param at - Epoch milliseconds.
|
|
49
|
+
* @param now - The current time (for tests).
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatClock(at: number, now?: number): string;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* How Monitoring writes numbers, durations, sizes and times: in full under 10,000, compact above
|
|
4
|
+
* (12.9K), durations in the unit that reads best (850 µs, 42 ms, 3.2 s, 4.5 min).
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.formatNumber = formatNumber;
|
|
8
|
+
exports.formatDuration = formatDuration;
|
|
9
|
+
exports.formatBytes = formatBytes;
|
|
10
|
+
exports.formatValue = formatValue;
|
|
11
|
+
exports.formatAgo = formatAgo;
|
|
12
|
+
exports.formatTime = formatTime;
|
|
13
|
+
exports.formatClock = formatClock;
|
|
14
|
+
const fullNumber = new Intl.NumberFormat(undefined, { maximumFractionDigits: 2 });
|
|
15
|
+
const compactNumber = new Intl.NumberFormat(undefined, {
|
|
16
|
+
notation: "compact",
|
|
17
|
+
maximumFractionDigits: 1,
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* A count or plain value: in full under 10,000 (1,284), compact above (12.9K).
|
|
21
|
+
*
|
|
22
|
+
* @param value - The number; `undefined` reads as a dash.
|
|
23
|
+
*/
|
|
24
|
+
function formatNumber(value) {
|
|
25
|
+
if (value === undefined || !Number.isFinite(value))
|
|
26
|
+
return "–";
|
|
27
|
+
return Math.abs(value) < 10_000 ? fullNumber.format(round(value)) : compactNumber.format(value);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A duration in milliseconds, in the unit that reads best.
|
|
31
|
+
*
|
|
32
|
+
* @param ms - Milliseconds; `undefined` reads as a dash.
|
|
33
|
+
*/
|
|
34
|
+
function formatDuration(ms) {
|
|
35
|
+
if (ms === undefined || !Number.isFinite(ms))
|
|
36
|
+
return "–";
|
|
37
|
+
if (ms === 0)
|
|
38
|
+
return "0";
|
|
39
|
+
const abs = Math.abs(ms);
|
|
40
|
+
if (abs < 1)
|
|
41
|
+
return `${fullNumber.format(Math.round(ms * 1000))} µs`;
|
|
42
|
+
if (abs < 1_000)
|
|
43
|
+
return `${fullNumber.format(abs < 10 ? round(ms, 1) : Math.round(ms))} ms`;
|
|
44
|
+
if (abs < 60_000)
|
|
45
|
+
return `${fullNumber.format(round(ms / 1_000, 1))} s`;
|
|
46
|
+
if (abs < 3_600_000)
|
|
47
|
+
return `${fullNumber.format(round(ms / 60_000, 1))} min`;
|
|
48
|
+
return `${fullNumber.format(round(ms / 3_600_000, 1))} h`;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A size in bytes: B, KB, MB or GB (1,024 apart).
|
|
52
|
+
*
|
|
53
|
+
* @param bytes - Bytes; `undefined` reads as a dash.
|
|
54
|
+
*/
|
|
55
|
+
function formatBytes(bytes) {
|
|
56
|
+
if (bytes === undefined || !Number.isFinite(bytes))
|
|
57
|
+
return "–";
|
|
58
|
+
const units = ["B", "KB", "MB", "GB", "TB"];
|
|
59
|
+
let value = bytes;
|
|
60
|
+
let unit = 0;
|
|
61
|
+
while (Math.abs(value) >= 1024 && unit < units.length - 1) {
|
|
62
|
+
value /= 1024;
|
|
63
|
+
unit++;
|
|
64
|
+
}
|
|
65
|
+
return `${fullNumber.format(unit === 0 ? value : round(value, 1))} ${units[unit]}`;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A metric's value in its unit: durations for `ms`, sizes for `bytes` (and `MB`), otherwise the
|
|
69
|
+
* number with its unit after it.
|
|
70
|
+
*
|
|
71
|
+
* @param value - The value; `undefined` reads as a dash.
|
|
72
|
+
* @param unit - The metric's unit, if it has one.
|
|
73
|
+
*/
|
|
74
|
+
function formatValue(value, unit) {
|
|
75
|
+
if (value === undefined || !Number.isFinite(value))
|
|
76
|
+
return "–";
|
|
77
|
+
switch (unit) {
|
|
78
|
+
case "ms":
|
|
79
|
+
return formatDuration(value);
|
|
80
|
+
case "bytes":
|
|
81
|
+
return formatBytes(value);
|
|
82
|
+
case "MB":
|
|
83
|
+
return formatBytes(value * 1024 * 1024);
|
|
84
|
+
case "%":
|
|
85
|
+
return `${formatNumber(value)}%`;
|
|
86
|
+
case undefined:
|
|
87
|
+
case "":
|
|
88
|
+
return formatNumber(value);
|
|
89
|
+
default:
|
|
90
|
+
return `${formatNumber(value)} ${unit}`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* How long ago a moment was: "just now", "4 min ago", "3 h ago", "2 d ago".
|
|
95
|
+
*
|
|
96
|
+
* @param at - Epoch milliseconds.
|
|
97
|
+
* @param now - The current time (for tests).
|
|
98
|
+
*/
|
|
99
|
+
function formatAgo(at, now = Date.now()) {
|
|
100
|
+
if (at === undefined)
|
|
101
|
+
return "–";
|
|
102
|
+
const seconds = Math.max(0, Math.round((now - at) / 1000));
|
|
103
|
+
if (seconds < 45)
|
|
104
|
+
return "just now";
|
|
105
|
+
const minutes = Math.round(seconds / 60);
|
|
106
|
+
if (minutes < 60)
|
|
107
|
+
return `${minutes} min ago`;
|
|
108
|
+
const hours = Math.round(minutes / 60);
|
|
109
|
+
if (hours < 48)
|
|
110
|
+
return `${hours} h ago`;
|
|
111
|
+
return `${Math.round(hours / 24)} d ago`;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* A log line's or call's time: `14:03:27.512` today, `11/28 14:03:27` on another day.
|
|
115
|
+
*
|
|
116
|
+
* @param at - Epoch milliseconds.
|
|
117
|
+
* @param now - The current time (for tests).
|
|
118
|
+
*/
|
|
119
|
+
function formatTime(at, now = Date.now()) {
|
|
120
|
+
const date = new Date(at);
|
|
121
|
+
const time = `${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
|
|
122
|
+
if (new Date(now).toDateString() === date.toDateString()) {
|
|
123
|
+
return `${time}.${String(date.getMilliseconds()).padStart(3, "0")}`;
|
|
124
|
+
}
|
|
125
|
+
return `${date.getMonth() + 1}/${date.getDate()} ${time}`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A clock time to the minute: "14:00" today, "yesterday 22:00", or "Mon 14:00" further back.
|
|
129
|
+
*
|
|
130
|
+
* @param at - Epoch milliseconds.
|
|
131
|
+
* @param now - The current time (for tests).
|
|
132
|
+
*/
|
|
133
|
+
function formatClock(at, now = Date.now()) {
|
|
134
|
+
const date = new Date(at);
|
|
135
|
+
const time = `${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
136
|
+
const today = new Date(now);
|
|
137
|
+
if (today.toDateString() === date.toDateString())
|
|
138
|
+
return time;
|
|
139
|
+
const yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
|
|
140
|
+
if (yesterday.toDateString() === date.toDateString())
|
|
141
|
+
return `yesterday ${time}`;
|
|
142
|
+
return `${date.toLocaleDateString(undefined, { weekday: "short" })} ${time}`;
|
|
143
|
+
}
|
|
144
|
+
function pad(value) {
|
|
145
|
+
return String(value).padStart(2, "0");
|
|
146
|
+
}
|
|
147
|
+
function round(value, digits = 2) {
|
|
148
|
+
const factor = 10 ** digits;
|
|
149
|
+
return Math.round(value * factor) / factor;
|
|
150
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ILogRecord, IReadLogsInput, LogLevel } from "@peers-app/peers-sdk";
|
|
2
|
+
/**
|
|
3
|
+
* The Logs section keeps at most this many lines: following drops the oldest past it, and loading
|
|
4
|
+
* older lines drops the newest.
|
|
5
|
+
*/
|
|
6
|
+
export declare const MAX_LOADED_LINES = 2000;
|
|
7
|
+
/** Lines per page, back and forward. */
|
|
8
|
+
export declare const LOG_PAGE_SIZE = 200;
|
|
9
|
+
/** The Logs section's filters, as its inputs hold them. */
|
|
10
|
+
export interface ILogFilters {
|
|
11
|
+
/** Levels to show; empty shows every level. */
|
|
12
|
+
levels: LogLevel[];
|
|
13
|
+
search: string;
|
|
14
|
+
/** Comma-separated lists. */
|
|
15
|
+
sources: string;
|
|
16
|
+
packageIds: string;
|
|
17
|
+
groupIds: string;
|
|
18
|
+
processes: string;
|
|
19
|
+
events: string;
|
|
20
|
+
traceId: string;
|
|
21
|
+
}
|
|
22
|
+
/** No filters: every line. */
|
|
23
|
+
export declare function emptyLogFilters(traceId?: string): ILogFilters;
|
|
24
|
+
/**
|
|
25
|
+
* The `readLogs` input for a set of filters (without paging).
|
|
26
|
+
*
|
|
27
|
+
* @param filters - The section's filters.
|
|
28
|
+
*/
|
|
29
|
+
export declare function toReadLogsInput(filters: ILogFilters): IReadLogsInput;
|
|
30
|
+
/** How many filters besides level and search are set, for the filters button's count. */
|
|
31
|
+
export declare function countFieldFilters(filters: ILogFilters): number;
|
|
32
|
+
/** Loaded lines, oldest first. */
|
|
33
|
+
export interface ILoadedLines {
|
|
34
|
+
lines: ILogRecord[];
|
|
35
|
+
/** Older lines match that aren't loaded. */
|
|
36
|
+
hasOlder: boolean;
|
|
37
|
+
/** Newer lines were dropped to keep the cap; reading the newest page brings them back. */
|
|
38
|
+
hasNewer?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Add a page of older lines (as `readLogs` returns them: newest first) before the loaded ones,
|
|
42
|
+
* dropping the newest past {@link MAX_LOADED_LINES}.
|
|
43
|
+
*
|
|
44
|
+
* @param loaded - The loaded lines.
|
|
45
|
+
* @param page - The older page.
|
|
46
|
+
* @param hasMore - Whether `readLogs` said still older lines match.
|
|
47
|
+
* @param max - The most to keep.
|
|
48
|
+
*/
|
|
49
|
+
export declare function addOlder(loaded: ILoadedLines, page: ILogRecord[], hasMore: boolean, max?: number): ILoadedLines;
|
|
50
|
+
/**
|
|
51
|
+
* Add newer lines (as `readLogs` returns them after a cursor: oldest first) after the loaded ones,
|
|
52
|
+
* dropping the oldest past {@link MAX_LOADED_LINES}.
|
|
53
|
+
*
|
|
54
|
+
* @param loaded - The loaded lines.
|
|
55
|
+
* @param page - The newer lines.
|
|
56
|
+
* @param max - The most to keep.
|
|
57
|
+
*/
|
|
58
|
+
export declare function addNewer(loaded: ILoadedLines, page: ILogRecord[], max?: number): ILoadedLines;
|
|
59
|
+
/**
|
|
60
|
+
* The newest loaded line's id, the cursor to follow from.
|
|
61
|
+
*
|
|
62
|
+
* @param loaded - The loaded lines.
|
|
63
|
+
*/
|
|
64
|
+
export declare function newestLogId(loaded: ILoadedLines): number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* An error logged with a line: `data.error`, as the logger records an `Error` argument.
|
|
67
|
+
*
|
|
68
|
+
* @param line - A log line.
|
|
69
|
+
*/
|
|
70
|
+
export declare function lineError(line: ILogRecord): {
|
|
71
|
+
name?: string;
|
|
72
|
+
message?: string;
|
|
73
|
+
stack?: string;
|
|
74
|
+
} | undefined;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOG_PAGE_SIZE = exports.MAX_LOADED_LINES = void 0;
|
|
4
|
+
exports.emptyLogFilters = emptyLogFilters;
|
|
5
|
+
exports.toReadLogsInput = toReadLogsInput;
|
|
6
|
+
exports.countFieldFilters = countFieldFilters;
|
|
7
|
+
exports.addOlder = addOlder;
|
|
8
|
+
exports.addNewer = addNewer;
|
|
9
|
+
exports.newestLogId = newestLogId;
|
|
10
|
+
exports.lineError = lineError;
|
|
11
|
+
/**
|
|
12
|
+
* The Logs section keeps at most this many lines: following drops the oldest past it, and loading
|
|
13
|
+
* older lines drops the newest.
|
|
14
|
+
*/
|
|
15
|
+
exports.MAX_LOADED_LINES = 2_000;
|
|
16
|
+
/** Lines per page, back and forward. */
|
|
17
|
+
exports.LOG_PAGE_SIZE = 200;
|
|
18
|
+
/** No filters: every line. */
|
|
19
|
+
function emptyLogFilters(traceId = "") {
|
|
20
|
+
return {
|
|
21
|
+
levels: [],
|
|
22
|
+
search: "",
|
|
23
|
+
sources: "",
|
|
24
|
+
packageIds: "",
|
|
25
|
+
groupIds: "",
|
|
26
|
+
processes: "",
|
|
27
|
+
events: "",
|
|
28
|
+
traceId,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function list(text) {
|
|
32
|
+
const items = text
|
|
33
|
+
.split(",")
|
|
34
|
+
.map((item) => item.trim())
|
|
35
|
+
.filter(Boolean);
|
|
36
|
+
return items.length ? items : undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The `readLogs` input for a set of filters (without paging).
|
|
40
|
+
*
|
|
41
|
+
* @param filters - The section's filters.
|
|
42
|
+
*/
|
|
43
|
+
function toReadLogsInput(filters) {
|
|
44
|
+
const input = {};
|
|
45
|
+
if (filters.levels.length)
|
|
46
|
+
input.levels = [...filters.levels];
|
|
47
|
+
const search = filters.search.trim();
|
|
48
|
+
if (search)
|
|
49
|
+
input.search = search;
|
|
50
|
+
const sources = list(filters.sources);
|
|
51
|
+
if (sources)
|
|
52
|
+
input.sources = sources;
|
|
53
|
+
const packageIds = list(filters.packageIds);
|
|
54
|
+
if (packageIds)
|
|
55
|
+
input.packageIds = packageIds;
|
|
56
|
+
const groupIds = list(filters.groupIds);
|
|
57
|
+
if (groupIds)
|
|
58
|
+
input.groupIds = groupIds;
|
|
59
|
+
const processes = list(filters.processes);
|
|
60
|
+
if (processes)
|
|
61
|
+
input.processes = processes;
|
|
62
|
+
const events = list(filters.events);
|
|
63
|
+
if (events)
|
|
64
|
+
input.events = events;
|
|
65
|
+
const traceId = filters.traceId.trim();
|
|
66
|
+
if (traceId)
|
|
67
|
+
input.traceId = traceId;
|
|
68
|
+
return input;
|
|
69
|
+
}
|
|
70
|
+
/** How many filters besides level and search are set, for the filters button's count. */
|
|
71
|
+
function countFieldFilters(filters) {
|
|
72
|
+
return [
|
|
73
|
+
filters.sources,
|
|
74
|
+
filters.packageIds,
|
|
75
|
+
filters.groupIds,
|
|
76
|
+
filters.processes,
|
|
77
|
+
filters.events,
|
|
78
|
+
filters.traceId,
|
|
79
|
+
].filter((value) => value.trim()).length;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Add a page of older lines (as `readLogs` returns them: newest first) before the loaded ones,
|
|
83
|
+
* dropping the newest past {@link MAX_LOADED_LINES}.
|
|
84
|
+
*
|
|
85
|
+
* @param loaded - The loaded lines.
|
|
86
|
+
* @param page - The older page.
|
|
87
|
+
* @param hasMore - Whether `readLogs` said still older lines match.
|
|
88
|
+
* @param max - The most to keep.
|
|
89
|
+
*/
|
|
90
|
+
function addOlder(loaded, page, hasMore, max = exports.MAX_LOADED_LINES) {
|
|
91
|
+
const known = new Set(loaded.lines.map((line) => line.logId));
|
|
92
|
+
const older = [...page].reverse().filter((line) => !known.has(line.logId));
|
|
93
|
+
const lines = [...older, ...loaded.lines];
|
|
94
|
+
if (lines.length <= max)
|
|
95
|
+
return { lines, hasOlder: hasMore, hasNewer: loaded.hasNewer };
|
|
96
|
+
return { lines: lines.slice(0, max), hasOlder: hasMore, hasNewer: true };
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Add newer lines (as `readLogs` returns them after a cursor: oldest first) after the loaded ones,
|
|
100
|
+
* dropping the oldest past {@link MAX_LOADED_LINES}.
|
|
101
|
+
*
|
|
102
|
+
* @param loaded - The loaded lines.
|
|
103
|
+
* @param page - The newer lines.
|
|
104
|
+
* @param max - The most to keep.
|
|
105
|
+
*/
|
|
106
|
+
function addNewer(loaded, page, max = exports.MAX_LOADED_LINES) {
|
|
107
|
+
if (page.length === 0)
|
|
108
|
+
return loaded;
|
|
109
|
+
const known = new Set(loaded.lines.map((line) => line.logId));
|
|
110
|
+
const lines = [...loaded.lines, ...page.filter((line) => !known.has(line.logId))].sort((a, b) => a.logId - b.logId);
|
|
111
|
+
if (lines.length <= max)
|
|
112
|
+
return { ...loaded, lines };
|
|
113
|
+
return { ...loaded, lines: lines.slice(lines.length - max), hasOlder: true };
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The newest loaded line's id, the cursor to follow from.
|
|
117
|
+
*
|
|
118
|
+
* @param loaded - The loaded lines.
|
|
119
|
+
*/
|
|
120
|
+
function newestLogId(loaded) {
|
|
121
|
+
return loaded.lines.length ? loaded.lines[loaded.lines.length - 1].logId : undefined;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* An error logged with a line: `data.error`, as the logger records an `Error` argument.
|
|
125
|
+
*
|
|
126
|
+
* @param line - A log line.
|
|
127
|
+
*/
|
|
128
|
+
function lineError(line) {
|
|
129
|
+
const error = line.data?.error;
|
|
130
|
+
if (!error || typeof error !== "object")
|
|
131
|
+
return undefined;
|
|
132
|
+
const { name, message, stack } = error;
|
|
133
|
+
return {
|
|
134
|
+
name: typeof name === "string" ? name : undefined,
|
|
135
|
+
message: typeof message === "string" ? message : undefined,
|
|
136
|
+
stack: typeof stack === "string" ? stack : undefined,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ILogRecord } from "@peers-app/peers-sdk";
|
|
2
|
+
/** Props for {@link LogRow}. */
|
|
3
|
+
export interface LogRowProps {
|
|
4
|
+
line: ILogRecord;
|
|
5
|
+
/** Narrow the Logs and Calls sections to a trace. */
|
|
6
|
+
onTrace: (traceId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* One log line: time, level, process, source, package and text; opened, its event, group, trace
|
|
10
|
+
* and logged data (an error's stack set apart).
|
|
11
|
+
*/
|
|
12
|
+
export declare function LogRow(props: LogRowProps): import("react/jsx-runtime").JSX.Element;
|