fix(stats): show data on header even in cluster mode
This commit is contained in:
parent
83f223450e
commit
909db909ac
@ -36,9 +36,6 @@
|
|||||||
shard.last_heartbeat = new Date(Number(shard.last_heartbeat) * 1000).toUTCString().match(/([0-9][0-9]:[0-9][0-9]:[0-9][0-9])/)?.shift()
|
shard.last_heartbeat = new Date(Number(shard.last_heartbeat) * 1000).toUTCString().match(/([0-9][0-9]:[0-9][0-9]:[0-9][0-9])/)?.shift()
|
||||||
return shard;
|
return shard;
|
||||||
});
|
});
|
||||||
console.log(data[0].cluster_id);
|
|
||||||
|
|
||||||
pingAverage = Math.trunc(pings / shards.length).toString();
|
|
||||||
|
|
||||||
currentCommitMsg = `Current Git commit: <a href="https://github.com/xSke/PluralKit/commit/${pkdata.version}">${pkdata.version.slice(0,7)}</a>`;
|
currentCommitMsg = `Current Git commit: <a href="https://github.com/xSke/PluralKit/commit/${pkdata.version}">${pkdata.version.slice(0,7)}</a>`;
|
||||||
|
|
||||||
@ -49,10 +46,11 @@
|
|||||||
clusterData[shard.cluster_id].push(shard);
|
clusterData[shard.cluster_id].push(shard);
|
||||||
});
|
});
|
||||||
clusters = clusterData;
|
clusters = clusterData;
|
||||||
} else {
|
|
||||||
shards = data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shards = data;
|
||||||
|
pingAverage = Math.trunc(pings / shards.length).toString();
|
||||||
|
|
||||||
message = "";
|
message = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -142,7 +140,7 @@
|
|||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{#if shards.length > 0}
|
{#if Object.keys(clusters).length == 0 && shards.length > 0}
|
||||||
<Row>
|
<Row>
|
||||||
<Col class="mx-auto" xs={12} lg={11} xl={10}>
|
<Col class="mx-auto" xs={12} lg={11} xl={10}>
|
||||||
<Card class="mb-4">
|
<Card class="mb-4">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user