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
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ const MetricsContextMenu = ({
<Item
key={label.name}
id={label.name}
onClick={() => onAddLabelMatcher({key: label.name, value: label.value})}
onClick={() => {
onAddLabelMatcher({
key: transformUtilizationLabels(label.name, utilizationMetrics),
value: label.value,
});
}}
className="max-w-[400px] overflow-hidden"
>
<div className="mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-300">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,15 @@ const RawUtilizationMetrics = ({
<g className="lines fill-transparent">
{series.map((s, i) => {
let isSelected = false;
if (
selectedSeriesMatchers != null &&
selectedSeriesMatchers.length > 0 &&
selectedSeriesMatchers.length === s.metric.length
) {
if (selectedSeriesMatchers != null && selectedSeriesMatchers.length > 0) {
isSelected = selectedSeriesMatchers.every(m => {
for (let i = 0; i < s.metric.length; i++) {
if (s.metric[i].name === m.key && s.metric[i].value === m.value) {
if (
s.metric[i].name
.replace('attributes_resource.', '')
.replace('attributes.', '') === m.key &&
s.metric[i].value === m.value
) {
return true;
}
}
Expand Down