Bereich Quelle Bearbeiten

from js import document from pyodide.ffi import create_proxy # Beispielwerte aus Block 2 DB_HOST = „localhost“ DB_NAME = „d0446ea6“ APP_NAME = „project_management_tmm“ PYTHON_RUNTIME = „3.12“ TABLE_MENU = f“{APP_NAME}_dashboard_menu“ TABLE_PROJEKTE = f“{APP_NAME}_project“ TABLE_BOARDS = f“{APP_NAME}_board“ TABLE_GRID = f“{APP_NAME}_dashboard_grid“ TABLE_AUDIT = f“{APP_NAME}_audit_log“ SECTION_NAV = {„id“: „tmm-nav“, „source“: TABLE_MENU} SECTION_PROJEKTE = {„id“: „tmm-projekte“, „source“: TABLE_PROJEKTE} SECTION_SYSTEM = {„id“: „tmm-system“, „source“: „tmm_system_info“} ROWS = [ {„bereich“: „Projekte“, „quelle“: TABLE_PROJEKTE}, {„bereich“: „Boards“, „quelle“: TABLE_BOARDS}, {„bereich“: „Grid“, „quelle“: TABLE_GRID}, {„bereich“: „Audit“, „quelle“: TABLE_AUDIT}, ] def edit_row(index): row = ROWS[index] document.getElementById(„edit_output“).innerHTML = ( f“Bearbeiten aktiviert: “ f“{row[‚bereich‘]} / {row[‚quelle‘]}“ ) def render_static_blocks(): document.getElementById(„section_nav_id“).innerText = SECTION_NAV[„id“] document.getElementById(„section_content_id“).innerText = SECTION_PROJEKTE[„id“] document.getElementById(„section_system_id“).innerText = SECTION_SYSTEM[„id“] document.getElementById(„db_host_value“).innerText = f“DB_HOST: {DB_HOST}“ document.getElementById(„db_name_value“).innerText = f“DB_NAME: {DB_NAME}“ document.getElementById(„app_name_value“).innerText = f“APP_NAME: {APP_NAME}“ document.getElementById(„python_runtime_value“).innerText = f“PYTHON: {PYTHON_RUNTIME}“ document.getElementById(„menu_list“).innerHTML = f“““
  • {TABLE_MENU}
  • {TABLE_PROJEKTE}
  • {TABLE_BOARDS}
  • {TABLE_GRID}
  • {TABLE_AUDIT}
  • „““ def render_table(): body = document.getElementById(„dashboard_table_body“) body.innerHTML = „“ for index, row in enumerate(ROWS): tr = document.createElement(„tr“) td_bereich = document.createElement(„td“) td_bereich.innerText = row[„bereich“] td_quelle = document.createElement(„td“) td_quelle.innerText = row[„quelle“] td_action = document.createElement(„td“) btn = document.createElement(„button“) btn.type = „button“ btn.innerText = „Bearbeiten“ proxy = create_proxy(lambda event, i=index: edit_row(i)) btn.addEventListener(„click“, proxy) td_action.appendChild(btn) tr.appendChild(td_bereich) tr.appendChild(td_quelle) tr.appendChild(td_action) body.appendChild(tr) render_static_blocks() render_table()
    Dashboard Master

    TMM API Core
    Pruefe API...
    Pruefe DB...
    Pruefe WP...
    Datei-Status
    Lade...
    API Core
    --
    wird geprueft
    Datenbank
    --
    wird geprueft
    WordPress
    --
    wird geprueft
    Datenquelle
    --
    endpoint response
    Pipeline-Log warte...
    --:--:--INFODashboard geladen. Warte auf Datenabruf...