chore: Änderungen commited

This commit is contained in:
2025-05-14 11:55:58 +02:00
parent 2b19cb000b
commit fd293e53e1
3 changed files with 228 additions and 11 deletions

View File

@@ -65,3 +65,81 @@ werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on
2025-05-14 11:27:28,763 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:27:28,854 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:27:28,854 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:53:51,021 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:53:53,562 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:53:53,562 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:53:57,370 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:53:59,662 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:53:59,662 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:77]
2025-05-14 11:55:55,242 ERROR: Fehler 404: 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.
Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1
Nicht angemeldet
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1458, in dispatch_request
self.raise_routing_exception(req)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1440, in raise_routing_exception
raise request.routing_exception # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 353, in match_request
result = self.url_adapter.match(return_rule=True) # type: ignore
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 655, in match
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\TTOMCZA.EMEA\Dev\website\app.py:93]
2025-05-14 11:55:55,242 ERROR: Fehler 404: 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.
Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1
Nicht angemeldet
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1458, in dispatch_request
self.raise_routing_exception(req)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1440, in raise_routing_exception
raise request.routing_exception # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 353, in match_request
result = self.url_adapter.match(return_rule=True) # type: ignore
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 655, in match
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\TTOMCZA.EMEA\Dev\website\app.py:93]
2025-05-14 11:55:55,252 ERROR: Fehler 404: 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.
Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1
Nicht angemeldet
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1458, in dispatch_request
self.raise_routing_exception(req)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1440, in raise_routing_exception
raise request.routing_exception # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 353, in match_request
result = self.url_adapter.match(return_rule=True) # type: ignore
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 655, in match
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\TTOMCZA.EMEA\Dev\website\app.py:93]
2025-05-14 11:55:55,252 ERROR: Fehler 404: 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.
Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1
Nicht angemeldet
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1458, in dispatch_request
self.raise_routing_exception(req)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1440, in raise_routing_exception
raise request.routing_exception # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 353, in match_request
result = self.url_adapter.match(return_rule=True) # type: ignore
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 655, in match
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\TTOMCZA.EMEA\Dev\website\app.py:93]

View File

@@ -813,12 +813,43 @@ function showUINotification(message, type = 'info', duration = 3000) {
const closeButton = document.createElement('span');
closeButton.innerHTML = '×';
closeButton.style.position = 'absolute';
// Deaktiviere Bearbeitungsfunktionen
cy.nodes().grabify();
cy.container().classList.remove('editing-mode');
cy.removeListener('dragfree');
cy.removeListener('dblclick');
cy.removeListener('cxttap');
closeButton.style.top = '0.25rem';
closeButton.style.right = '0.5rem';
closeButton.style.fontSize = '1.25rem';
closeButton.style.cursor = 'pointer';
closeButton.onclick = () => {
notification.style.opacity = '0';
notification.style.transform = 'translateY(-20px)';
setTimeout(() => {
if (notification.parentNode === container) {
container.removeChild(notification);
}
}, 300);
};
notification.appendChild(closeButton);
// Zur Seite hinzufügen
container.appendChild(notification);
// Animation starten
setTimeout(() => {
notification.style.opacity = '1';
notification.style.transform = 'translateY(0)';
}, 10);
// Automatisch ausblenden, wenn keine Dauer von 0 übergeben wurde
if (duration > 0) {
setTimeout(() => {
if (notification.parentNode === container) {
notification.style.opacity = '0';
notification.style.transform = 'translateY(-20px)';
setTimeout(() => {
if (notification.parentNode === container) {
container.removeChild(notification);
}
}, 300);
}
}, duration);
}
}

View File

@@ -157,6 +157,43 @@
.pulse {
animation: pulse 2s infinite;
}
/* Ladeanzeige */
.loader {
border: 4px solid rgba(255, 255, 255, 0.1);
border-radius: 50%;
border-top: 4px solid #60a5fa;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
position: absolute;
top: 50%;
left: 50%;
margin-top: -20px;
margin-left: -20px;
z-index: 5;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Status-Meldung */
.status-message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(15, 23, 42, 0.9);
padding: 1rem 2rem;
border-radius: 0.5rem;
color: white;
font-size: 1rem;
z-index: 15;
text-align: center;
max-width: 80%;
}
</style>
{% endblock %}
@@ -167,6 +204,12 @@
<h1 class="mindmap-title">Interaktive Wissenslandkarte</h1>
</div>
<!-- Ladeanzeige -->
<div id="loader" class="loader"></div>
<!-- Status-Meldung -->
<div id="statusMessage" class="status-message" style="display: none;">Lade Mindmap...</div>
<!-- Hauptvisualisierung -->
<div id="cy"></div>
@@ -199,23 +242,23 @@
<!-- Kategorie-Legende -->
<div id="categoryLegend" class="category-legend">
<div class="category-item">
<div class="category-color" style="background-color: #60a5fa;"></div>
<div class="category-color" style="background-color: #9F7AEA;"></div>
<span>Philosophie</span>
</div>
<div class="category-item">
<div class="category-color" style="background-color: #8b5cf6;"></div>
<div class="category-color" style="background-color: #60A5FA;"></div>
<span>Wissenschaft</span>
</div>
<div class="category-item">
<div class="category-color" style="background-color: #10b981;"></div>
<div class="category-color" style="background-color: #10B981;"></div>
<span>Technologie</span>
</div>
<div class="category-item">
<div class="category-color" style="background-color: #f59e0b;"></div>
<div class="category-color" style="background-color: #F59E0B;"></div>
<span>Künste</span>
</div>
<div class="category-item">
<div class="category-color" style="background-color: #ef4444;"></div>
<div class="category-color" style="background-color: #EF4444;"></div>
<span>Psychologie</span>
</div>
</div>
@@ -229,4 +272,69 @@
<!-- Unsere JavaScript-Dateien -->
<script src="{{ url_for('static', filename='js/update_mindmap.js') }}"></script>
<!-- Initialisierung -->
<script>
document.addEventListener('DOMContentLoaded', function() {
console.log('DOMContentLoaded Event ausgelöst');
const cyContainer = document.getElementById('cy');
const loader = document.getElementById('loader');
const statusMessage = document.getElementById('statusMessage');
if (cyContainer) {
console.log('Container gefunden:', cyContainer);
// Loader und Statusmeldung anzeigen
loader.style.display = 'block';
statusMessage.textContent = 'Lade Mindmap...';
statusMessage.style.display = 'block';
// Prüfen, ob Cytoscape vorhanden ist
if (typeof cytoscape !== 'undefined') {
console.log('Cytoscape ist verfügbar');
// Initialisieren der Mindmap
initializeMindmap().then(() => {
// Erfolg: Loader und Statusmeldung ausblenden
loader.style.display = 'none';
statusMessage.style.display = 'none';
}).catch(error => {
// Fehler: Fehlermeldung anzeigen
console.error('Mindmap-Initialisierung fehlgeschlagen', error);
loader.style.display = 'none';
statusMessage.textContent = 'Mindmap konnte nicht initialisiert werden: ' + error.message;
statusMessage.style.backgroundColor = 'rgba(220, 38, 38, 0.9)';
statusMessage.style.display = 'block';
});
} else {
console.error('Cytoscape ist nicht verfügbar');
loader.style.display = 'none';
statusMessage.textContent = 'Cytoscape-Bibliothek konnte nicht geladen werden';
statusMessage.style.backgroundColor = 'rgba(220, 38, 38, 0.9)';
statusMessage.style.display = 'block';
}
} else {
console.error('Container #cy nicht gefunden');
}
// Zoom-Funktionen
document.getElementById('zoomIn').addEventListener('click', function() {
if (window.cy) window.cy.zoom(window.cy.zoom() * 1.2);
});
document.getElementById('zoomOut').addEventListener('click', function() {
if (window.cy) window.cy.zoom(window.cy.zoom() * 0.8);
});
document.getElementById('resetView').addEventListener('click', function() {
if (window.cy) window.cy.fit();
});
document.getElementById('toggleLegend').addEventListener('click', function() {
const legend = document.getElementById('categoryLegend');
legend.style.display = legend.style.display === 'none' ? 'flex' : 'none';
});
});
</script>
{% endblock %}