Skip to content

Commit

Permalink
Merge branch 'DependencyTrack:master' into feat/add-team-selection-in…
Browse files Browse the repository at this point in the history
…-create-proect-button
  • Loading branch information
Gepardgame authored Sep 19, 2024
2 parents ae3ec68 + 4bf7818 commit 91e9980
Show file tree
Hide file tree
Showing 23 changed files with 471 additions and 51 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginxinc/nginx-unprivileged:1.27.1-alpine@sha256:16f6d3e75e8e00832788c9e3d52fd00b29d363df1858d1906348752b539cd944
FROM nginxinc/nginx-unprivileged:1.27.1-alpine@sha256:a0e2ed302ce2f7d316ad3c98c5025f143d4bb0daf46fa86d2fb15b42d5cc31be

# Arguments that can be passed at build time
ARG COMMIT_SHA=unknown
Expand Down
31 changes: 30 additions & 1 deletion src/containers/DefaultContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="app">
<DefaultHeader />
<div class="app-body">
<AppSidebar fixed>
<AppSidebar ref="sidebar" fixed>
<SidebarHeader />
<SidebarForm />
<SidebarNav :navItems="permissibleNav"></SidebarNav>
Expand Down Expand Up @@ -60,6 +60,7 @@ export default {
},
data() {
return {
isSidebarMinimized: true,
breadcrumbs: [],
nav: [
{
Expand Down Expand Up @@ -150,6 +151,12 @@ export default {
};
},
methods: {
handleMinimizedUpdate() {
this.isSidebarMinimized = !this.isSidebarMinimized;
if (localStorage) {
localStorage.setItem('isSidebarMinimized', this.isSidebarMinimized);
}
},
generateBreadcrumbs: function generateBreadcrumbs(
crumbName,
subSectionName,
Expand Down Expand Up @@ -186,6 +193,28 @@ export default {
mounted() {
if (this.$dtrack && this.$dtrack.version.includes('SNAPSHOT')) {
this.$root.$emit('bv::show::modal', 'snapshotModal');
this.isSidebarMinimized =
localStorage && localStorage.getItem('isSidebarMinimized') !== null
? localStorage.getItem('isSidebarMinimized') === 'true'
: false;
const sidebar = document.body;
if (sidebar) {
if (this.isSidebarMinimized) {
sidebar.classList.add('sidebar-minimized');
} else {
sidebar.classList.remove('sidebar-minimized');
}
}
this.$nextTick(() => {
const sidebarMinimizer = this.$el.querySelector('.sidebar-minimizer');
if (sidebarMinimizer) {
sidebarMinimizer.addEventListener(
'click',
this.handleMinimizedUpdate,
);
}
});
}
},
computed: {
Expand Down
28 changes: 23 additions & 5 deletions src/i18n/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import axios from 'axios';
import api from '../shared/api.json';

Vue.use(VueI18n);

async function getDefaultLanguage() {
try {
let url = `${api.BASE_URL}/${api.URL_CONFIG_PROPERTY}/public/general/default.locale`;
let response = await axios.get(url);
return decodeURIComponent(response.data.propertyValue);
} catch (error) {
console.error('Error fetching default language:', error);
return '';
}
}

function loadLocaleMessages() {
const locales = require.context(
'./locales',
Expand Down Expand Up @@ -54,15 +67,20 @@ function matchLocale(requestedLocale) {
);
return 'en';
}

const i18n = new VueI18n({
locale: matchLocale(
locale: 'en',
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
messages: localeMessages,
});

getDefaultLanguage().then((defaultLanguage) => {
const matchedLocale = matchLocale(
(localStorage && localStorage.getItem('Locale')) ||
defaultLanguage ||
navigator.language ||
navigator.userLanguage,
),
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
messages: localeMessages,
);
i18n.locale = matchedLocale;
});

export default i18n;
11 changes: 10 additions & 1 deletion src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"create_template": "Vorlage erstellen",
"create_user": "Benutzer erstellen",
"default": "Standard",
"default_language": "Standardsprache",
"default_language_desc": "Standardsprache, die für alle verwendet wird, wenn sie keine angegeben haben. \nWenn dies deaktiviert ist, wird die Sprache des Browsers verwendet.",
"default_language_enable": "Aktivieren Sie die Standardsprache",
"default_template_restored": "Standardvorlagen wiederhergestellt",
"defectdojo": "DefectDojo",
"delete_alert": "Alarm löschen",
Expand Down Expand Up @@ -187,6 +190,7 @@
"permissions": "Berechtigungen",
"personal_access_token": "Persönlicher Zugriffstoken",
"portfolio_access_control": "Portfolio-Zugriffskontrolle",
"preview": "Vorschau",
"project_access": "Projektzugriff",
"publisher": "Publisher",
"publisher_class": "Publisher-Klasse",
Expand Down Expand Up @@ -273,7 +277,10 @@
"vulnsource_osv_advisories_desc": "Google OSV ist eine verteilte Infrastruktur für Schwachstellen und Triage für Open-Source-Projekte, die sowohl Open-Source-Betreuern als auch Open-Source-Nutzern helfen soll. Es dient als Aggregator von Schwachstellendatenbanken, die das OpenSSF-Schwachstellenformat übernommen haben.",
"vulnsource_osv_advisories_enable": "Wählen Sie ein Ökosystem aus, um Google OSV Advisory Mirroring zu aktivieren",
"vulnsource_osv_alias_sync_warning": "OSV kann nicht identische Schwachstellen als Aliase melden. Gehen Sie mit Vorsicht vor.",
"vulnsource_osv_base_url": "OSV-Basis-URL"
"vulnsource_osv_base_url": "OSV-Basis-URL",
"welcome_message": "Willkommensnachricht",
"welcome_message_desc": "Passen Sie die Willkommensnachricht an, die auf der Startseite von Dependency-Track angezeigt wird, bevor sich Benutzer anmelden.",
"welcome_message_enable": "Willkommensnachricht aktivieren"
},
"condition": {
"forbidden": "Verboten (403)",
Expand Down Expand Up @@ -699,6 +706,8 @@
"profile_updated": "Profil aktualisiert",
"project_cloning_in_progress": "Das Projekt wird mit den angegebenen Klonoptionen erstellt",
"project_created": "Projekt erstellt",
"project_delete_message": "Durch das Löschen dieses Projekts werden auch alle zugehörigen untergeordneten Projekte dauerhaft gelöscht. \nDiese Aktion kann nicht rückgängig gemacht werden. \nSind Sie sicher, dass Sie fortfahren möchten?",
"project_delete_title": "Bestätigen Sie die Projektlöschung",
"project_deleted": "Projekt gelöscht",
"project_details": "Projekt Details",
"project_metadata_supplier_name_desc": "Die Organisation, die die BOM bereitgestellt hat",
Expand Down
11 changes: 10 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"create_template": "Create Template",
"create_user": "Create User",
"default": "Default",
"default_language": "Default Language",
"default_language_desc": "Default language, which is used for everyone, when they didn't specify one. Langauge from Browser will be used, when this is disabled.",
"default_language_enable": "Enable Default language",
"default_template_restored": "Default templates restored",
"defectdojo": "DefectDojo",
"delete_alert": "Delete Alert",
Expand Down Expand Up @@ -187,6 +190,7 @@
"permissions": "Permissions",
"personal_access_token": "Personal Access Token",
"portfolio_access_control": "Portfolio Access Control",
"preview": "Preview",
"project_access": "Project access",
"publisher": "Publisher",
"publisher_class": "Publisher class",
Expand Down Expand Up @@ -273,7 +277,10 @@
"vulnsource_osv_advisories_desc": "Google OSV is a distributed vulnerability and triage infrastructure for open source projects aimed at helping both open source maintainers and consumers of open source. It serves as an aggregator of vulnerability databases that have adopted the OpenSSF Vulnerability format.",
"vulnsource_osv_advisories_enable": "Select ecosystem to enable Google OSV Advisory mirroring",
"vulnsource_osv_alias_sync_warning": "OSV may report non-identical vulnerabilities as aliases. Proceed with caution.",
"vulnsource_osv_base_url": "OSV Base URL"
"vulnsource_osv_base_url": "OSV Base URL",
"welcome_message": "Welcome Message",
"welcome_message_desc": "Customize the welcome message that appears on the start page of Dependency-Track before users sign in.",
"welcome_message_enable": "Enable welcome message"
},
"condition": {
"forbidden": "Forbidden (403)",
Expand Down Expand Up @@ -699,6 +706,8 @@
"profile_updated": "Profile updated",
"project_cloning_in_progress": "The project is being created with the cloning options specified",
"project_created": "Project created",
"project_delete_message": "Deleting this project will also permanently delete all associated child projects. This action cannot be undone. Are you sure you want to proceed?",
"project_delete_title": "Confirm Project Deletion",
"project_deleted": "Project deleted",
"project_details": "Project Details",
"project_metadata_supplier_name_desc": "The organization that supplied the BOM",
Expand Down
11 changes: 10 additions & 1 deletion src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"create_template": "Crear plantilla",
"create_user": "Crear usuario",
"default": "Por defecto",
"default_language": "Idioma predeterminado",
"default_language_desc": "Idioma predeterminado, que se usa para todos, cuando no especificaron uno. \nSe utilizará el idioma del navegador cuando esté deshabilitado.",
"default_language_enable": "Habilitar idioma predeterminado",
"default_template_restored": "Plantillas predeterminadas restauradas",
"defectdojo": "DefectoDojo",
"delete_alert": "Eliminar alerta",
Expand Down Expand Up @@ -187,6 +190,7 @@
"permissions": "Permisos",
"personal_access_token": "Token de acceso personal",
"portfolio_access_control": "Control de acceso al portafolio",
"preview": "Avance",
"project_access": "Acceso al proyecto",
"publisher": "Editor",
"publisher_class": "Clase de editor",
Expand Down Expand Up @@ -273,7 +277,10 @@
"vulnsource_osv_advisories_desc": "Google OSV es una infraestructura distribuida de clasificación y vulnerabilidad para proyectos de código abierto cuyo objetivo es ayudar tanto a los mantenedores como a los consumidores de código abierto. Sirve como agregador de bases de datos de vulnerabilidades que han adoptado el formato OpenSSF Vulnerability.",
"vulnsource_osv_advisories_enable": "Seleccione el ecosistema para habilitar la duplicación del aviso OSV de Google",
"vulnsource_osv_alias_sync_warning": "OSV puede informar vulnerabilidades no idénticas como alias. Proceda con precaución.",
"vulnsource_osv_base_url": "URL base de OSV"
"vulnsource_osv_base_url": "URL base de OSV",
"welcome_message": "Mensaje de bienvenida",
"welcome_message_desc": "Personalice el mensaje de bienvenida que aparece en la página de inicio de Dependency-Track antes de que los usuarios inicien sesión.",
"welcome_message_enable": "Habilitar mensaje de bienvenida"
},
"condition": {
"forbidden": "Prohibido (403)",
Expand Down Expand Up @@ -699,6 +706,8 @@
"profile_updated": "Perfil actualizado",
"project_cloning_in_progress": "El proyecto se está creando con las opciones de clonación especificadas.",
"project_created": "Proyecto creado",
"project_delete_message": "Al eliminar este proyecto, también se eliminarán permanentemente todos los proyectos secundarios asociados. \nEsta acción no se puede deshacer. \n¿Estás seguro de que quieres continuar?",
"project_delete_title": "Confirmar la eliminación del proyecto",
"project_deleted": "Proyecto eliminado",
"project_details": "detalles del proyecto",
"project_metadata_supplier_name_desc": "La organización que suministró el BOM.",
Expand Down
11 changes: 10 additions & 1 deletion src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"create_template": "Créer un modèle",
"create_user": "Créer un utilisateur",
"default": "Défaut",
"default_language": "Langue par défaut",
"default_language_desc": "Langue par défaut, qui est utilisée par tout le monde, lorsqu'ils n'en ont pas spécifié. \nLa langue du navigateur sera utilisée lorsqu'elle est désactivée.",
"default_language_enable": "Activer la langue par défaut",
"default_template_restored": "Modèles par défaut restaurés",
"defectdojo": "DefectDojo",
"delete_alert": "Supprimer l'alerte",
Expand Down Expand Up @@ -187,6 +190,7 @@
"permissions": "Autorisations",
"personal_access_token": "Jeton d'accès personnel",
"portfolio_access_control": "Contrôle d'accès au portefolio",
"preview": "Aperçu",
"project_access": "Accès au projet",
"publisher": "Éditeur",
"publisher_class": "Classe d'éditeur",
Expand Down Expand Up @@ -273,7 +277,10 @@
"vulnsource_osv_advisories_desc": "Google OSV est une infrastructure distribuée de tri et de vulnérabilité pour les projets open source visant à aider à la fois les responsables et les consommateurs d'open source. Il sert d'agrégateur de bases de données de vulnérabilités ayant adopté le format OpenSSF Vulnerability.",
"vulnsource_osv_advisories_enable": "Sélectionnez (au moins) un écosystème pour activer la réplication de Google OSV Advisory",
"vulnsource_osv_alias_sync_warning": "OSV peut signaler des vulnérabilités non identiques sous forme d'alias. Procéder avec prudence.",
"vulnsource_osv_base_url": "URL de base OSV"
"vulnsource_osv_base_url": "URL de base OSV",
"welcome_message": "Message de bienvenue",
"welcome_message_desc": "Personnalisez le message de bienvenue qui apparaît sur la page de démarrage de Dependency-Track avant que les utilisateurs ne se connectent.",
"welcome_message_enable": "Activer le message de bienvenue"
},
"condition": {
"forbidden": "Interdit (403)",
Expand Down Expand Up @@ -699,6 +706,8 @@
"profile_updated": "Profil mis à jour",
"project_cloning_in_progress": "Le projet est en cours de création avec les options de clonage spécifiées",
"project_created": "Projet créé",
"project_delete_message": "La suppression de ce projet supprimera également définitivement tous les projets enfants associés. \nCette action ne peut pas être annulée. \nÊtes-vous sûr de vouloir continuer ?",
"project_delete_title": "Confirmer la suppression du projet",
"project_deleted": "Projet supprimé",
"project_details": "Détails du projet",
"project_metadata_supplier_name_desc": "L'organisation qui a fourni la nomenclature",
Expand Down
11 changes: 10 additions & 1 deletion src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
"create_template": "टेम्पलेट बनाएं",
"create_user": "उपयोगकर्ता बनाइये",
"default": "गलती करना",
"default_language": "डिफ़ॉल्ट भाषा",
"default_language_desc": "डिफ़ॉल्ट भाषा, जिसका उपयोग सभी के लिए किया जाता है, जब उन्होंने किसी एक को निर्दिष्ट नहीं किया हो। \nइसे अक्षम करने पर ब्राउज़र से लैंग्वेज का उपयोग किया जाएगा।",
"default_language_enable": "डिफ़ॉल्ट भाषा सक्षम करें",
"default_template_restored": "डिफ़ॉल्ट टेम्पलेट्स पुनर्स्थापित किए गए",
"defectdojo": "डिफेक्टडोजो",
"delete_alert": "अलर्ट हटाएं",
Expand Down Expand Up @@ -187,6 +190,7 @@
"permissions": "अनुमतियां",
"personal_access_token": "व्यक्तिगत एक्सेस टोकन",
"portfolio_access_control": "पोर्टफोलियो एक्सेस नियंत्रण",
"preview": "पूर्व दर्शन",
"project_access": "परियोजना तक पहुंच",
"publisher": "प्रकाशक",
"publisher_class": "प्रकाशक वर्ग",
Expand Down Expand Up @@ -273,7 +277,10 @@
"vulnsource_osv_advisories_desc": "Google OSV ओपन सोर्स प्रोजेक्ट्स के लिए एक वितरित भेद्यता और ट्राइएज इंफ्रास्ट्रक्चर है जिसका उद्देश्य ओपन सोर्स अनुरक्षकों और ओपन सोर्स के उपभोक्ताओं दोनों की मदद करना है। यह भेद्यता डेटाबेस के एग्रीगेटर के रूप में कार्य करता है जिसने OpenSSF भेद्यता प्रारूप को अपनाया है।",
"vulnsource_osv_advisories_enable": "Google OSV एडवाइजरी मिररिंग सक्षम करने के लिए पारिस्थितिकी तंत्र का चयन करें",
"vulnsource_osv_alias_sync_warning": "OSV गैर-समान कमज़ोरियों को उपनाम के रूप में रिपोर्ट कर सकता है। सावधानी से आगे बढ़ें।",
"vulnsource_osv_base_url": "OSV बेस यूआरएल"
"vulnsource_osv_base_url": "OSV बेस यूआरएल",
"welcome_message": "स्वागत संदेश",
"welcome_message_desc": "उपयोगकर्ताओं के साइन इन करने से पहले डिपेंडेंसी-ट्रैक के आरंभ पृष्ठ पर दिखाई देने वाले स्वागत संदेश को अनुकूलित करें।",
"welcome_message_enable": "स्वागत संदेश सक्षम करें"
},
"condition": {
"forbidden": "निषिद्ध (403)",
Expand Down Expand Up @@ -699,6 +706,8 @@
"profile_updated": "प्रोफाइल अद्यतन किया गया",
"project_cloning_in_progress": "परियोजना को निर्दिष्ट क्लोनिंग विकल्पों के साथ बनाया जा रहा है",
"project_created": "प्रोजेक्ट बनाया गया",
"project_delete_message": "इस प्रोजेक्ट को हटाने से सभी संबद्ध चाइल्ड प्रोजेक्ट भी स्थायी रूप से हटा दिए जाएंगे। \nइस एक्शन को वापस नहीं किया जा सकता। \nक्या आप सुनिश्चित रूप से आगे बढ़ना चाहते हैं?",
"project_delete_title": "प्रोजेक्ट विलोपन की पुष्टि करें",
"project_deleted": "परियोजना हटा दी गई",
"project_details": "परियोजना विवरण",
"project_metadata_supplier_name_desc": "वह संगठन जिसने BOM की आपूर्ति की",
Expand Down
Loading

0 comments on commit 91e9980

Please sign in to comment.