Make resource tables fluid without horizontal scroll
Release rolling / release (push) Has been cancelled
Release rolling / release (push) Has been cancelled
Use fixed table layout, cell ellipsis, and progressive column hiding on narrower widths so containers/images/networks tables stay within the content pane instead of growing a horizontal scrollbar.
This commit is contained in:
+258
-6
@@ -1835,6 +1835,10 @@ textarea::placeholder {
|
||||
--bs-table-striped-color: var(--text-primary);
|
||||
--bs-table-hover-color: var(--text-primary);
|
||||
font-size: 13px;
|
||||
width: 100% !important;
|
||||
max-width: 100%;
|
||||
table-layout: fixed;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.table thead th {
|
||||
@@ -1845,6 +1849,8 @@ textarea::placeholder {
|
||||
font-weight: 650;
|
||||
border-bottom-width: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.table-dark {
|
||||
@@ -1861,7 +1867,230 @@ textarea::placeholder {
|
||||
.table td,
|
||||
.table th {
|
||||
vertical-align: middle;
|
||||
padding: 12px 14px;
|
||||
padding: 10px 12px;
|
||||
/* Prevent long cells from forcing horizontal page scroll */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* ─── Responsive resource tables (no horizontal scrollbar) ─── */
|
||||
.view,
|
||||
.view .container-fluid,
|
||||
.view .container-fluid > * {
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.view .container-fluid {
|
||||
width: 100%;
|
||||
padding-left: clamp(0.5rem, 1.5vw, 1rem);
|
||||
padding-right: clamp(0.5rem, 1.5vw, 1rem);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Bootstrap .table-responsive enables overflow-x:auto — disable that so
|
||||
* tables reflow/truncate instead of growing a horizontal scrollbar.
|
||||
*/
|
||||
.view .table-responsive,
|
||||
#stacks-list.table-responsive,
|
||||
#images-list,
|
||||
#networks-list,
|
||||
#volumes-list,
|
||||
#container-list {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
overflow-x: hidden !important;
|
||||
/* Keep vertical menus unclipped when open */
|
||||
overflow-y: visible;
|
||||
}
|
||||
|
||||
.view .table-responsive > .table,
|
||||
.view table.table {
|
||||
width: 100% !important;
|
||||
max-width: 100%;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
/* Truncate long text/code in cells */
|
||||
.view .table td code,
|
||||
.view .table td .text-truncate-cell,
|
||||
.view .table td {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.view .table td code {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
/* Containers table column budget */
|
||||
#containers-view table th:nth-child(1),
|
||||
#containers-view table td:nth-child(1) {
|
||||
width: 2.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
#containers-view table th:nth-child(2),
|
||||
#containers-view table td:nth-child(2) {
|
||||
width: 16%;
|
||||
}
|
||||
#containers-view table th:nth-child(3),
|
||||
#containers-view table td:nth-child(3) {
|
||||
width: 18%;
|
||||
}
|
||||
#containers-view table th:nth-child(4),
|
||||
#containers-view table td:nth-child(4) {
|
||||
width: 7.5rem;
|
||||
}
|
||||
#containers-view table th:nth-child(5),
|
||||
#containers-view table td:nth-child(5),
|
||||
#containers-view table th:nth-child(6),
|
||||
#containers-view table td:nth-child(6) {
|
||||
width: 9rem;
|
||||
}
|
||||
#containers-view table th:nth-child(7),
|
||||
#containers-view table td:nth-child(7) {
|
||||
width: 8.5rem;
|
||||
}
|
||||
#containers-view table th:nth-child(8),
|
||||
#containers-view table td:nth-child(8) {
|
||||
width: 10.5rem;
|
||||
}
|
||||
|
||||
.container-name-display,
|
||||
.container-name-link {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#containers-view table td:nth-child(3),
|
||||
#containers-view table td.ip-address {
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.stats-container {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.stats-container .stats-value {
|
||||
font-size: 11.5px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.stats-bar-container {
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Images / networks / volumes / stacks — flexible cols, truncate names */
|
||||
#images-view table th:nth-child(1),
|
||||
#images-view table td:nth-child(1),
|
||||
#networks-view table th:nth-child(1),
|
||||
#networks-view table td:nth-child(1) {
|
||||
width: 2.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#images-view table td,
|
||||
#networks-view table td,
|
||||
#volumes-view table td,
|
||||
#stacks-view table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Prefer name/image columns take remaining space and ellipsize */
|
||||
#images-view table th:nth-child(2),
|
||||
#images-view table td:nth-child(2),
|
||||
#networks-view table th:nth-child(2),
|
||||
#networks-view table td:nth-child(2),
|
||||
#volumes-view table th:nth-child(1),
|
||||
#volumes-view table td:nth-child(1),
|
||||
#stacks-view table th:nth-child(1),
|
||||
#stacks-view table td:nth-child(1) {
|
||||
width: 22%;
|
||||
}
|
||||
|
||||
/* Collapse secondary columns on narrower viewports */
|
||||
@media (max-width: 1280px) {
|
||||
#containers-view table th:nth-child(7),
|
||||
#containers-view table td:nth-child(7) {
|
||||
/* IP */
|
||||
display: none;
|
||||
}
|
||||
#containers-view table th:nth-child(3),
|
||||
#containers-view table td:nth-child(3) {
|
||||
width: 22%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
#containers-view table th:nth-child(6),
|
||||
#containers-view table td:nth-child(6) {
|
||||
/* Memory */
|
||||
display: none;
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
padding: 8px 8px;
|
||||
}
|
||||
#containers-view table th:nth-child(8),
|
||||
#containers-view table td:nth-child(8) {
|
||||
width: 9.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
#containers-view table th:nth-child(5),
|
||||
#containers-view table td:nth-child(5) {
|
||||
/* CPU */
|
||||
display: none;
|
||||
}
|
||||
#containers-view table th:nth-child(3),
|
||||
#containers-view table td:nth-child(3) {
|
||||
/* Image */
|
||||
display: none;
|
||||
}
|
||||
.view-toolbar .row > [class*='col-'] {
|
||||
flex: 1 1 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
#containers-view table th:nth-child(4),
|
||||
#containers-view table td:nth-child(4) {
|
||||
/* Status badge — keep but tighter */
|
||||
width: 5.5rem;
|
||||
}
|
||||
#containers-view .container-actions-primary {
|
||||
display: none; /* ⋮ only on very small screens */
|
||||
}
|
||||
#containers-view table th:nth-child(8),
|
||||
#containers-view table td:nth-child(8) {
|
||||
width: 3rem;
|
||||
}
|
||||
.page-header h2 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.view {
|
||||
padding-left: 0.75rem;
|
||||
padding-right: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.card,
|
||||
@@ -2085,23 +2314,32 @@ textarea::placeholder {
|
||||
|
||||
/* Container action overflow */
|
||||
.container-actions {
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 4px;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-end;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.container-actions-primary {
|
||||
flex-wrap: nowrap;
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.container-actions-cell {
|
||||
white-space: nowrap;
|
||||
width: 1%;
|
||||
width: 10.5rem;
|
||||
max-width: 10.5rem;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.container-actions .btn {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2159,19 +2397,33 @@ textarea::placeholder {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* Do not clip row action menus */
|
||||
/* Containers table shell: never grow a horizontal scrollbar */
|
||||
#containers-view .table-responsive {
|
||||
overflow-x: auto;
|
||||
overflow-x: hidden !important;
|
||||
overflow-y: visible;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#containers-view .table {
|
||||
overflow: visible;
|
||||
width: 100% !important;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
/* Text truncates by default; actions cell may overflow for menus */
|
||||
#containers-view #container-list > tr > td {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#containers-view #container-list > tr > td.container-actions-cell {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* Open-row elevation already sets background; keep action cell usable */
|
||||
#containers-view #container-list > tr:has(.dropdown.show) > td.container-actions-cell {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
@@ -547,12 +547,20 @@
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
margin-top: 35px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
padding: var(--spacing-lg);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Kill Bootstrap table-responsive horizontal scrollbars in app views */
|
||||
.view .table-responsive {
|
||||
overflow-x: hidden !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.view.hidden {
|
||||
|
||||
Reference in New Issue
Block a user