mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-18 23:34:04 +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();
|
||||
|
||||
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 {
|
||||
delete query[ `sort_${ groupId }` ];
|
||||
delete query[ `sort_${groupId}` ];
|
||||
}
|
||||
|
||||
this.$router.push({ query }).catch(() => {});
|
||||
|
@ -318,8 +318,8 @@ export default {
|
|||
} else if (sortKey === "uptime") {
|
||||
// Sort by uptime
|
||||
const uptimeList = this.$root.uptimeList || {};
|
||||
const uptimeA = a.id ? parseFloat(uptimeList[ `${ a.id }_24` ]) || 0 : 0;
|
||||
const uptimeB = b.id ? parseFloat(uptimeList[ `${ b.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;
|
||||
valueA = uptimeA;
|
||||
valueB = uptimeB;
|
||||
} else if (sortKey === "cert") {
|
||||
|
@ -356,7 +356,7 @@ export default {
|
|||
return cleanName;
|
||||
}
|
||||
// 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}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -485,4 +485,4 @@ export default {
|
|||
align-items: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<!-- Group Title -->
|
||||
<h2 class="group-title">
|
||||
<div class="title-section">
|
||||
<font-awesome-icon v-if="editMode && showGroupDrag" icon="arrows-alt-v" class="action drag me-3" />
|
||||
<font-awesome-icon v-if="editMode" icon="times" class="action remove me-3" @click="removeGroup(group.index)" />
|
||||
<Editable v-model="group.element.name" :contenteditable="editMode" tag="span" data-testid="group-name" />
|
||||
<font-awesome-icon v-if="editMode && showGroupDrag" icon="arrows-alt-v" class="action drag me-3" />
|
||||
<font-awesome-icon v-if="editMode" icon="times" class="action remove me-3" @click="removeGroup(group.index)" />
|
||||
<Editable v-model="group.element.name" :contenteditable="editMode" tag="span" data-testid="group-name" />
|
||||
</div>
|
||||
|
||||
<GroupSortDropdown
|
||||
|
|
Loading…
Add table
Reference in a new issue