diff --git a/frontend/src/app/[lang]/dashboard/admin/apps/page.tsx b/frontend/src/app/[lang]/dashboard/admin/apps/page.tsx index 69fb3c7..2664102 100644 --- a/frontend/src/app/[lang]/dashboard/admin/apps/page.tsx +++ b/frontend/src/app/[lang]/dashboard/admin/apps/page.tsx @@ -19,6 +19,7 @@ import { import { TruncatedText } from '@/components/truncated-text'; import { useDebounce } from '@/hooks/useDebounce'; import { useApplicationDelete } from '@/lib/use-application-delete'; +import { Select } from '@/components/ui/select'; const statusColors: Record = { running: 'badge-green', @@ -605,23 +606,18 @@ export default function AdminAppsPage() {

)} - + onChange={(v) => setTargetClusterId(v)} + options={targetClusters.map((cluster) => ({ + value: cluster.id, + label: `${cluster.name} · ${cluster.region || aa.na} · ${cluster.status}/${cluster.healthStatus || aa.unknown}`, + disabled: cluster.status !== 'active' || cluster.healthStatus !== 'healthy', + }))} + />

{aa.currentExcludedNote}

diff --git a/frontend/src/app/[lang]/dashboard/admin/billing/page.tsx b/frontend/src/app/[lang]/dashboard/admin/billing/page.tsx index e320d44..b8c08b8 100644 --- a/frontend/src/app/[lang]/dashboard/admin/billing/page.tsx +++ b/frontend/src/app/[lang]/dashboard/admin/billing/page.tsx @@ -15,6 +15,7 @@ import type { LifecycleSettings, } from '@/types'; import { DollarSign, Edit2, Shield, Clock, Layers, Info, Box, Server, Globe } from 'lucide-react'; +import { Select } from '@/components/ui/select'; const cycles: BillingCycle[] = ['hourly', 'monthly', 'yearly']; @@ -198,16 +199,19 @@ function DeployDefaultsFields({ {readOnly ? (

{profile.cpuRequest || '—'}

) : ( - + onChange={(v) => onUpdate({ cpuRequest: v })} + options={[ + { value: '50m', label: '50m' }, + { value: '100m', label: '100m' }, + { value: '250m', label: '250m' }, + { value: '500m', label: '500m' }, + ]} + /> )}
@@ -215,17 +219,20 @@ function DeployDefaultsFields({ {readOnly ? (

{profile.cpuLimit}

) : ( - + onChange={(v) => onUpdate({ cpuLimit: v })} + options={[ + { value: '200m', label: '200m' }, + { value: '250m', label: '250m' }, + { value: '500m', label: '500m' }, + { value: '1', label: b.oneCore }, + { value: '2', label: b.twoCores }, + ]} + /> )}
@@ -233,16 +240,19 @@ function DeployDefaultsFields({ {readOnly ? (

{profile.memoryRequest || '—'}

) : ( - + onChange={(v) => onUpdate({ memoryRequest: v })} + options={[ + { value: '64Mi', label: '64 Mi' }, + { value: '128Mi', label: '128 Mi' }, + { value: '256Mi', label: '256 Mi' }, + { value: '512Mi', label: '512 Mi' }, + ]} + /> )}
@@ -250,16 +260,19 @@ function DeployDefaultsFields({ {readOnly ? (

{profile.memoryLimit}

) : ( - + onChange={(v) => onUpdate({ memoryLimit: v })} + options={[ + { value: '256Mi', label: '256 Mi' }, + { value: '512Mi', label: '512 Mi' }, + { value: '1Gi', label: '1 Gi' }, + { value: '2Gi', label: '2 Gi' }, + ]} + /> )}
diff --git a/frontend/src/app/[lang]/dashboard/admin/clusters/page.tsx b/frontend/src/app/[lang]/dashboard/admin/clusters/page.tsx index 6c2aff2..81552d8 100644 --- a/frontend/src/app/[lang]/dashboard/admin/clusters/page.tsx +++ b/frontend/src/app/[lang]/dashboard/admin/clusters/page.tsx @@ -8,6 +8,7 @@ import { useT, useLocale } from '@/i18n/I18nProvider'; import type { Cluster, ClusterResources } from '@/types'; import { Server, CheckCircle, XCircle, BarChart3, Clock, RotateCw, Plug, X, ScrollText } from 'lucide-react'; import { useConfirm } from '@/components/confirm-modal'; +import { Select } from '@/components/ui/select'; function ResourcePanel({ clusterId }: { clusterId: string }) { const cl = useT().dashboard.clusters; @@ -345,17 +346,16 @@ function ClusterToolsPanel({

{cl.toolsSubtitle}

{clusters.length > 1 && ( - + onChange={(v) => onSelectCluster(v)} + options={clusters.map((c) => ({ + value: c.id, + label: `${c.name}${c.isDefault ? cl.defaultSuffix : ''}`, + }))} + /> )} @@ -502,13 +502,19 @@ export default function AdminClustersPage() {
- + setStatus(e.target.value as any)} className="input-field"> - - {(Object.keys(inv.status) as InvoiceStatus[]).map((value) => ( - - ))} - - + setPaymentMethod(v as any)} + options={[ + { value: 'all', label: inv.allMethods }, + { value: 'wallet', label: inv.methodWallet }, + { value: 'gateway', label: inv.methodGateway }, + { value: 'mixed', label: inv.methodMixed }, + ]} + />
diff --git a/frontend/src/app/[lang]/dashboard/admin/pools/page.tsx b/frontend/src/app/[lang]/dashboard/admin/pools/page.tsx index 421f50c..7f3ea3b 100644 --- a/frontend/src/app/[lang]/dashboard/admin/pools/page.tsx +++ b/frontend/src/app/[lang]/dashboard/admin/pools/page.tsx @@ -8,6 +8,7 @@ import { useT, useLocale } from '@/i18n/I18nProvider'; import type { Cluster, ClusterPool } from '@/types'; import { Scale, BarChart3, RotateCw, CheckCircle, XCircle, Pencil, Clock, X } from 'lucide-react'; import { useConfirm } from '@/components/confirm-modal'; +import { Select } from '@/components/ui/select'; export default function AdminPoolsPage() { const t = useT(); @@ -150,18 +151,20 @@ export default function AdminPoolsPage() {
- + onChange={(v) => setForm({ ...form, strategy: v as any })} + options={[ + { value: 'weighted-resource', label: strategyOption('weighted-resource') }, + { value: 'least-loaded', label: strategyOption('least-loaded') }, + { value: 'weighted-round-robin', label: strategyOption('weighted-round-robin') }, + { value: 'region-based', label: strategyOption('region-based') }, + { value: 'least-apps', label: strategyOption('least-apps') }, + { value: 'round-robin', label: strategyOption('round-robin') }, + ]} + />
diff --git a/frontend/src/app/[lang]/dashboard/admin/users/page.tsx b/frontend/src/app/[lang]/dashboard/admin/users/page.tsx index 36bb31a..18e0177 100644 --- a/frontend/src/app/[lang]/dashboard/admin/users/page.tsx +++ b/frontend/src/app/[lang]/dashboard/admin/users/page.tsx @@ -8,6 +8,7 @@ import { useT, useLocale } from '@/i18n/I18nProvider'; import { toast } from 'react-toastify'; import type { AdminUser } from '@/types'; import { Users, Search, X, Clock, KeyRound } from 'lucide-react'; +import { Select } from '@/components/ui/select'; export default function AdminUsersPage() { const t = useT(); @@ -166,16 +167,19 @@ export default function AdminUsersPage() {
- + onChange={(v) => setForm({ ...form, role: v as typeof form.role })} + options={[ + { value: 'user', label: u.roles.user }, + { value: 'admin', label: u.roles.admin }, + { value: 'technical', label: u.roles.technical }, + { value: 'sales', label: u.roles.sales }, + ]} + />