diff --git a/pvc-vue/src/components/VMDetail.vue b/pvc-vue/src/components/VMDetail.vue index 8baefca..2dced00 100644 --- a/pvc-vue/src/components/VMDetail.vue +++ b/pvc-vue/src/components/VMDetail.vue @@ -1,113 +1,79 @@ @@ -177,142 +119,39 @@ const getDiskVolume = (name) => { display: flex; flex-direction: column; gap: 0.5rem; - width: 100%; } -/* Section styling - match Overview/Node pages exactly */ -.section-container { - position: relative; -} - -.section-content-wrapper { - display: flex; - position: relative; -} - -.section-content { - flex: 1; - min-width: 0; - padding-right: 40px; -} - -/* Toggle button styling */ -.toggle-column { - position: absolute; - top: 4px; - right: 0; - width: 40px; - height: 30px; - z-index: 10; - padding-left: 6px; -} - -.section-toggle { - background: none; - border: none; - color: #666; - cursor: pointer; - padding: 0.25rem; - border-radius: 0.25rem; - transition: all 0.2s; - width: 30px; - height: 30px; - display: flex; - align-items: center; - justify-content: center; - background-color: rgba(255, 255, 255, 0.8); - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -} - -.section-toggle:hover { - background-color: rgba(0, 0, 0, 0.05); - color: #333; -} - -.section-toggle:focus { - outline: none; -} - -/* Collapsed section header */ -.collapsed-section-header { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0.5rem; - background-color: rgba(0, 0, 0, 0.03); - border: 1px solid rgba(0, 0, 0, 0.125); - border-radius: 0.25rem; - height: 38px; - width: 100%; -} - -.collapsed-section-header .card-title { - margin: 0; - color: #495057; - font-size: 0.95rem; - font-weight: 600; -} - -/* Card grid layout */ -.info-cards { +.info-row, +.resources-row { display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.5rem; width: 100%; } -/* Metric card styles */ -:deep(.metric-card) { - min-width: 180px; - background: white; - border: 1px solid rgba(0, 0, 0, 0.125); +.networks-row, +.storage-row { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.network-card, +.storage-card { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 0.5rem; + padding: 0.5rem; + background-color: rgba(0, 0, 0, 0.02); border-radius: 0.25rem; - height: 100%; - display: flex; - flex-direction: column; } -:deep(.metric-card .card-header) { - background-color: rgba(0, 0, 0, 0.03); - padding: 0.5rem; - border-bottom: 1px solid rgba(0, 0, 0, 0.125); - height: 38px; - display: flex; - justify-content: space-between; - align-items: center; +@media (min-width: 1201px) { + .info-row { grid-template-columns: repeat(4, 1fr); } + .resources-row { grid-template-columns: repeat(2, 1fr); } } -:deep(.card-header h6) { - font-size: 0.95rem; - font-weight: 600; - display: flex; - justify-content: space-between; - align-items: center; - margin: 0; -} - -:deep(.metric-card .card-body) { - flex: 1; - padding: 0.5rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; -} - -:deep(.metric-card .metric-value) { - font-size: 1.25rem; - font-weight: bold; - color: #333; - line-height: 1; - margin: 0; - text-align: center; - white-space: nowrap; - min-width: fit-content; -} - -.metric-label { - color: #495057; - font-weight: 600; +@media (max-width: 1200px) { + .info-row { grid-template-columns: repeat(2, 1fr); } + .resources-row { grid-template-columns: 1fr; } } \ No newline at end of file diff --git a/pvc-vue/src/components/VMOverview.vue b/pvc-vue/src/components/VMOverview.vue index 8882494..f2ee0ad 100644 --- a/pvc-vue/src/components/VMOverview.vue +++ b/pvc-vue/src/components/VMOverview.vue @@ -1,149 +1,125 @@ @@ -380,7 +356,7 @@ const handleSearchFocus = () => { // Handle search blur const handleSearchBlur = (event) => { // Don't close the list if clicking on another element within the list - const vmList = document.querySelector('.vm-list-fullpage'); + const vmList = document.querySelector('.vm-list-container'); if (vmList && vmList.contains(event.relatedTarget)) { return; } @@ -443,7 +419,7 @@ const handleClickOutside = (event) => { // Only handle this if a VM is selected and the list is showing if (selectedVM.value && showVMList.value) { const vmControls = document.querySelector('.vm-controls-container'); - const vmList = document.querySelector('.vm-list-fullpage'); + const vmList = document.querySelector('.vm-list-container'); // If click is outside both the controls and list, close the list if ((!vmControls || !vmControls.contains(event.target)) && @@ -513,98 +489,19 @@ watch(() => props.vmData, (newData) => {