mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 08:27:46 +08:00
feat(pool): add bulk key configuration management
This commit is contained in:
@@ -936,6 +936,17 @@
|
||||
:provider-type="selectedProviderData?.provider_type || selectedProviderType"
|
||||
:batch-concurrency="selectedProviderConfig?.batch_concurrency"
|
||||
@changed="handleAccountBatchChanged"
|
||||
@edit-config="openKeyBatchEditDialog"
|
||||
/>
|
||||
<PoolKeyBatchEditDialog
|
||||
v-if="selectedProviderId"
|
||||
:open="keyBatchEditDialogOpen"
|
||||
:provider-id="selectedProviderId"
|
||||
:provider-name="selectedProviderData?.name || ''"
|
||||
:key-ids="keyBatchEditKeyIds"
|
||||
:available-api-formats="selectedProviderData?.api_formats || []"
|
||||
@close="closeKeyBatchEditDialog"
|
||||
@saved="handleKeyBatchEditSaved"
|
||||
/>
|
||||
<KeyFormDialog
|
||||
v-if="selectedProviderId"
|
||||
@@ -1042,6 +1053,7 @@ import PoolSchedulingDialog from '@/features/pool/components/PoolSchedulingDialo
|
||||
import PoolAdvancedDialog from '@/features/pool/components/PoolAdvancedDialog.vue'
|
||||
import PoolDemandMetricsDialog from '@/features/pool/components/PoolDemandMetricsDialog.vue'
|
||||
import PoolAccountBatchDialog from '@/features/pool/components/PoolAccountBatchDialog.vue'
|
||||
import PoolKeyBatchEditDialog from '@/features/pool/components/PoolKeyBatchEditDialog.vue'
|
||||
import PoolManagementHeader from '@/features/pool/components/PoolManagementHeader.vue'
|
||||
import PoolKeyQuotaPanel from '@/features/pool/components/PoolKeyQuotaPanel.vue'
|
||||
import PoolKeyStatsPanel from '@/features/pool/components/PoolKeyStatsPanel.vue'
|
||||
@@ -1248,6 +1260,8 @@ async function loadOverview(options: { cacheTtlMs?: number, silent?: boolean } =
|
||||
endpointEditDialogOpen.value = false
|
||||
providerEndpointsForEdit.value = []
|
||||
showAccountBatchDialog.value = false
|
||||
keyBatchEditDialogOpen.value = false
|
||||
keyBatchEditKeyIds.value = []
|
||||
closeProviderProxyPopovers()
|
||||
resetKeyPage()
|
||||
}
|
||||
@@ -1610,6 +1624,8 @@ async function selectProvider(
|
||||
providerEndpointsForEdit.value = []
|
||||
editingKeyDetail.value = null
|
||||
showAccountBatchDialog.value = false
|
||||
keyBatchEditDialogOpen.value = false
|
||||
keyBatchEditKeyIds.value = []
|
||||
keyPermissionsDialogOpen.value = false
|
||||
keyFormDialogOpen.value = false
|
||||
oauthKeyEditDialogOpen.value = false
|
||||
@@ -1691,6 +1707,8 @@ const prioritySavingKeyId = ref<string | null>(null)
|
||||
|
||||
const keyPermissionsDialogOpen = ref(false)
|
||||
const keyFormDialogOpen = ref(false)
|
||||
const keyBatchEditDialogOpen = ref(false)
|
||||
const keyBatchEditKeyIds = ref<string[]>([])
|
||||
const oauthKeyEditDialogOpen = ref(false)
|
||||
const editingKeyDetail = ref<PoolKeyDetail | null>(null)
|
||||
|
||||
@@ -2382,6 +2400,20 @@ function handleKeyPermissions(key: PoolKeyDetail) {
|
||||
keyPermissionsDialogOpen.value = true
|
||||
}
|
||||
|
||||
function openKeyBatchEditDialog(keyIds: string[]): void {
|
||||
keyBatchEditKeyIds.value = [...new Set(keyIds)]
|
||||
keyBatchEditDialogOpen.value = keyBatchEditKeyIds.value.length > 0
|
||||
}
|
||||
|
||||
function closeKeyBatchEditDialog(): void {
|
||||
keyBatchEditDialogOpen.value = false
|
||||
keyBatchEditKeyIds.value = []
|
||||
}
|
||||
|
||||
async function handleKeyBatchEditSaved(): Promise<void> {
|
||||
await Promise.all([loadKeys(), loadOverview()])
|
||||
}
|
||||
|
||||
async function handleDialogSaved() {
|
||||
editingKeyDetail.value = null
|
||||
await loadKeys()
|
||||
|
||||
Reference in New Issue
Block a user