fix(aiops): 菜单移至日志告警下系统设置上;模型配置精简
- 菜单顺序:日志查询 → 日志分析 → 日志告警 → 智能运维 → 系统设置 - 模型配置去掉快捷预设按钮组;Base URL 仅选「自定义」供应商时显示; 温度/输出上限/超时/每日token上限/额外脱敏收进「高级设置」折叠(默认收起), 常规配置只剩:供应商下拉 + 模型名 + API Key + 测试/保存
This commit is contained in:
1 parent
9641503007
commit
07aa41bc33
4 files changed
+10
-35
No files matched your search
@@ -518,34 +518,6 @@ export default function AiopsPage() {
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap items-end gap-2">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs">{t('config.quickPresets')}</Label>
|
||||
<div className="flex gap-2">
|
||||
{LLM_PROVIDERS.filter(p => p.id === 'deepseek')[0].models.slice(0, 2).reverse().concat([]).map(m => (
|
||||
<Button
|
||||
key={m}
|
||||
type="button"
|
||||
size="sm"
|
||||
variant={config.model === m ? 'default' : 'outline'}
|
||||
onClick={() => setConfig({ ...config, baseUrl: LLM_PROVIDERS.find(p => p.id === 'deepseek')!.endpoint, model: m })}
|
||||
>
|
||||
{m}
|
||||
</Button>
|
||||
))}
|
||||
<Button
|
||||
type="button"
|
||||
size="sm"
|
||||
variant={matchProvider(config.baseUrl) === 'custom' ? 'default' : 'outline'}
|
||||
onClick={() => setConfig({ ...config, baseUrl: '', model: '' })}
|
||||
>
|
||||
{t('config.presetCustom')}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-[11px] text-muted-foreground">{t('config.presetHint')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs">{t('config.provider')}</Label>
|
||||
@@ -581,6 +553,7 @@ export default function AiopsPage() {
|
||||
</datalist>
|
||||
<p className="text-[11px] text-muted-foreground">{t('config.modelHint')}</p>
|
||||
</div>
|
||||
{matchProvider(config.baseUrl) === 'custom' && (
|
||||
<div className="space-y-1 sm:col-span-2">
|
||||
<Label className="text-xs">{t('config.baseUrl')}</Label>
|
||||
<Input
|
||||
@@ -590,6 +563,7 @@ export default function AiopsPage() {
|
||||
/>
|
||||
<p className="text-[11px] text-muted-foreground">{t('config.baseUrlHint')}</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs">{t('config.apiKey')}</Label>
|
||||
<Input
|
||||
@@ -600,6 +574,9 @@ export default function AiopsPage() {
|
||||
/>
|
||||
<p className="text-[11px] text-muted-foreground">{t('config.apiKeyHint')}</p>
|
||||
</div>
|
||||
<details className="sm:col-span-2 rounded-lg border px-3 py-2">
|
||||
<summary className="cursor-pointer text-xs font-medium text-muted-foreground">{t('config.advanced')}</summary>
|
||||
<div className="mt-3 grid gap-4">
|
||||
<div className="grid grid-cols-3 gap-2">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-xs">{t('config.temperature')}</Label>
|
||||
@@ -648,6 +625,8 @@ export default function AiopsPage() {
|
||||
/>
|
||||
<p className="text-[11px] text-muted-foreground">{t('config.redactExtraHint')}</p>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
{/* 顺序按实际操作流:先「测试连接」确认能通,再「保存配置」 */}
|
||||
|
||||
Reference in new issue
Block a user