From 4ef8e733a3432bfbd245aec95648078904a39b3f Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Sun, 12 Oct 2025 12:19:54 +0200 Subject: [PATCH] Poprack Features: * Komplettes kabelmanagement auf Rack He Modul Basis --- Layout/default/Pop/Detail.php | 713 ++++++++++++------ Layout/default/Pop/_rack_body.php | 140 ++++ application/Poprack/PoprackController.php | 17 +- application/Poprack/PoprackModel.php | 100 +-- .../Poprackmodule/PoprackmoduleController.php | 4 +- .../Poprackmodule/PoprackmoduleModel.php | 2 +- .../Poprackmodulecable/Poprackmodulecable.php | 60 ++ .../PoprackmodulecableController.php | 283 +++++++ .../PoprackmodulecableModel.php | 150 ++++ public/js/pages/pop/detail.js | 342 ++++++++- 10 files changed, 1505 insertions(+), 306 deletions(-) create mode 100644 Layout/default/Pop/_rack_body.php create mode 100644 application/Poprackmodulecable/Poprackmodulecable.php create mode 100644 application/Poprackmodulecable/PoprackmodulecableController.php create mode 100644 application/Poprackmodulecable/PoprackmodulecableModel.php diff --git a/Layout/default/Pop/Detail.php b/Layout/default/Pop/Detail.php index 763af59bb..58b3bae68 100644 --- a/Layout/default/Pop/Detail.php +++ b/Layout/default/Pop/Detail.php @@ -24,8 +24,8 @@ .rack-color-lwl { background: rgb(159, 255, 96); - background: linear-gradient(180deg, rgb(129 237 58) 0%, rgb(92 211 15) 100%); - font-weight: 500; + background: linear-gradient(180deg, rgb(129 223 68) 0%, rgb(62 155 3) 100%); + color: #000000; padding-top: 2px; } @@ -97,12 +97,177 @@ background-color: #d7d7d7; opacity: 1; } + .switch-rack-side { margin-right: 8px; margin-top: 2px; cursor: pointer; } + .cable-container { + display: flex; + width: 100%; + height: 100%; + align-items: stretch; + color: #000; + cursor: pointer; + } + + .cable-item { + border-right: 1px solid #797979; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 12px; + line-height: 1.1; + color: #333; + background-color: #e1ffdf; + cursor: pointer; + overflow: hidden; + white-space: nowrap; + padding: 1px 0; + position: relative; + } + + .cable-item .port-range, .cable-item .fiber-range { + font-size: 12px; + color: #040404; + font-weight: 500; + } + + .cable-item:hover { + background-color: #cfffc8; + } + + .cable-item:last-child { + border-right: none; + } + + .cable-free { + flex-grow: 1; + } + + .context-menu { + display: none; + position: absolute; + z-index: 1000; + width: 180px; + background-color: #fff; + border: 1px solid #ccc; + border-radius: 5px; + box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15); + } + + .context-menu ul { + list-style: none; + padding: 5px 0; + margin: 0; + } + + .context-menu ul li { + padding: 8px 15px; + cursor: pointer; + font-size: 14px; + } + + .context-menu ul li:hover { + background-color: #f0f0f0; + } + + .context-menu ul li i { + margin-right: 10px; + color: #555; + } + + #cable-context-menu { + position: absolute; /* Popper setzt top/left */ + z-index: 20000; + transform: none !important; /* falls doch mal ein transform reingeschummelt wird */ + } + + .dropdown-menu[x-placement^=left], .dropdown-menu[x-placement^=right], .dropdown-menu[x-placement^=top] { + top: unset; + -webkit-animation: none !important; + animation: none !important; + } + + .context-span { + min-width: 25px; + display: inline-block; + } + + .dropdown-item { + padding: .3rem 1.2rem; + } + + .w-10 { + width: 10% !important; + } + + .cable-highlight { + background-color: #e6ff00 !important; + border: 2px solid #e0a800 !important; + color: #000; + } + + /* NEU: Animation für das "Aufblinken" */ + .cable-flash { + /*animation: flash-animation 1s;*/ + } + + @keyframes flash-animation { + 0% { + transform: scale(1); + } + 25% { + transform: scale(1.05); + } + 50% { + transform: scale(1); + } + 75% { + transform: scale(1.05); + } + 100% { + transform: scale(1); + } + } + + /* Sorgt dafür, dass die Autocomplete-Vorschläge über anderen Elementen liegen */ + .ui-autocomplete { + z-index: 2000; + } + + .module-highlight { + /*box-shadow: inset 0 0 0 3px #007bff !important; !* Ein auffälliger, blauer Innen-Rahmen *!*/ + /*transition: box-shadow 0.3s ease-in-out;*/ + } + + .rack-color-lwl-planned { + background: rgb(255, 0, 0); + background: linear-gradient(180deg, rgba(255, 0, 0, 1) 0%, rgba(196, 0, 0, 1) 100%); + font-weight: 500; + padding-top: 2px; + color: #fff; + } + + .port-info { + font-size: 12px; + font-weight: 500; + + + } + .cable-description + { + font-size: 12px; + font-style: italic; + color: #000000; + white-space: normal; + line-height: 1.2; + font-weight: 400; + }
@@ -130,9 +295,9 @@
vlan_ipv6))) Dokustand | Status - doku_date) ? date("d.m.Y",$pops->doku_date) : '-' ?>|state) ? $stateArray[$pops->state] : '-' ?> + doku_date) ? date("d.m.Y", $pops->doku_date) : '-' ?>|state) ? $stateArray[$pops->state] : '-' ?> + Fotospeicherort - folder_link): ?> folder_link ?> + folder_link): ?> folder_link ?> + Interne Notiz @@ -341,123 +510,138 @@ if (!empty(trim($pops->vlan_ipv6)))