Skip to content
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
8 changes: 7 additions & 1 deletion dashboards-observability/public/components/metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export const Home = ({ http, chrome, parentBreadcrumb, renderProps, pplService }
'col-md-12': isSidebarClosed,
});

const sidebarClassName = classNames({
closed: isSidebarClosed,
});

return (
<>
<Route
Expand Down Expand Up @@ -135,7 +139,9 @@ export const Home = ({ http, chrome, parentBreadcrumb, renderProps, pplService }
resolutionSelectId={resolutionSelectId}
/>
<div className="dscAppContainer">
<div className="col-md-3 dscSidebar__container dscCollapsibleSidebar">
<div
className={`col-md-3 dscSidebar__container dscCollapsibleSidebar ${sidebarClassName}`}
>
<div className="">
{!isSidebarClosed && <Sidebar http={http} pplService={pplService} />}
<EuiButtonIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,13 @@
}

.metricsList {
overflow-x:auto;
line-height:normal;
margin-top:10px;
}

.metricName {
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
margin-bottom:10px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,14 @@ export const Sidebar = (props: ISidebarProps) => {
>
<ul className="metricsList">
{recentlyCreatedMetrics.map((metric: any) => (
<li key={metric.id}>
<EuiLink onClick={() => handleAddMetric(metric)}>{metric.name}</EuiLink>
<li className="metricName" key={metric.id}>
<EuiLink
className="metricName eui-textTruncate"
title={metric.name}
onClick={() => handleAddMetric(metric)}
>
{metric.name}
</EuiLink>
</li>
))}
</ul>
Expand All @@ -80,7 +86,13 @@ export const Sidebar = (props: ISidebarProps) => {
<ul className="metricsList">
{selectedMetrics.map((metric: any) => (
<li key={metric.id}>
<EuiLink onClick={() => handleRemoveMetric(metric)}>{metric.name}</EuiLink>
<EuiLink
className="metricName eui-textTruncate"
title={metric.name}
onClick={() => handleRemoveMetric(metric)}
>
{metric.name}
</EuiLink>
</li>
))}
</ul>
Expand All @@ -99,7 +111,13 @@ export const Sidebar = (props: ISidebarProps) => {
<ul className="metricsList">
{availableMetrics.slice(0, 100).map((metric: any) => (
<li key={metric.id}>
<EuiLink onClick={() => handleAddMetric(metric)}>{metric.name}</EuiLink>
<EuiLink
className="metricName eui-textTruncate"
title={metric.name}
onClick={() => handleAddMetric(metric)}
>
{metric.name}
</EuiLink>
</li>
))}
</ul>
Expand Down