-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [WD-18263] CMS Storage pool usage #1124
base: main
Are you sure you want to change the base?
Conversation
b27c6b5
to
7d0c01c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can improve the approach for the data loading. See comment below.
7d0c01c
to
82e8949
Compare
82e8949
to
ca621f0
Compare
ca621f0
to
59a64d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks already very neat. Data loading code LGTM, QA of the data part as well.
The layout needs a bit of refinement, I think there are some improvements we should aim for.
@@ -11,7 +12,9 @@ interface Props { | |||
const ResourceLink: FC<Props> = ({ type, value, to }) => { | |||
return ( | |||
<Link | |||
className="p-chip is-inline is-dense resource-link" | |||
className={classNames("p-chip is-inline is-dense resource-link", { | |||
"storage-pool-table": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be in the generic component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be reverted.
@@ -15,7 +15,7 @@ const Meter: FC<Props> = ({ | |||
hoverText, | |||
}: Props) => { | |||
return ( | |||
<> | |||
<div className="p-meter-container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we avoid those wrapper classes and find a way to style without having to add markup just for layouting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we undo the changes here and in the meter.scss
file? I assume with the two column solution most of it is not needed.
508e565
to
47f2066
Compare
Signed-off-by: Nkeiruka <[email protected]>
47f2066
to
02b3c3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table is great. Some ideas for refinement below.
{/* {isClustered && ( | ||
<ResourceLink | ||
to="/ui/cluster" | ||
type={ | ||
hasMemberSpecificSize ? "cluster-member" : "cluster-group" | ||
} | ||
value={ | ||
hasMemberSpecificSize && poolResource.memberName | ||
? poolResource.memberName | ||
: "Cluster wide" | ||
} | ||
/> | ||
)} */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{/* {isClustered && ( | |
<ResourceLink | |
to="/ui/cluster" | |
type={ | |
hasMemberSpecificSize ? "cluster-member" : "cluster-group" | |
} | |
value={ | |
hasMemberSpecificSize && poolResource.memberName | |
? poolResource.memberName | |
: "Cluster wide" | |
} | |
/> | |
)} */} |
} | ||
|
||
return ( | ||
<div className="storage-pool-meter-container" key={index}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div className="storage-pool-meter-container" key={index}> | |
<Fragment key={index}> |
I think this is not needed.
.storage-pool-meter-container { | ||
align-items: center; | ||
display: flex; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.storage-pool-meter-container { | |
align-items: center; | |
display: flex; | |
} |
Seems not needed.
.storage-pool-overview-meter { | ||
display: flex; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.storage-pool-overview-meter { | |
display: flex; | |
} | |
.cluster-member-with-meters { | |
display: flex; | |
} |
Better name and move this into the namespace for storage-overview-tab
. This doesn't need to be on the root namespace.
@@ -38,7 +45,10 @@ const StoragePoolOverview: FC<Props> = ({ pool, project }) => { | |||
</tr> | |||
<tr> | |||
<th className="u-text--muted">Size</th> | |||
<td> | |||
<td className="storage-pool-overview-meter"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? [ | ||
{ | ||
content: <StoragePoolClusterMember pool={pool} />, | ||
role: "rowheader", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role: "rowheader", | |
role: "cell", |
@@ -11,7 +12,9 @@ interface Props { | |||
const ResourceLink: FC<Props> = ({ type, value, to }) => { | |||
return ( | |||
<Link | |||
className="p-chip is-inline is-dense resource-link" | |||
className={classNames("p-chip is-inline is-dense resource-link", { | |||
"storage-pool-table": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be reverted.
@@ -15,7 +15,7 @@ const Meter: FC<Props> = ({ | |||
hoverText, | |||
}: Props) => { | |||
return ( | |||
<> | |||
<div className="p-meter-container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we undo the changes here and in the meter.scss
file? I assume with the two column solution most of it is not needed.
.clustered-resource-link { | ||
height: 2.25rem; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only for the storage-pool-table
and the migrate-instance-table > storage-pools
. On the storage pool overview page, the height should be adjusted to match its context.
I suggest moving this into the SCSS files for the respective use cases instead of the global size in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe hide the usage and cluster member columns on smaller screen sizes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because on small screen sizes, the columns and headings become unreadable. We can hide the columns with css and a media query below a reasonable breakpoint.
Done
Fixes [list issues/bugs if needed]
QA
Screenshots