Skip to content

Commit

Permalink
feat(generate_source_code_bundle): Add ui for generate source code bu…
Browse files Browse the repository at this point in the history
…ndle table display
  • Loading branch information
deo002 committed Jan 22, 2025
1 parent 433d9af commit 2d0251c
Show file tree
Hide file tree
Showing 13 changed files with 336 additions and 65 deletions.
3 changes: 3 additions & 0 deletions messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "Vollständiger Name ist nicht null oder leer!",
"Fullname shortname should not be null or empty": "Vollständiger Name und Kurzname sollten nicht null oder leer sein",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "QUELLCODEBUNDLE GENERIEREN",
"GNU arch": "GNU arch",
"General": "Allgemeines",
"General Information": "Allgemeine Informationen",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "Unbekannt",
"UPLOAD SBOM HEADER": "Bitte laden Sie das SBOM-Dokument <strong>{fileFormats</strong> hoch.",
"URL": "URL",
"USED_BY_PROJECTS": "Wird in <strong>{count}</strong> Projekten verwendet",
"Unknown": "Unbekannt",
"Unsubscribe": "Abbestellen",
"Update": "Aktualisierung",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "Es gibt Probleme mit der Software. Bitte entfernen Sie sie bald, wenn Sie sie verwenden",
"mainline_state_specific_tooltip": "Die Software wird im Allgemeinen nicht empfohlen, ist aber für spezielle Anwendungsfälle oder für diese bestimmte Version akzeptabel",
"n a modified list": "n / A. (geänderte Liste)",
"not used in any project yet": "noch in keinem Projekt verwendet",
"number of the vulnerabilities were matched by": "<strong>{count}</strong> der Schwachstellen wurden von <strong>{matchedBy}</strong>",
"number_of_attachments_not_match_condition": "Es muss genau ein Quell-Ansatz sein, aber es gibt {count} bei dieser Freigabe. Bitte kommen Sie zurück, sobald Sie das korrigiert haben.",
"other documents might use the licenses": "Hinweis: Andere Dokumente können die Lizenzen verwenden.",
Expand Down
3 changes: 3 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "Fullname not null or empty",
"Fullname shortname should not be null or empty": "Fullname, shortname should not be null or Empty",
"Further properties": "Further properties",
"GENERATE SOURCE CODE BUNDLE": "GENERATE SOURCE CODE BUNDLE",
"GNU arch": "GNU arch",
"General": "General",
"General Information": "General Information",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "Unknown",
"UPLOAD SBOM HEADER": "Please upload the <strong>{fileFormats}</strong> SBOM document.",
"URL": "URL",
"USED_BY_PROJECTS": "used in <strong>{count}</strong> projects",
"Unknown": "Unknown",
"Unsubscribe": "Unsubscribe",
"Update": "Update",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "The software has issues, please consider removing it soon, if in use",
"mainline_state_specific_tooltip": "The software is not recommended in general, but for special use case or for this particular version it is acceptable",
"n a modified list": "n.a. (modified list)",
"not used in any project yet": "not used in any project yet",
"number of the vulnerabilities were matched by": "<strong>{count}</strong> of the vulnerabilities were matched by <strong>{matchedBy}</strong>",
"number_of_attachments_not_match_condition": "There has to be exactly one source attachment, but there are {count} at this release. Please come back once you corrected that.",
"other documents might use the licenses": "Note: other documents might use the licenses.",
Expand Down
3 changes: 3 additions & 0 deletions messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "¡El nombre completo no es nulo ni está vacío!",
"Fullname shortname should not be null or empty": "Nombre completo, nombre corto no debe ser nulo o vacío",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "GENERAR PAQUETE DE CÓDIGO FUENTE",
"GNU arch": "Archivo de GNU",
"General": "General",
"General Information": "Información general",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "Desconocido",
"UPLOAD SBOM HEADER": "Cargue el documento SBOM <strong>{fileFormats}</strong>.",
"URL": "URL",
"USED_BY_PROJECTS": "utilizado en <strong>{count}</strong> proyectos",
"Unknown": "Desconocido",
"Unsubscribe": "Darse de baja",
"Update": "Actualización",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "El software tiene problemas; considere eliminarlo pronto, si está en uso.",
"mainline_state_specific_tooltip": "El software no se recomienda en general, pero para casos de uso especiales o para esta versión particular es aceptable.",
"n a modified list": "n / A. (lista modificada)",
"not used in any project yet": "Aún no se ha utilizado en ningún proyecto.",
"number of the vulnerabilities were matched by": "<strong>{contador}</strong> de las vulnerabilidades fueron igualadas por <strong>{matchedBy}</strong>",
"number_of_attachments_not_match_condition": "Tiene que haber exactamente un apego fuente, pero hay {cuenta} en esta liberación. Por favor, vuelve una vez que lo corrigiste.",
"other documents might use the licenses": "Nota: otros documentos podrían usar las licencias.",
Expand Down
3 changes: 3 additions & 0 deletions messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "Nom complet ni nul ni vide !",
"Fullname shortname should not be null or empty": "Nom complet, nom court ne doit pas être nul ou vide",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "GÉNÉRER UN GROUPE DE CODE SOURCE",
"GNU arch": "Arche GNU",
"General": "Généralités",
"General Information": "Informations générales",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "Inconnu",
"UPLOAD SBOM HEADER": "Veuillez télécharger le document SBOM <strong>{fileFormats></strong>.",
"URL": "URL",
"USED_BY_PROJECTS": "utilisé dans <strong>{count}</strong> projets",
"Unknown": "Inconnu",
"Unsubscribe": "Se désabonner",
"Update": "Mise à jour",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "Le logiciel a des problèmes, veuillez envisager de le supprimer bientôt, s'il est utilisé",
"mainline_state_specific_tooltip": "Le logiciel n'est pas recommandé en général, mais pour des cas d'utilisation particuliers ou pour cette version particulière, il est acceptable",
"n a modified list": "n / A. (liste modifiée)",
"not used in any project yet": "pas encore utilisé dans aucun projet",
"number of the vulnerabilities were matched by": "<strong>{compte}</strong> des vulnérabilités ont été jumelées par <strong>{comparé par}</strong>",
"number_of_attachments_not_match_condition": "Il doit y avoir exactement une pièce jointe source, mais il y a {count} à cette publication. Revenez une fois que vous l'avez corrigé.",
"other documents might use the licenses": "Remarque : d'autres documents pourraient utiliser les licences.",
Expand Down
3 changes: 3 additions & 0 deletions messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "フルネームが null または空ではありません!",
"Fullname shortname should not be null or empty": "フルネーム、ショートネームはnullまたは空であってはなりません",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "ソースコードバンドルの生成",
"GNU arch": "GNU アーチ",
"General": "一般的な",
"General Information": "一般情報",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "未知",
"UPLOAD SBOM HEADER": "<strong>{fileFormats}</strong> SBOM ドキュメントをアップロードしてください。",
"URL": "URL",
"USED_BY_PROJECTS": "<strong>{count}</strong> 個のプロジェクトで使用されています",
"Unknown": "未知",
"Unsubscribe": "購読を解除する",
"Update": "アップデート",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "ソフトウェアには問題があります。使用中の場合はすぐに削除することを検討してください。",
"mainline_state_specific_tooltip": "このソフトウェアは一般的に推奨されませんが、特殊な使用例またはこの特定のバージョンでは許容されます。",
"n a modified list": "いや。 (変更されたリスト)",
"not used in any project yet": "まだどのプロジェクトでも使用されていません",
"number of the vulnerabilities were matched by": "<strong>{count}</strong> of the vulnerabilities were matched by <strong>{matchedBy}</strong>",
"number_of_attachments_not_match_condition": "There has to be exactly one source attachment, but there are {count} at this release. Please come back once you corrected that.",
"other documents might use the licenses": "注意:その他の文書はライセンスを使用する場合があります。",
Expand Down
3 changes: 3 additions & 0 deletions messages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "전체 이름은 null이거나 비어 있지 않습니다!",
"Fullname shortname should not be null or empty": "전체 이름, 단축 이름은 null이거나 비어 있을 수 없습니다.",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "소스 코드 번들 생성",
"GNU arch": "GNU 아카이브",
"General": "주요사업",
"General Information": "일반 정보",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "이름 *",
"UPLOAD SBOM HEADER": "<strong>{fileFormats}</strong> SBOM 문서를 업로드하세요.",
"URL": "사이트 맵",
"USED_BY_PROJECTS": "<strong>{count}</strong>개 프로젝트에서 사용됨",
"Unknown": "이름 *",
"Unsubscribe": "구독 취소",
"Update": "(주)",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "소프트웨어에 문제가 있습니다. 사용 중인 경우 즉시 제거하는 것이 좋습니다.",
"mainline_state_specific_tooltip": "이 소프트웨어는 일반적으로 권장되지 않지만 특별한 사용 사례나 이 특정 버전의 경우 허용됩니다.",
"n a modified list": "해당 없음 (수정된 목록)",
"not used in any project yet": "아직 어떤 프로젝트에도 사용되지 않았습니다",
"number of the vulnerabilities were matched by": "<strong>이름 *</strong> 취약점의 일치 <strong>이름 *</strong>",
"number_of_attachments_not_match_condition": "정확히 하나의 소스 첨부 파일이 있지만,이 릴리스에서 {count}이 있습니다. 한 번에 다시 오십시오.",
"other documents might use the licenses": "참고 : 다른 문서는 라이센스를 사용할 수 있습니다.",
Expand Down
3 changes: 3 additions & 0 deletions messages/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "Nome completo não nulo ou vazio!",
"Fullname shortname should not be null or empty": "Nome completo, nome abreviado não deve ser nulo ou vazio",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "GERAR PACOTE DE CÓDIGO FONTE",
"GNU arch": "Arco GNU",
"General": "Geral",
"General Information": "Informações gerais",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "Desconhecido",
"UPLOAD SBOM HEADER": "Faça upload do documento SBOM <strong>{fileFormats}</strong>.",
"URL": "URL",
"USED_BY_PROJECTS": "usado em <strong>{count}</strong> projetos",
"Unknown": "Desconhecido",
"Unsubscribe": "Cancelar inscrição",
"Update": "Atualização",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "O software tem problemas, considere removê-lo logo, se estiver em uso",
"mainline_state_specific_tooltip": "O software não é recomendado em geral, mas para casos de uso especiais ou para esta versão específica é aceitável",
"n a modified list": "n / D. (lista modificada)",
"not used in any project yet": "ainda não usado em nenhum projeto",
"number of the vulnerabilities were matched by": "<strong>{count}</strong> das vulnerabilidades foram correspondidas por <strong>{matchedBy}</strong>",
"number_of_attachments_not_match_condition": "Tem que haver exatamente um anexo de origem, mas há {count} nesta versão. Por favor, volte depois de corrigir isso.",
"other documents might use the licenses": "Nota: outros documentos podem utilizar as licenças.",
Expand Down
3 changes: 3 additions & 0 deletions messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "Tên đầy đủ không rỗng hoặc trống!",
"Fullname shortname should not be null or empty": "Tên đầy đủ, tên viết tắt không được rỗng hoặc trống",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "TẠO BỘ MÃ NGUỒN",
"GNU arch": "Vòm GNU",
"General": "Tổng quan",
"General Information": "Thông tin chung",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "không xác định",
"UPLOAD SBOM HEADER": "Vui lòng tải lên tài liệu SBOM <strong>{fileFormats</strong>.",
"URL": "URL",
"USED_BY_PROJECTS": "được sử dụng trong các dự án <strong>{count</strong>",
"Unknown": "không xác định",
"Unsubscribe": "Hủy đăng ký",
"Update": "Cập nhật",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "Phần mềm có vấn đề mong bạn cân nhắc gỡ bỏ sớm nếu đang sử dụng",
"mainline_state_specific_tooltip": "Phần mềm nói chung không được khuyến nghị, nhưng đối với trường hợp sử dụng đặc biệt hoặc đối với phiên bản cụ thể này thì có thể chấp nhận được",
"n a modified list": "không (danh sách đã sửa đổi)",
"not used in any project yet": "chưa được sử dụng trong bất kỳ dự án nào",
"number of the vulnerabilities were matched by": "<strong>{count}</strong> số các lỗ hổng đã được so khớp bởi <strong>{matchedBy}</strong>",
"number_of_attachments_not_match_condition": "Phải có chính xác một tệp đính kèm nguồn nhưng có {count} ở bản phát hành này. \nVui lòng quay lại sau khi bạn sửa lỗi đó.",
"other documents might use the licenses": "Lưu ý: các tài liệu khác có thể sử dụng giấy phép.",
Expand Down
3 changes: 3 additions & 0 deletions messages/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "全名不为空!",
"Fullname shortname should not be null or empty": "全名、简称不得为空或为空",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "生成源代码包",
"GNU arch": "GNU 拱门",
"General": "一般的",
"General Information": "一般信息",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "未知",
"UPLOAD SBOM HEADER": "请上传<strong>{fileFormats}</strong> SBOM 文档。",
"URL": "网址",
"USED_BY_PROJECTS": "用于<strong>{count}</strong>个项目",
"Unknown": "未知",
"Unsubscribe": "退订",
"Update": "更新",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "该软件有问题,如果正在使用,请考虑尽快删除",
"mainline_state_specific_tooltip": "一般情况下不推荐使用该软件,但对于特殊用例或此特定版本是可以接受的",
"n a modified list": "不适用(修改后的列表)",
"not used in any project yet": "尚未在任何项目中使用",
"number of the vulnerabilities were matched by": "<strong>{count}</strong> 个漏洞与 <strong>{matchedBy}</strong> 匹配",
"number_of_attachments_not_match_condition": "必须只有一个源附件,但此版本中有 {count} 个。\n更正后请回来。",
"other documents might use the licenses": "注:其他文件可能使用许可证。",
Expand Down
3 changes: 3 additions & 0 deletions messages/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"Fullname not null or empty": "全名不為空!",
"Fullname shortname should not be null or empty": "全名、簡稱不得為空或為空",
"Further properties": "",
"GENERATE SOURCE CODE BUNDLE": "產生原始碼包",
"GNU arch": "GNU 拱門",
"General": "一般",
"General Information": "一般資訊",
Expand Down Expand Up @@ -1070,6 +1071,7 @@
"UNKNOWN": "未知",
"UPLOAD SBOM HEADER": "請上傳<strong>{fileFormats}</strong> SBOM 文件。",
"URL": "網址",
"USED_BY_PROJECTS": "用於<strong>{count}</strong>個項目",
"Unknown": "未知",
"Unsubscribe": "退訂",
"Update": "更新",
Expand Down Expand Up @@ -1199,6 +1201,7 @@
"mainline_state_phaseout_tooltip": "軟體有問題,如果正在使用,請考慮盡快刪除",
"mainline_state_specific_tooltip": "一般情況下不建議使用該軟體,但對於特殊用例或此特定版本是可以接受的",
"n a modified list": "不適用(修改後的清單)",
"not used in any project yet": "尚未在任何項目中使用",
"number of the vulnerabilities were matched by": "<strong>{計數}</strong> 与脆弱性相匹配 <strong>{匹配By}</strong>",
"number_of_attachments_not_match_condition": "必須有一個來源附件, 但此放行時有 {count} 。 校正了再回來吧",
"other documents might use the licenses": "注:其他文件可能使用许可证。",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default function LicenseClearing({
const [showCreateClearingRequestModal, setShowCreateClearingRequestModal] = useState(false)
const [showViewClearingRequestModal, setShowViewClearingRequestModal] = useState(false)

const generateSourceCodeBundle = () => {
router.push(`/projects/generateSourceCode/${projectId}`)
const generateSourceCodeBundle = (withSubProjects: boolean) => {
router.push(`/projects/generateSourceCode/${projectId}?withSubProjects=${withSubProjects ? "true" : "false"}`)
}


Expand Down Expand Up @@ -98,11 +98,13 @@ export default function LicenseClearing({
<Dropdown.Toggle variant='secondary'>{t('Generate Source Code Bundle')}</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item
onClick = {() => generateSourceCodeBundle()}
onClick = {() => generateSourceCodeBundle(false)}
>
{t('Projects only')}
</Dropdown.Item>
<Dropdown.Item>
<Dropdown.Item
onClick = {() => generateSourceCodeBundle(true)}
>
{t('Projects with sub projects')}
</Dropdown.Item>
</Dropdown.Menu>
Expand Down
Loading

0 comments on commit 2d0251c

Please sign in to comment.