Repository navigation
Zeta 前端:提交页 jar 本地上传(第三种来源 + 最近上传 + 哈希预检) - #270
Merged
todosdev[bot] merged 4 commits intoNov 30, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
download_url作为file走现有livyApi.submitBatch()。Changes
web/src/lib/jar-upload.ts(新增):MAX_JAR_BYTES、fileSha256(Web Crypto SHA-256,64 位小写 hex)、putToUploadUrl(XMLHttpRequestPUT + 进度回调)。web/src/lib/api.ts:新增jarsApi(listUploads/createUpload/completeUpload/signUpload),复用apiFetch鉴权与 401 刷新。web/src/types.ts:新增JarUploadSummary/JarUploadRecord/JarUploadCreateResponse。web/src/lib/time.ts:新增formatTtl(剩余时间,en/zh 最大单位取整)。web/src/lib/translations.ts:新增 9 个livy.*key(en/zh 成对)。web/src/pages/SparkJobSubmit.tsx:来源扩为url | file | upload三态 toggle;上传态含文件选择、哈希/上传/就绪状态与最近上传列表;提交时先signUpload再submitBatch;100MB 前端拦截;并发 token 守卫覆盖「重选文件」与「点选最近记录」两条入口,防止旧异步链路覆盖新选择。jar-upload.test.ts、time.test.ts、sparkJobSubmitUpload.test.tsx(含两条并发回归用例)。Testing
cd web && pnpm test:45 文件 / 461 用例全部通过。cd web && pnpm type-check:tsc --noEmit通过。pnpm build:web:tsc -b && vite build成功。(
web/dist/为构建产物、已 gitignore,不纳入本 PR。)