Initial NetBox Floor Planner plugin
Drag & drop SVG floor plan designer for NetBox 4.7.2+ with rack/device placement, smart snapping, undo/redo, view mode with status colouring, SVG/PNG export, REST layout API and English/German translations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
c4dc5d53ce
31 files changed
+3041
No files matched your search
@@ -0,0 +1,160 @@
|
||||
.fp-root {
|
||||
--fp-bg: #f1f5f9;
|
||||
--fp-floor: #ffffff;
|
||||
--fp-grid: #e2e8f0;
|
||||
--fp-wall: #334155;
|
||||
--fp-text: #0f172a;
|
||||
--fp-panel: #ffffff;
|
||||
--fp-border: #dee2e6;
|
||||
--fp-accent: #206bc4;
|
||||
--fp-muted: #6c757d;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--fp-border);
|
||||
border-radius: 6px;
|
||||
background: var(--fp-panel);
|
||||
overflow: hidden;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
[data-bs-theme="dark"] .fp-root {
|
||||
--fp-bg: #111827;
|
||||
--fp-floor: #1f2937;
|
||||
--fp-grid: #2d3a4d;
|
||||
--fp-wall: #94a3b8;
|
||||
--fp-text: #e5e7eb;
|
||||
--fp-panel: #182433;
|
||||
--fp-border: #2c3e50;
|
||||
--fp-muted: #9aa5b1;
|
||||
}
|
||||
|
||||
.fp-root:fullscreen { border-radius: 0; }
|
||||
.fp-root:fullscreen .fp-body { height: auto; flex: 1; }
|
||||
|
||||
.fp-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
border-bottom: 1px solid var(--fp-border);
|
||||
}
|
||||
.fp-group { align-items: center; }
|
||||
.fp-btn { border: 1px solid var(--fp-border); background: transparent; color: inherit; }
|
||||
.fp-btn:hover { background: rgba(32, 107, 196, .1); }
|
||||
.fp-btn.active { background: rgba(32, 107, 196, .18); color: var(--fp-accent); border-color: var(--fp-accent); }
|
||||
.fp-btn:disabled { opacity: .4; }
|
||||
.fp-btn .mdi { font-size: 1.1rem; line-height: 1; }
|
||||
.fp-zoom-label { min-width: 52px; text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; }
|
||||
.fp-select { width: auto; }
|
||||
.fp-search { width: 200px; }
|
||||
.fp-spacer { flex: 1; }
|
||||
.fp-save-state { font-size: .8rem; color: var(--fp-muted); }
|
||||
.fp-save-state.dirty { color: #f59f00; }
|
||||
.fp-save-state.ok { color: #2fb344; }
|
||||
.fp-save-state.error { color: #d63939; }
|
||||
|
||||
.fp-body { display: flex; height: 72vh; min-height: 420px; }
|
||||
.fp-view .fp-body { height: 62vh; }
|
||||
|
||||
.fp-canvas { position: relative; flex: 1; min-width: 0; background: var(--fp-bg); }
|
||||
.fp-svg { display: block; width: 100%; height: 100%; user-select: none; touch-action: none; cursor: default; }
|
||||
.fp-view .fp-svg { cursor: grab; }
|
||||
.fp-svg.fp-panning, .fp-svg.fp-panning * { cursor: grab !important; }
|
||||
|
||||
.fp-edit .fp-item { cursor: move; }
|
||||
.fp-view .fp-item.fp-linked { cursor: pointer; }
|
||||
.fp-item.fp-linked:hover > rect:first-child { filter: brightness(1.12); }
|
||||
.fp-item.fp-dimmed { opacity: .2; }
|
||||
|
||||
.fp-selection { fill: none; stroke: var(--fp-accent); pointer-events: none; }
|
||||
.fp-handle { fill: #ffffff; stroke: var(--fp-accent); }
|
||||
.fp-rot { cursor: grab; }
|
||||
.fp-rot-line { stroke: var(--fp-accent); pointer-events: none; }
|
||||
.fp-band { fill: rgba(32, 107, 196, .08); stroke: var(--fp-accent); pointer-events: none; }
|
||||
.fp-guide { stroke: #e8590c; pointer-events: none; }
|
||||
.fp-highlight { fill: none; stroke: #f59f00; pointer-events: none; animation: fp-pulse 1.2s ease-in-out infinite; }
|
||||
@keyframes fp-pulse { 50% { stroke-opacity: .2; } }
|
||||
|
||||
.fp-palette, .fp-panel {
|
||||
width: 240px;
|
||||
flex-shrink: 0;
|
||||
overflow-y: auto;
|
||||
padding: 8px;
|
||||
font-size: .85rem;
|
||||
}
|
||||
.fp-palette { border-right: 1px solid var(--fp-border); }
|
||||
.fp-panel { border-left: 1px solid var(--fp-border); }
|
||||
.fp-palette-title {
|
||||
font-size: .7rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .04em;
|
||||
color: var(--fp-muted);
|
||||
margin: 10px 0 6px;
|
||||
}
|
||||
.fp-palette-title:first-child { margin-top: 0; }
|
||||
.fp-shapes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
|
||||
.fp-shapes .fp-entry { flex-direction: column; justify-content: center; text-align: center; padding: 6px 4px; }
|
||||
.fp-shapes .fp-entry .mdi { font-size: 1.3rem; }
|
||||
.fp-entry {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 6px;
|
||||
border: 1px solid var(--fp-border);
|
||||
border-radius: 4px;
|
||||
margin-bottom: 3px;
|
||||
cursor: grab;
|
||||
background: var(--fp-panel);
|
||||
}
|
||||
.fp-entry:hover { border-color: var(--fp-accent); background: rgba(32, 107, 196, .06); }
|
||||
.fp-entry.disabled { opacity: .5; cursor: default; }
|
||||
.fp-entry.disabled:hover { border-color: var(--fp-border); background: var(--fp-panel); }
|
||||
.fp-entry-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.fp-shapes .fp-entry-label { flex: none; font-size: .75rem; }
|
||||
.fp-entry-sub { font-size: .7rem; color: var(--fp-muted); }
|
||||
.fp-entry-check { color: #2fb344; }
|
||||
.fp-objlist { max-height: 30vh; overflow-y: auto; }
|
||||
.fp-palette-search { margin-top: 10px; }
|
||||
.fp-muted { color: var(--fp-muted); font-size: .8rem; }
|
||||
.fp-hint { margin-top: 10px; font-size: .75rem; color: var(--fp-muted); }
|
||||
|
||||
.fp-field { display: block; margin-bottom: 8px; width: 100%; }
|
||||
.fp-field > span { display: block; font-size: .75rem; color: var(--fp-muted); margin-bottom: 2px; }
|
||||
.fp-row { display: flex; gap: 6px; }
|
||||
.fp-color { display: flex; gap: 6px; }
|
||||
.fp-type-badge { font-weight: 600; margin-bottom: 8px; }
|
||||
.fp-info { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin-bottom: 10px; font-size: .8rem; }
|
||||
.fp-info dt { font-weight: 400; color: var(--fp-muted); }
|
||||
.fp-info dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
.fp-tooltip {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
min-width: 160px;
|
||||
max-width: 280px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
background: var(--fp-panel);
|
||||
border: 1px solid var(--fp-border);
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.fp-statusbar {
|
||||
padding: 4px 8px;
|
||||
border-top: 1px solid var(--fp-border);
|
||||
font-size: .72rem;
|
||||
color: var(--fp-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.fp-body { flex-direction: column; height: auto; }
|
||||
.fp-canvas { height: 60vh; }
|
||||
.fp-palette, .fp-panel { width: auto; max-height: 30vh; border: none; border-top: 1px solid var(--fp-border); }
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user