@aaronbassett/midnight-local-devnet 0.2.1 → 0.3.0
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/README.md +16 -26
- package/dist/cli/commands/dashboard.js +53 -14
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/dashboard/html.d.ts +3 -0
- package/dist/cli/dashboard/html.js +1095 -0
- package/dist/cli/dashboard/html.js.map +1 -0
- package/dist/cli/dashboard/server.d.ts +17 -0
- package/dist/cli/dashboard/server.js +133 -0
- package/dist/cli/dashboard/server.js.map +1 -0
- package/dist/cli/dashboard/state-collector.d.ts +67 -0
- package/dist/cli/dashboard/state-collector.js +121 -0
- package/dist/cli/dashboard/state-collector.js.map +1 -0
- package/package.json +4 -5
- package/dist/cli/dashboard/app.d.ts +0 -9
- package/dist/cli/dashboard/app.js +0 -106
- package/dist/cli/dashboard/app.js.map +0 -1
- package/dist/cli/dashboard/components/gauge.d.ts +0 -9
- package/dist/cli/dashboard/components/gauge.js +0 -10
- package/dist/cli/dashboard/components/gauge.js.map +0 -1
- package/dist/cli/dashboard/components/panel-box.d.ts +0 -10
- package/dist/cli/dashboard/components/panel-box.js +0 -6
- package/dist/cli/dashboard/components/panel-box.js.map +0 -1
- package/dist/cli/dashboard/components/sparkline.d.ts +0 -9
- package/dist/cli/dashboard/components/sparkline.js +0 -25
- package/dist/cli/dashboard/components/sparkline.js.map +0 -1
- package/dist/cli/dashboard/components/status-badge.d.ts +0 -6
- package/dist/cli/dashboard/components/status-badge.js +0 -24
- package/dist/cli/dashboard/components/status-badge.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-breakpoint.d.ts +0 -7
- package/dist/cli/dashboard/hooks/use-breakpoint.js +0 -15
- package/dist/cli/dashboard/hooks/use-breakpoint.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-health.d.ts +0 -9
- package/dist/cli/dashboard/hooks/use-health.js +0 -35
- package/dist/cli/dashboard/hooks/use-health.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-indexer-info.d.ts +0 -5
- package/dist/cli/dashboard/hooks/use-indexer-info.js +0 -19
- package/dist/cli/dashboard/hooks/use-indexer-info.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-logs.d.ts +0 -19
- package/dist/cli/dashboard/hooks/use-logs.js +0 -55
- package/dist/cli/dashboard/hooks/use-logs.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-node-info.d.ts +0 -21
- package/dist/cli/dashboard/hooks/use-node-info.js +0 -49
- package/dist/cli/dashboard/hooks/use-node-info.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-polling.d.ts +0 -7
- package/dist/cli/dashboard/hooks/use-polling.js +0 -35
- package/dist/cli/dashboard/hooks/use-polling.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-proof-server.d.ts +0 -7
- package/dist/cli/dashboard/hooks/use-proof-server.js +0 -14
- package/dist/cli/dashboard/hooks/use-proof-server.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-services.d.ts +0 -3
- package/dist/cli/dashboard/hooks/use-services.js +0 -6
- package/dist/cli/dashboard/hooks/use-services.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-terminal-size.d.ts +0 -5
- package/dist/cli/dashboard/hooks/use-terminal-size.js +0 -22
- package/dist/cli/dashboard/hooks/use-terminal-size.js.map +0 -1
- package/dist/cli/dashboard/hooks/use-wallet-state.d.ts +0 -10
- package/dist/cli/dashboard/hooks/use-wallet-state.js +0 -63
- package/dist/cli/dashboard/hooks/use-wallet-state.js.map +0 -1
- package/dist/cli/dashboard/layouts/large.d.ts +0 -7
- package/dist/cli/dashboard/layouts/large.js +0 -13
- package/dist/cli/dashboard/layouts/large.js.map +0 -1
- package/dist/cli/dashboard/layouts/medium.d.ts +0 -7
- package/dist/cli/dashboard/layouts/medium.js +0 -11
- package/dist/cli/dashboard/layouts/medium.js.map +0 -1
- package/dist/cli/dashboard/layouts/small.d.ts +0 -7
- package/dist/cli/dashboard/layouts/small.js +0 -11
- package/dist/cli/dashboard/layouts/small.js.map +0 -1
- package/dist/cli/dashboard/panels/indexer-panel.d.ts +0 -11
- package/dist/cli/dashboard/panels/indexer-panel.js +0 -17
- package/dist/cli/dashboard/panels/indexer-panel.js.map +0 -1
- package/dist/cli/dashboard/panels/log-panel.d.ts +0 -13
- package/dist/cli/dashboard/panels/log-panel.js +0 -27
- package/dist/cli/dashboard/panels/log-panel.js.map +0 -1
- package/dist/cli/dashboard/panels/node-panel.d.ts +0 -10
- package/dist/cli/dashboard/panels/node-panel.js +0 -17
- package/dist/cli/dashboard/panels/node-panel.js.map +0 -1
- package/dist/cli/dashboard/panels/proof-panel.d.ts +0 -10
- package/dist/cli/dashboard/panels/proof-panel.js +0 -20
- package/dist/cli/dashboard/panels/proof-panel.js.map +0 -1
- package/dist/cli/dashboard/panels/response-graph.d.ts +0 -10
- package/dist/cli/dashboard/panels/response-graph.js +0 -12
- package/dist/cli/dashboard/panels/response-graph.js.map +0 -1
- package/dist/cli/dashboard/panels/wallet-panel.d.ts +0 -9
- package/dist/cli/dashboard/panels/wallet-panel.js +0 -24
- package/dist/cli/dashboard/panels/wallet-panel.js.map +0 -1
- package/dist/cli/dashboard/types.d.ts +0 -39
- package/dist/cli/dashboard/types.js +0 -2
- package/dist/cli/dashboard/types.js.map +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import { PanelBox } from '../components/panel-box.js';
|
|
4
|
-
import { StatusBadge } from '../components/status-badge.js';
|
|
5
|
-
export function IndexerPanel({ data, nodeBlock, loading, focused, compact }) {
|
|
6
|
-
if (loading && !data) {
|
|
7
|
-
return (_jsx(PanelBox, { title: "Indexer", focused: focused, children: _jsx(Text, { color: "gray", children: "Connecting..." }) }));
|
|
8
|
-
}
|
|
9
|
-
if (!data) {
|
|
10
|
-
return (_jsxs(PanelBox, { title: "Indexer", focused: focused, children: [_jsx(StatusBadge, { status: "stopped" }), _jsx(Text, { color: "gray", children: " Offline" })] }));
|
|
11
|
-
}
|
|
12
|
-
if (compact) {
|
|
13
|
-
return (_jsxs(Text, { children: [_jsx(StatusBadge, { status: data.ready ? 'running' : 'stopped' }), _jsx(Text, { children: " indexer :8088" })] }));
|
|
14
|
-
}
|
|
15
|
-
return (_jsxs(PanelBox, { title: "Indexer", focused: focused, children: [_jsxs(Text, { children: ["Status: ", _jsx(StatusBadge, { status: data.ready ? 'ok' : 'unhealthy' })] }), data.responseTime != null && (_jsxs(Text, { children: ["Response: ", _jsxs(Text, { color: "yellow", children: [data.responseTime, "ms"] })] }))] }));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=indexer-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"indexer-panel.js","sourceRoot":"","sources":["../../../../src/cli/dashboard/panels/indexer-panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAW5D,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAqB;IAC5F,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,OAAO,CACL,KAAC,QAAQ,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,YACxC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,8BAAqB,GAC9B,CACZ,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CACL,MAAC,QAAQ,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,aACxC,KAAC,WAAW,IAAC,MAAM,EAAC,SAAS,GAAG,EAChC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yBAAgB,IACzB,CACZ,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,MAAC,IAAI,eACH,KAAC,WAAW,IAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,GAAI,EAC3D,KAAC,IAAI,iCAAsB,IACtB,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,QAAQ,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,aACxC,MAAC,IAAI,2BAAS,KAAC,WAAW,IAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,GAAI,IAAO,EAC5E,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,CAC5B,MAAC,IAAI,6BAAW,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,aAAE,IAAI,CAAC,YAAY,UAAU,IAAO,CACzE,IACQ,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ParsedLogLine, LogFilter } from '../lib/log-parser.js';
|
|
3
|
-
interface LogPanelProps {
|
|
4
|
-
lines: ParsedLogLine[];
|
|
5
|
-
filter: LogFilter;
|
|
6
|
-
scrollOffset: number;
|
|
7
|
-
maxLines?: number;
|
|
8
|
-
focused?: boolean;
|
|
9
|
-
searchMode?: boolean;
|
|
10
|
-
searchText?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function LogPanel({ lines, filter, scrollOffset, maxLines, focused, searchMode, searchText, }: LogPanelProps): React.ReactElement;
|
|
13
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { PanelBox } from '../components/panel-box.js';
|
|
4
|
-
const SERVICE_COLORS = {
|
|
5
|
-
node: 'green',
|
|
6
|
-
indexer: 'blue',
|
|
7
|
-
'proof-server': 'yellow',
|
|
8
|
-
unknown: 'gray',
|
|
9
|
-
};
|
|
10
|
-
const LEVEL_COLORS = {
|
|
11
|
-
error: 'red',
|
|
12
|
-
warn: 'yellow',
|
|
13
|
-
info: 'white',
|
|
14
|
-
debug: 'gray',
|
|
15
|
-
};
|
|
16
|
-
export function LogPanel({ lines, filter, scrollOffset, maxLines = 10, focused, searchMode, searchText, }) {
|
|
17
|
-
const visibleLines = lines.slice(scrollOffset, scrollOffset + maxLines);
|
|
18
|
-
const filterLabel = [
|
|
19
|
-
filter.service ? `svc:${filter.service}` : null,
|
|
20
|
-
filter.level ? `lvl:${filter.level}` : null,
|
|
21
|
-
filter.search ? `/${filter.search}` : null,
|
|
22
|
-
]
|
|
23
|
-
.filter(Boolean)
|
|
24
|
-
.join(' ') || 'all';
|
|
25
|
-
return (_jsxs(PanelBox, { title: `Logs (${filterLabel})`, focused: focused, children: [visibleLines.length === 0 ? (_jsxs(Text, { color: "gray", children: ["No log entries", filter.service || filter.level || filter.search ? ' matching filter' : ''] })) : (visibleLines.map((line, i) => (_jsxs(Box, { children: [_jsxs(Text, { color: SERVICE_COLORS[line.service] ?? 'gray', children: ["[", line.service.padEnd(6).slice(0, 6), "]"] }), _jsx(Text, { children: " " }), _jsx(Text, { color: LEVEL_COLORS[line.level] ?? 'white', children: line.message.slice(0, 200) })] }, `${scrollOffset + i}-${line.service}`)))), searchMode && (_jsx(Box, { children: _jsxs(Text, { color: "cyan", children: ["Search: ", searchText ?? '', "_"] }) })), _jsx(Box, { children: _jsxs(Text, { color: "gray", children: [lines.length, " lines | s=service l=level /=search | ", '\u2191\u2193', " scroll"] }) })] }));
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=log-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-panel.js","sourceRoot":"","sources":["../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B,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,IAAQ,CACpH,CAAC,CAAC,CAAC,CACF,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC5B,MAAC,GAAG,eACF,MAAC,IAAI,IAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,kBAC/C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,SAC/B,EACP,KAAC,IAAI,oBAAS,EACd,KAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,YAC7C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GACtB,KAPC,GAAG,YAAY,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAQzC,CACP,CAAC,CACH,EACA,UAAU,IAAI,CACb,KAAC,GAAG,cACF,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yBAAU,UAAU,IAAI,EAAE,SAAS,GACjD,CACP,EACD,KAAC,GAAG,cACF,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,aACf,KAAK,CAAC,MAAM,4CAAwC,cAAc,eAC9D,GACH,IACG,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { NodeInfo } from '../hooks/use-node-info.js';
|
|
3
|
-
interface NodePanelProps {
|
|
4
|
-
data: NodeInfo | null;
|
|
5
|
-
loading: boolean;
|
|
6
|
-
focused?: boolean;
|
|
7
|
-
compact?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function NodePanel({ data, loading, focused, compact }: NodePanelProps): React.ReactElement;
|
|
10
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import { PanelBox } from '../components/panel-box.js';
|
|
4
|
-
import { StatusBadge } from '../components/status-badge.js';
|
|
5
|
-
export function NodePanel({ data, loading, focused, compact }) {
|
|
6
|
-
if (loading && !data) {
|
|
7
|
-
return (_jsx(PanelBox, { title: "Node", focused: focused, children: _jsx(Text, { color: "gray", children: "Connecting..." }) }));
|
|
8
|
-
}
|
|
9
|
-
if (!data || data.bestBlock === null) {
|
|
10
|
-
return (_jsxs(PanelBox, { title: "Node", focused: focused, children: [_jsx(StatusBadge, { status: "stopped" }), _jsx(Text, { color: "gray", children: " Offline" })] }));
|
|
11
|
-
}
|
|
12
|
-
if (compact) {
|
|
13
|
-
return (_jsxs(Text, { children: [_jsx(StatusBadge, { status: data.health ? 'running' : 'stopped' }), _jsx(Text, { children: " node :9944 " }), _jsxs(Text, { color: "cyan", children: ["\u25B2 #", data.bestBlock] })] }));
|
|
14
|
-
}
|
|
15
|
-
return (_jsxs(PanelBox, { title: "Node", focused: focused, children: [_jsxs(Text, { children: ["Block: ", _jsxs(Text, { color: "cyan", children: ["#", data.bestBlock] })] }), data.avgBlockTime != null && (_jsxs(Text, { children: ["Avg time: ", _jsxs(Text, { color: "yellow", children: [data.avgBlockTime.toFixed(1), "s"] })] })), _jsxs(Text, { children: ["Chain: ", data.chainName ?? 'unknown'] }), _jsxs(Text, { children: ["Peers: ", data.health?.peers ?? 'N/A'] }), _jsxs(Text, { children: ["Sync: ", data.health?.isSyncing ? 'syncing' : 'idle'] }), _jsxs(Text, { children: ["Version: ", data.version ?? 'unknown'] })] }));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=node-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-panel.js","sourceRoot":"","sources":["../../../../src/cli/dashboard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9D,IAAI,CAAC,YAAY,IAAI,IAAI,IAAI,CAC5B,MAAC,IAAI,6BAAW,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,aAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAO,CACnF,EACD,MAAC,IAAI,0BAAS,IAAI,CAAC,SAAS,IAAI,SAAS,IAAQ,EACjD,MAAC,IAAI,0BAAS,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,KAAK,IAAQ,EACjD,MAAC,IAAI,yBAAQ,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAQ,EAChE,MAAC,IAAI,4BAAW,IAAI,CAAC,OAAO,IAAI,SAAS,IAAQ,IACxC,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ProofServerInfo } from '../hooks/use-proof-server.js';
|
|
3
|
-
interface ProofPanelProps {
|
|
4
|
-
data: ProofServerInfo | null;
|
|
5
|
-
loading: boolean;
|
|
6
|
-
focused?: boolean;
|
|
7
|
-
compact?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function ProofPanel({ data, loading, focused, compact }: ProofPanelProps): React.ReactElement;
|
|
10
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import { PanelBox } from '../components/panel-box.js';
|
|
4
|
-
import { StatusBadge } from '../components/status-badge.js';
|
|
5
|
-
import { Gauge } from '../components/gauge.js';
|
|
6
|
-
export function ProofPanel({ data, loading, focused, compact }) {
|
|
7
|
-
if (loading && !data) {
|
|
8
|
-
return (_jsx(PanelBox, { title: "Proof Server", focused: focused, children: _jsx(Text, { color: "gray", children: "Connecting..." }) }));
|
|
9
|
-
}
|
|
10
|
-
if (!data) {
|
|
11
|
-
return (_jsxs(PanelBox, { title: "Proof Server", focused: focused, children: [_jsx(StatusBadge, { status: "stopped" }), _jsx(Text, { color: "gray", children: " Offline" })] }));
|
|
12
|
-
}
|
|
13
|
-
if (compact) {
|
|
14
|
-
const processing = data.ready?.jobsProcessing ?? 0;
|
|
15
|
-
const capacity = data.ready?.jobCapacity ?? 0;
|
|
16
|
-
return (_jsxs(Text, { children: [_jsx(StatusBadge, { status: data.ready ? (data.ready.status === 'ok' ? 'running' : 'busy') : 'stopped' }), _jsx(Text, { children: " proof :6300 " }), _jsxs(Text, { color: "cyan", children: ["\u25B2 ", processing, "/", capacity] })] }));
|
|
17
|
-
}
|
|
18
|
-
return (_jsxs(PanelBox, { title: "Proof Server", focused: focused, children: [_jsxs(Text, { children: ["Version: ", data.version ?? 'unknown'] }), _jsxs(Text, { children: ["Proofs: ", data.proofVersions?.join(', ') ?? 'unknown'] }), data.ready && (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["Status: ", _jsx(StatusBadge, { status: data.ready.status === 'ok' ? 'ok' : 'busy' })] }), _jsxs(Text, { children: ["Jobs: ", _jsx(Gauge, { value: data.ready.jobsProcessing, max: data.ready.jobCapacity, width: 8 })] }), _jsxs(Text, { children: ["Pending: ", data.ready.jobsPending] })] }))] }));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=proof-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proof-panel.js","sourceRoot":"","sources":["../../../../src/cli/dashboard/panels/proof-panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAU/C,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EA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AAC,IAAI,CAAC,IAAI,SAAS,IAAQ,EACjE,IAAI,CAAC,KAAK,IAAI,CACb,8BACE,MAAC,IAAI,2BAAS,KAAC,WAAW,IAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAI,IAAO,EACxF,MAAC,IAAI,yBAAO,KAAC,KAAK,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,GAAI,IAAO,EACrG,MAAC,IAAI,4BAAW,IAAI,CAAC,KAAK,CAAC,WAAW,IAAQ,IAC7C,CACJ,IACQ,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ResponseGraphProps {
|
|
3
|
-
nodeHistory: number[];
|
|
4
|
-
indexerHistory: number[];
|
|
5
|
-
proofServerHistory: number[];
|
|
6
|
-
focused?: boolean;
|
|
7
|
-
width?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function ResponseGraph({ nodeHistory, indexerHistory, proofServerHistory, focused, width, }: ResponseGraphProps): React.ReactElement;
|
|
10
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { PanelBox } from '../components/panel-box.js';
|
|
4
|
-
import { Sparkline } from '../components/sparkline.js';
|
|
5
|
-
export function ResponseGraph({ nodeHistory, indexerHistory, proofServerHistory, focused, width, }) {
|
|
6
|
-
const sparkWidth = width ? Math.max(5, width - 20) : 20;
|
|
7
|
-
const lastNode = nodeHistory[nodeHistory.length - 1];
|
|
8
|
-
const lastIndexer = indexerHistory[indexerHistory.length - 1];
|
|
9
|
-
const lastProof = proofServerHistory[proofServerHistory.length - 1];
|
|
10
|
-
return (_jsxs(PanelBox, { title: "Response Times", focused: focused, children: [_jsxs(Box, { children: [_jsx(Text, { children: "node " }), _jsx(Sparkline, { data: nodeHistory, maxWidth: sparkWidth, color: "green" }), _jsxs(Text, { children: [" ", lastNode != null ? `${lastNode}ms` : 'N/A'] })] }), _jsxs(Box, { children: [_jsx(Text, { children: "idx " }), _jsx(Sparkline, { data: indexerHistory, maxWidth: sparkWidth, color: "blue" }), _jsxs(Text, { children: [" ", lastIndexer != null ? `${lastIndexer}ms` : 'N/A'] })] }), _jsxs(Box, { children: [_jsx(Text, { children: "proof " }), _jsx(Sparkline, { data: proofServerHistory, maxWidth: sparkWidth, color: "yellow" }), _jsxs(Text, { children: [" ", lastProof != null ? `${lastProof}ms` : 'N/A'] })] })] }));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=response-graph.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response-graph.js","sourceRoot":"","sources":["../../../../src/cli/dashboard/panels/response-graph.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAUvD,MAAM,UAAU,aAAa,CAAC,EAC5B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,OAAO,EACP,KAAK,GACc;IACnB,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxD,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEpE,OAAO,CACL,MAAC,QAAQ,IAAC,KAAK,EAAC,gBAAgB,EAAC,OAAO,EAAE,OAAO,aAC/C,MAAC,GAAG,eACF,KAAC,IAAI,yBAAc,EACnB,KAAC,SAAS,IAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,OAAO,GAAG,EACpE,MAAC,IAAI,oBAAG,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,IAAQ,IACtD,EACN,MAAC,GAAG,eACF,KAAC,IAAI,yBAAc,EACnB,KAAC,SAAS,IAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,MAAM,GAAG,EACtE,MAAC,IAAI,oBAAG,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC,CAAC,KAAK,IAAQ,IAC5D,EACN,MAAC,GAAG,eACF,KAAC,IAAI,yBAAc,EACnB,KAAC,SAAS,IAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,QAAQ,GAAG,EAC5E,MAAC,IAAI,oBAAG,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC,CAAC,KAAK,IAAQ,IACxD,IACG,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { WalletState } from '../hooks/use-wallet-state.js';
|
|
3
|
-
interface WalletPanelProps {
|
|
4
|
-
wallet: WalletState;
|
|
5
|
-
focused?: boolean;
|
|
6
|
-
compact?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function WalletPanel({ wallet, focused, compact }: WalletPanelProps): React.ReactElement;
|
|
9
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { PanelBox } from '../components/panel-box.js';
|
|
4
|
-
function formatBalance(value) {
|
|
5
|
-
const whole = value / 10n ** 6n;
|
|
6
|
-
return whole.toLocaleString();
|
|
7
|
-
}
|
|
8
|
-
export function WalletPanel({ wallet, focused, compact }) {
|
|
9
|
-
if (wallet.connecting) {
|
|
10
|
-
return (_jsx(PanelBox, { title: "Wallet", focused: focused, children: _jsx(Text, { color: "yellow", children: "Connecting..." }) }));
|
|
11
|
-
}
|
|
12
|
-
if (wallet.error) {
|
|
13
|
-
return (_jsxs(PanelBox, { title: "Wallet", focused: focused, children: [_jsx(Text, { color: "red", children: "Unavailable" }), _jsx(Text, { color: "gray", children: wallet.error })] }));
|
|
14
|
-
}
|
|
15
|
-
if (!wallet.balances) {
|
|
16
|
-
return (_jsx(PanelBox, { title: "Wallet", focused: focused, children: _jsx(Text, { color: "gray", children: "No data" }) }));
|
|
17
|
-
}
|
|
18
|
-
const b = wallet.balances;
|
|
19
|
-
if (compact) {
|
|
20
|
-
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, color: "cyan", children: `Wallet (${wallet.address ?? 'master'})` }), _jsxs(Text, { children: ["NIGHT ", formatBalance(b.total)] }), _jsxs(Text, { children: ["DUST ", formatBalance(b.dust)] })] }));
|
|
21
|
-
}
|
|
22
|
-
return (_jsxs(PanelBox, { title: "Wallet", focused: focused, children: [_jsx(Text, { color: "cyan", bold: true, children: `> ${wallet.address ?? 'master'}` }), _jsxs(Text, { children: [" NIGHT ", _jsx(Text, { color: "green", children: formatBalance(b.unshielded) }), " (unshielded)"] }), _jsxs(Text, { children: [" NIGHT ", _jsx(Text, { color: "green", children: formatBalance(b.shielded) }), " (shielded)"] }), _jsxs(Text, { children: [" DUST ", _jsx(Text, { color: "yellow", children: formatBalance(b.dust) })] }), _jsxs(Text, { children: [" Total ", _jsx(Text, { bold: true, children: formatBalance(b.total) })] })] }));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=wallet-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wallet-panel.js","sourceRoot":"","sources":["../../../../src/cli/dashboard/panels/wallet-panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAStD,SAAS,aAAa,CAAC,KAAa;IAClC,MAAM,KAAK,GAAG,KAAK,GAAG,GAAG,IAAI,EAAE,CAAC;IAChC,OAAO,KAAK,CAAC,cAAc,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAoB;IACxE,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,OAAO,CACL,KAAC,QAAQ,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACvC,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,8BAAqB,GAChC,CACZ,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO,CACL,MAAC,QAAQ,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,aACvC,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,4BAAmB,EACpC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,MAAM,CAAC,KAAK,GAAQ,IAC/B,CACZ,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,CACL,KAAC,QAAQ,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACvC,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,wBA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ooks/use-indexer-info.js';
|
|
3
|
-
import type { ProofServerInfo } from './hooks/use-proof-server.js';
|
|
4
|
-
import type { WalletState } from './hooks/use-wallet-state.js';
|
|
5
|
-
import type { ParsedLogLine, LogFilter } from './lib/log-parser.js';
|
|
6
|
-
export type PanelName = 'node' | 'indexer' | 'proof' | 'wallet' | 'logs' | 'graph';
|
|
7
|
-
export interface LogsData {
|
|
8
|
-
lines: ParsedLogLine[];
|
|
9
|
-
allLines: ParsedLogLine[];
|
|
10
|
-
filter: LogFilter;
|
|
11
|
-
scrollOffset: number;
|
|
12
|
-
loading: boolean;
|
|
13
|
-
cycleService: () => void;
|
|
14
|
-
cycleLevel: () => void;
|
|
15
|
-
setSearch: (search: string) => void;
|
|
16
|
-
scrollUp: () => void;
|
|
17
|
-
scrollDown: () => void;
|
|
18
|
-
}
|
|
19
|
-
export interface HealthHistory {
|
|
20
|
-
nodeHistory: number[];
|
|
21
|
-
indexerHistory: number[];
|
|
22
|
-
proofServerHistory: number[];
|
|
23
|
-
}
|
|
24
|
-
export interface DashboardData {
|
|
25
|
-
node: NodeInfo | null;
|
|
26
|
-
nodeLoading: boolean;
|
|
27
|
-
indexer: IndexerInfo | null;
|
|
28
|
-
indexerLoading: boolean;
|
|
29
|
-
proofServer: ProofServerInfo | null;
|
|
30
|
-
proofServerLoading: boolean;
|
|
31
|
-
wallet: WalletState;
|
|
32
|
-
logs: LogsData;
|
|
33
|
-
healthHistory: HealthHistory;
|
|
34
|
-
focusedPanel: PanelName;
|
|
35
|
-
searchMode: boolean;
|
|
36
|
-
searchText: string;
|
|
37
|
-
columns: number;
|
|
38
|
-
rows: number;
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/dashboard/types.ts"],"names":[],"mappings":""}
|