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

StatsHouse UI: update enable server color #1526

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

vauweb
Copy link
Contributor

@vauweb vauweb commented Nov 6, 2024

No description provided.

@vauweb vauweb requested a review from a team as a code owner November 6, 2024 07:11
@vauweb vauweb merged commit b991aa6 into master Nov 6, 2024
1 check passed
@vauweb vauweb deleted the vauweb/update/line-color branch November 6, 2024 07:12
@@ -170,7 +170,7 @@ export function normalizePlotData(
const metricName = isValue ? `${meta.name || (plot.metricName !== promQLMetric ? plot.metricName : '')}: ` : '';
const colorKey = `${prefColor}${metricName}${oneGraph ? label : baseLabel}`;
// client select color line
const baseColor = /*meta.color ?? */ baseColors[colorKey] ?? selectColor(colorKey, usedBaseColors);
const baseColor = meta.color ?? baseColors[colorKey] ?? selectColor(colorKey, usedBaseColors);
Copy link
Contributor

Choose a reason for hiding this comment

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

а какого вида могут быть meta.color и baseColors[colorKey] ? Вероятно здесь будет уместнее использовать оператор || вместо ??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

цвет либо есть либо такого поля нет...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants