Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,28 @@
}

this.axios.interceptors.response.use(null, (error) => {
if (!error.response) {
this.$toastr.e(
this.$t('condition.unsuccessful_action'),
this.$t('condition.http_request_error'),
);
return Promise.reject(error);
}
const contentType =
(error.response.headers && error.response.headers['content-type']) ||
'';
// On error status codes (4xx - 5xx), display a toast with either:
// * The problem title and detail in case of an RFC 9457 response
// * the HTTP status code and text
if (error.response.status >= 400 && error.response.status < 500) {
if (
error.response.headers['content-type'] === 'application/problem+json'
) {
if (contentType.includes('application/problem+json')) {
this.$toastr.w(error.response.data.detail, error.response.data.title);
} else if (
error.response.status === 400 &&
error.response.headers['content-type'] === 'application/json' &&
error.response.data &&
contentType.includes('application/json') &&
Array.isArray(error.response.data) &&
error.response.data.length > 0 &&
error.response.data[0].hasOwnProperty('invalidValue')

Check failure on line 125 in src/App.vue

View workflow job for this annotation

GitHub Actions / lint

Do not access Object.prototype method 'hasOwnProperty' from target object
) {
let validationError = error.response.data
.map((failure) => `${failure.path}: ${failure.message}`)
Expand All @@ -130,9 +138,7 @@
);
}
} else {
if (
error.response.headers['content-type'] === 'application/problem+json'
) {
if (contentType.includes('application/problem+json')) {
this.$toastr.w(error.response.data.detail, error.response.data.title);
} else {
this.$toastr.e(
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "Kennung",
"identifier_type": "Kennungstyp",
"identity": "Identität",
"identity_fields_set": null,
"in_triage": "In Triage",
"inactive": "Inaktiv",
"inactive_active_children": "Das Projekt kann nicht auf inaktiv gesetzt werden, wenn es aktive untergeordnete Projekte hat",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "Inventar",
"inventory_with_vulnerabilities": "Inventarisierung mit Schwachstellen",
"is_latest_tooltip": null,
"item": "Element",
"justification": "Begründung",
"justification_tooltip": "Die Begründung, warum der Auswirkungsanalysestatus „Nicht betroffen“ lautete",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "Betriebsrisiko",
"operator": "Operator",
"operator_help": null,
"optional": null,
"osi_approved": "OSI-Zulassung",
"outdated_only": "Nur veraltet",
"overview": "Überblick",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "Komponente entfernen",
"reported_by": "Berichtet von",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "Eine Komponentenkennung ist erforderlich",
"required_component_name": "Der Komponentenname ist erforderlich",
"required_component_version": "Die Komponentenversion ist erforderlich",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "Der Lizenzname ist erforderlich",
"required_project_name": "Der Projektname ist erforderlich",
"required_service_name": "Der Dienstname ist erforderlich",
"required_team": null,
"required_vulnerability_vuln_id": "Eine eindeutige Schwachstellenkennung ist erforderlich",
"requires_configuration": "Erfordert Konfiguration",
"requires_dependency": "Erfordert Abhängigkeit",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "Identifier",
"identifier_type": "Identifier Type",
"identity": "Identity",
"identity_fields_set": "{count} field(s) set",
"in_triage": "In Triage",
"inactive": "Inactive",
"inactive_active_children": "The project cannot be set to inactive if it has active children",
Expand All @@ -647,6 +648,7 @@
"internal_status": "Component classified as internal",
"inventory": "Inventory",
"inventory_with_vulnerabilities": "Inventory with Vulnerabilities",
"is_latest_tooltip": "Marks this version as the latest release of the project",
"item": "Item",
"justification": "Justification",
"justification_tooltip": "The rationale of why the impact analysis state was asserted to be \"Not Affected\"",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "Operational Risk",
"operator": "Operator",
"operator_help": "ANY = any condition matches; ALL = every condition must match",
"optional": "optional",
"osi_approved": "OSI Approved",
"outdated_only": "Outdated only",
"overview": "Overview",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": "{n}s ago",
"remove_component": "Remove Component",
"reported_by": "Reported By",
"required_classifier": "A classifier is required",
"required_collection_logic": "A collection logic is required",
"required_component_identifier": "A component identifier is required",
"required_component_name": "The component name is required",
"required_component_version": "The component version is required",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "The license name is required",
"required_project_name": "The project name is required",
"required_service_name": "The service name is required",
"required_team": "At least one team must be selected",
"required_vulnerability_vuln_id": "A unique vulnerability identifier is required",
"requires_configuration": "Requires configuration",
"requires_dependency": "Requires dependency",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "Identificador",
"identifier_type": "Tipo de identificador",
"identity": "Identidad",
"identity_fields_set": null,
"in_triage": "En triaje",
"inactive": "Inactivo",
"inactive_active_children": "El proyecto no se puede configurar como inactivo si tiene hijos activos",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "Inventario",
"inventory_with_vulnerabilities": "Inventario con vulnerabilidades",
"is_latest_tooltip": null,
"item": "Elemento",
"justification": "Justificación",
"justification_tooltip": "El motivo por el que se afirmó que el estado del análisis de impacto era \"No afectado\"",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "Riesgo operacional",
"operator": "Operador",
"operator_help": null,
"optional": null,
"osi_approved": "Aprobado por OSI",
"outdated_only": "Sólo anticuado",
"overview": "Descripción general",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "Quitar componente",
"reported_by": "Reportado por",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "Se requiere un identificador de componente",
"required_component_name": "El nombre del componente es obligatorio.",
"required_component_version": "La versión del componente es obligatoria.",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "El nombre de la licencia es obligatorio.",
"required_project_name": "El nombre del proyecto es obligatorio.",
"required_service_name": "El nombre del servicio es obligatorio.",
"required_team": null,
"required_vulnerability_vuln_id": "Se requiere un identificador de vulnerabilidad único",
"requires_configuration": "Requiere configuración",
"requires_dependency": "Requiere dependencia",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "Identifiant",
"identifier_type": "Type d'identifiant",
"identity": "Identité",
"identity_fields_set": null,
"in_triage": "Au tri",
"inactive": "Inactif",
"inactive_active_children": "Le projet ne peut pas être défini comme inactif s'il a des enfants actifs",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "Inventaire",
"inventory_with_vulnerabilities": "Inventaire avec vulnérabilités",
"is_latest_tooltip": null,
"item": "Élément",
"justification": "Justification",
"justification_tooltip": "La raison pour laquelle l'état de l'analyse d'impact a été déclaré « Non affecté »",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "Risque opérationnel",
"operator": "Opérateur",
"operator_help": null,
"optional": null,
"osi_approved": "Approuvée par l'OSI",
"outdated_only": "Obsolète seulement",
"overview": "Aperçu",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "Supprimer un composant",
"reported_by": "Rapporté par",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "Un identifiant de composant est requis",
"required_component_name": "Le nom du composant est obligatoire",
"required_component_version": "La version du composant est requise",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "Le nom de la licence est obligatoire",
"required_project_name": "Le nom du projet est obligatoire",
"required_service_name": "Le nom du service est obligatoire",
"required_team": null,
"required_vulnerability_vuln_id": "Un identifiant de vulnérabilité unique est requis",
"requires_configuration": "Nécessite une configuration",
"requires_dependency": "Nécessite une dépendance",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "पहचानकर्ता",
"identifier_type": "पहचानकर्ता प्रकार",
"identity": "पहचान",
"identity_fields_set": null,
"in_triage": "ट्राइएज में",
"inactive": "निष्क्रिय",
"inactive_active_children": "यदि प्रोजेक्ट में सक्रिय बच्चे हैं तो उसे निष्क्रिय नहीं किया जा सकता",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "भंडार",
"inventory_with_vulnerabilities": "कमज़ोरियों वाली सूची",
"is_latest_tooltip": null,
"item": "वस्तु",
"justification": "औचित्य",
"justification_tooltip": "प्रभाव विश्लेषण स्थिति को \"प्रभावित नहीं\" क्यों कहा गया, इसका औचित्य",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "परिचालनात्मक जोखिम",
"operator": "ऑपरेटर",
"operator_help": null,
"optional": null,
"osi_approved": "ओएसआई स्वीकृत",
"outdated_only": "केवल पुराना",
"overview": "अवलोकन",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "घटक हटाएँ",
"reported_by": "के द्वारा रिपोर्ट किया गया",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "घटक पहचानकर्ता आवश्यक है",
"required_component_name": "घटक का नाम आवश्यक है",
"required_component_version": "घटक संस्करण आवश्यक है",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "लाइसेंस का नाम आवश्यक है",
"required_project_name": "प्रोजेक्ट का नाम आवश्यक है",
"required_service_name": "सेवा का नाम आवश्यक है",
"required_team": null,
"required_vulnerability_vuln_id": "एक अद्वितीय भेद्यता पहचानकर्ता आवश्यक है",
"requires_configuration": "कॉन्फ़िगरेशन की आवश्यकता है",
"requires_dependency": "निर्भरता की आवश्यकता है",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "Identificatore",
"identifier_type": "Tipo di identificatore",
"identity": "Identità",
"identity_fields_set": null,
"in_triage": "Nel triage",
"inactive": "Inattivo",
"inactive_active_children": "Il progetto non può essere impostato su inattivo se ha figli attivi",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "Inventario",
"inventory_with_vulnerabilities": "Inventario con vulnerabilità",
"is_latest_tooltip": null,
"item": "Elemento",
"justification": "Giustificazione",
"justification_tooltip": "La motivazione per cui lo stato dell'analisi d'impatto è stato dichiarato \"Non interessato\"",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "Rischio operativo",
"operator": "Operatore",
"operator_help": null,
"optional": null,
"osi_approved": "Approvato dall'OSI",
"outdated_only": "Solo obsoleto",
"overview": "Panoramica",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "Rimuovi componente",
"reported_by": "Segnalato da",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "È obbligatorio un identificatore del componente",
"required_component_name": "Il nome del componente è obbligatorio",
"required_component_version": "La versione del componente è obbligatoria",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "Il nome della licenza è obbligatorio",
"required_project_name": "Il nome del progetto è obbligatorio",
"required_service_name": "Il nome del servizio è obbligatorio",
"required_team": null,
"required_vulnerability_vuln_id": "È richiesto un identificatore di vulnerabilità univoco",
"requires_configuration": "Richiede configurazione",
"requires_dependency": "Richiede dipendenza",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "識別子",
"identifier_type": "識別子の種類",
"identity": "身元",
"identity_fields_set": null,
"in_triage": "トリアージ中",
"inactive": "非活性",
"inactive_active_children": "アクティブな子プロジェクトがある場合、プロジェクトを非アクティブに設定することはできません。",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "インベントリ",
"inventory_with_vulnerabilities": "脆弱性のあるインベントリ",
"is_latest_tooltip": null,
"item": "アイテム",
"justification": "正当化",
"justification_tooltip": "影響分析の状態が「影響を受けない」と主張された理由",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "運用リスク",
"operator": "オペレーター",
"operator_help": null,
"optional": null,
"osi_approved": "OSI承認",
"outdated_only": "古いもののみ",
"overview": "概要",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "コンポーネントを削除",
"reported_by": "報告者",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "コンポーネント識別子が必要です",
"required_component_name": "コンポーネント名は必須です",
"required_component_version": "コンポーネントのバージョンが必要です",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "ライセンス名は必須です",
"required_project_name": "プロジェクト名は必須です",
"required_service_name": "サービス名は必須です",
"required_team": null,
"required_vulnerability_vuln_id": "固有の脆弱性識別子が必要です",
"requires_configuration": "設定が必要",
"requires_dependency": "依存関係が必要",
Expand Down
6 changes: 6 additions & 0 deletions src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@
"identifier": "Identyfikator",
"identifier_type": "Typ identyfikatora",
"identity": "Tożsamość",
"identity_fields_set": null,
"in_triage": "W segregacji",
"inactive": "Nieaktywny",
"inactive_active_children": "Projektu nie można ustawić jako nieaktywnego, jeśli ma aktywne elementy podrzędne",
Expand All @@ -647,6 +648,7 @@
"internal_status": null,
"inventory": "Spis",
"inventory_with_vulnerabilities": "Inwentarz z lukami w zabezpieczeniach",
"is_latest_tooltip": null,
"item": "Pozycja",
"justification": "Uzasadnienie",
"justification_tooltip": "Uzasadnienie, dla którego stwierdzono, że stan analizy wpływu to „Nie ma wpływu”",
Expand Down Expand Up @@ -716,6 +718,7 @@
"operational_risk": "Ryzyko operacyjne",
"operator": "Operator",
"operator_help": null,
"optional": null,
"osi_approved": "Zatwierdzone przez OSI",
"outdated_only": "Tylko nieaktualne",
"overview": "Przegląd",
Expand Down Expand Up @@ -964,6 +967,8 @@
"relative_seconds_ago": null,
"remove_component": "Usuń komponent",
"reported_by": "Zgłoszone przez",
"required_classifier": null,
"required_collection_logic": null,
"required_component_identifier": "Wymagany jest identyfikator komponentu",
"required_component_name": "Nazwa komponentu jest wymagana",
"required_component_version": "Wymagana jest wersja komponentu",
Expand All @@ -972,6 +977,7 @@
"required_license_name": "Nazwa licencji jest wymagana",
"required_project_name": "Nazwa projektu jest wymagana",
"required_service_name": "Nazwa usługi jest wymagana",
"required_team": null,
"required_vulnerability_vuln_id": "Wymagany jest unikalny identyfikator podatności",
"requires_configuration": "Wymaga konfiguracji",
"requires_dependency": "Wymaga zależności",
Expand Down
Loading
Loading