From f7fe8361af0507dc185d4546ff5b6095daa62205 Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Wed, 8 Nov 2023 14:25:36 +0200 Subject: [PATCH] refactor: update meter component --- package.json | 2 +- .../StorageTable/PoolSelect/PoolSelect.tsx | 13 ++--- .../KVMResourceMeter/KVMResourceMeter.tsx | 18 +++---- .../StoragePopover/StoragePopover.tsx | 53 ++++++++++--------- yarn.lock | 8 +-- 5 files changed, 49 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index 26527ec879..dcf2d912cf 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "build-storybook": "storybook build" }, "dependencies": { - "@canonical/maas-react-components": "1.3.0", + "@canonical/maas-react-components": "1.5.0", "@canonical/macaroon-bakery": "1.3.2", "@canonical/react-components": "0.46.0", "@reduxjs/toolkit": "1.9.3", diff --git a/src/app/kvm/components/KVMForms/ComposeForm/StorageTable/PoolSelect/PoolSelect.tsx b/src/app/kvm/components/KVMForms/ComposeForm/StorageTable/PoolSelect/PoolSelect.tsx index 41a4490a9d..38581a08a5 100644 --- a/src/app/kvm/components/KVMForms/ComposeForm/StorageTable/PoolSelect/PoolSelect.tsx +++ b/src/app/kvm/components/KVMForms/ComposeForm/StorageTable/PoolSelect/PoolSelect.tsx @@ -131,8 +131,10 @@ const generateDropdownContent = ( value: free >= 0 ? free : 0, }, ]} - label={ - free >= 0 ? ( + max={pool.total} + > + + {free >= 0 ? (