Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

LogViewer doesn't handle ANSI "CSI Ps K" (Erase in Line) control character

Đang mở
#101 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start at the LogViewer entry point and trace how ANSI control characters are parsed, focusing on CSI Ps K (Erase in Line). Use the JavaScript reproduction in the issue as the first check; done means the secret message is rendered without the duplicated shell prompt or unintended hidden text.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When you debug a node ( Compute -> Nodes -> SomeNode -> Terminal, or via CLI oc debug node/[nodeName] ) and you open a separate console window where you open up the spawned debug pods logs, the shell prompt (e.g sh-5.1#) is shown twice at the start of the logs.

This is not shown when oc logs is used because ANSI control characters are used to hide the first sh-5.1.

reproducing example:

import { LogViewer } from '@patternfly/react-log-viewer';

// shows "secret message"
export default () => (
  [LogViewer data="\x1b[0msecret message\r\x1b[K" /]
);

vs.

h1. shows nothing
echo -e "\x1b[0msecret message\r\x1b[K"

xref https://redhat.atlassian.net/browse/OCPBUGS-54247


Jira Issue: PF-3123

Ngôn ngữ chính
TypeScript
Star
34
Fork
19
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của patternfly/react-log-viewer

Tất cả issue của patternfly/react-log-viewer

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.