Skip to content

Commit 67d6842

Browse files
committed
metrics: fix spacing issues
1 parent e99070e commit 67d6842

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

pkg/metrics/metrics.jsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ class CurrentMetrics extends React.Component {
605605
};
606606

607607
let name_text = (
608-
<Button variant="link" isInline component="a" key={name}
608+
<Button variant="link" isInline isBlock component="a" key={name}
609609
onClick={() => cgroupClickHandler(name, is_user, is_container, uid)}
610610
isDisabled={is_container && !podman_installed}>
611611
<TableText wrapModifier="truncate">
@@ -1994,7 +1994,9 @@ export const Application = () => {
19941994

19951995
return (
19961996
<WithDialogs>
1997-
<Page additionalGroupedContent={
1997+
<Page
1998+
className='no-masthead-sidebar'
1999+
additionalGroupedContent={
19982000
<PageSection hasBodyWrapper={false} id="metrics-header-section" type='breadcrumb'>
19992001
<Flex>
20002002
<FlexItem>

pkg/metrics/metrics.scss

+28-25
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,19 @@ html {
4343
// FIXME: More styles from ct-system-overview
4444
.current-metrics {
4545
--card-width: 200px;
46-
--pf-v5-l-gallery--GridTemplateColumns: repeat(auto-fit, minmax(var(--card-width), 1fr));
46+
--pf-v6-l-gallery--GridTemplateColumns: repeat(auto-fit, minmax(var(--card-width), 1fr));
4747

4848
// the cards already have padding, align the "top 5" tables with the other content
4949
.pf-v6-c-table {
50-
--pf-v5-c-table--m-compact--cell--first-last-child--PaddingLeft: 0;
51-
--pf-v5-c-table--m-compact--cell--first-last-child--PaddingRight: 0;
50+
--pf-v6-c-table--cell--first-last-child--PaddingInline: 0;
5251

5352
tr > * {
54-
--pf-v5-c-table--cell--PaddingTop: var(--pf-v5-global--spacer--xs);
55-
--pf-v5-c-table--cell--PaddingBottom: var(--pf-v5-global--spacer--xs);
53+
--pf-v6-c-table--cell--PaddingBlockStart: var(--pf-t--global--spacer--xs);
54+
--pf-v6-c-table--cell--PaddingBlockEnd: var(--pf-t--global--spacer--xs);
5655
}
5756
}
5857

5958
.pf-v6-c-card {
60-
// Make sure the cards do not get taller than 50% of the screen
61-
// ...and when they do, they should scroll
62-
@media screen and (orientation: landscape) {
63-
max-block-size: 50vh;
64-
overflow: auto;
65-
}
66-
6759
&__title-text {
6860
font-size: var(--pf-v5-global--FontSize--xl);
6961
font-weight: var(--pf-v5-global--FontWeight--normal);
@@ -74,6 +66,13 @@ html {
7466
display: flex;
7567
flex-direction: column;
7668

69+
// Make sure the cards do not get taller than 50% of the screen
70+
// ...and when they do, they should scroll
71+
@media screen and (orientation: landscape) {
72+
max-block-size: 50vh;
73+
overflow: auto;
74+
}
75+
7776
// Strip the padding from the first item,
7877
// including table headings
7978
> :first-child,
@@ -109,21 +108,21 @@ html {
109108

110109
.progress-stack {
111110
display: grid;
112-
padding-block-end: var(--pf-v5-global--spacer--sm);
113-
grid-gap: var(--pf-v5-global--spacer--sm) var(--pf-v5-global--spacer--md);
111+
padding-block-end: var(--pf-t--global--spacer--sm);
112+
grid-gap: var(--pf-t--global--spacer--sm) var(--pf-t--global--spacer--md);
114113

115114
&:not(:first-child) {
116-
padding-block-start: var(--pf-v5-global--spacer--sm);
115+
padding-block-start: var(--pf-t--global--spacer--sm);
117116
}
118117
}
119118

120119
.progress-stack-no-space {
121120
display: grid;
122-
padding-block-end: var(--pf-v5-global--spacer--sm);
121+
padding-block-end: var(--pf-t--global--spacer--sm);
123122
grid-gap: 0;
124123

125124
&:not(:first-child) {
126-
padding-block-start: var(--pf-v5-global--spacer--sm);
125+
padding-block-start: var(--pf-t--global--spacer--sm);
127126
}
128127

129128
// avoid the "x" icon on high CPU usage
@@ -166,7 +165,7 @@ html {
166165
// Shrink progress bars and their gap a little
167166
.pf-v6-c-progress {
168167
grid-gap: 0;
169-
--pf-v5-c-progress__bar--Height: var(--pf-v5-global--spacer--xs);
168+
--pf-v6-c-progress__bar--Height: var(--pf-t--global--spacer--xs);
170169
// PF4 uses end; it probably should arguably use last baseline.
171170
// (perhaps end may work better for non-text content?)
172171
align-items: last baseline;
@@ -182,13 +181,17 @@ html {
182181
text-decoration: none;
183182

184183
.pf-v6-c-progress__description {
185-
text-decoration: var(--pf-v5-c-button--m-link--m-inline--hover--TextDecoration);
184+
text-decoration: var(--pf-v6-c-button--m-link--m-inline--hover--TextDecoration);
186185
}
187186
}
188187

188+
.pf-v6-c-button .pf-v6-c-button__text {
189+
flex: auto;
190+
}
191+
189192
// Match font weight with description list terms
190193
.pf-v6-c-progress__description {
191-
font-weight: var(--pf-v5-global--FontWeight--bold);
194+
font-weight: var(--pf-t--global--font--weight--300);
192195
}
193196

194197
// Recolor text
@@ -202,8 +205,8 @@ html {
202205

203206
// default is way too wide for the cards
204207
.pf-v6-c-description-list {
205-
--pf-v5-c-description-list--m-horizontal__term--width: minmax(0, auto);
206-
--pf-v5-c-description-list--m-horizontal__description--width: minmax(0, auto);
208+
--pf-v6-c-description-list--m-horizontal__term--width: minmax(0, auto);
209+
--pf-v6-c-description-list--m-horizontal__description--width: minmax(0, auto);
207210
}
208211

209212
// Don't wrap network in / out data
@@ -213,7 +216,7 @@ html {
213216
.network-nowrap-shrink {
214217
td {
215218
white-space: nowrap;
216-
font-size: var(--pf-v5-global--FontSize--xs);
219+
font-size: var(--pf-t--global--size--font--xs);
217220
}
218221
}
219222

@@ -289,7 +292,7 @@ html {
289292

290293
// Trim down the gutter space between cards
291294
.current-metrics.pf-v6-l-gallery.pf-m-gutter {
292-
grid-gap: var(--pf-v5-global--spacer--sm);
295+
grid-gap: var(--pf-t--global--spacer--sm);
293296
}
294297

295298
// Shave off a few pixels from cards
@@ -474,7 +477,7 @@ $graphs: cpu, memory, disks, network;
474477

475478
// Just embolden the top level time events
476479
button + time {
477-
font-weight: var(--pf-v5-global--FontWeight--bold);
480+
font-weight: var(--pf-t--global--font--weight--300);
478481
}
479482

480483
// Make messages such as `Loading...` or `No logs found` centered

0 commit comments

Comments
 (0)