Skip to content

Commit 5c3e9f4

Browse files
authored
Merge pull request #1674 from jumpserver/pr@dev@feat_add_video_worker
feat(replay): search OCR index and mark timeline events
2 parents 2e0a5b9 + 9dc9de7 commit 5c3e9f4

27 files changed

Lines changed: 1442 additions & 69 deletions

‎i18n/locales/en.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "History commands",
1818
"Playlist": "Playlist",
1919
"SearchCommands": "Search commands...",
20+
"TextIndex": "Text index",
21+
"SearchIndex": "Search recognized text...",
22+
"OCRTextEvidence": "Screen text (OCR)",
23+
"OCREvidenceHint": "OCR observations from video frames, not verified user actions.",
24+
"IndexBaseline": "Initial screen (OCR)",
25+
"IndexNoText": "No text available",
26+
"IndexEmpty": "No indexed events",
27+
"IndexEmptyHint": "This recording contains no OCR text events.",
28+
"IndexNoMatch": "No matching events",
29+
"IndexNoMatchHint": "Try another word or phrase.",
30+
"IndexFailed": "Unable to load text index",
31+
"IndexPartUnavailable": "The recording segment for this event is not available yet.",
2032
"NoCommands": "No command records",
2133
"NoCommandsHint": "This session has no recorded commands",
2234
"CommandsFailed": "Unable to load commands",
@@ -25,6 +37,8 @@
2537
"HideRail": "Hide panel",
2638
"ShowRail": "Show panel",
2739
"Seeking": "Seeking...",
40+
"WaitingForSeekable": "Waiting for the recording to become seekable...",
41+
"SeekUnavailable": "This position is not seekable yet. Try again after the recording loads.",
2842
"Preparing": "Preparing recording",
2943
"PreparingHint": "The recording is still being processed. Please wait.",
3044
"NotFound": "Recording not found",

‎i18n/locales/es.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "Historial de comandos",
1818
"Playlist": "Lista de reproducción",
1919
"SearchCommands": "Buscar comandos...",
20+
"TextIndex": "Índice de texto",
21+
"SearchIndex": "Buscar texto reconocido...",
22+
"OCRTextEvidence": "Texto en pantalla (OCR)",
23+
"OCREvidenceHint": "Observaciones OCR de los fotogramas, no acciones verificadas del usuario.",
24+
"IndexBaseline": "Pantalla inicial (OCR)",
25+
"IndexNoText": "No hay texto disponible",
26+
"IndexEmpty": "No hay eventos indexados",
27+
"IndexEmptyHint": "Esta grabación no contiene eventos de texto OCR.",
28+
"IndexNoMatch": "No hay eventos coincidentes",
29+
"IndexNoMatchHint": "Pruebe con otra palabra o frase.",
30+
"IndexFailed": "No se pudo cargar el índice de texto",
31+
"IndexPartUnavailable": "El segmento de grabación de este evento aún no está disponible.",
2032
"NoCommands": "No hay registros de comandos",
2133
"NoCommandsHint": "Esta sesión no tiene comandos grabados",
2234
"CommandsFailed": "No se pudieron cargar los comandos",
@@ -25,6 +37,8 @@
2537
"HideRail": "Ocultar panel",
2638
"ShowRail": "Mostrar panel",
2739
"Seeking": "Buscando...",
40+
"WaitingForSeekable": "Esperando a que la grabación permita saltar...",
41+
"SeekUnavailable": "Aún no se puede saltar a esta posición. Inténtelo tras cargar la grabación.",
2842
"Preparing": "Preparando la grabación",
2943
"PreparingHint": "La grabación aún se está procesando. Espere.",
3044
"NotFound": "Grabación no encontrada",

‎i18n/locales/ja.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "コマンド履歴",
1818
"Playlist": "プレイリスト",
1919
"SearchCommands": "コマンドを検索...",
20+
"TextIndex": "文字インデックス",
21+
"SearchIndex": "認識された文字を検索...",
22+
"OCRTextEvidence": "画面の文字(OCR)",
23+
"OCREvidenceHint": "動画フレームの OCR 観測結果であり、確認済みのユーザー操作ではありません。",
24+
"IndexBaseline": "初期画面(OCR)",
25+
"IndexNoText": "文字情報がありません",
26+
"IndexEmpty": "インデックスイベントがありません",
27+
"IndexEmptyHint": "この録画には OCR 文字イベントがありません。",
28+
"IndexNoMatch": "一致するイベントがありません",
29+
"IndexNoMatchHint": "別の単語や語句を試してください。",
30+
"IndexFailed": "文字インデックスを読み込めません",
31+
"IndexPartUnavailable": "このイベントに対応する録画セグメントはまだ利用できません。",
2032
"NoCommands": "コマンド記録はありません",
2133
"NoCommandsHint": "このセッションにはコマンドが記録されていません",
2234
"CommandsFailed": "コマンドを読み込めません",
@@ -25,6 +37,8 @@
2537
"HideRail": "パネルを非表示",
2638
"ShowRail": "パネルを表示",
2739
"Seeking": "移動中...",
40+
"WaitingForSeekable": "録画をシークできる状態になるまで待機しています...",
41+
"SeekUnavailable": "この位置にはまだシークできません。録画の読み込み後に再試行してください。",
2842
"Preparing": "録画を準備中",
2943
"PreparingHint": "録画はまだ処理中です。しばらくお待ちください。",
3044
"NotFound": "録画が見つかりません",

‎i18n/locales/ko.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "명령 기록",
1818
"Playlist": "재생 목록",
1919
"SearchCommands": "명령 검색...",
20+
"TextIndex": "텍스트 색인",
21+
"SearchIndex": "인식된 텍스트 검색...",
22+
"OCRTextEvidence": "화면 텍스트 (OCR)",
23+
"OCREvidenceHint": "영상 프레임의 OCR 관찰 결과이며, 확인된 사용자 작업이 아닙니다.",
24+
"IndexBaseline": "초기 화면 (OCR)",
25+
"IndexNoText": "텍스트 없음",
26+
"IndexEmpty": "색인된 이벤트 없음",
27+
"IndexEmptyHint": "이 녹화에는 OCR 텍스트 이벤트가 없습니다.",
28+
"IndexNoMatch": "일치하는 이벤트 없음",
29+
"IndexNoMatchHint": "다른 단어나 문구를 사용해 보세요.",
30+
"IndexFailed": "텍스트 색인을 불러올 수 없습니다",
31+
"IndexPartUnavailable": "이 이벤트의 녹화 구간을 아직 사용할 수 없습니다.",
2032
"NoCommands": "명령 기록 없음",
2133
"NoCommandsHint": "이 세션에는 기록된 명령이 없습니다",
2234
"CommandsFailed": "명령을 불러올 수 없습니다",
@@ -25,6 +37,8 @@
2537
"HideRail": "패널 숨기기",
2638
"ShowRail": "패널 표시",
2739
"Seeking": "이동 중...",
40+
"WaitingForSeekable": "녹화를 탐색할 수 있을 때까지 기다리는 중...",
41+
"SeekUnavailable": "아직 이 위치로 이동할 수 없습니다. 녹화가 로드된 후 다시 시도하세요.",
2842
"Preparing": "녹화 준비 중",
2943
"PreparingHint": "녹화를 처리 중입니다. 잠시 기다려 주세요.",
3044
"NotFound": "녹화를 찾을 수 없음",

‎i18n/locales/pt_br.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "Histórico de comandos",
1818
"Playlist": "Lista de reprodução",
1919
"SearchCommands": "Pesquisar comandos...",
20+
"TextIndex": "Índice de texto",
21+
"SearchIndex": "Pesquisar texto reconhecido...",
22+
"OCRTextEvidence": "Texto da tela (OCR)",
23+
"OCREvidenceHint": "Observações de OCR dos quadros do vídeo, não ações verificadas do usuário.",
24+
"IndexBaseline": "Tela inicial (OCR)",
25+
"IndexNoText": "Nenhum texto disponível",
26+
"IndexEmpty": "Nenhum evento indexado",
27+
"IndexEmptyHint": "Esta gravação não contém eventos de texto OCR.",
28+
"IndexNoMatch": "Nenhum evento correspondente",
29+
"IndexNoMatchHint": "Tente outra palavra ou expressão.",
30+
"IndexFailed": "Não foi possível carregar o índice de texto",
31+
"IndexPartUnavailable": "O segmento da gravação deste evento ainda não está disponível.",
2032
"NoCommands": "Nenhum registro de comando",
2133
"NoCommandsHint": "Esta sessão não possui comandos gravados",
2234
"CommandsFailed": "Não foi possível carregar os comandos",
@@ -25,6 +37,8 @@
2537
"HideRail": "Ocultar painel",
2638
"ShowRail": "Mostrar painel",
2739
"Seeking": "Buscando...",
40+
"WaitingForSeekable": "Aguardando a gravação ficar disponível para busca...",
41+
"SeekUnavailable": "Ainda não é possível acessar essa posição. Tente novamente após o carregamento.",
2842
"Preparing": "Preparando a gravação",
2943
"PreparingHint": "A gravação ainda está sendo processada. Aguarde.",
3044
"NotFound": "Gravação não encontrada",

‎i18n/locales/ru.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "История команд",
1818
"Playlist": "Список воспроизведения",
1919
"SearchCommands": "Поиск команд...",
20+
"TextIndex": "Текстовый индекс",
21+
"SearchIndex": "Поиск распознанного текста...",
22+
"OCRTextEvidence": "Текст на экране (OCR)",
23+
"OCREvidenceHint": "Результаты OCR кадров видео, а не подтверждённые действия пользователя.",
24+
"IndexBaseline": "Начальный экран (OCR)",
25+
"IndexNoText": "Текст недоступен",
26+
"IndexEmpty": "Нет индексированных событий",
27+
"IndexEmptyHint": "В этой записи нет текстовых событий OCR.",
28+
"IndexNoMatch": "Совпадений не найдено",
29+
"IndexNoMatchHint": "Попробуйте другое слово или фразу.",
30+
"IndexFailed": "Не удалось загрузить текстовый индекс",
31+
"IndexPartUnavailable": "Фрагмент записи для этого события пока недоступен.",
2032
"NoCommands": "Нет записанных команд",
2133
"NoCommandsHint": "Для этого сеанса команды не записывались",
2234
"CommandsFailed": "Не удалось загрузить команды",
@@ -25,6 +37,8 @@
2537
"HideRail": "Скрыть панель",
2638
"ShowRail": "Показать панель",
2739
"Seeking": "Переход...",
40+
"WaitingForSeekable": "Ожидание готовности записи к перемотке...",
41+
"SeekUnavailable": "Переход к этой позиции пока недоступен. Повторите после загрузки записи.",
2842
"Preparing": "Подготовка записи",
2943
"PreparingHint": "Запись еще обрабатывается. Подождите.",
3044
"NotFound": "Запись не найдена",

‎i18n/locales/vi.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "Lịch sử lệnh",
1818
"Playlist": "Danh sách phát",
1919
"SearchCommands": "Tìm kiếm lệnh...",
20+
"TextIndex": "Chỉ mục văn bản",
21+
"SearchIndex": "Tìm văn bản đã nhận dạng...",
22+
"OCRTextEvidence": "Văn bản trên màn hình (OCR)",
23+
"OCREvidenceHint": "Kết quả OCR từ khung hình, không phải hành động người dùng đã được xác minh.",
24+
"IndexBaseline": "Màn hình ban đầu (OCR)",
25+
"IndexNoText": "Không có văn bản",
26+
"IndexEmpty": "Không có sự kiện được lập chỉ mục",
27+
"IndexEmptyHint": "Bản ghi này không có sự kiện văn bản OCR.",
28+
"IndexNoMatch": "Không có sự kiện phù hợp",
29+
"IndexNoMatchHint": "Hãy thử từ hoặc cụm từ khác.",
30+
"IndexFailed": "Không thể tải chỉ mục văn bản",
31+
"IndexPartUnavailable": "Đoạn ghi hình của sự kiện này chưa khả dụng.",
2032
"NoCommands": "Không có bản ghi lệnh",
2133
"NoCommandsHint": "Phiên này không có lệnh nào được ghi lại",
2234
"CommandsFailed": "Không thể tải các lệnh",
@@ -25,6 +37,8 @@
2537
"HideRail": "Ẩn bảng điều khiển",
2638
"ShowRail": "Hiện bảng điều khiển",
2739
"Seeking": "Đang tìm...",
40+
"WaitingForSeekable": "Đang chờ bản ghi có thể tua đến vị trí này...",
41+
"SeekUnavailable": "Chưa thể tua đến vị trí này. Hãy thử lại sau khi bản ghi tải xong.",
2842
"Preparing": "Đang chuẩn bị bản ghi",
2943
"PreparingHint": "Bản ghi vẫn đang được xử lý. Vui lòng chờ.",
3044
"NotFound": "Không tìm thấy bản ghi",

‎i18n/locales/zh.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "历史命令",
1818
"Playlist": "播放列表",
1919
"SearchCommands": "搜索命令...",
20+
"TextIndex": "文字索引",
21+
"SearchIndex": "搜索识别文字...",
22+
"OCRTextEvidence": "画面文字(OCR)",
23+
"OCREvidenceHint": "这是录像画面的 OCR 观察结果,并非已核实的用户操作。",
24+
"IndexBaseline": "初始画面(OCR)",
25+
"IndexNoText": "暂无文字内容",
26+
"IndexEmpty": "没有索引事件",
27+
"IndexEmptyHint": "这段录像没有产生 OCR 文字事件。",
28+
"IndexNoMatch": "没有匹配的事件",
29+
"IndexNoMatchHint": "请换一个关键词或短语。",
30+
"IndexFailed": "无法加载文字索引",
31+
"IndexPartUnavailable": "此事件对应的录像分段尚不可用。",
2032
"NoCommands": "无命令记录",
2133
"NoCommandsHint": "此会话未记录命令操作",
2234
"CommandsFailed": "无法加载命令",
@@ -25,6 +37,8 @@
2537
"HideRail": "隐藏侧栏",
2638
"ShowRail": "显示侧栏",
2739
"Seeking": "正在跳转...",
40+
"WaitingForSeekable": "正在等待录像可跳转,请稍候...",
41+
"SeekUnavailable": "录像尚无法跳转到此时间,请等待加载完成后重试。",
2842
"Preparing": "正在准备录像",
2943
"PreparingHint": "录像文件正在转换处理中,请稍候",
3044
"NotFound": "录像不存在",

‎i18n/locales/zh_hant.json‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
"HistoryCommands": "歷史命令",
1818
"Playlist": "播放列表",
1919
"SearchCommands": "搜尋命令...",
20+
"TextIndex": "文字索引",
21+
"SearchIndex": "搜尋辨識文字...",
22+
"OCRTextEvidence": "畫面文字(OCR)",
23+
"OCREvidenceHint": "這是錄影畫面的 OCR 觀察結果,並非已核實的使用者操作。",
24+
"IndexBaseline": "初始畫面(OCR)",
25+
"IndexNoText": "暫無文字內容",
26+
"IndexEmpty": "沒有索引事件",
27+
"IndexEmptyHint": "這段錄影沒有產生 OCR 文字事件。",
28+
"IndexNoMatch": "沒有符合的事件",
29+
"IndexNoMatchHint": "請換一個關鍵字或詞句。",
30+
"IndexFailed": "無法載入文字索引",
31+
"IndexPartUnavailable": "此事件對應的錄影片段尚不可用。",
2032
"NoCommands": "無命令記錄",
2133
"NoCommandsHint": "此會話未記錄命令操作",
2234
"CommandsFailed": "無法載入命令",
@@ -25,6 +37,8 @@
2537
"HideRail": "隱藏側欄",
2638
"ShowRail": "顯示側欄",
2739
"Seeking": "正在跳轉...",
40+
"WaitingForSeekable": "正在等待錄影可跳轉,請稍候...",
41+
"SeekUnavailable": "錄影尚無法跳轉到此時間,請等待載入完成後重試。",
2842
"Preparing": "正在準備錄影",
2943
"PreparingHint": "錄影檔案正在轉換處理中,請稍候",
3044
"NotFound": "錄影不存在",

‎packages/online-player/app/api/replay.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Replay, ReplayCommand, ReplayPartManifest, ReplaySession } from "#online-player/types";
1+
import type { Replay, ReplayCommand, ReplayIndex, ReplayPartManifest, ReplaySession } from "#online-player/types";
22

33
import { apiRequest } from "#imports";
44
import { isReplayApiPath, replayRequestOrgId } from "#online-player/utils/replay";
@@ -20,6 +20,14 @@ export function fetchReplay(sessionId: string) {
2020
});
2121
}
2222

23+
export function fetchReplayIndex(sessionId: string) {
24+
return apiRequest<ReplayIndex>({
25+
method: "GET",
26+
path: `/api/v1/terminal/sessions/${encodeURIComponent(sessionId)}/replay-index/`,
27+
orgId: requestOrgId()
28+
});
29+
}
30+
2331
export function fetchReplaySession(sessionId: string) {
2432
return apiRequest<ReplaySession>({
2533
method: "GET",

0 commit comments

Comments
 (0)