feat: pin Alexander as start of telemetry (#156)

This commit is contained in:
Maciej Hirsz
2019-06-26 18:20:21 +02:00
committed by GitHub
parent 31bc535c5c
commit 5c1f3272c2
2 changed files with 16 additions and 1 deletions
+5
View File
@@ -403,6 +403,11 @@ export class Connection {
let topCount: Types.NodeCount = 0 as Types.NodeCount;
for (const [label, count] of chains.entries()) {
if (label === 'Alexander') {
topLabel = label;
break;
}
if (count > topCount) {
topLabel = label;
topCount = count;
+11 -1
View File
@@ -52,7 +52,17 @@ export class Chains extends React.Component<Chains.Props, {}> {
return stable
.inplace(
Array.from(this.props.chains.entries()),
(a, b) => b[1] - a[1]
(a, b) => {
if (a[0] === 'Alexander') {
return -1;
}
if (b[0] === 'Alexander') {
return 1;
}
return b[1] - a[1];
}
)
.map(([label, nodeCount]) => ({ label, nodeCount }));
}