diff --git a/messages/en.json b/messages/en.json index 56a47473..8532652c 100644 --- a/messages/en.json +++ b/messages/en.json @@ -14,16 +14,26 @@ "Add Vendor": "Add Vendor", "Additional Data": "Additional Data", "Additional Roles": "Additional Roles", + "Additional Request Information": "Additional Request Information", "Advanced Search": "Advanced Search", + "AL": "AL", "APPROVED": "Approved", "Approved Releases": "Approved Releases", "Attachments": "Attachments", "Attributes change": "Attributes change", + "Assessor Contact Person": "Assessor Contact Person", + "Assessor Department": "Assessor Department", + "Assessment Date": "Assessment Date", "Authentication failed Please try again": "Authentication failed. Please try again.", "Basic Info": "Basic Info", + "basic_fossology_process": "If the source of a release is attached to it, a basic FOSSology process can be invoked by just opening this dialog. It consists of", "Between": "Between", + "Binary Download URL": "Binary Download URL", + "Binaries Original from Community": "Binaries Original from Community", + "Binaries Self-Made": "Binaries Self-Made", "Blog": "Blog", "Blog URL": "Blog URL", + "Cancel": "Cancel", "Categories": "Categories", "Change Log Id": "Change Log Id", "Change Log": "Change Log", @@ -43,10 +53,16 @@ "Click to set vendor": "Click to set vendor", "Code Snippet": "Code Snippet", "Committer": "Committer", + "CODE_SNIPPET": "Code Snippet", + "Contributors": "Contributors", + "CONTAINED": "Contained", + "Comments": "Comments", "Components": "Components", + "Component Clearing Report": "Component Clearing Report", "Components only": "Components Only", "Component Name": "Component Name", "Component Owner": "Component Owner", + "Component License Information": "Component License Information", "Component Type": "Component Type", "Components Only": "Components Only", "Component is created": "Component is created", @@ -54,6 +70,8 @@ "Components with releases": "Components With Releases", "Contributor": "Contributor", "COTS": "COTS", + "Clearing Details": "Clearing Details", + "Clearing Standard": "Clearing Standard", "Closed": "Closed", "Change Vulnerability Rating And Action?": "Change Vulnerability Rating And Action?", "Create Account": "Create Account", @@ -77,8 +95,14 @@ "Document Type": "Document Type", "Download Attachment Bundle": "Download Attachment Bundle", "DOWNLOAD": "Download", + "DYNAMICALLY_LINKED": "Dynamically linked", "ECC": "ECC", + "ECC Comment": "ECC Comment", + "ECC Details": "ECC Details", + "ECC Information": "ECC Information", + "ECC Status": "ECC Status", "Edit component": "Edit component", + "Edit release": "Edit release", "Email Address": "Email Address", "entries": "entries", "Enter Owner Billing Group": "Enter Owner Billing Group", @@ -95,15 +119,27 @@ "External Id": "External Id", "External ids": "External ids", "Expert": "Expert", + "External URL": "External URL", + "External Supplier ID": "External Supplier ID", + "Evaluation Start": "Evaluation Start", + "Evaluation End": "Evaluation End", "Field Name": "Field Name", "File name": "File name", + "Finalized License Scan Report": "Finalized License Scan Report", + "fossology_clearing_finished": "The FOSSology process already finished. You should find the resulting report as attachment at this release.", + "Found source attachment": "Found source attachment", + "Fossology Process": "Fossology Process", "Freeware": "Freeware", + "Full Name": "Full Name", "General": "General", "General Information": "General Information", + "Generate a report out of the scan results and attach it to this release": "Generate a report out of the scan results and attach it to this release", "Group": "Group", "Home": "Home", "Homepage": "Homepage", "Homepage Url": "Homepage Url", + "How it works": "How it works", + "hand_when_got_stuck_fossology": "If a FOSSology process got stuck or if the source attachment was not correct, you can start all over by setting the current FOSSology process to status OUTDATED. A new one will be started automatically, so make sure you corrected all attachments or other problems first before changing the state.", "I could not delete the release, since it is used by another component (release) or project": "I could not delete the release, since it is used by another component (release) or project", "Import SBOM": "Import SBOM", "In order to go ahead, please sign in or create a new account!": "In order to go ahead, please sign in or create a new account!", @@ -114,13 +150,19 @@ "INTERNAL_USE_SCAN_AVAILABLE": "Internal Use Scan Available", "Internal": "Internal", "Internal Project": "Internal Project", + "INTERNAL_USE": "Internal use", "Is Checked": "Is Checked", "Languages": "Languages", "Licenses": "Licenses", + "License Agreement": "License Agreement", "License Clearing": "License Clearing", + "Licence names": "Licence names", "License Fullname": "License Fullname", "License Shortname": "License Shortname", "License Type": "License Type", + "Linked Releases": "Linked Releases", + "License Scan Report Result": "License Scan Report Result", + "Legal Evaluation": "Legal Evaluation", "Logout": "Sign Out", "learn_more_components": "Learn more about component types.", "Mailing list": "Mailing list", @@ -128,6 +170,7 @@ "Main Licenses": "Main Licenses", "MAINLINE": "Mainline", "Matched by": "Matched by", + "Material Index Number": "Material Index Number", "Merge": "Merge", "Moderators": "Moderators", "Modified By": "Modified By", @@ -138,6 +181,7 @@ "My Task Submissions": "My Task Submissions", "Name": "Name", "NEW_CLEARING": "New", + "No": "No", "No attachments yet": "No attachments yet.", "No Records Found": "No Records Found", "NO_REPORT": "No report", @@ -145,11 +189,15 @@ "NO_STATUS": "No status", "NOT_CHECKED": "Not Checked", "number of the vulnerabilities were matched by": "{count} of the vulnerabilities were matched by {matchedBy}", + "Number of Security Vulnerabilities": "Number of Security Vulnerabilities", + "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.", "OPEN": "Open", "Open": "Open", "Operating Systems": "Operating Systems", "Operation": "Operation", + "Other licenses": "Other licenses", "OSS": "OSS", + "OPTIONAL": "Optional", "Owner Accounting Unit": "Owner Accounting Unit", "Owner Billing Group": "Owner Billing Group", "Owner Country": "Owner Country", @@ -161,6 +209,7 @@ "Preferences": "Preferences", "Priority": "Priority", "Product": "Product", + "Programming Languages": "Programming Languages", "Projects": "Projects", "Project Name": "Project Name", "Projects only": "Projects Only", @@ -172,27 +221,49 @@ "Quick Filter": "Quick Filter", "Reference Doc Changes": "Reference Doc Changes", "Reference Doc": "Reference Doc", + "REFERRED": "Related", "Release Aggregate Data": "Release Aggregate Data", + "Release Date of this Release": "Release Date of this Release", "Release Mainline State": "Release Mainline State", "Release Overview": "Release Overview", + "Release Vendor": "Release Vendor", "Requests": "Requests", + "Request ID": "Request ID", + "Request Information": "Request Information", "Release": "Release", "Reset": "Reset", + "Release relation": "Release relation", "REPORT_AVAILABLE": "Report Available", "Roles": "Roles", + "Reset FOSSology Process": "Reset FOSSology Process", + "Reload Report": "Reload Report", "SCAN_AVAILABLE": "Scan available", + "Scanned": "Scanned", + "Scan the sources": "Scan the sources", "Search": "Search", "SENT_TO_CLEARING_TOOL": "Sent to clearing tool", "Service": "Service", + "Set Outdated": "Set Outdated", + "Set To Outdated": "Set To Outdated", "Show": "Show", + "Short Name": "Short Name", "Sign In": "Sign In", "Size": "Size", + "SIDE_BY_SIDE": "Side by side", "Software Platforms": "Software Platforms", + "Source Code Download URL": "Source Code Download URL", + "Source Code Delivery": "Source Code Delivery", + "Source Code Original from Community": "Source Code Original from Community", + "Source Code Tool-Made": "Source Code Tool-Made", + "Source Code Self-Made": "Source Code Self-Made", + "Screenshot of Website": "Screenshot of Website", "SPECIFIC": "Specific", "Split": "Split", "Start": "Start", "State": "State", "Status": "Status", + "STANDALONE": "Standalone", + "STATICALLY_LINKED": "Statically linked", "Subscribe": "Subscribe", "Subscribers": "Subscribers", "Summary": "Summary", @@ -202,12 +273,14 @@ "Select Users": "Select Users", "Select User": "Select User", "Select Vendor": "Select Vendor", + "Supplemental Information": "Supplemental Information", "The component cannot be deleted, since it contains releases Please delete the releases first": "The component {name} cannot be deleted, since it contains {releaseCount} releases. Please delete the releases first.", "This release contains": "This release {name} contains: ", "Tag": "Tag", "Title": "Title", "The verification of vulnerabilities will be changed to": "The verification of {number} vulnerabilities will be changed to", "To": "To", + "TO_BE_REPLACED": "To be replaced", "Total vulnerabilities": "Total vulnerabilities", "Type": "Type", "UNDER_CLEARING": "Under Clearing", @@ -215,6 +288,7 @@ "Uploaded By": "Uploaded By", "Uploaded Comment": "Uploaded Comment", "Uploaded On": "Uploaded On", + "Upload the sources to FOSSology": "Upload the sources to FOSSology", "Usage": "Usage", "User": "User", "Vendor": "Vendor", @@ -227,6 +301,7 @@ "Wiki": "Wiki", "Will be set auto": "Will be set auto", "Will be set automatically": "Will be set automatically", - "Wiki URL": "Wiki Url" + "Wiki URL": "Wiki Url", + "Yes": "Yes" } } diff --git a/messages/ja.json b/messages/ja.json index 22eabd73..5f0650da 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -15,14 +15,23 @@ "Add Vendor": "ベンダーを追加", "Additional Data": "追加データ", "Additional Roles": "追加ロール", + "Additional Request Information": "追加リクエスト情報", "Advance Search": "高度な検索", "Advanced Search": "NOT TRANSLATED", + "AL": "輸出管理", "Approved Releases": "NOT TRANSLATED", "Attachments": "添付ファイル", "Attributes change": "属性変更", + "Assessor Contact Person": "評価者の連絡先", + "Assessor Department": "評価部門", + "Assessment Date": "評価日", "Authentication failed Please try again": "認証に失敗しました。もう一度お試しください。", "Basic Info": "基本情報", + "basic_fossology_process": "もしリリースへソースコードを添付したら,FOSSologyのプロセスは開始できます. このダイアログを開いてください. 含むもの", "Between": "間", + "Binary Download URL": "Binary Download URL", + "Binaries Original from Community": "コミュニティが提供するオリジナルバイナリ", + "Binaries Self-Made": "自作のバイナリ", "Blog": "ブログ", "Blog URL": "ブログURL", "Cancel": "キャンセル", @@ -42,22 +51,30 @@ "Close": "キャンセル", "Closed": "近い", "Code Snippet": "コードスニペット", + "CODE_SNIPPET": "コードスニペット", + "Contributors": "貢献者", + "CONTAINED": "含まれている", + "Comments": "コメント", + "Component Clearing Report": "コンポーネントクリアリングレポート", "Component Name": "コンポーネント名", "Component Owner": "コンポーネントオーナー", "Component Type": "コンポーネントタイプ", "Components": "コミッター", "Committer": "コミッター", + "Component License Information": "コンポーネントライセンス情報", "Components Only": "コンポーネントのみ", "Component is created": "コンポーネントが作成されました", "Component is Duplicate": "コンポーネントが重複しています", "Components With Releases": "リリースされたコンポーネント", - "Components only": "NOT TRANSLATED", - "Components with releases": "NOT TRANSLATED", + "Components only": "コンポーネントのみ", + "Components with releases": "リリースされたコンポーネント", "Contributor": "投稿者", "Click to edit": "クリックして編集する", "Click to add row to Additional Roles": "クリックして行を「追加の役割」に追加します。", "Click to set vendor": "クリックしてベンダーを設定します", "COTS": "COTS", + "Clearing Details": "クリアリング詳細", + "Clearing Standard": "クリアリング基準", "Change Vulnerability Rating And Action?": "脆弱性レートとそのアクションを変更しますか?", "Create Account": "アカウントの作成", "Created By (Email)": "Created by (Email)", @@ -67,6 +84,7 @@ "Customer Project": "NOT TRANSLATED", "DENIED": "拒否", "DOWNLOAD": "ダウンロード", + "DYNAMICALLY_LINKED": "動的にリンクされている", "Date": "日期", "Default vendor": "デフォルトのベンダー", "Delete Component": "コンポーネント削除", @@ -81,7 +99,12 @@ "Document Type": "ドキュメントの種類", "Download Attachment Bundle": "添付ファイルの一括ダウンロード", "ECC": "NOT TRANSLATED", + "ECC Comment": "ECCコメント", + "ECC Details": "ECC詳細", + "ECC Information": "ECC情報", + "ECC Status": "ECCステータス", "Edit component": "コンポーネント編集", + "Edit release": "リンクされたリリース", "Email Address": "メールアドレス", "Error when processing!": "処理中にエラーが発生しました!", "Export Spreadsheet": "SBOMのインポート", @@ -97,15 +120,27 @@ "Enter Mailing List URL": "メーリング リストの URL を入力してください", "Enter Description": "説明を入力してください", "Enter search text": "検索テキストを入力してください...", + "External URL": "外部URL", + "External Supplier ID": "外部サプライヤーID", + "Evaluation Start": "評価開始", + "Evaluation End": "評価終了", "Field Name": "フィールド名", "File name": "ファイル名", + "Finalized License Scan Report": "ライセンススキャンレポート完成", + "fossology_clearing_finished": "The FOSSology process already finished. You should find the resulting report as attachment at this release.", + "Found source attachment": "検出された添付ソースコードファイル", + "Fossology Process": "FOSSologyのプロセス", "Freeware": "フリーウェア", + "Full Name": "氏名", "General": "一般的な", "General Information": "一般情報", + "Generate a report out of the scan results and attach it to this release": "スキャン結果からレポートを生成し、このリリースに添付します。", "Group": "グループ", "Home": "NOT TRANSLATED", "Homepage": "ホームページ", "Homepage Url": "ホームページの URL", + "How it works": "どのように動作するか", + "hand_when_got_stuck_fossology": "FOSSologyのプロセスか,添付ファイルが正しくないのであれば, FOSSologyののステータスをoutdatedにして最初から行うことができる.新しいものは自動で開始される.そのため,全ての添付ファイルや他の問題を,ステータス変更前に初めに確認しておくべき.", "I could not delete the release, since it is used by another component (release) or project": "リリースは他のコンポーネント(リリース)やプロジェクトで使用されているため、削除できませんでした。", "INCORRECT": "間違い", "INTERNAL_USE_SCAN_AVAILABLE": "Internal Use Scan Available", @@ -116,12 +151,18 @@ "Inner Source": "内部ソース", "Internal": "内部", "Internal Project": "NOT TRANSLATED", + "INTERNAL_USE": "内部利用", "Is Checked": "NOT TRANSLATED", "Languages": "言語", + "License Agreement": "ライセンス契約書", "License Clearing": "NOT TRANSLATED", + "Licence names": "ライセンス名", "License Fullname": "NOT TRANSLATED", "License Shortname": "NOT TRANSLATED", "License Type": "NOT TRANSLATED", + "Linked Releases": "リンクされたリリース", + "License Scan Report Result": "ライセンススキャンレポート結果", + "Legal Evaluation": "法的評価", "Licenses": "NOT TRANSLATED", "Logout": "ログアウト", "learn_more_components": "コンポーネントの種類について詳しくは、こちらをご覧くだ い。", @@ -130,6 +171,7 @@ "Mailing List URL": "メーリングリストのURL", "Main Licenses": "メインライセンス", "Matched by": "匹配者", + "Material Index Number": "部品識別番号", "Merge": "マージ", "Moderators": "モデレータ", "Modified By": "変更方法", @@ -143,15 +185,20 @@ "NO_REPORT": "レポートはありません", "NO_STATUS": "No status", "Name": "名前", + "No": "否", "No Records Found": "NOT TRANSLATED", "No attachments yet": "添付ファイルはまだありません", "None": "NOT TRANSLATED", "number of the vulnerabilities were matched by": "{count} of the vulnerabilities were matched by {matchedBy}", + "Number of Security Vulnerabilities": "セキュリティ脆弱性の数", + "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.", "OPEN": "開く", "Open": "NOT TRANSLATED", "Operating Systems": "オペレーティングシステム", "Operation": "操作", + "Other licenses": "その他ライセンス", "OSS": "OSS", + "OPTIONAL": "オプション", "Owner Accounting Unit": "オーナーの会計単位", "Owner Billing Group": "オーナーの課金グループ", "Owner Country": "オーナーの国", @@ -163,6 +210,7 @@ "Preferences": "NOT TRANSLATED", "Priority": "优先级", "Product": "NOT TRANSLATED", + "Programming Languages": "プログラミング言語", "Project Name": "NOT TRANSLATED", "Project Responsible": "NOT TRANSLATED", "Project Responsible (Email)": "NOT TRANSLATED", @@ -175,14 +223,24 @@ "REPORT_AVAILABLE": "レポートあり", "Reference Doc": "参考ドキュメント", "Reference Doc Changes": "参考ドキュメント 変更", + "REFERRED": "関連する", "Release": "发行版本", "Release Aggregate Data": "集計データのリリース", + "Release Date of this Release": "本リリースの公開日", "Release Mainline State": "リリースメインライン状態", "Release Overview": "リリース概要", + "Release Vendor": "リリースベンダー", "Requests": "NOT TRANSLATED", "Roles": "役割", "Reset": "リセット", + "Request ID": "リクエスト ID", + "Request Information": "リクエスト情報", + "Release relation": "リリース関係", + "Reset FOSSology Process": "Reset FOSSology Process", + "Reload Report": "リロードレポート", "SCAN_AVAILABLE": "Scan available", + "Scanned": "スキャンされた", + "Scan the sources": "ソースをスキャン", "SENT_TO_CLEARING_TOOL": "クリアリングツールに送る", "SPECIFIC": "特定の", "SW360_INFO": "SW360は、ソフトウェアコンポーネントに関する情報を収集、整理、利用可能にするためのウェブアプリケーションとリポジトリの両方を提供するオープンソースのソフトウェアプロジェクトです。SW360は、組織内のソフトウェアコンポーネントの一元化を行います。", @@ -193,23 +251,37 @@ "Select User": "ユーザーを選択", "Select Vendor": "ベンダーを選択してください", "Service": "サービス", + "Set Outdated": "セット古い", + "Set To Outdated": "Set To Outdated", "Show": "", + "Short Name": "短縮名", "Sign In": "サインイン", "Size": "サイズ", + "SIDE_BY_SIDE": "横に並んで", "Software Platforms": "ソフトウェアプラットフォーム", + "Source Code Download URL": "ソースコードダウンロードURL", + "Source Code Delivery": "ソースコード提供", + "Source Code Original from Community": "ソースコード コミュニティからのオリジナル", + "Source Code Tool-Made": "ツール生成のソースコード", + "Source Code Self-Made": "独自・自作のソースコード", + "Screenshot of Website": "ウェブサイトのスクリーンショット", "Split": "分離", "Start": "開始", "State": "NOT TRANSLATED", "Status": "NOT TRANSLATED", + "STANDALONE": "単体", + "STATICALLY_LINKED": "静的にリンクされている", "Subscribe": "購読する", "Subscribers": "加入者", "Summary": "概要", + "Supplemental Information": "補足情報", "Tag": "NOT TRANSLATED", "The component cannot be deleted, since it contains releases Please delete the releases first": "コンポーネント {name}{releaseCount} を持つため消去できない.最初にリリースを消去してください", "This release contains": "このリリース {name} には次の内容が含まれています:", "The verification of vulnerabilities will be changed to": "{number} 件の脆弱性の検証を変更", "Title": "标题", "To": "To", + "TO_BE_REPLACED": "置き換わる", "Total vulnerabilities": "脆弱性の総数", "Type": "タイプ", "UNDER_CLEARING": "クリアリング中", @@ -217,6 +289,7 @@ "Uploaded By": "アップロード元", "Uploaded Comment": "Uploaded Comment", "Uploaded On": "Uploaded On", + "Upload the sources to FOSSology": "ソースをFOSSologyにアップロード", "Usage": "使い方", "User": "用户", "Vendor": "ベンダー", @@ -230,6 +303,7 @@ "Will be set auto": "自動に設定されます", "Will be set automatically": "自動的に設定されます", "Wiki URL": "ウィキの URL", - "entries": "件表示" + "entries": "件表示", + "Yes": "はい" } } diff --git a/messages/vi.json b/messages/vi.json index 18d7649f..d1e58de8 100644 --- a/messages/vi.json +++ b/messages/vi.json @@ -14,15 +14,24 @@ "Add User": "Thêm Người Dùng", "Additional Data": "Dữ liệu bổ sung", "Additional Roles": "Vai trò bổ sung", + "Additional Request Information": "Thông tin yêu cầu bổ sung", "Advance Search": "Tìm Kiếm Nâng Cao", "Advanced Search": "NOT TRANSLATED", + "AL": "AL", "Approved Releases": "NOT TRANSLATED", "Add Vendor": "Thêm Người bán", "Attachments": "Tệp đính kèm", "Attributes change": "Thay đổi thuộc tính", + "Assessor Contact Person": "Người liên hệ thẩm định", + "Assessor Department": "Bộ phận thẩm định", + "Assessment Date": "Ngày thẩm định", "Authentication failed Please try again": "Đăng nhập thất bại. Vui lòng thử lại.", "Basic Info": "Basic Info", + "basic_fossology_process": "Nếu nguồn của một bản phát hành được đính kèm với nó, một quy trình FOSSology cơ bản có thể được gọi bằng cách chỉ mở hộp thoại này. Nó bao gồm", "Between": "Trong Khoảng", + "Binary Download URL": "Binary Download URL", + "Binaries Original from Community": "Các tệp Binary gốc từ cộng đồng", + "Binaries Self-Made": "Những tệp binary tự làm", "Blog": "Blog", "Blog URL": "Blog Url", "CHECKED": "ĐÃ KIỂM TRA", @@ -42,19 +51,27 @@ "Close": "Đóng", "Closed": "NOT TRANSLATED", "Code Snippet": "Đoạn mã", + "CODE_SNIPPET": "Đoạn mã", + "Contributors": "Những người đóng góp", + "CONTAINED": "Chứa", + "Comments": "Những giải thích", + "Component Clearing Report": "Báo cáo dọn dẹp thành phần", "Component Name": "Tên thành phần", "Component Owner": "Chủ sở hữu thành phần", "Component Type": "Loại thành phần", "Components": "Thành Phần", "Components Only": "Chỉ thành phần", + "Component License Information": "Thông tin giấy phép thành phần", "Components With Releases": "Các thành phần có bản phát hành", - "Components only": "NOT TRANSLATED", - "Components with releases": "NOT TRANSLATED", + "Components only": "Chỉ thành phần", + "Components with releases": "Các thành phần có bản phát hành", "Component is created": "Thành Phần đã được tạo", "Component is Duplicate": "Thành Phần đã tồn tại", "Committer": "Ủy viên", "Contributor": "Người đóng góp", "COTS": "COTS", + "Clearing Details": "Chi tiết dọn dẹp", + "Clearing Standard": "Tiêu chuẩn dọn dẹp", "Change Vulnerability Rating And Action?": "Change Vulnerability Rating And Action?", "Click to edit": "Nhấp để sửa", "Click to add row to Additional Roles": "Nhấp để thêm hàng vào Vai trò bổ sung", @@ -67,6 +84,7 @@ "Customer Project": "NOT TRANSLATED", "DENIED": "Phủ định", "DOWNLOAD": "Tải về", + "DYNAMICALLY_LINKED": "Liên kết tĩnh", "Date": "Ngày", "Default vendor": "Nhà cung cấp mặc định", "Delete Component": "Xóa Thành Phần", @@ -81,7 +99,12 @@ "Document Type": "Document Type", "Download Attachment Bundle": "Tải xuống tệp tin đính kèm", "ECC": "NOT TRANSLATED", + "ECC Comment": "Giải thích ECC", + "ECC Details": "Chi tiết ECC", + "ECC Information": "Thông tin ECC", + "ECC Status": "Trạng thái ECC", "Edit component": "Chỉnh sửa thành phần", + "Edit release": "Chỉnh sửa bản phát hành", "Email Address": "Địa chỉ Email", "Error when processing!": "Lỗi khi xử lý!", "Export Spreadsheet": "Xuất bảng tính", @@ -97,15 +120,27 @@ "Enter Mailing List URL": "Nhập Url Danh sách gửi thư", "Enter Description": "Nhập Miêu tả", "Enter search text": "Nhập từ tìm kiếm...", + "External URL": "URL bên ngoài", + "External Supplier ID": "ID nhà cung cấp bên ngoài", + "Evaluation Start": "Đánh giá bắt đầu", + "Evaluation End": "Đánh giá kết thúc", "Field Name": "Tên trường", "File name": "Tên tệp", + "Finalized License Scan Report": "Báo cáo quét giấy phép đã hoàn thành", + "fossology_clearing_finished": "The FOSSology process already finished. You should find the resulting report as attachment at this release.", + "Found source attachment": "Tìm thấy nguồn đính kèm", + "Fossology Process": "Quy trình Fossology", "Freeware": "Phần mềm miễn phí", + "Full Name": "Họ và tên", "General": "Chung", "General Information": "Thông tin chung", + "Generate a report out of the scan results and attach it to this release": "Tạo một báo cáo từ các kết quả quét và đính kèm nó vào bản phát hành này", "Group": "Nhóm", "Home": "NOT TRANSLATED", "Homepage": "Trang chủ", "Homepage Url": "Trang chủ Url", + "How it works": "Nó hoạt động như thế nào", + "hand_when_got_stuck_fossology": "Nếu quy trình FOSSology bị kẹt hoặc nếu tệp đính kèm nguồn không chính xác, bạn có thể bắt đầu lại tất cả bằng cách đặt quy trình FOSSology hiện tại thành trạng thái OUTDATED. Một cái mới sẽ được bắt đầu tự động, vì vậy hãy đảm bảo bạn đã sửa tất cả các tệp đính kèm hoặc các vấn đề khác trước khi thay đổi trạng thái.", "I could not delete the release, since it is used by another component (release) or project": "Tôi không thể xóa bản phát hành, vì nó được sử dụng bởi một thành phần (bản phát hành) hoặc dự án khác", "INCORRECT": "Sai", "INTERNAL_USE_SCAN_AVAILABLE": "Internal Use Scan Available", @@ -116,13 +151,19 @@ "Inner Source": "Nguồn bên trong", "Internal": "Nội bộ", "Internal Project": "NOT TRANSLATED", + "INTERNAL_USE": "Sử dụng nội bộ", "Is Checked": "NOT TRANSLATED", "Languages": "Ngôn ngữ", "learn_more_components": "Tìm hiểu thêm về các loại thành phần.", + "License Agreement": "Thỏa thuận cấp phép", "License Clearing": "NOT TRANSLATED", + "Licence names": "Tên giấy phép", "License Fullname": "NOT TRANSLATED", "License Shortname": "NOT TRANSLATED", "License Type": "NOT TRANSLATED", + "Linked Releases": "Các bản phát hành được liên kết", + "License Scan Report Result": "Kết quả báo cáo quét giấy phép", + "Legal Evaluation": "Đánh giá pháp lý", "Licenses": "NOT TRANSLATED", "Logout": "Đăng Xuất", "MAINLINE": "Đường chính", @@ -130,6 +171,7 @@ "Mailing List URL": "Danh sách gửi thư URL", "Main Licenses": "Giấy phép chính", "Matched by": "Phù hợp với", + "Material Index Number": "Số chỉ mục vật liệu", "Merge": "Hợp nhất", "Moderators": "Người điều hành", "Modified By": "Được chỉnh sửa bởi", @@ -139,6 +181,7 @@ "My Task Assignments": "NOT TRANSLATED", "My Task Submissions": "NOT TRANSLATED", "NEW_CLEARING": "New", + "No": "Không", "NOT_CHECKED": "Chưa được kiểm tra", "NO_REPORT": "không có báo cáo", "NO_STATUS": "No status", @@ -146,12 +189,16 @@ "No Records Found": "NOT TRANSLATED", "No attachments yet": "Chưa có tệp đính kèm nào.", "number of the vulnerabilities were matched by": "{count} of the vulnerabilities were matched by {matchedBy}", + "Number of Security Vulnerabilities": "Số lượng lỗ hổng bảo mật", + "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.", "None": "NOT TRANSLATED", "OPEN": "Mở", "Open": "NOT TRANSLATED", "Operating Systems": "Hệ điều hành", "Operation": "Operation", + "Other licenses": "Other licenses", "OSS": "OSS", + "OPTIONAL": "Tùy chọn", "Owner Accounting Unit": "Nhập đơn vị kế toán", "Owner Billing Group": "Nhập nhóm thanh toán", "Owner Country": "Quốc gia", @@ -163,6 +210,7 @@ "Preferences": "NOT TRANSLATED", "Priority": "Độ ưu tiên", "Product": "NOT TRANSLATED", + "Programming Languages": "Ngôn ngữ lập trình", "Project Name": "NOT TRANSLATED", "Project Responsible": "NOT TRANSLATED", "Project Responsible (Email)": "NOT TRANSLATED", @@ -175,14 +223,24 @@ "REPORT_AVAILABLE": "Báo cáo có sẵn", "Reference Doc": "Reference Doc", "Reference Doc Changes": "Thay đổi các tài liệu liên quan", + "REFERRED": "Liên quan", "Release": "Bản phát hành", "Release Aggregate Data": "Dữ liệu tổng hợp bản phát hành", + "Release Date of this Release": "Ngày phát hành của bản phát hành này", "Release Mainline State": "Trạng thái chính bản phát hành", "Release Overview": "Tổng quan bản phát hành", + "Release Vendor": "Nhà cung cấp bản phát hành", "Requests": "NOT TRANSLATED", "Reset": "Còn lại", + "Request ID": "Yêu cầu ID", + "Request Information": "Yêu cầu thông tin", + "Release relation": "Quan hệ bản phát hành", "Roles": "Vai trò", + "Reset FOSSology Process": "Reset FOSSology Process", + "Reload Report": "Tải lại báo cáo", "SCAN_AVAILABLE": "Scan available", + "Scanned": "Đã quét", + "Scan the sources": "Quét các nguồn", "SENT_TO_CLEARING_TOOL": "Sent to clearing tool", "SPECIFIC": "Riêng", "SW360_INFO": "SW360 là một dự án phần mềm nguồn mở cung cấp cả ứng dụng web và kho lưu trữ để thu thập, sắp xếp và cung cấp thông tin có sẵn về các thành phần của phần mềm. Nó thiết lập một trung tâm trung tâm cho các thành phần phần mềm trong một tổ chức.", @@ -193,23 +251,37 @@ "Select Users": "Chọn Người dùng", "Select User": "Chọn Người Dùng", "Select Vendor": "Chọn Người bán", + "Set Outdated": "Đặt lỗi thời", + "Set To Outdated": "Set To Outdated", "Show": "Xem", + "Short Name": "Tên ngắn", "Sign In": "Đăng Nhập", "Size": "Kích thước", + "SIDE_BY_SIDE": "Bên cạnh nhau", "Software Platforms": "Nền tảng phần mềm", + "Source Code Download URL": "Source Code Download URL", + "Source Code Delivery": "Mã nguồn chuyển giao", + "Source Code Original from Community": "Mã nguồn gốc từ cộng đồng", + "Source Code Tool-Made": "Mã nguồn được tạo ra", + "Source Code Self-Made": "Mã nguồn tự làm", + "Screenshot of Website": "Ảnh chụp màn hình của trang web", "Split": "Phân tách", "Start": "Bắt Đầu", "State": "NOT TRANSLATED", "Status": "NOT TRANSLATED", + "STANDALONE": "Độc lập", + "STATICALLY_LINKED": "Liên kết tĩnh", "Subscribe": "Theo dõi", "Subscribers": "Người đăng ký", "Summary": "Tóm lược", + "Supplemental Information": "Thông tin bổ sung", "Tag": "NOT TRANSLATED", "The component cannot be deleted, since it contains releases Please delete the releases first": "Thành phần {name} không thể bị xóa, vì nó chứa {releaseCount} bản phát hành. Vui lòng xóa các bản phát hành trước.", "This release contains": "Bản phát hành {name} này chứa: ", "The verification of vulnerabilities will be changed to": "Việc xác minh các lỗ hổng {number} sẽ được thay đổi thành", "Title": "Tiêu đề", "To": "Đến", + "TO_BE_REPLACED": "Sẽ được thay thế", "Total vulnerabilities": "Số lượng lỗ hổng bảo mật", "Type": "Loại", "UNDER_CLEARING": "Đang dọn dẹp", @@ -217,6 +289,7 @@ "Uploaded By": "Tải lên bởi", "Uploaded Comment": "Bình luận tải lên", "Uploaded On": "Tải lên vào", + "Upload the sources to FOSSology": "Tải các nguồn lên FOSSology", "Usage": "Sử dụng", "User": "Người dùng", "Vendor": "Nhà cung cấp", @@ -230,6 +303,7 @@ "Will be set auto": "Sẽ được đặt thành", "Will be set automatically": "Sẽ được thiết lập tự động", "Wiki URL": "Wiki Url", - "entries": "mục" + "entries": "mục", + "Yes": "Có" } } diff --git a/messages/zh.json b/messages/zh.json index 2e3e0f0a..6514686c 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -13,16 +13,25 @@ "Add Projects": "NOT TRANSLATED", "Additional Data": "附加数据", "Additional Roles": "附加角色", + "Additional Request Information": "附加请求信息", "Advance Search": "高级搜索", "Advanced Search": "NOT TRANSLATED", "Add User": "添加用户", "Add Vendor": "添加供应商", + "AL": "出口管制", "Approved Releases": "NOT TRANSLATED", "Attachments": "附件", "Attributes change": "属性更改", + "Assessor Contact Person": "评估员联系人", + "Assessor Department": "评估部门", + "Assessment Date": "评估日期", "Authentication failed Please try again": "认证失败,请重试。", "Basic Info": "基本信息", + "basic_fossology_process": "如果源文件被附加到一个发行版本,则只需打开此对话框即可调用基本的FOSSology进程。它包括", "Between": "之间", + "Binary Download URL": "二进制文件下载URL", + "Binaries Original from Community": "来自社区的二进制文件", + "Binaries Self-Made": "自制的二进制文件", "Blog": "博客", "Blog URL": "博客网址", "CHECKED": "已检查", @@ -42,6 +51,11 @@ "Close": "取消", "Closed": "关闭", "Code Snippet": "代码片段", + "CODE_SNIPPET": "代码片段", + "Contributors": "贡献者", + "CONTAINED": "包含", + "Comments": "注释", + "Component Clearing Report": "组件明确报告", "Component Name": "组件名称", "Component Owner": "组件所有者", "Component Type": "组件类型", @@ -49,15 +63,18 @@ "Component is created": "组件已创建", "Component is Duplicate": "组件重复", "Components Only": "仅组件", + "Component License Information": "组件许可证信息", "Components With Releases": "具有发行版本的组件", - "Components only": "NOT TRANSLATED", - "Components with releases": "NOT TRANSLATED", + "Components only": "仅组件", + "Components with releases": "具有发行版本的组件", "Committer": "提交者", "Contributor": "贡献者", "Click to edit": "点击编辑", "Click to add row to Additional Roles": "单击将行添加到其他角色", "Click to set vendor": "点击设置供应商", "COTS": "COTS", + "Clearing Details": "明确细节", + "Clearing Standard": "明确标准", "Change Vulnerability Rating And Action?": "是否更改漏洞等级和操作?", "Create Account": "创建账户", "Created By (Email)": "创建者(电子邮件)", @@ -66,6 +83,7 @@ "Customer Project": "NOT TRANSLATED", "DENIED": "拒绝", "DOWNLOAD": "下载", + "DYNAMICALLY_LINKED": "动态链接", "Date": "日期", "Default vendor": "默认供应商", "Delete Component": "删除组件", @@ -80,7 +98,12 @@ "Document Type": "文档类型", "Download Attachment Bundle": "下载附件包", "ECC": "NOT TRANSLATED", + "ECC Comment": "出口管制注释", + "ECC Details": "出口管制详细信息", + "ECC Information": "出口管制信息", + "ECC Status": "出口管制状态", "Edit component": "编辑组件", + "Edit release": "编辑发行版本", "Email Address": "电子邮件地址", "Error when processing!": "处理时出错!", "Export Spreadsheet": "导出电子表格", @@ -96,15 +119,27 @@ "Enter Mailing List URL": "输入邮件列表 URL", "Enter Description": "输入描述", "Enter search text": "输入搜索文本...", + "External URL": "外部URL", + "External Supplier ID": "外部供应商ID", + "Evaluation Start": "评估开始", + "Evaluation End": "评估结束", "Field Name": "领域名称", "File name": "文件名", + "Finalized License Scan Report": "最终许可证扫描报告", + "fossology_clearing_finished": "The FOSSology process already finished. You should find the resulting report as attachment at this release.", + "Found source attachment": "找到源附件", + "Fossology Process": "Fossology进程", "Freeware": "免费软件", + "Full Name": "全名", + "Generate a report out of the scan results and attach it to this release": "根据扫描结果生成报告并将其附加到此发行版本", "General": "一般", "General Information": "一般信息", "Group": "组", "Home": "NOT TRANSLATED", "Homepage": "主页", "Homepage Url": "主页网址", + "How it works": "它是如何工作的", + "hand_when_got_stuck_fossology": "如果FOSSology进程卡住或源附件不正确,可以通过将当前FOSSology进程状态设置为状态OUTDATED 来重新开始。一个新的FOSSology进程将自动启动,因此请确保在更改状态之前先修复所有附件或其他的问题。", "I could not delete the release, since it is used by another component (release) or project": "无法删除该版本,因为它正在被另一个组件或发行版本或项目使用", "INCORRECT": "不正确", "INTERNAL_USE_SCAN_AVAILABLE": "Internal Use Scan Available", @@ -115,12 +150,18 @@ "Inner Source": "内源", "Internal": "内部", "Internal Project": "NOT TRANSLATED", + "INTERNAL_USE": "内部使用", "Is Checked": "NOT TRANSLATED", "Languages": "语言", + "License Agreement": "许可协议", "License Clearing": "NOT TRANSLATED", + "Licence names": "许可证名称", "License Fullname": "NOT TRANSLATED", "License Shortname": "NOT TRANSLATED", "License Type": "NOT TRANSLATED", + "Linked Releases": "链接的发行版本", + "License Scan Report Result": "许可证扫描报告结果", + "Legal Evaluation": "法律评估", "Licenses": "NOT TRANSLATED", "Logout": "登出", "learn_more_components": "了解有关组件类型的更多信息。", @@ -129,6 +170,7 @@ "Mailing List URL": "邮件列表网址", "Main Licenses": "主许可证", "Matched by": "適合", + "Material Index Number": "组件索引号", "Merge": "合并", "Moderators": "审核人", "Modified By": "修改者", @@ -142,6 +184,7 @@ "NO_REPORT": "没有报告", "NO_STATUS": "No status", "Name": "名称", + "No": "否", "No Records Found": "NOT TRANSLATED", "No attachments yet": "还没有附件。", "None": "NOT TRANSLATED", @@ -149,11 +192,15 @@ "Open": "NOT TRANSLATED", "Operating Systems": "操作系统", "Operation": "操作", + "Other licenses": "其他许可证", "OSS": "OSS", + "OPTIONAL": "可选", "Owner Accounting Unit": "所有者会计单元", "Owner Billing Group": "所有者计费组", "Owner Country": "所有者国家", "number of the vulnerabilities were matched by": "{count} of the vulnerabilities were matched by {matchedBy}", + "Number of Security Vulnerabilities": "安全漏洞数量", + "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.", "PHASEOUT": "停止", "Password": "密码", "PhaseOut": "NOT TRANSLATED", @@ -162,6 +209,7 @@ "Preferences": "NOT TRANSLATED", "Priority": "優先順位", "Product": "NOT TRANSLATED", + "Programming Languages": "编程语言", "Project Name": "NOT TRANSLATED", "Project Responsible": "NOT TRANSLATED", "Project Responsible (Email)": "NOT TRANSLATED", @@ -174,27 +222,49 @@ "REPORT_AVAILABLE": "报告可用", "Reference Doc": "参考文档", "Reference Doc Changes": "参考文档 更改", + "REFERRED": "相关", "Release": "リリース", "Release Aggregate Data": "发行版本集合数据", + "Release Date of this Release": "该发行版本的发行日期", "Release Mainline State": "发行版本主线状态", "Release Overview": "发行版本概述", + "Release Vendor": "发行版本供应商", "Requests": "NOT TRANSLATED", "Roles": "角色", "Reset": "重置", + "Request ID": "请求ID", + "Request Information": "请求信息", + "Release relation": "发行版本关系", + "Reset FOSSology Process": "Reset FOSSology Process", + "Reload Report": "重新加载报告", "SCAN_AVAILABLE": "扫描可用", + "Scanned": "已扫描", + "Scan the sources": "扫描源", "SENT_TO_CLEARING_TOOL": "发送到明确工具", "SPECIFIC": "具体", "SW360_INFO": "SW360是一个开源软件项目,它提供了一个 Web 应用程序和一个存储库以收集,组织和提供有关软件组件的信息。它为组织中的软件组件建立了一个中心枢纽。", "Search": "搜索", "Service": "服务", + "Set Outdated": "设置为过期", + "Set To Outdated": "Set To Outdated", "Show": "Show", + "Short Name": "短名称", "Sign In": "登录", "Size": "尺寸", + "SIDE_BY_SIDE": "并排", "Software Platforms": "软件平台", + "Source Code Download URL": "源代码下载URL", + "Source Code Delivery": "源代码交付", + "Source Code Original from Community": "来自社区的源代码", + "Source Code Tool-Made": "工具制作的源代码", + "Source Code Self-Made": "自制源代码", + "Screenshot of Website": "网站截图", "Split": "拆分", "Start": "开始", "State": "NOT TRANSLATED", "Status": "NOT TRANSLATED", + "STANDALONE": "独立", + "STATICALLY_LINKED": "静态链接", "Subscribe": "订阅", "Subscribers": "订阅者", "Summary": "摘要", @@ -203,12 +273,14 @@ "Select Users": "选择用户", "Select User": "选择用户", "Select Vendor": "选择供应商", + "Supplemental Information": "补充信息", "Tag": "NOT TRANSLATED", "The component cannot be deleted, since it contains releases Please delete the releases first": "组件 {name} 无法被删除,因为它包含发行版本 {releaseCount}。请先删除发行版本。", "This release contains": "发行版本 {name} 包含:", "The verification of vulnerabilities will be changed to": "{number} 件の脆弱性の検証を変更", "Title": "タイトル", "To": "到", + "TO_BE_REPLACED": "被替换", "Total vulnerabilities": "漏洞总数", "Type": "类型", "UNDER_CLEARING": "明确中", @@ -216,6 +288,7 @@ "Uploaded By": "上传者", "Uploaded Comment": "上传的注释", "Uploaded On": "上传时间", + "Upload the sources to FOSSology": "上传源到FOSSology", "Usage": "用法", "User": "用户", "Vendor": "供应商", @@ -229,6 +302,7 @@ "entries": "entries", "Will be set auto": "将设置为自动", "Will be set automatically": "将自动设置", - "Wiki URL": "维基网址" + "Wiki URL": "维基网址", + "Yes": "是" } } diff --git a/src/app/[locale]/components/detail/[id]/components/ReleaseOverview.tsx b/src/app/[locale]/components/detail/[id]/components/ReleaseOverview.tsx index 1c43fb9e..23479b85 100644 --- a/src/app/[locale]/components/detail/[id]/components/ReleaseOverview.tsx +++ b/src/app/[locale]/components/detail/[id]/components/ReleaseOverview.tsx @@ -23,6 +23,9 @@ import { Session } from '@/object-types/Session' import ReleaseLink from '@/object-types/ReleaseLink' import { FaTrashAlt, FaPencilAlt } from 'react-icons/fa' import styles from '../detail.module.css' +import Image from 'next/image' +import fossologyIcon from '@/assets/images/fossology.svg' +import FossologyClearing from '@/components/sw360/FossologyClearing/FossologyClearing' import { Table, _ } from '@/components/sw360' import DeleteReleaseModal from './DeleteReleaseModal' @@ -37,12 +40,19 @@ const ReleaseOverview = ({ session, componentId }: Props) => { const [data, setData] = useState([]) const [deletingRelease, setDeletingRelease] = useState('') const [deleteModalOpen, setDeleteModalOpen] = useState(false) + const [clearingReleaseId, setClearingReleaseId] = useState(undefined) + const [fossologyClearingModelOpen, setFossologyClearingModelOpen] = useState(false) const handleClickDelete = (releaseId: any) => { setDeletingRelease(releaseId) setDeleteModalOpen(true) } + const handleFossologyClearing = (releaseId: string) => { + setClearingReleaseId(releaseId) + setFossologyClearingModelOpen(true) + } + const fetchData: any = useCallback( async (url: string) => { const response = await ApiUtils.GET(url, session.user.access_token) @@ -86,7 +96,7 @@ const ReleaseOverview = ({ session, componentId }: Props) => { name: t('Version'), formatter: ([id, version]: Array) => _( - + {version} ), @@ -109,6 +119,14 @@ const ReleaseOverview = ({ session, componentId }: Props) => { formatter: (id: string) => _( + Fossology handleFossologyClearing(id)} + /> {' '} @@ -129,6 +147,11 @@ const ReleaseOverview = ({ session, componentId }: Props) => { show={deleteModalOpen} setShow={setDeleteModalOpen} /> + {(clearingReleaseId) && + + } ) } diff --git a/src/app/[locale]/components/releases/detail/[id]/components/ClearingDetails.tsx b/src/app/[locale]/components/releases/detail/[id]/components/ClearingDetails.tsx new file mode 100644 index 00000000..5e7811fa --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/ClearingDetails.tsx @@ -0,0 +1,239 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +"use client" +import { useState } from 'react' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' +import Link from 'next/link' +import Image from 'next/image' +import fossologyIcon from '@/assets/images/fossology.svg' +import styles from '../detail.module.css' +import ClearingInformationStatus from './ClearingInformationStatus' +import FossologyClearing from '@/components/sw360/FossologyClearing/FossologyClearing' + +import { Session } from '@/object-types/Session' + +interface Props { + release: any + session: Session + releaseId: string +} + +const ClearingDetails = ({ release, session, releaseId }: Props) => { + const t = useTranslations(COMMON_NAMESPACE); + const [toggle, setToggle] = useState(false); + const [show, setShow] = useState(false); + + return ( +
+ + { setToggle(!toggle) }}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{`${t('Clearing Details')}: ${release.name} ${release.version}`}
+ + + +
+ ) +} + +const SupplementalInformation = ({ clearingInformation }: any) => { + const [toggle, setToggle] = useState(false); + const t = useTranslations(COMMON_NAMESPACE); + + return ( + + { setToggle(!toggle) }}> + + + + + + + + + + + + + + +
{t('Supplemental Information')}
+ ) +} + +const RequestInformation = ({ clearingInformation }: any) => { + const [toggle, setToggle] = useState(false); + const t = useTranslations(COMMON_NAMESPACE); + + return ( + + { setToggle(!toggle) }}> + + + + + + + + + + + + + + + + + + + + + + +
{t('Request Information')}
+ ) +} + +export default ClearingDetails \ No newline at end of file diff --git a/src/app/[locale]/components/releases/detail/[id]/components/ClearingInformationStatus.tsx b/src/app/[locale]/components/releases/detail/[id]/components/ClearingInformationStatus.tsx new file mode 100644 index 00000000..c2302f2e --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/ClearingInformationStatus.tsx @@ -0,0 +1,25 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +import { CiCircleRemove } from 'react-icons/ci' +import { FiCheckCircle } from 'react-icons/fi' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' + +const ClearingInformationStatus = ({ status }: any) => { + const t = useTranslations(COMMON_NAMESPACE) + return ( + (status) + ? {t('Yes')} + : {t('No')} + ) +} + +export default ClearingInformationStatus \ No newline at end of file diff --git a/src/app/[locale]/components/releases/detail/[id]/components/DetailOverview.tsx b/src/app/[locale]/components/releases/detail/[id]/components/DetailOverview.tsx new file mode 100644 index 00000000..90315b1d --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/DetailOverview.tsx @@ -0,0 +1,272 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +'use client' +import { useEffect, useState, useCallback } from 'react' +import CommonTabIds from '@/object-types/enums/CommonTabsIds' +import ApiUtils from '@/utils/api/api.util' +import { Session } from '@/object-types/Session' +import HttpStatus from '@/object-types/enums/HttpStatus' +import { signOut } from 'next-auth/react' +import { Dropdown } from 'react-bootstrap' +import CommonUtils from '@/utils/common.utils' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' +import { SideBar, PageButtonHeader } from '@/components/sw360' + +import ReleaseTabIds from '@/object-types/enums/ReleaseTabIds' +import DocumentTypes from '@/object-types/enums/DocumentTypes' +import { LinkedVulnerability } from '@/object-types/LinkedVulnerability' +import DownloadService from '@/services/download.service' +import Link from 'next/link' +import styles from '../detail.module.css' + +import Summary from './Summary' +import ClearingDetails from './ClearingDetails' +import LinkedReleases from './LinkedReleases' +import ECCDetails from './ECCDetails' +import Attachments from '@/components/Attachments/Attachments' +import ComponentVulnerabilities from '@/components/ComponentVulnerabilities/ComponentVulnerabilities' +import ChangeLogList from '@/components/ChangeLog/ChangeLogList/ChangeLogList' +import ChangeLogDetail from '@/components/ChangeLog/ChangeLogDetail/ChangeLogDetail' + +interface Props { + session: Session + releaseId: string +} + +const tabList = [ + { + id: CommonTabIds.SUMMARY, + name: 'Summary', + }, + { + id: ReleaseTabIds.LINKED_RELEASES, + name: 'Linked Releases', + }, + { + id: ReleaseTabIds.CLEARING_DETAILS, + name: 'Clearing Details', + }, + { + id: ReleaseTabIds.ECC_DETAILS, + name: 'ECC Details', + }, + { + id: CommonTabIds.ATTACHMENTS, + name: 'Attachments', + }, + { + id: CommonTabIds.VULNERABILITIES, + name: 'Vulnerabilities', + }, + { + id: CommonTabIds.CHANGE_LOG, + name: 'Change Log', + }, +] + +const DetailOverview = ({ session, releaseId }: Props) => { + const t = useTranslations(COMMON_NAMESPACE) + const [selectedTab, setSelectedTab] = useState(CommonTabIds.SUMMARY) + const [release, setRelease] = useState(undefined) + const [releasesSameComponent, setReleasesSameComponentt] = useState>([]) + const [attachmentNumber, setAttachmentNumber] = useState(0) + const [vulnerData, setVulnerData] = useState>([]) + const [changesLogTab, setChangesLogTab] = useState('list-change') + const [changeLogIndex, setChangeLogIndex] = useState(-1) + const [changeLogList, setChangeLogList] = useState>([]) + + const fetchData: any = useCallback( + async (url: string) => { + const response = await ApiUtils.GET(url, session.user.access_token) + if (response.status == HttpStatus.OK) { + const data = await response.json() + return data + } else if (response.status == HttpStatus.UNAUTHORIZED) { + signOut() + } else { + return null + } + }, + [session.user.access_token] + ) + + useEffect(() => { + fetchData(`releases/${releaseId}`) + .then((release: any) => { + setRelease(release) + if ( + !CommonUtils.isNullOrUndefined(release['_embedded']) && + !CommonUtils.isNullOrUndefined(release['_embedded']['sw360:attachments']) + ) { + setAttachmentNumber(release['_embedded']['sw360:attachments'].length) + } + return release + }) + .then((release: any) => { + fetchData(`components/${release._links['sw360:component'].href.split('/').at(-1)}/releases`).then((component: any) => { + (component) && setReleasesSameComponentt(component['_embedded']['sw360:releaseLinks']) + }) + }) + + fetchData(`releases/${releaseId}/vulnerabilities`).then((vulnerabilities: any) => { + if ( + vulnerabilities && + !CommonUtils.isNullOrUndefined(vulnerabilities['_embedded']) && + !CommonUtils.isNullOrUndefined(vulnerabilities['_embedded']['sw360:vulnerabilityDTOes']) + ) { + setVulnerData(vulnerabilities['_embedded']['sw360:vulnerabilityDTOes']) + } else { + setVulnerData([]) + } + }) + + fetchData(`changelog/document/${releaseId}`).then((changeLogs: any) => { + (changeLogs) && setChangeLogList( + CommonUtils.isNullOrUndefined(changeLogs['_embedded']['sw360:changeLogs']) + ? [] + : changeLogs['_embedded']['sw360:changeLogs'] + ) + }) + }, [releaseId]) + + const downloadBundle = () => { + DownloadService.download( + `${DocumentTypes.RELEASE}/${releaseId}/attachments/download`, session, 'AttachmentBundle.zip') + } + + const headerButtons = { + 'Edit release': { link: '', type: 'primary' }, + Merge: { link: '', type: 'secondary' }, + Subscribe: { link: '', type: 'outline-success' }, + } + + return ( + release && ( +
+
+
+ +
+
+
+ +
+ + + + {`${t('Version')} ${release.version}`} + + + { + Object.entries(releasesSameComponent).map(([index, item]: any) => + + + + {`${t('Version')} ${item.version}`} + + ) + } + + +
+ {selectedTab === CommonTabIds.ATTACHMENTS && attachmentNumber > 0 && ( +
+
+ +
+
+ )} + {selectedTab === CommonTabIds.CHANGE_LOG && ( + + )} +
+
+ + + + + + + +
+
+
+ ) + ) +} + +export default DetailOverview diff --git a/src/app/[locale]/components/releases/detail/[id]/components/ECCDetails.tsx b/src/app/[locale]/components/releases/detail/[id]/components/ECCDetails.tsx new file mode 100644 index 00000000..85320d73 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/ECCDetails.tsx @@ -0,0 +1,75 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +"use client" +import { useState } from 'react' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' +import styles from '../detail.module.css' + +const ECCDetails = ({ release }: any) => { + const t = useTranslations(COMMON_NAMESPACE); + const [toggle, setToggle] = useState(false); + return ( +
+ + { setToggle(!toggle) }}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{t('ECC Information')}
+
+ ) +} + +export default ECCDetails \ No newline at end of file diff --git a/src/app/[locale]/components/releases/detail/[id]/components/LinkedReleases.tsx b/src/app/[locale]/components/releases/detail/[id]/components/LinkedReleases.tsx new file mode 100644 index 00000000..086efd27 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/LinkedReleases.tsx @@ -0,0 +1,74 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +'use client' + +import { Table, _ } from '@/components/sw360' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' +import { useState, useEffect } from 'react' +import CommonUtils from '@/utils/common.utils' +import Link from 'next/link' +import ReleaseLink from '@/object-types/ReleaseLink' + +interface Props { + release: any +} + +const LinkedReleases = ({ release }: Props) => { + const t = useTranslations(COMMON_NAMESPACE) + const [data, setData] = useState([]) + + useEffect(() => { + if ( + !CommonUtils.isNullOrUndefined(release['_embedded']) && + !CommonUtils.isNullOrUndefined(release['_embedded']['sw360:releaseLinks']) + ) { + const data = release['_embedded']['sw360:releaseLinks'].map((item: ReleaseLink) => [ + [item.name, item.version, item.id], + t(item.releaseRelationship), + (CommonUtils.isNullEmptyOrUndefinedArray(item.licenseIds)) ? '' : item.licenseIds.join(', '), + t(item.clearingState) + ]) + setData(data) + } + }, []) + + const columns = [ + { + name: t('Name'), + formatter: ([name, version, id]: Array) => + _( + + {`${name} ${version}`} + + ), + }, + { + name: t('Release relation'), + }, + { + name: t('Licence names'), + }, + { + name: t('Clearing State'), + }, + ] + + return ( + <> +
+ + + + ) +} + +export default LinkedReleases diff --git a/src/app/[locale]/components/releases/detail/[id]/components/ReleaseGeneral.tsx b/src/app/[locale]/components/releases/detail/[id]/components/ReleaseGeneral.tsx new file mode 100644 index 00000000..a16d0db4 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/ReleaseGeneral.tsx @@ -0,0 +1,231 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +"use client" +import AdditionalData from '@/components/AdditionalData/AdditionalData' +import { useState } from 'react' +import ExternalIds from '@/components/ExternalIds/ExternalIds' +import { FaCopy } from 'react-icons/fa' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' +import Link from 'next/link' +import { FaInfoCircle } from 'react-icons/fa' +import styles from '../detail.module.css' +import CommonUtils from '@/utils/common.utils' + +const ReleaseGeneral = ({ release, releaseId }: any) => { + const t = useTranslations(COMMON_NAMESPACE); + const [toggle, setToggle] = useState(false); + + const renderArrayOfUsers = (users: Array) => { + return Object.entries(users) + .map(([index, item]: any) => ( + + {item.fullName} + + )) + .reduce((prev, curr): any => [prev, ', ', curr]) + } + + const renderArrayOfTexts = (texts: Array) => { + return Object.entries(texts) + .map(([index, item]: any) => ( + + {item} + + )) + .reduce((prev, curr): any => [prev, ', ', curr]) + } + + return ( +
+ { setToggle(!toggle) }}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{t('General')}
+ ) +} + +export default ReleaseGeneral \ No newline at end of file diff --git a/src/app/[locale]/components/releases/detail/[id]/components/ReleaseVendor.tsx b/src/app/[locale]/components/releases/detail/[id]/components/ReleaseVendor.tsx new file mode 100644 index 00000000..514e91e7 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/ReleaseVendor.tsx @@ -0,0 +1,58 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +"use client" +import { useState } from 'react' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' +import styles from '../detail.module.css' + +const ReleaseVendor = ({ release }: any) => { + const t = useTranslations(COMMON_NAMESPACE); + const [toggle, setToggle] = useState(false); + + return ( + + { setToggle(!toggle) }}> + + + + + + + + + + + + + + + + + + +
{t('Release Vendor')}
+ ) +} + +export default ReleaseVendor \ No newline at end of file diff --git a/src/app/[locale]/components/releases/detail/[id]/components/Summary.tsx b/src/app/[locale]/components/releases/detail/[id]/components/Summary.tsx new file mode 100644 index 00000000..3d7b8110 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/components/Summary.tsx @@ -0,0 +1,33 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +import ReleaseGeneral from "./ReleaseGeneral" +import ReleaseVendor from "./ReleaseVendor" + +interface Props { + release: any + releaseId: string +} + +const Summary = ({ release, releaseId }: Props) => { + return ( +
+
+

{release.description}

+
+
+ + +
+
+ ) +} + +export default Summary diff --git a/src/app/[locale]/components/releases/detail/[id]/detail.module.css b/src/app/[locale]/components/releases/detail/[id]/detail.module.css new file mode 100644 index 00000000..26c351d1 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/detail.module.css @@ -0,0 +1,73 @@ +/* + Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. + Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + + This program and the accompanying materials are made + available under the terms of the Eclipse Public License 2.0 + which is available at https://www.eclipse.org/legal/epl-2.0/ + + SPDX-License-Identifier: EPL-2.0 + License-Filename: LICENSE +*/ + +.summary-table { + border: 1px solid lightgray; + margin-bottom: 2rem; +} + +.mapDisplayRootItem { + max-width: 70%; +} + +.summary-table tbody td:first-child { + width: 30%; +} + +.summary-table tbody a{ + color: #F7941E !important; + text-decoration-line: none; +} + +.summary-table tbody td { + word-wrap: break-word; +} + +.btn-group:not(:last-child) { + margin-right: 0.5rem; +} + +.info:hover { + cursor: pointer; +} + +.dropdown-item a{ + text-decoration: none; + color: gray; +} + +.badge-circle { + display: inline-block; + width: 1rem; + height: 1rem; + border-radius: 0.5rem; + vertical-align: center; + margin-right: 5px; +} + +.SCAN_AVAILABLE, +.REPORT_AVAILABLE, +.UNDER_CLEARING { + background-color: #b95000; + color: #fff; +} + +.APPROVED { + background-color: #287d3c; + color: #fff; +} + +.NEW_CLEARING, +.SENT_TO_CLEARING_TOOL { + background-color: #da1414; + color: #fff; +} \ No newline at end of file diff --git a/src/app/[locale]/components/releases/detail/[id]/page.tsx b/src/app/[locale]/components/releases/detail/[id]/page.tsx new file mode 100644 index 00000000..582404a8 --- /dev/null +++ b/src/app/[locale]/components/releases/detail/[id]/page.tsx @@ -0,0 +1,27 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +import { authOptions } from '@/app/api/auth/[...nextauth]/route' +import { getServerSession } from "next-auth/next" +import { Session } from '@/object-types/Session' +import DetailOverview from './components/DetailOverview' + +interface Context { + params: { id: string } +} + +const Detail = async ({ params }: Context) => { + const session: Session = await getServerSession(authOptions) + const releaseId = params.id + + return +} + +export default Detail \ No newline at end of file diff --git a/src/assets/images/fossology.svg b/src/assets/images/fossology.svg new file mode 100644 index 00000000..051cd3d7 --- /dev/null +++ b/src/assets/images/fossology.svg @@ -0,0 +1,42 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/src/components/Attachments/Attachments.tsx b/src/components/Attachments/Attachments.tsx index d9c84bd2..6485c3fc 100644 --- a/src/components/Attachments/Attachments.tsx +++ b/src/components/Attachments/Attachments.tsx @@ -35,7 +35,7 @@ const Attachments = ({ documentId, session, documentType }: Props) => { const [attachmentData, setAttachmentData] = useState([]) const [totalRows, setTotalRows] = useState(0) - const buildAttachmentDetail = (item: any) => { + const buildAttachmentDetail = (item: Attachment) => { return (event: any) => { if (event.target.className == styles.expand) { event.target.className = styles.collapse @@ -62,7 +62,7 @@ const Attachments = ({ documentId, session, documentType }: Props) => { ${t('Checked On')} : - ${item.checkedOn} + ${(item.checkedOn) ? item.checkedOn : ''} ${t('Checked Comment')} : ${item.checkedComment} @@ -122,11 +122,15 @@ const Attachments = ({ documentId, session, documentType }: Props) => { item.filename, 'n/a', item.attachmentType, - '', - '', - '', - '', - '', + item.createdTeam, + item.createdBy, + item.checkedTeam, + item.checkedBy, + (item.usageAttachment.visible === 0 && item.usageAttachment.restricted == 0) + ? 'n/a' + : + {item.usageAttachment.visible} / {item.usageAttachment.restricted} + , [item.attachmentContentId, item.filename], ]) setAttachmentData(attachmentData) diff --git a/src/components/ComponentVulnerabilities/ComponentVulnerabilities.tsx b/src/components/ComponentVulnerabilities/ComponentVulnerabilities.tsx index 78ca8ace..5d332a2c 100644 --- a/src/components/ComponentVulnerabilities/ComponentVulnerabilities.tsx +++ b/src/components/ComponentVulnerabilities/ComponentVulnerabilities.tsx @@ -86,6 +86,7 @@ const ComponentVulnerabilities = ({ vulnerData, session }: Props) => { formatter: ({ checked, index }: any) => _( handleCheckBox(index, checked)} type='checkbox'>), + sort: false, }, { name: t('Release'), diff --git a/src/components/sw360/FossologyClearing/FossologyClearing.tsx b/src/components/sw360/FossologyClearing/FossologyClearing.tsx new file mode 100644 index 00000000..c32409fd --- /dev/null +++ b/src/components/sw360/FossologyClearing/FossologyClearing.tsx @@ -0,0 +1,356 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +'use client' +import Modal from 'react-bootstrap/Modal' +import Button from 'react-bootstrap/Button' +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from "@/object-types/Constants" +import { useState, useEffect, useRef, useCallback } from 'react' +import { Session } from '@/object-types/Session' +import styles from './fossologyClearing.module.css' +import EmbeddedAttachment from '@/object-types/EmbeddedAttachment' +import { Alert } from 'react-bootstrap' +import CommonUtils from '@/utils/common.utils' +import ApiUtils from '@/utils/api/api.util' +import { FossologyProcessInfo, FossologyProcessStatus } from '@/object-types/FossologyProcessStatus' + +interface Props { + show?: boolean + setShow?: React.Dispatch> + session: Session + releaseId: string +} + +const clearingMessages: { [key: string]: { [key: string]: string } } = { + NUMBER_OF_ATTACHMENTS_NOT_MATCH: { + message: 'number_of_attachments_not_match_condition', + variant: 'danger' + }, + CLEARING_SUCCESS: { + message: 'fossology_clearing_finished', + variant: 'success' + }, + ERROR_PROCESSING: { + message: 'Error when processing!', + variant: 'danger' + } +} + +const FossologyClearing = ({ show, setShow, session, releaseId }: Props) => { + const t = useTranslations(COMMON_NAMESPACE) + const stepSize = 16.66 + const progressInterval = useRef(undefined) + const countDownInterval = useRef(undefined) + const numberOfSourceAttachment = useRef(0) + + const [timeInterval, setTimeInterval] = useState(5) + const [release, setRelease] = useState(undefined) + const [confirmShow, setConfirmShow] = useState(false) + + const [message, setMessage] = useState({ + content: '', + variant: 'success', + show: false, + }) + + + const [progressStatus, setProgressStatus] = useState({ + percent: 0, + stepName: '' + }) + + const fetchData = async (url: string) => { + return ApiUtils.GET(url, session.user.access_token) + .then((response) => response.json()) + .catch(() => undefined) + } + + const fetchRelease = useCallback(async () => { + const url = `releases/${releaseId}` + fetchData(url).then(data => { + setRelease(data) + numberOfSourceAttachment.current = countSourceAttachment(data._embedded['sw360:attachments']) + if (!isClearingAllowed()) { + showMessage(clearingMessages.NUMBER_OF_ATTACHMENTS_NOT_MATCH) + setProgressStatus({ + percent: 0, + stepName: '' + }) + return + } + }) + }, [releaseId]) + + const handleCloseDialog = () => { + hideMessage() + clearAllInterval() + setProgressStatus({ + percent: 0, + stepName: '' + }) + setRelease(undefined) + setShow(false) + } + + const handleOutdated = () => { + handleFossologyClearing({ markFossologyProcessOutdated: true }) + setConfirmShow(false) + } + + const reloadReport = () => { + // Missing API will handle later + handleFossologyClearing({ markFossologyProcessOutdated: false }) + } + + const handleFossologyClearing = async (params: any) => { + hideMessage() + clearAllInterval() + + const triggerStatus = await triggerFossologyClearing(params) + if (triggerStatus == false) { + showMessage(clearingMessages.ERROR_PROCESSING) + return + } + + setProgressStatus({ + percent: 0, + stepName: '' + }) + + startCountDownt() + + const interval = setInterval(() => { + checkFossologyProcessStatus() + resetTimeCountDown() + }, 5000) + + progressInterval.current = interval + } + + const triggerFossologyClearing = async (params: { [key: string]: string }) => { + const url = CommonUtils.createUrlWithParams(`releases/${releaseId}/triggerFossologyProcess`, params) + const response = await fetchData(url) + return (response) ? true : false + } + + const checkFossologyProcessStatus = async () => { + const url = `releases/${releaseId}/checkFossologyProcessStatus` + const response: FossologyProcessStatus = await fetchData(url) + + if (response.status === 'SUCCESS') { + setProgressStatus({ + percent: 99.96, + stepName: 'Report generation done' + }) + showMessage(clearingMessages.CLEARING_SUCCESS) + return + } + if (response.fossologyProcessInfo !== null) { + updateProgressStatus(response.fossologyProcessInfo) + } + } + + const updateProgressStatus = (fossologyProcessInfo: FossologyProcessInfo) => { + let progressText = '', + progressPercent = 0 + if (fossologyProcessInfo.processSteps.length === 3) { + progressText += 'Report generation' + progressPercent = 4 * stepSize + } else if (fossologyProcessInfo.processSteps.length === 2) { + progressText += 'Scanning source' + progressPercent = 2 * stepSize + } else { + progressText += 'Uploading source' + progressPercent = 0 * stepSize + } + + if (fossologyProcessInfo.processSteps.at(-1).stepStatus === 'DONE') { + progressText += ' done' + progressPercent += 2 * stepSize + } else if (fossologyProcessInfo.processSteps.at(-1).stepStatus === 'IN_WORK') { + progressText += ' in progress' + progressPercent += 1 * stepSize + } else { + progressText += ' to be started' + progressPercent += 0 * stepSize + } + + setProgressStatus({ + percent: progressPercent, + stepName: progressText + }) + } + + const hideMessage = () => { + setMessage((prev: any) => ({ + ...prev, + show: false, + })) + } + + const showMessage = (clearingMessage: { [key: string]: string }) => { + setMessage({ + content: clearingMessage.message, + variant: clearingMessage.variant, + show: true + }) + } + + const startCountDownt = () => { + const interval = setInterval(() => { + setTimeInterval(prev => prev - 1) + }, 1000) + countDownInterval.current = interval + } + + const clearAllInterval = () => { + countDownInterval.current = clearInterval(countDownInterval.current) + progressInterval.current = clearInterval(progressInterval.current) + resetTimeCountDown() + } + + const resetTimeCountDown = () => { + setTimeInterval(5) + } + + const isClearingAllowed = () => { + if (numberOfSourceAttachment.current != 1) { + return false + } + return true + } + + const countSourceAttachment = (attachments: Array | undefined) => { + if (CommonUtils.isNullEmptyOrUndefinedArray(attachments)) { + return 0 + } + return attachments.filter((attachment) => attachment.attachmentType === 'SOURCE').length + } + + useEffect(() => { + if (show === true) { + if (release === undefined) { + fetchRelease() + checkFossologyProcessStatus() + } + else { + if (progressStatus.percent > 99) { + showMessage(clearingMessages.CLEARING_SUCCESS) + return + } + + if (show === true && + !countDownInterval.current && + !progressInterval.current && + (numberOfSourceAttachment.current == 1)) { + handleFossologyClearing({}) + } + + if (progressStatus.percent > 99) { + clearAllInterval() + showMessage(clearingMessages.CLEARING_SUCCESS) + } + } + } + + }, [show, progressStatus.percent, releaseId, fetchRelease]); + + return ( + <> + + + {t('Fossology Process')} + + + + {t.rich(message.content, { + count: numberOfSourceAttachment.current, + })} + +
+

{t('How it works')}:

+

+ {t('basic_fossology_process')}: +

    +
  1. {t('Upload the sources to FOSSology')}
  2. +
  3. {t('Scan the sources')}
  4. +
  5. {t('Generate a report out of the scan results and attach it to this release')}
  6. +
+

+

+ {t('hand_when_got_stuck_fossology')} +

+
+
{t('Found source attachment')}: + {(release && (numberOfSourceAttachment.current === 1)) + ? release._embedded['sw360:attachments'].filter((attachment: EmbeddedAttachment) => attachment.attachmentType === 'SOURCE').at(0).filename + : 'unknown' + } +
+
+
+
+
+ {progressStatus.stepName} +
+
+
+
+ {(progressStatus.percent < 99.96) &&
Auto-refresh in {timeInterval}
} +
+ + {(numberOfSourceAttachment.current === 1) + ? + <> + + + + + : + <> + + + } + +
+ setConfirmShow(false)} + backdrop='static' + centered + size='lg' + > + + {t('Reset FOSSology Process')}? + + +
Do you really want to set the current FOSSology process to state "OUTDATED"? + This cannot be undone and a new process is started the next time you open this popup.
+
+ + + + +
+ + ) +} + +export default FossologyClearing \ No newline at end of file diff --git a/src/components/sw360/FossologyClearing/fossologyClearing.module.css b/src/components/sw360/FossologyClearing/fossologyClearing.module.css new file mode 100644 index 00000000..fbc178f9 --- /dev/null +++ b/src/components/sw360/FossologyClearing/fossologyClearing.module.css @@ -0,0 +1,21 @@ +/* + Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project. + + This program and the accompanying materials are made + available under the terms of the Eclipse Public License 2.0 + which is available at https://www.eclipse.org/legal/epl-2.0/ + + SPDX-License-Identifier: EPL-2.0 + License-Filename: LICENSE +*/ + +.guide { + background-color: #eef2fa; + border: 1px solid #89a7e0; + padding: 0.9375rem 1rem; + border-width: 0.0625rem; + border-radius: 0.25rem; + white-space: normal; + margin-bottom: 1rem; + font-weight: bold; +} diff --git a/src/components/sw360/SideBar/SideBar.module.css b/src/components/sw360/SideBar/SideBar.module.css index 5724c1a2..97f29d30 100644 --- a/src/components/sw360/SideBar/SideBar.module.css +++ b/src/components/sw360/SideBar/SideBar.module.css @@ -36,3 +36,46 @@ margin-left: 0.5rem; border-radius: 10rem; } + +.APPROVED { + background-color: #287d3c; + width: 24px; + height: 24px; + border-radius: 0.2rem; + margin: 0 0.5rem; + display: inline-block; +} + +.OPEN { + background-color: red; + width: 24px; + height: 24px; + border-radius: 0.2rem; + margin: 0 0.5rem; + display: inline-block; +} + +.IN_PROGRESS { + background-color: #b95000; + width: 24px; + height: 24px; + border-radius: 0.2rem; + margin: 0 0.5rem; + display: inline-block; +} + +.REJECTED::before { + content: '!' +} + +.REJECTED { + background-color: red; + width: 24px; + height: 24px; + border-radius: 0.2rem; + margin: 0 0.5rem; + display: inline-block; + color: white; + padding-left: 5px; + font-weight: bold; +} diff --git a/src/components/sw360/SideBar/SideBar.tsx b/src/components/sw360/SideBar/SideBar.tsx index b6469d90..b34cb82e 100644 --- a/src/components/sw360/SideBar/SideBar.tsx +++ b/src/components/sw360/SideBar/SideBar.tsx @@ -11,7 +11,10 @@ "use client" import { useTranslations } from 'next-intl' import styles from './SideBar.module.css' + +import ReleaseTabIds from '@/object-types/enums/ReleaseTabIds' import CommonTabIds from '@/object-types/enums/CommonTabsIds' + import { COMMON_NAMESPACE } from '@/object-types/Constants' import { useState, useEffect } from 'react' import CommonUtils from '@/utils/common.utils' @@ -28,9 +31,10 @@ interface Props { setSelectedTab: React.Dispatch>, tabList: Array, vulnerabilities?: Array, + eccStatus?: string } -const SideBar = ({ selectedTab, setSelectedTab, tabList, vulnerabilities }: Props) => { +const SideBar = ({ selectedTab, setSelectedTab, tabList, vulnerabilities, eccStatus }: Props) => { const [numberOfCheckedOrUncheckedVulnerabilities, setNumberOfCheckedOrUncheckedVulnerabilities] = useState(0); const [numberOfIncorrectVulnerabilities, setNumberOfIncorrectVulnerabilities] = useState(0); const t = useTranslations(COMMON_NAMESPACE); @@ -68,6 +72,11 @@ const SideBar = ({ selectedTab, setSelectedTab, tabList, vulnerabilities }: Prop ) + } else if (tab.id === ReleaseTabIds.ECC_DETAILS) { + return ( + {t(tab.name)} + ) } return ( +} + +export interface FossologyProcessStatus { + fossologyProcessInfo: FossologyProcessInfo | null + status: string +} \ No newline at end of file diff --git a/src/object-types/ReleaseLink.ts b/src/object-types/ReleaseLink.ts index 8eeca650..5cfcda13 100644 --- a/src/object-types/ReleaseLink.ts +++ b/src/object-types/ReleaseLink.ts @@ -9,12 +9,18 @@ // License-Filename: LICENSE export default interface ReleaseLink { - id: string, - name: string, - version: string, - mainlineState: string, + id: string + name: string + version: string + mainlineState: string | undefined clearingReport: { clearingReportStatus: string - }, + } | undefined clearingState: string + vendor: string + longName: string + releaseRelationship: string + hasSubreleases: boolean + licenseIds: Array | undefined + accessible: boolean } \ No newline at end of file diff --git a/src/object-types/enums/ReleaseTabIds.ts b/src/object-types/enums/ReleaseTabIds.ts new file mode 100644 index 00000000..7f9f9af5 --- /dev/null +++ b/src/object-types/enums/ReleaseTabIds.ts @@ -0,0 +1,17 @@ +// Copyright (C) TOSHIBA CORPORATION, 2023. Part of the SW360 Frontend Project. +// Copyright (C) Toshiba Software Development (Vietnam) Co., Ltd., 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +enum ReleaseTabIds { + LINKED_RELEASES = 'tab-Releases', + CLEARING_DETAILS = 'tab-ClearingDetails', + ECC_DETAILS = 'tab-EccDetails', +} + +export default ReleaseTabIds \ No newline at end of file diff --git a/src/styles/globals.css b/src/styles/globals.css index 0e2dd355..14bae5e1 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -118,7 +118,7 @@ footer { padding: 10px; } -.table thead { +.table thead th{ background-color: var(--sw360-primary-background-color); color: white; font-size: bold; diff --git a/src/utils/common.utils.ts b/src/utils/common.utils.ts index 19f524a6..7a9d4b16 100644 --- a/src/utils/common.utils.ts +++ b/src/utils/common.utils.ts @@ -29,10 +29,18 @@ const createUrlWithParams = (url: string, params: any) => { return `${url}?${queryString}`; } +const isNullEmptyOrUndefinedArray = (arr: Array) => { + if (arr === null || arr === undefined || arr.length === 0) { + return true; + } + return false; +} + const CommonUtils = { isNullOrUndefined, isNullEmptyOrUndefinedString, createUrlWithParams, + isNullEmptyOrUndefinedArray, } export default CommonUtils; \ No newline at end of file