Skip to content
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

Nit CSS updates #306

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/locales/en/plugin__netobserv-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
"Zoom buttons": "Zoom buttons",
"Arrow buttons": "Arrow buttons",
"Page buttons": "Page buttons",
"Number of logs over time": "Number of logs over time",
"No datapoints found in the selected time range": "No datapoints found in the selected time range",
"Reset time range and try again.": "Reset time range and try again.",
"Reset time range": "Reset time range",
Expand Down
1 change: 1 addition & 0 deletions web/src/components/metrics/histogram.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
right: 1.5rem;
justify-content: center;
margin: 0;
padding: 0.25rem 0.5rem 0 0.5rem;
z-index: 999;
}

Expand Down
10 changes: 6 additions & 4 deletions web/src/components/metrics/histogram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const Histogram: React.FC<{
animationWhitelist: ['data', 'domain']
};

const [dimensions, setDimensions] = React.useState<Dimensions>({ width: 3000, height: 130 });
const [dimensions, setDimensions] = React.useState<Dimensions>({ width: 3000, height: 150 });
React.useEffect(() => {
observe(containerRef, dimensions, setDimensions);
}, [containerRef, dimensions]);
Expand Down Expand Up @@ -241,7 +241,9 @@ export const Histogram: React.FC<{
onKeyDown={e => onKeyDown(e.key)}
>
<Flex className="histogram-range-container" direction={{ default: 'row' }}>
<FlexItem flex={{ default: 'flex_1' }} />
<FlexItem flex={{ default: 'flex_1' }}>
<Text>{t('Number of logs over time')}</Text>
</FlexItem>
Comment on lines +244 to +246
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a value adding this title on top left corner of the histogram for you guys ?
It would replace a tooltip while hovering the graph

<FlexItem>
<Tooltip
content={arrowButtonTips()}
Expand Down Expand Up @@ -395,9 +397,9 @@ export const Histogram: React.FC<{
width={dimensions.width}
height={dimensions.height}
padding={{
top: 30,
top: 45,
right: 25,
bottom: 35,
bottom: 40,
left: 60
}}
>
Expand Down
6 changes: 5 additions & 1 deletion web/src/components/netflow-table/netflow-table-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ export const NetflowTableHeader: React.FC<{
}, [columns]);

return (
<Thead data-test="thead" hasNestedHeader={headersState.useNested}>
<Thead
className={`${isDark ? 'dark' : 'light'}-bottom-shadow`}
data-test="thead"
hasNestedHeader={headersState.useNested}
>
{headersState.useNested && <Tr>{headersState.nestedHeaders.map(nh => getNestedTableHeader(nh))}</Tr>}
<Tr data-test="thead-tr">{headersState.headers.map(c => getTableHeader(c))}</Tr>
</Thead>
Expand Down
20 changes: 19 additions & 1 deletion web/src/components/netflow-traffic.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ span.pf-c-button__icon.pf-m-start {

/* histogram is maximum 2x standard toolbar height */
#histogram-toolbar {
max-height: 130px;
max-height: 150px;
}

#histogram-toolbar,
Expand Down Expand Up @@ -204,10 +204,28 @@ span.pf-c-button__icon.pf-m-start {
margin: 0;
}

/* outside bottom border */
.light-bottom-border {
margin: 0 !important;
align-self: flex-end;
border-bottom: 1px #d2d2d2 solid;
}

.dark-bottom-border {
margin: 0 !important;
align-self: flex-end;
border-bottom: 1px #444548 solid;
}

/* inside bottom border */
.light-bottom-shadow {
-webkit-box-shadow: inset 0 -1px 0 0 #d2d2d2;
-moz-box-shadow: inset 0 -1px 0 0 #d2d2d2;
box-shadow: inset 0 -1px 0 0 #d2d2d2;
}

.dark-bottom-shadow {
-webkit-box-shadow: inset 0 -1px 0 0 #444548;
-moz-box-shadow: inset 0 -1px 0 0 #444548;
box-shadow: inset 0 -1px 0 0 #444548;
}