kubefc 0.1.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 +320 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +95 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/App.d.ts +17 -0
- package/dist/components/App.js +346 -0
- package/dist/components/App.js.map +1 -0
- package/dist/components/LogViewer.d.ts +18 -0
- package/dist/components/LogViewer.js +335 -0
- package/dist/components/LogViewer.js.map +1 -0
- package/dist/hooks/useLogBuffer.d.ts +16 -0
- package/dist/hooks/useLogBuffer.js +27 -0
- package/dist/hooks/useLogBuffer.js.map +1 -0
- package/dist/hooks/useLogFilter.d.ts +22 -0
- package/dist/hooks/useLogFilter.js +45 -0
- package/dist/hooks/useLogFilter.js.map +1 -0
- package/dist/k8s/client.d.ts +11 -0
- package/dist/k8s/client.js +134 -0
- package/dist/k8s/client.js.map +1 -0
- package/dist/kfc-darwin-arm64 +0 -0
- package/dist/utils/cache.d.ts +2 -0
- package/dist/utils/cache.js +40 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/colorize.d.ts +1 -0
- package/dist/utils/colorize.js +165 -0
- package/dist/utils/colorize.js.map +1 -0
- package/dist/utils/logFilter.d.ts +36 -0
- package/dist/utils/logFilter.js +102 -0
- package/dist/utils/logFilter.js.map +1 -0
- package/dist/utils/logHighlight.d.ts +16 -0
- package/dist/utils/logHighlight.js +49 -0
- package/dist/utils/logHighlight.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { Box, Text, useApp, useStdout, useInput } from 'ink';
|
|
3
|
+
import Spinner from 'ink-spinner';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { followLogs } from '../k8s/client.js';
|
|
6
|
+
import { colorizeLogLine } from '../utils/colorize.js';
|
|
7
|
+
import { useLogBuffer } from '../hooks/useLogBuffer.js';
|
|
8
|
+
import { useLogFilter } from '../hooks/useLogFilter.js';
|
|
9
|
+
import { filterLines, shouldShowLine } from '../utils/logFilter.js';
|
|
10
|
+
import { highlightMatches } from '../utils/logHighlight.js';
|
|
11
|
+
export default function LogViewer({ deployment, namespace, context, tail, maxRetry, timeout, grepPattern: initialPattern, grepAfter: initialAfter = 0, grepBefore: initialBefore = 0, grepContext: initialContext = 0, grepIgnoreCase: initialIgnoreCase = false, grepInvert: initialInvert = false, onBack, }) {
|
|
12
|
+
const { exit } = useApp();
|
|
13
|
+
const { write } = useStdout();
|
|
14
|
+
// Connection state
|
|
15
|
+
const [status, setStatus] = useState('Connecting...');
|
|
16
|
+
const [connectionProgress, setConnectionProgress] = useState('');
|
|
17
|
+
const [retryCount, setRetryCount] = useState(0);
|
|
18
|
+
const [isConnected, setIsConnected] = useState(false);
|
|
19
|
+
// Use custom hooks for buffer and filter management
|
|
20
|
+
const { buffer, addLine } = useLogBuffer(10000);
|
|
21
|
+
const filter = useLogFilter(initialPattern, initialAfter, initialBefore, initialContext, initialIgnoreCase, initialInvert);
|
|
22
|
+
// Interactive state
|
|
23
|
+
const [filterMode, setFilterMode] = useState(false);
|
|
24
|
+
const [filterInput, setFilterInput] = useState('');
|
|
25
|
+
const [paused, setPaused] = useState(false);
|
|
26
|
+
// Track current filter state for the log callback (to avoid closure staleness)
|
|
27
|
+
const currentFilter = useRef(filter);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
currentFilter.current = filter;
|
|
30
|
+
// Re-filter when filter settings change
|
|
31
|
+
refilterAndDisplay();
|
|
32
|
+
}, [filter]);
|
|
33
|
+
// Initialize screen with space for status bar
|
|
34
|
+
const hasInitialized = useRef(false);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (!hasInitialized.current) {
|
|
37
|
+
write('\n\n\n');
|
|
38
|
+
hasInitialized.current = true;
|
|
39
|
+
}
|
|
40
|
+
}, []);
|
|
41
|
+
// Function to clear screen and display filtered logs
|
|
42
|
+
function refilterAndDisplay() {
|
|
43
|
+
// Clear screen
|
|
44
|
+
write('\x1Bc');
|
|
45
|
+
const { pattern, ignoreCase, invert, context, before, after } = currentFilter.current;
|
|
46
|
+
const filtered = filterLines(buffer.current, pattern, ignoreCase, invert, context, before, after);
|
|
47
|
+
if (filtered.length === 0 && pattern) {
|
|
48
|
+
write(chalk.yellow(`No matches found for pattern: ${pattern}\n\n`));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
let lastIdx = -2;
|
|
52
|
+
filtered.forEach(({ bufferedLine, isMatch, index }) => {
|
|
53
|
+
// Add separator for gaps
|
|
54
|
+
if (index - lastIdx > 1 && pattern) {
|
|
55
|
+
write(chalk.gray('--\n'));
|
|
56
|
+
}
|
|
57
|
+
// Highlight matches in the line
|
|
58
|
+
const highlightedLine = pattern && isMatch
|
|
59
|
+
? highlightMatches(bufferedLine.line, pattern, ignoreCase)
|
|
60
|
+
: bufferedLine.line;
|
|
61
|
+
// Re-colorize the highlighted line
|
|
62
|
+
const coloredLine = colorizeLogLine(highlightedLine);
|
|
63
|
+
const prefix = isMatch && pattern ? chalk.red('> ') : ' ';
|
|
64
|
+
write(`${prefix}${bufferedLine.podPrefix} ${coloredLine}\n`);
|
|
65
|
+
lastIdx = index;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Track if help is showing
|
|
70
|
+
const [isShowingHelp, setIsShowingHelp] = useState(false);
|
|
71
|
+
const isShowingHelpRef = useRef(false);
|
|
72
|
+
// Sync state to ref for callback access
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
isShowingHelpRef.current = isShowingHelp;
|
|
75
|
+
if (isShowingHelp) {
|
|
76
|
+
write('\x1Bc');
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// Restore logs when closing help
|
|
80
|
+
if (isConnected) {
|
|
81
|
+
refilterAndDisplay();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, [isShowingHelp, isConnected]);
|
|
85
|
+
// Handle keyboard input
|
|
86
|
+
useInput((input, key) => {
|
|
87
|
+
if (isShowingHelp) {
|
|
88
|
+
// Any key exits help
|
|
89
|
+
setIsShowingHelp(false);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (!isConnected) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (filterMode) {
|
|
96
|
+
// In filter mode, handle text input
|
|
97
|
+
if (key.return) {
|
|
98
|
+
// Apply filter
|
|
99
|
+
filter.setPattern(filterInput);
|
|
100
|
+
setFilterMode(false);
|
|
101
|
+
}
|
|
102
|
+
else if (key.escape) {
|
|
103
|
+
// Cancel filter
|
|
104
|
+
setFilterMode(false);
|
|
105
|
+
setFilterInput('');
|
|
106
|
+
}
|
|
107
|
+
else if (key.backspace || key.delete) {
|
|
108
|
+
if (key.meta) {
|
|
109
|
+
// Option+Delete: Remove last word
|
|
110
|
+
setFilterInput(prev => {
|
|
111
|
+
const words = prev.trimEnd().split(' ');
|
|
112
|
+
words.pop();
|
|
113
|
+
return words.join(' ') + (words.length > 0 ? ' ' : '');
|
|
114
|
+
});
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (key.ctrl) {
|
|
118
|
+
// Ctrl+Backspace
|
|
119
|
+
setFilterInput('');
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
setFilterInput(prev => prev.slice(0, -1));
|
|
123
|
+
}
|
|
124
|
+
else if (key.ctrl && input === 'u') {
|
|
125
|
+
// Ctrl+U (Cmd+Delete often sends this)
|
|
126
|
+
setFilterInput('');
|
|
127
|
+
}
|
|
128
|
+
else if (!key.ctrl && !key.meta && input) {
|
|
129
|
+
setFilterInput(prev => prev + input);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// Normal mode - keyboard shortcuts
|
|
134
|
+
if (input === '/') {
|
|
135
|
+
// Enter filter mode
|
|
136
|
+
setFilterMode(true);
|
|
137
|
+
setFilterInput(filter.pattern);
|
|
138
|
+
}
|
|
139
|
+
else if (input === 'c') {
|
|
140
|
+
// Clear filter
|
|
141
|
+
filter.clearFilter();
|
|
142
|
+
}
|
|
143
|
+
else if (input === 'i') {
|
|
144
|
+
// Toggle ignore case
|
|
145
|
+
filter.toggleIgnoreCase();
|
|
146
|
+
}
|
|
147
|
+
else if (input === 'v') {
|
|
148
|
+
// Toggle invert
|
|
149
|
+
filter.toggleInvert();
|
|
150
|
+
}
|
|
151
|
+
else if (input === 'p') {
|
|
152
|
+
// Toggle pause
|
|
153
|
+
setPaused(prev => !prev);
|
|
154
|
+
}
|
|
155
|
+
else if (input === '+') {
|
|
156
|
+
// Increase context
|
|
157
|
+
filter.increaseContext();
|
|
158
|
+
}
|
|
159
|
+
else if (input === '-') {
|
|
160
|
+
// Decrease context
|
|
161
|
+
filter.decreaseContext();
|
|
162
|
+
}
|
|
163
|
+
else if (input === '?') {
|
|
164
|
+
setIsShowingHelp(true);
|
|
165
|
+
}
|
|
166
|
+
else if (key.escape && onBack) {
|
|
167
|
+
onBack();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}, { isActive: true });
|
|
171
|
+
// Connection state check for non-exit keys
|
|
172
|
+
useEffect(() => {
|
|
173
|
+
if (!isConnected && filterMode) {
|
|
174
|
+
setFilterMode(false);
|
|
175
|
+
}
|
|
176
|
+
}, [isConnected]);
|
|
177
|
+
// Main log streaming effect
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
let cancelled = false;
|
|
180
|
+
async function startFollowing() {
|
|
181
|
+
try {
|
|
182
|
+
setStatus(`Connecting to ${deployment}...`);
|
|
183
|
+
setConnectionProgress('Initializing...');
|
|
184
|
+
setIsConnected(false);
|
|
185
|
+
await followLogs(deployment, namespace, context, tail, (logLine) => {
|
|
186
|
+
if (!cancelled && !paused) {
|
|
187
|
+
// Mark as connected on first log
|
|
188
|
+
if (!isConnected) {
|
|
189
|
+
setIsConnected(true);
|
|
190
|
+
setStatus(`Following logs for ${deployment}`);
|
|
191
|
+
setConnectionProgress('');
|
|
192
|
+
}
|
|
193
|
+
const podPrefix = `[${logLine.pod}/${logLine.container}]`;
|
|
194
|
+
const coloredLine = colorizeLogLine(logLine.line);
|
|
195
|
+
const bufferedLine = {
|
|
196
|
+
podPrefix,
|
|
197
|
+
line: logLine.line,
|
|
198
|
+
coloredLine,
|
|
199
|
+
timestamp: Date.now(),
|
|
200
|
+
};
|
|
201
|
+
// Add to buffer
|
|
202
|
+
addLine(bufferedLine);
|
|
203
|
+
// Use current filter state from ref
|
|
204
|
+
const { pattern, ignoreCase, invert } = currentFilter.current;
|
|
205
|
+
// Check if should display using utils
|
|
206
|
+
// shouldShowLine is now safe against invalid regex (returns true)
|
|
207
|
+
const isMatch = shouldShowLine(logLine.line, pattern, ignoreCase, invert);
|
|
208
|
+
if ((!pattern || isMatch) && !isShowingHelpRef.current) {
|
|
209
|
+
// Highlight matches in real-time
|
|
210
|
+
const highlightedLine = pattern && isMatch
|
|
211
|
+
? highlightMatches(logLine.line, pattern, ignoreCase)
|
|
212
|
+
: logLine.line;
|
|
213
|
+
const finalColoredLine = colorizeLogLine(highlightedLine);
|
|
214
|
+
const prefix = isMatch && pattern ? chalk.red('> ') : '';
|
|
215
|
+
write(`${prefix}${podPrefix} ${finalColoredLine}\n`);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}, (error) => {
|
|
219
|
+
if (!cancelled) {
|
|
220
|
+
setIsConnected(false);
|
|
221
|
+
setConnectionProgress('');
|
|
222
|
+
if (retryCount < maxRetry) {
|
|
223
|
+
setRetryCount(prev => prev + 1);
|
|
224
|
+
const nextRetry = retryCount + 1;
|
|
225
|
+
setStatus(`Connection lost. Retrying (${nextRetry}/${maxRetry})...`);
|
|
226
|
+
setTimeout(() => startFollowing(), 2000);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
setStatus(`Failed after ${maxRetry} attempts: ${error.message}`);
|
|
230
|
+
write(chalk.red(`\n✗ Error: ${error.message}\n`));
|
|
231
|
+
setTimeout(() => exit(), 3000);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}, (progressMsg) => {
|
|
235
|
+
setConnectionProgress(progressMsg);
|
|
236
|
+
}, timeout * 1000);
|
|
237
|
+
}
|
|
238
|
+
catch (error) {
|
|
239
|
+
if (!cancelled) {
|
|
240
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
241
|
+
setStatus(`Error: ${errorMsg}`);
|
|
242
|
+
setConnectionProgress('');
|
|
243
|
+
write(chalk.red(`\n✗ ${errorMsg}\n`));
|
|
244
|
+
setTimeout(() => exit(new Error(String(error))), 3000);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
startFollowing();
|
|
249
|
+
return () => {
|
|
250
|
+
cancelled = true;
|
|
251
|
+
};
|
|
252
|
+
}, [deployment, namespace, context, tail, retryCount, paused]);
|
|
253
|
+
// Build status info
|
|
254
|
+
const contextInfo = context ? chalk.blue(`[${context}]`) : '';
|
|
255
|
+
const namespaceInfo = chalk.yellow(`[${namespace}]`);
|
|
256
|
+
const deploymentInfo = chalk.cyan(deployment);
|
|
257
|
+
const filterInfo = filter.pattern
|
|
258
|
+
? ` | ${filter.invert ? 'NOT ' : ''}/${filter.pattern}/${filter.ignoreCase ? 'i' : ''}${filter.context > 0 ? ` ±${filter.context}` : ''}`
|
|
259
|
+
: '';
|
|
260
|
+
const pauseInfo = paused ? ' [PAUSED]' : '';
|
|
261
|
+
const modeInfo = filterMode ? ' [FILTER MODE]' : '';
|
|
262
|
+
const bufferInfo = ` (${buffer.current.length})`;
|
|
263
|
+
if (isShowingHelp) {
|
|
264
|
+
return (React.createElement(Box, { flexDirection: "column", padding: 1, borderStyle: "double", borderColor: "cyan" },
|
|
265
|
+
React.createElement(Text, { bold: true, color: "cyan", underline: true }, "KFC Interactive Mode - Keyboard Shortcuts"),
|
|
266
|
+
React.createElement(Box, { marginTop: 1, flexDirection: "column" },
|
|
267
|
+
React.createElement(Text, null,
|
|
268
|
+
React.createElement(Text, { color: "yellow", bold: true }, "/"),
|
|
269
|
+
" Filter logs (type pattern, press Enter)"),
|
|
270
|
+
React.createElement(Text, null,
|
|
271
|
+
React.createElement(Text, { color: "yellow", bold: true }, "c"),
|
|
272
|
+
" Clear filter"),
|
|
273
|
+
React.createElement(Text, null,
|
|
274
|
+
React.createElement(Text, { color: "yellow", bold: true }, "i"),
|
|
275
|
+
" Toggle case-insensitive matching"),
|
|
276
|
+
React.createElement(Text, null,
|
|
277
|
+
React.createElement(Text, { color: "yellow", bold: true }, "v"),
|
|
278
|
+
" Toggle invert match"),
|
|
279
|
+
React.createElement(Text, null,
|
|
280
|
+
React.createElement(Text, { color: "yellow", bold: true }, "p"),
|
|
281
|
+
" Toggle pause/resume log streaming"),
|
|
282
|
+
React.createElement(Text, null,
|
|
283
|
+
React.createElement(Text, { color: "yellow", bold: true }, "+"),
|
|
284
|
+
" Increase context lines"),
|
|
285
|
+
React.createElement(Text, null,
|
|
286
|
+
React.createElement(Text, { color: "yellow", bold: true }, "-"),
|
|
287
|
+
" Decrease context lines"),
|
|
288
|
+
React.createElement(Text, null,
|
|
289
|
+
React.createElement(Text, { color: "yellow", bold: true }, "?"),
|
|
290
|
+
" Show this help"),
|
|
291
|
+
React.createElement(Text, null,
|
|
292
|
+
React.createElement(Text, { color: "yellow", bold: true }, "Esc"),
|
|
293
|
+
" Go back")),
|
|
294
|
+
React.createElement(Box, { marginTop: 1 },
|
|
295
|
+
React.createElement(Text, { dimColor: true }, "Press any key to return..."))));
|
|
296
|
+
}
|
|
297
|
+
return (React.createElement(Box, { flexDirection: "column" },
|
|
298
|
+
React.createElement(Box, { borderStyle: "round", borderColor: "cyan", paddingX: 1 },
|
|
299
|
+
React.createElement(Text, null,
|
|
300
|
+
React.createElement(Text, { color: isConnected ? 'green' : 'gray' }, isConnected ? '●' : '○'),
|
|
301
|
+
context && React.createElement(Text, { color: "blue" },
|
|
302
|
+
" [",
|
|
303
|
+
context,
|
|
304
|
+
"]"),
|
|
305
|
+
React.createElement(Text, { color: "yellow" },
|
|
306
|
+
" [",
|
|
307
|
+
namespace,
|
|
308
|
+
"]"),
|
|
309
|
+
React.createElement(Text, { color: "cyan" },
|
|
310
|
+
" ",
|
|
311
|
+
deployment),
|
|
312
|
+
React.createElement(Text, { color: "magenta" }, filterInfo),
|
|
313
|
+
React.createElement(Text, { color: "yellow" }, pauseInfo),
|
|
314
|
+
React.createElement(Text, { color: "yellow" }, modeInfo),
|
|
315
|
+
React.createElement(Text, { dimColor: true }, bufferInfo))),
|
|
316
|
+
filterMode && (React.createElement(Box, { borderStyle: "single", borderColor: "yellow", paddingX: 1, marginTop: 1 },
|
|
317
|
+
React.createElement(Text, { color: "yellow" },
|
|
318
|
+
"Filter: ",
|
|
319
|
+
React.createElement(Text, { color: "white" }, filterInput),
|
|
320
|
+
React.createElement(Text, { dimColor: true }, " (Enter to apply, Esc to cancel)")))),
|
|
321
|
+
!filterMode && isConnected && (React.createElement(Box, { marginTop: 1 },
|
|
322
|
+
React.createElement(Text, { dimColor: true },
|
|
323
|
+
"Press ",
|
|
324
|
+
React.createElement(Text, { color: "yellow" }, "?"),
|
|
325
|
+
" for help, ",
|
|
326
|
+
React.createElement(Text, { color: "yellow" }, "/"),
|
|
327
|
+
" to filter"))),
|
|
328
|
+
!isConnected && (React.createElement(Box, { marginTop: 1 },
|
|
329
|
+
React.createElement(Text, { color: "yellow" },
|
|
330
|
+
React.createElement(Spinner, { type: "dots" }),
|
|
331
|
+
" ",
|
|
332
|
+
connectionProgress || 'Connecting...',
|
|
333
|
+
retryCount > 0 && ` (Retry ${retryCount}/${maxRetry})`)))));
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=LogViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogViewer.js","sourceRoot":"","sources":["../../src/components/LogViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,E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E,SAAS,EAAE,CAAC;YACvE,oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ;;gBACX,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,IAAE,WAAW,CAAQ;gBAChD,oBAAC,IAAI,IAAC,QAAQ,6CAAwC,CAChD,CACF,CACN;QAGA,CAAC,UAAU,IAAI,WAAW,IAAI,CAC9B,oBAAC,GAAG,IAAC,SAAS,EAAE,CAAC;YAChB,oBAAC,IAAI,IAAC,QAAQ;;gBACP,oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,QAAS;;gBAAW,oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,QAAS;6BACrE,CACF,CACN;QAGA,CAAC,WAAW,IAAI,CAChB,oBAAC,GAAG,IAAC,SAAS,EAAE,CAAC;YAChB,oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ;gBACnB,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG;;gBAAE,kBAAkB,IAAI,eAAe;gBAC7D,UAAU,GAAG,CAAC,IAAI,WAAW,UAAU,IAAI,QAAQ,GAAG,CACjD,CACF,CACN,CACI,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for managing log buffer
|
|
3
|
+
*/
|
|
4
|
+
export interface BufferedLine {
|
|
5
|
+
podPrefix: string;
|
|
6
|
+
line: string;
|
|
7
|
+
coloredLine: string;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
}
|
|
10
|
+
export interface UseLogBufferReturn {
|
|
11
|
+
buffer: React.MutableRefObject<BufferedLine[]>;
|
|
12
|
+
addLine: (line: BufferedLine) => void;
|
|
13
|
+
clear: () => void;
|
|
14
|
+
getSize: () => number;
|
|
15
|
+
}
|
|
16
|
+
export declare function useLogBuffer(maxSize?: number): UseLogBufferReturn;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for managing log buffer
|
|
3
|
+
*/
|
|
4
|
+
import { useRef, useCallback } from 'react';
|
|
5
|
+
export function useLogBuffer(maxSize = 10000) {
|
|
6
|
+
const buffer = useRef([]);
|
|
7
|
+
const addLine = useCallback((line) => {
|
|
8
|
+
buffer.current.push(line);
|
|
9
|
+
// Trim buffer if too large
|
|
10
|
+
if (buffer.current.length > maxSize) {
|
|
11
|
+
buffer.current = buffer.current.slice(-maxSize);
|
|
12
|
+
}
|
|
13
|
+
}, [maxSize]);
|
|
14
|
+
const clear = useCallback(() => {
|
|
15
|
+
buffer.current = [];
|
|
16
|
+
}, []);
|
|
17
|
+
const getSize = useCallback(() => {
|
|
18
|
+
return buffer.current.length;
|
|
19
|
+
}, []);
|
|
20
|
+
return {
|
|
21
|
+
buffer,
|
|
22
|
+
addLine,
|
|
23
|
+
clear,
|
|
24
|
+
getSize,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=useLogBuffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLogBuffer.js","sourceRoot":"","sources":["../../src/hooks/useLogBuffer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAgB5C,MAAM,UAAU,YAAY,CAAC,UAAkB,KAAK;IACnD,MAAM,MAAM,GAAG,MAAM,CAAiB,EAAE,CAAC,CAAC;IAE1C,MAAM,OAAO,GAAG,WAAW,CAC1B,CAAC,IAAkB,EAAE,EAAE;QACtB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE1B,2BAA2B;QAC3B,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,EAAE,CAAC;YACrC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;QACjD,CAAC;IACF,CAAC,EACD,CAAC,OAAO,CAAC,CACT,CAAC;IAEF,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IAC9B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACN,MAAM;QACN,OAAO;QACP,KAAK;QACL,OAAO;KACP,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for managing log filter state
|
|
3
|
+
*/
|
|
4
|
+
export interface LogFilterState {
|
|
5
|
+
pattern: string;
|
|
6
|
+
ignoreCase: boolean;
|
|
7
|
+
invert: boolean;
|
|
8
|
+
context: number;
|
|
9
|
+
before: number;
|
|
10
|
+
after: number;
|
|
11
|
+
}
|
|
12
|
+
export interface LogFilterActions {
|
|
13
|
+
setPattern: (pattern: string) => void;
|
|
14
|
+
toggleIgnoreCase: () => void;
|
|
15
|
+
toggleInvert: () => void;
|
|
16
|
+
increaseContext: () => void;
|
|
17
|
+
decreaseContext: () => void;
|
|
18
|
+
clearFilter: () => void;
|
|
19
|
+
}
|
|
20
|
+
export interface UseLogFilterReturn extends LogFilterState, LogFilterActions {
|
|
21
|
+
}
|
|
22
|
+
export declare function useLogFilter(initialPattern?: string, initialAfter?: number, initialBefore?: number, initialContext?: number, initialIgnoreCase?: boolean, initialInvert?: boolean): UseLogFilterReturn;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for managing log filter state
|
|
3
|
+
*/
|
|
4
|
+
import { useState, useCallback } from 'react';
|
|
5
|
+
export function useLogFilter(initialPattern, initialAfter = 0, initialBefore = 0, initialContext = 0, initialIgnoreCase = false, initialInvert = false) {
|
|
6
|
+
const [pattern, setPattern] = useState(initialPattern || '');
|
|
7
|
+
const [ignoreCase, setIgnoreCase] = useState(initialIgnoreCase);
|
|
8
|
+
const [invert, setInvert] = useState(initialInvert);
|
|
9
|
+
const [context, setContext] = useState(initialContext);
|
|
10
|
+
const [before] = useState(initialBefore);
|
|
11
|
+
const [after] = useState(initialAfter);
|
|
12
|
+
const toggleIgnoreCase = useCallback(() => {
|
|
13
|
+
setIgnoreCase((prev) => !prev);
|
|
14
|
+
}, []);
|
|
15
|
+
const toggleInvert = useCallback(() => {
|
|
16
|
+
setInvert((prev) => !prev);
|
|
17
|
+
}, []);
|
|
18
|
+
const increaseContext = useCallback(() => {
|
|
19
|
+
setContext((prev) => Math.min(prev + 1, 20));
|
|
20
|
+
}, []);
|
|
21
|
+
const decreaseContext = useCallback(() => {
|
|
22
|
+
setContext((prev) => Math.max(prev - 1, 0));
|
|
23
|
+
}, []);
|
|
24
|
+
const clearFilter = useCallback(() => {
|
|
25
|
+
setPattern('');
|
|
26
|
+
setIgnoreCase(false);
|
|
27
|
+
setInvert(false);
|
|
28
|
+
setContext(0);
|
|
29
|
+
}, []);
|
|
30
|
+
return {
|
|
31
|
+
pattern,
|
|
32
|
+
ignoreCase,
|
|
33
|
+
invert,
|
|
34
|
+
context,
|
|
35
|
+
before,
|
|
36
|
+
after,
|
|
37
|
+
setPattern,
|
|
38
|
+
toggleIgnoreCase,
|
|
39
|
+
toggleInvert,
|
|
40
|
+
increaseContext,
|
|
41
|
+
decreaseContext,
|
|
42
|
+
clearFilter,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=useLogFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLogFilter.js","sourceRoot":"","sources":["../../src/hooks/useLogFilter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAsB9C,MAAM,UAAU,YAAY,CAC3B,cAAuB,EACvB,eAAuB,CAAC,EACxB,gBAAwB,CAAC,EACzB,iBA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,EAAE,CAAC,CAAC;IAEP,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,UAAU,CAAC,EAAE,CAAC,CAAC;QACf,aAAa,CAAC,KAAK,CAAC,CAAC;QACrB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,CAAC,CAAC,CAAC;IACf,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACN,OAAO;QACP,UAAU;QACV,MAAM;QACN,OAAO;QACP,MAAM;QACN,KAAK;QACL,UAAU;QACV,gBAAgB;QAChB,YAAY;QACZ,eAAe;QACf,eAAe;QACf,WAAW;KACX,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LogLine {
|
|
2
|
+
pod: string;
|
|
3
|
+
container: string;
|
|
4
|
+
line: string;
|
|
5
|
+
timestamp?: Date;
|
|
6
|
+
}
|
|
7
|
+
export declare function getContexts(): string[];
|
|
8
|
+
export declare function getCurrentContext(): string;
|
|
9
|
+
export declare function getNamespaces(context?: string, timeoutMs?: number): Promise<string[]>;
|
|
10
|
+
export declare function getDeployments(namespace: string, context?: string, timeoutMs?: number): Promise<string[]>;
|
|
11
|
+
export declare function followLogs(deployment: string, namespace: string, context: string | undefined, tailLines: number, onLog: (log: LogLine) => void, onError: (error: Error) => void, onProgress?: (message: string) => void, timeoutMs?: number): Promise<void>;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import * as k8s from '@kubernetes/client-node';
|
|
2
|
+
import { Writable } from 'stream';
|
|
3
|
+
// Helper function to add timeout to promises
|
|
4
|
+
function withTimeout(promise, timeoutMs, operation) {
|
|
5
|
+
return Promise.race([
|
|
6
|
+
promise,
|
|
7
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error(`Operation timed out after ${timeoutMs}ms: ${operation}`)), timeoutMs)),
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
export function getContexts() {
|
|
11
|
+
const kc = new k8s.KubeConfig();
|
|
12
|
+
kc.loadFromDefault();
|
|
13
|
+
return kc.contexts.map(ctx => ctx.name);
|
|
14
|
+
}
|
|
15
|
+
export function getCurrentContext() {
|
|
16
|
+
const kc = new k8s.KubeConfig();
|
|
17
|
+
kc.loadFromDefault();
|
|
18
|
+
return kc.currentContext;
|
|
19
|
+
}
|
|
20
|
+
export async function getNamespaces(context, timeoutMs = 5000) {
|
|
21
|
+
const kc = new k8s.KubeConfig();
|
|
22
|
+
kc.loadFromDefault();
|
|
23
|
+
if (context) {
|
|
24
|
+
kc.setCurrentContext(context);
|
|
25
|
+
}
|
|
26
|
+
const coreApi = kc.makeApiClient(k8s.CoreV1Api);
|
|
27
|
+
try {
|
|
28
|
+
const response = await withTimeout(coreApi.listNamespace(), timeoutMs, `listing namespaces${context ? ` (context: ${context})` : ''}`);
|
|
29
|
+
return response.items.map((item) => item.metadata?.name || '').filter(Boolean);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw new Error(`Failed to list namespaces: ${error instanceof Error ? error.message : String(error)}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export async function getDeployments(namespace, context, timeoutMs = 15000) {
|
|
36
|
+
const kc = new k8s.KubeConfig();
|
|
37
|
+
kc.loadFromDefault();
|
|
38
|
+
if (context) {
|
|
39
|
+
kc.setCurrentContext(context);
|
|
40
|
+
}
|
|
41
|
+
const appsApi = kc.makeApiClient(k8s.AppsV1Api);
|
|
42
|
+
try {
|
|
43
|
+
const response = await withTimeout(appsApi.listNamespacedDeployment({ namespace }), timeoutMs, `listing deployments in namespace "${namespace}"${context ? ` (context: ${context})` : ''}`);
|
|
44
|
+
return response.items.map((item) => item.metadata?.name || '').filter(Boolean);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
if (error instanceof Error && error.message.includes('timed out')) {
|
|
48
|
+
throw new Error(`Connection timeout: Unable to connect to cluster${context ? ` "${context}"` : ''}. Please check your network connection and cluster availability.`);
|
|
49
|
+
}
|
|
50
|
+
throw new Error(`Failed to list deployments: ${error instanceof Error ? error.message : String(error)}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export async function followLogs(deployment, namespace, context, tailLines, onLog, onError, onProgress, timeoutMs = 10000) {
|
|
54
|
+
const kc = new k8s.KubeConfig();
|
|
55
|
+
kc.loadFromDefault();
|
|
56
|
+
if (context) {
|
|
57
|
+
kc.setCurrentContext(context);
|
|
58
|
+
}
|
|
59
|
+
const coreApi = kc.makeApiClient(k8s.CoreV1Api);
|
|
60
|
+
const appsApi = kc.makeApiClient(k8s.AppsV1Api);
|
|
61
|
+
try {
|
|
62
|
+
// Get deployment
|
|
63
|
+
onProgress?.('Fetching deployment info...');
|
|
64
|
+
let deploymentResponse;
|
|
65
|
+
try {
|
|
66
|
+
deploymentResponse = await withTimeout(appsApi.readNamespacedDeployment({ name: deployment, namespace }), timeoutMs, `reading deployment "${deployment}"`);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
if (error instanceof Error && error.message.includes('timed out')) {
|
|
70
|
+
throw new Error(`Connection timeout: Unable to connect to cluster${context ? ` "${context}"` : ''}. Please check your network connection and cluster availability.`);
|
|
71
|
+
}
|
|
72
|
+
if (error.response?.statusCode === 404) {
|
|
73
|
+
throw new Error(`Deployment "${deployment}" not found in namespace "${namespace}". Use 'kubectl get deployments -n ${namespace}' to list available deployments.`);
|
|
74
|
+
}
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
const selector = deploymentResponse.spec?.selector?.matchLabels;
|
|
78
|
+
if (!selector) {
|
|
79
|
+
throw new Error('Deployment has no selector labels');
|
|
80
|
+
}
|
|
81
|
+
// Convert selector to label selector string
|
|
82
|
+
const labelSelector = Object.entries(selector)
|
|
83
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
84
|
+
.join(',');
|
|
85
|
+
// Get pods
|
|
86
|
+
onProgress?.('Finding pods...');
|
|
87
|
+
const podsResponse = await withTimeout(coreApi.listNamespacedPod({
|
|
88
|
+
namespace,
|
|
89
|
+
labelSelector,
|
|
90
|
+
}), timeoutMs, `listing pods for deployment "${deployment}"`);
|
|
91
|
+
if (podsResponse.items.length === 0) {
|
|
92
|
+
throw new Error(`No pods found for deployment "${deployment}". The deployment may have 0 replicas.`);
|
|
93
|
+
}
|
|
94
|
+
// Follow logs from the first running pod
|
|
95
|
+
const pod = podsResponse.items.find((p) => p.status?.phase === 'Running');
|
|
96
|
+
if (!pod || !pod.metadata?.name) {
|
|
97
|
+
throw new Error('No running pods found');
|
|
98
|
+
}
|
|
99
|
+
const podName = pod.metadata.name;
|
|
100
|
+
const containerName = pod.spec?.containers[0]?.name || '';
|
|
101
|
+
// Create log stream
|
|
102
|
+
onProgress?.(`Connecting to pod ${podName}...`);
|
|
103
|
+
const logStream = new k8s.Log(kc);
|
|
104
|
+
const stream = new Writable({
|
|
105
|
+
write(chunk, encoding, callback) {
|
|
106
|
+
const lines = chunk.toString().split('\n').filter(Boolean);
|
|
107
|
+
lines.forEach((line) => {
|
|
108
|
+
onLog({
|
|
109
|
+
pod: podName,
|
|
110
|
+
container: containerName,
|
|
111
|
+
line,
|
|
112
|
+
timestamp: new Date(),
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
callback();
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
try {
|
|
119
|
+
await logStream.log(namespace, podName, containerName, stream, {
|
|
120
|
+
follow: true,
|
|
121
|
+
tailLines,
|
|
122
|
+
pretty: false,
|
|
123
|
+
timestamps: false,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
onError(error instanceof Error ? error : new Error(String(error)));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
onError(error instanceof Error ? error : new Error(String(error)));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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