🗑️ chore: remove unused database and routing scripts; update cached Python bytecode files in __pycache__ directories

This commit is contained in:
2025-05-12 20:31:20 +02:00
parent fab8d10f03
commit 61124f5266
16 changed files with 84 additions and 110 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -5870,3 +5870,7 @@ Traceback (most recent call last):
raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
[in C:\Users\firem\Desktop\111\Systades\website\app.py:93]
2025-05-12 20:27:21,822 INFO: Anwendung gestartet [in /home/core/dev/website/app.py:77]
2025-05-12 20:27:23,378 INFO: Anwendung gestartet [in /home/core/dev/website/app.py:77]
2025-05-12 20:27:23,378 INFO: Anwendung gestartet [in /home/core/dev/website/app.py:77]
2025-05-12 20:27:37,548 INFO: Anwendung gestartet [in /home/core/dev/website/app.py:77]
+77 -107
View File
@@ -226,20 +226,74 @@ async function initializeMindmap() {
];
// Bestehende Cytoscape-Instanz entfernen, falls vorhanden
if (window.cy) {
if (window.cy && typeof window.cy.destroy === 'function') {
window.cy.destroy();
}
const cyContainer = document.getElementById('cy');
if (!cyContainer) {
throw new Error('Mindmap-Container #cy nicht gefunden!');
}
window.cy = cytoscape({
container: document.getElementById('cy'),
container: cyContainer,
elements: elements,
style: mindmapStyles,
style: [
{
selector: 'node',
style: mindmapStyles.node.base
},
{
selector: 'node[isCenter]',
style: mindmapStyles.node.center
},
{
selector: 'node:selected',
style: mindmapStyles.node.selected
},
{
selector: 'edge',
style: mindmapStyles.edge.base
}
],
layout: mindmapStyles.layout.base
});
// Füge neuronale Eigenschaften zu allen Knoten hinzu
cy.nodes().forEach(node => {
const data = node.data();
// Verwende mindmapConfig für Kategorie-Farben oder einen Standardwert
const categoryColor = data.category && mindmapConfig.categories[data.category]
? mindmapConfig.categories[data.category].color
: '#60a5fa';
node.data({
...data,
neuronSize: data.neuronSize || 8,
neuronActivity: data.neuronActivity || 0.8,
refractionPeriod: Math.random() * 300 + 700,
threshold: Math.random() * 0.3 + 0.6,
lastFired: 0,
color: data.color || categoryColor
});
});
// Füge synaptische Eigenschaften zu allen Kanten hinzu
cy.edges().forEach(edge => {
const data = edge.data();
edge.data({
...data,
strength: data.strength || 0.5,
conductionVelocity: Math.random() * 0.5 + 0.3,
latency: Math.random() * 100 + 50
});
});
// Event-Listener für Knoten-Klicks
cy.on('tap', 'node', async function(evt) {
const node = evt.target;
console.log('Node clicked:', node.id(), 'hasChildren:', node.data('hasChildren'), 'expanded:', node.data('expanded'));
if (node.data('hasChildren') && !node.data('expanded')) {
await loadSubthemes(node);
}
@@ -248,6 +302,12 @@ async function initializeMindmap() {
// Layout ausführen
cy.layout(mindmapStyles.layout.base).run();
// Starte neuronale Aktivitätssimulation
startNeuralActivitySimulation(cy);
// Mindmap mit echten Daten befüllen (Styles, Farben etc.)
updateMindmap();
return true;
} catch (error) {
console.error('Fehler bei der Mindmap-Initialisierung:', error);
@@ -279,115 +339,25 @@ document.addEventListener('DOMContentLoaded', function() {
}
console.log('Cytoscape ist verfügbar');
// Beispiel-Daten entfernt, stattdessen große Mindmap-Daten verwenden
const elements = [
// Knoten
...mindmapData.nodes.map(node => ({
data: {
id: node.id,
label: node.label,
category: node.category,
description: node.description,
hasChildren: node.hasChildren,
expanded: node.expanded,
neuronSize: node.neuronSize,
neuronActivity: node.neuronActivity,
color: node.color,
icon: node.icon,
fontColor: node.fontColor,
fontSize: node.fontSize
}
})),
// Kanten
...mindmapData.edges.map(edge => ({
data: {
source: edge.source,
target: edge.target,
label: edge.label,
strength: edge.strength
}
}))
];
console.log('Initialisiere Cytoscape...');
// Initialisiere Cytoscape mit einem schlichten, modernen Design
window.cy = cytoscape({
container: cyContainer,
elements: elements,
style: [
{
selector: 'node',
style: mindmapStyles.node.base
},
{
selector: 'node[isCenter]',
style: mindmapStyles.node.center
},
{
selector: 'node:selected',
style: mindmapStyles.node.selected
},
{
selector: 'edge',
style: mindmapStyles.edge.base
}
],
layout: mindmapStyles.layout.base
});
console.log('Cytoscape initialisiert');
// Füge neuronale Eigenschaften zu allen Knoten hinzu
cy.nodes().forEach(node => {
const data = node.data();
node.data({
...data,
neuronSize: data.neuronSize || 8,
neuronActivity: data.neuronActivity || 0.8,
refractionPeriod: Math.random() * 300 + 700,
threshold: Math.random() * 0.3 + 0.6,
lastFired: 0,
color: categoryColors[data.category] || '#60a5fa'
});
});
// Füge synaptische Eigenschaften zu allen Kanten hinzu
cy.edges().forEach(edge => {
const data = edge.data();
edge.data({
...data,
strength: data.strength || 0.5,
conductionVelocity: Math.random() * 0.5 + 0.3,
latency: Math.random() * 100 + 50
});
});
// Starte neuronale Aktivitätssimulation
startNeuralActivitySimulation(cy);
// Mindmap mit echten Daten befüllen (Styles, Farben etc.)
updateMindmap();
// Initialisiere die Mindmap
initializeMindmap()
.then(success => {
if (success) {
console.log('Mindmap wurde erfolgreich initialisiert');
// Event auslösen, damit andere Scripte reagieren können
document.dispatchEvent(new Event('mindmap-loaded'));
console.log('mindmap-loaded Event ausgelöst');
// Event-Listener für Knoten-Klicks
cy.on('tap', 'node', async function(evt) {
const node = evt.target;
console.log('Node clicked:', node.id(), 'hasChildren:', node.data('hasChildren'), 'expanded:', node.data('expanded'));
if (node.data('hasChildren') && !node.data('expanded')) {
await loadSubthemes(node);
} else {
console.error('Mindmap-Initialisierung fehlgeschlagen');
}
})
.catch(error => {
console.error('Fehler bei der Mindmap-Initialisierung:', error);
showUINotification({
error: 'Mindmap konnte nicht initialisiert werden',
details: error.message
}, 'error');
});
// Entferne den Icon-Overlay-Code
setTimeout(() => {
// Entferne alle existierenden Icon-Overlays
document.querySelectorAll('.cy-node-icon').forEach(icon => icon.remove());
}, 0);
});
// Funktion zum Initialisieren des neuronalen Designs
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File