mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-19 07:44:02 +02:00
Fix the warning and error
This commit is contained in:
parent
d6bfd9b952
commit
5caca1a701
2 changed files with 9 additions and 9 deletions
|
@ -253,9 +253,9 @@ export default {
|
||||||
const groupId = this.getGroupIdentifier();
|
const groupId = this.getGroupIdentifier();
|
||||||
|
|
||||||
if (this.group.sortKey && this.group.sortDirection) {
|
if (this.group.sortKey && this.group.sortDirection) {
|
||||||
query[ `sort_${ groupId }` ] = `${ this.group.sortKey }_${ this.group.sortDirection }`;
|
query[ `sort_${groupId}` ] = `${this.group.sortKey}_${this.group.sortDirection}`;
|
||||||
} else {
|
} else {
|
||||||
delete query[ `sort_${ groupId }` ];
|
delete query[ `sort_${groupId}` ];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$router.push({ query }).catch(() => {});
|
this.$router.push({ query }).catch(() => {});
|
||||||
|
@ -318,8 +318,8 @@ export default {
|
||||||
} else if (sortKey === "uptime") {
|
} else if (sortKey === "uptime") {
|
||||||
// Sort by uptime
|
// Sort by uptime
|
||||||
const uptimeList = this.$root.uptimeList || {};
|
const uptimeList = this.$root.uptimeList || {};
|
||||||
const uptimeA = a.id ? parseFloat(uptimeList[ `${ a.id }_24` ]) || 0 : 0;
|
const uptimeA = a.id ? parseFloat(uptimeList[ `${a.id}_24` ]) || 0 : 0;
|
||||||
const uptimeB = b.id ? parseFloat(uptimeList[ `${ b.id }_24` ]) || 0 : 0;
|
const uptimeB = b.id ? parseFloat(uptimeList[ `${b.id}_24` ]) || 0 : 0;
|
||||||
valueA = uptimeA;
|
valueA = uptimeA;
|
||||||
valueB = uptimeB;
|
valueB = uptimeB;
|
||||||
} else if (sortKey === "cert") {
|
} else if (sortKey === "cert") {
|
||||||
|
@ -356,7 +356,7 @@ export default {
|
||||||
return cleanName;
|
return cleanName;
|
||||||
}
|
}
|
||||||
// Fallback to ID or index
|
// Fallback to ID or index
|
||||||
return this.group.id ? `group${ this.group.id }` : `group${ this.groupIndex }`;
|
return this.group.id ? `group${this.group.id}` : `group${this.groupIndex}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue