mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
fix(dashboard): order shards correctly
This commit is contained in:
parent
fd6909cd96
commit
d1b617f6be
3 changed files with 9 additions and 7 deletions
|
|
@ -36,7 +36,7 @@
|
|||
return shard;
|
||||
});
|
||||
|
||||
if (data[0].cluster_id === 0) {
|
||||
if (data[0].cluster_id !== undefined) {
|
||||
let clusterData = {};
|
||||
data.forEach(shard => {
|
||||
if (clusterData[shard.cluster_id] === undefined) clusterData[shard.cluster_id] = [];
|
||||
|
|
@ -45,6 +45,8 @@
|
|||
clusters = clusterData;
|
||||
}
|
||||
|
||||
Object.keys(clusters).map(c => clusters[c] = clusters[c].reverse());
|
||||
|
||||
shards = data;
|
||||
pingAverage = Math.trunc(latencies / shards.length).toString();
|
||||
|
||||
|
|
@ -141,7 +143,7 @@
|
|||
{shardInfoMsg}
|
||||
{/if}
|
||||
{#if foundShard}
|
||||
Your shard is: Shard { foundShard.id }
|
||||
Your shard is: Shard { foundShard.shard_id }
|
||||
{/if}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue