feat(admin): read live back-office data in every console view
Models, pipelines, users, subscriptions, usage, audit log, ads, and releases still rendered placeholder or duplicated implementations from the earlier admin split. They now read the live back-office API, share one sidebar and console theme, and the license issuer dialog uses the rotated signing key.
This commit is contained in:
parent
cfc58458a8
commit
5aa268970a
23 changed files with 187 additions and 174 deletions
|
|
@ -345,7 +345,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
width: 4,
|
||||
height: 34,
|
||||
borderRadius: '999px',
|
||||
background: 'linear-gradient(180deg, #06b6d4 0%, #8b5cf6 50%, #3b82f6 100%)',
|
||||
background: 'linear-gradient(180deg, var(--d3-tag-cyan) 0%, var(--d3-tag-purple) 50%, var(--d3-accent-main) 100%)',
|
||||
}}
|
||||
/>
|
||||
<Box>
|
||||
|
|
@ -457,8 +457,8 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
width: 44,
|
||||
height: 44,
|
||||
borderRadius: '12px',
|
||||
bgcolor: 'rgba(6, 182, 212, 0.15)',
|
||||
border: '1px solid rgba(6, 182, 212, 0.3)',
|
||||
bgcolor: 'var(--d3-tag-cyan)',
|
||||
border: '1px solid var(--d3-tag-cyan)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
|
|
@ -483,7 +483,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
</Box>
|
||||
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.cyanLight, bgcolor: 'rgba(6, 182, 212, 0.1)', px: 1.5, py: 0.75, borderRadius: '8px', border: `1px solid ${C.borderHl}` }}>
|
||||
<Typography sx={{ fontFamily: FONT_MONO, fontSize: '11px', color: C.cyanLight, bgcolor: 'var(--d3-tag-cyan)', px: 1.5, py: 0.75, borderRadius: '8px', border: `1px solid ${C.borderHl}` }}>
|
||||
🛡️ Auto Failover Route: {sttEndpoints.map((e) => e.providerType).join(' ➔ ')}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
|
@ -530,7 +530,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
</Box>
|
||||
) : (
|
||||
sttEndpoints.map((ep) => (
|
||||
<Box component="tr" key={ep.id} sx={{ bgcolor: ep.isDefault ? 'rgba(59, 130, 246, 0.05)' : 'transparent' }}>
|
||||
<Box component="tr" key={ep.id} sx={{ bgcolor: ep.isDefault ? 'var(--d3-accent-glow)' : 'transparent' }}>
|
||||
<Box component="td" sx={{ fontFamily: FONT_MONO, fontSize: '12px', color: C.cyanLight, fontWeight: 500 }}>
|
||||
#{ep.fallbackPriority}
|
||||
</Box>
|
||||
|
|
@ -556,7 +556,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
</Box>
|
||||
<Box component="td">
|
||||
{ep.isDefault ? (
|
||||
<Box component="span" sx={{ px: 1, py: 0.3, borderRadius: '4px', bgcolor: 'rgba(34, 197, 94, 0.2)', color: C.green400, fontSize: '10px', fontWeight: 500 }}>
|
||||
<Box component="span" sx={{ px: 1, py: 0.3, borderRadius: '4px', bgcolor: 'var(--d3-status-success)', color: C.green400, fontSize: '10px', fontWeight: 500 }}>
|
||||
⭐ DEFAULT
|
||||
</Box>
|
||||
) : (
|
||||
|
|
@ -576,10 +576,10 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
fontFamily: FONT_SANS,
|
||||
fontSize: '10px',
|
||||
color: C.green400,
|
||||
borderColor: 'rgba(34, 197, 94, 0.4)',
|
||||
borderColor: 'var(--d3-status-success)',
|
||||
px: 1,
|
||||
py: 0.25,
|
||||
'&:hover': { bgcolor: 'rgba(34, 197, 94, 0.15)', borderColor: C.green400 },
|
||||
'&:hover': { bgcolor: 'var(--d3-status-success)', borderColor: C.green400 },
|
||||
}}
|
||||
>
|
||||
Set Default
|
||||
|
|
@ -596,7 +596,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
borderColor: C.borderHl,
|
||||
px: 1,
|
||||
py: 0.25,
|
||||
'&:hover': { bgcolor: 'rgba(59, 130, 246, 0.15)', borderColor: C.accentLight },
|
||||
'&:hover': { bgcolor: 'var(--d3-accent-glow)', borderColor: C.accentLight },
|
||||
}}
|
||||
>
|
||||
{sttPingStatus[ep.id] || '⚡ Test'}
|
||||
|
|
@ -676,7 +676,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
<Box component="td" sx={{ fontFamily: FONT_MONO, fontSize: '12px', color: C.bright, fontWeight: 600 }}>
|
||||
{ep.modelId}
|
||||
{ep.isDefault && (
|
||||
<Box component="span" sx={{ ml: 1, px: 0.75, py: 0.1, borderRadius: '4px', bgcolor: 'rgba(59, 130, 246, 0.2)', color: C.cyanLight, fontSize: '9px' }}>
|
||||
<Box component="span" sx={{ ml: 1, px: 0.75, py: 0.1, borderRadius: '4px', bgcolor: 'var(--d3-accent-glow)', color: C.cyanLight, fontSize: '9px' }}>
|
||||
DEFAULT
|
||||
</Box>
|
||||
)}
|
||||
|
|
@ -716,7 +716,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
borderColor: C.borderHl,
|
||||
px: 1,
|
||||
py: 0.25,
|
||||
'&:hover': { bgcolor: 'rgba(59, 130, 246, 0.15)', borderColor: C.accentLight },
|
||||
'&:hover': { bgcolor: 'var(--d3-accent-glow)', borderColor: C.accentLight },
|
||||
}}
|
||||
>
|
||||
Delete
|
||||
|
|
@ -740,11 +740,11 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
fullWidth
|
||||
PaperProps={{
|
||||
sx: {
|
||||
bgcolor: 'rgba(17, 26, 48, 0.95)',
|
||||
bgcolor: 'var(--d3-bg-card-soft)',
|
||||
backdropFilter: 'blur(32px)',
|
||||
border: `1px solid ${C.borderHl}`,
|
||||
borderRadius: '20px',
|
||||
boxShadow: '0 24px 60px rgba(3, 7, 18, 0.8)',
|
||||
boxShadow: '0 24px 60px var(--d3-scrim)',
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
|
@ -772,7 +772,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
if (preset.prompt) setSttPrompt(preset.prompt)
|
||||
}}
|
||||
sx={{
|
||||
bgcolor: 'rgba(10, 17, 31, 0.7)',
|
||||
bgcolor: 'var(--d3-bg-inset-soft)',
|
||||
color: C.bright,
|
||||
borderRadius: '10px',
|
||||
'& fieldset': { borderColor: C.border },
|
||||
|
|
@ -796,7 +796,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
size="small"
|
||||
placeholder="e.g. Groq Whisper LPU Fast"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px' },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px' },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -807,7 +807,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
label="Provider Type"
|
||||
onChange={(e) => setSttProviderType(e.target.value as STTProviderCategory)}
|
||||
sx={{
|
||||
bgcolor: 'rgba(10, 17, 31, 0.7)',
|
||||
bgcolor: 'var(--d3-bg-inset-soft)',
|
||||
color: C.bright,
|
||||
borderRadius: '10px',
|
||||
'& fieldset': { borderColor: C.border },
|
||||
|
|
@ -834,7 +834,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
size="small"
|
||||
placeholder="https://api.groq.com/openai/v1/audio/transcriptions"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -849,7 +849,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
size="small"
|
||||
placeholder={sttEditingId ? '•••••••• (변경 시 입력)' : 'gsk_... or sk-... or token'}
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -862,7 +862,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
size="small"
|
||||
placeholder="e.g. whisper-large-v3-turbo, nova-3"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -876,7 +876,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
label="Dispatch Method"
|
||||
onChange={(e) => setSttMethod(e.target.value as SttProviderEndpoint['method'])}
|
||||
sx={{
|
||||
bgcolor: 'rgba(10, 17, 31, 0.7)',
|
||||
bgcolor: 'var(--d3-bg-inset-soft)',
|
||||
color: C.bright,
|
||||
borderRadius: '10px',
|
||||
'& fieldset': { borderColor: C.border },
|
||||
|
|
@ -897,7 +897,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
size="small"
|
||||
placeholder="ko, en, auto"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -911,7 +911,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
size="small"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -926,7 +926,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
size="small"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -937,7 +937,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
size="small"
|
||||
placeholder="e.g. D3RO, Kubernetes, React, LLM"
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px' },
|
||||
'& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px' },
|
||||
'& .MuiInputLabel-root': { color: C.dim },
|
||||
}}
|
||||
/>
|
||||
|
|
@ -950,11 +950,11 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
helperText="변경 사유를 3자 이상 입력하세요."
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px' } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px' } }}
|
||||
/>
|
||||
|
||||
{/* Test Connection Inside Modal */}
|
||||
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'rgba(10, 17, 31, 0.6)', border: `1px solid ${C.border}`, display: 'flex', flexDirection: 'column', gap: 1.5 }}>
|
||||
<Box sx={{ p: 2, borderRadius: '12px', bgcolor: 'var(--d3-bg-inset-soft)', border: `1px solid ${C.border}`, display: 'flex', flexDirection: 'column', gap: 1.5 }}>
|
||||
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<Typography sx={{ fontFamily: FONT_SANS, fontSize: '13px', fontWeight: 600, color: C.bright }}>
|
||||
Live Connection Test (Synthetic Audio Ping)
|
||||
|
|
@ -970,7 +970,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
color: C.bright,
|
||||
borderColor: C.borderHl,
|
||||
textTransform: 'none',
|
||||
'&:hover': { borderColor: C.accentLight, bgcolor: 'rgba(59, 130, 246, 0.15)' },
|
||||
'&:hover': { borderColor: C.accentLight, bgcolor: 'var(--d3-accent-glow)' },
|
||||
}}
|
||||
>
|
||||
{testingInModal ? <CircularProgress size={14} sx={{ color: C.bright, mr: 1 }} /> : null}
|
||||
|
|
@ -985,8 +985,8 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
sx={{
|
||||
fontFamily: FONT_SANS,
|
||||
fontSize: '12px',
|
||||
borderColor: sttTestModalResult.success ? 'rgba(34, 197, 94, 0.5)' : 'rgba(239, 68, 68, 0.5)',
|
||||
color: sttTestModalResult.success ? C.green400 : '#f87171',
|
||||
borderColor: sttTestModalResult.success ? 'var(--d3-status-success)' : 'var(--d3-status-danger)',
|
||||
color: sttTestModalResult.success ? C.green400 : 'var(--d3-status-danger)',
|
||||
}}
|
||||
>
|
||||
{sttTestModalResult.message}
|
||||
|
|
@ -1013,11 +1013,11 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
fullWidth
|
||||
PaperProps={{
|
||||
sx: {
|
||||
bgcolor: 'rgba(17, 26, 48, 0.95)',
|
||||
bgcolor: 'var(--d3-bg-card-soft)',
|
||||
backdropFilter: 'blur(32px)',
|
||||
border: `1px solid ${C.borderHl}`,
|
||||
borderRadius: '20px',
|
||||
boxShadow: '0 24px 60px rgba(3, 7, 18, 0.8)',
|
||||
boxShadow: '0 24px 60px var(--d3-scrim)',
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
|
@ -1042,7 +1042,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
setLlmCompletionCost(preset.completionCost)
|
||||
}}
|
||||
sx={{
|
||||
bgcolor: 'rgba(10, 17, 31, 0.7)',
|
||||
bgcolor: 'var(--d3-bg-inset-soft)',
|
||||
color: C.bright,
|
||||
borderRadius: '10px',
|
||||
'& fieldset': { borderColor: C.border },
|
||||
|
|
@ -1062,7 +1062,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
fullWidth
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
/>
|
||||
<TextField
|
||||
label="Display Name"
|
||||
|
|
@ -1071,7 +1071,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
fullWidth
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px' } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px' } }}
|
||||
/>
|
||||
<FormControl fullWidth size="small">
|
||||
<InputLabel sx={{ color: C.dim }}>Provider Category</InputLabel>
|
||||
|
|
@ -1079,7 +1079,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
value={llmProvider}
|
||||
label="Provider Category"
|
||||
onChange={(e) => setLlmProvider(e.target.value)}
|
||||
sx={{ bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px' }}
|
||||
sx={{ bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px' }}
|
||||
>
|
||||
<MenuItem value="Local Sidecar">Local Sidecar</MenuItem>
|
||||
<MenuItem value="Ollama Local">Ollama Local Engine</MenuItem>
|
||||
|
|
@ -1095,7 +1095,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
fullWidth
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
/>
|
||||
<TextField
|
||||
label="API Key (Optional)"
|
||||
|
|
@ -1104,7 +1104,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
onChange={(e) => setLlmApiKey(e.target.value)}
|
||||
fullWidth
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
/>
|
||||
<Box sx={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 2 }}>
|
||||
<TextField
|
||||
|
|
@ -1115,7 +1115,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
onChange={(e) => setLlmPromptCost(e.target.value)}
|
||||
required
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
/>
|
||||
<TextField
|
||||
label="Completion Cost ($/1K)"
|
||||
|
|
@ -1125,7 +1125,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
onChange={(e) => setLlmCompletionCost(e.target.value)}
|
||||
required
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px', fontFamily: FONT_MONO } }}
|
||||
/>
|
||||
</Box>
|
||||
<TextField
|
||||
|
|
@ -1135,7 +1135,7 @@ export default function ServiceModelsPage(): React.ReactElement {
|
|||
required
|
||||
helperText="생성 사유를 3자 이상 입력하세요."
|
||||
size="small"
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'rgba(10, 17, 31, 0.7)', color: C.bright, borderRadius: '10px' } }}
|
||||
sx={{ '& .MuiOutlinedInput-root': { bgcolor: 'var(--d3-bg-inset-soft)', color: C.bright, borderRadius: '10px' } }}
|
||||
/>
|
||||
</DialogContent>
|
||||
<DialogActions sx={{ px: 3, pb: 3, pt: 1, borderTop: `1px solid ${C.border}` }}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue