Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
d5c711d0
Commit
d5c711d0
authored
Jan 11, 2026
by
IanShaw027
Browse files
refactor(ops): 从系统设置页面移除运维监控配置项
- 移除Ops Monitoring设置卡片及相关配置项 - 移除ops相关组件导入和展示逻辑 - 相关配置已迁移至运维监控页面统一管理
parent
73b62bb1
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/views/admin/SettingsView.vue
View file @
d5c711d0
...
...
@@ -685,78 +685,6 @@
</div>
</div>
<!-- Ops Monitoring -->
<div
class=
"card"
>
<div
class=
"border-b border-gray-100 px-6 py-4 dark:border-dark-700"
>
<h2
class=
"text-lg font-semibold text-gray-900 dark:text-white"
>
{{
t
(
'
admin.settings.opsMonitoring.title
'
)
}}
</h2>
<p
class=
"mt-1 text-sm text-gray-500 dark:text-gray-400"
>
{{
t
(
'
admin.settings.opsMonitoring.description
'
)
}}
</p>
</div>
<div
class=
"p-6"
>
<div
class=
"flex items-center justify-between"
>
<div>
<label
class=
"font-medium text-gray-900 dark:text-white"
>
{{
t
(
'
admin.settings.opsMonitoring.enabled
'
)
}}
</label>
<p
class=
"text-sm text-gray-500 dark:text-gray-400"
>
{{
t
(
'
admin.settings.opsMonitoring.enabledHint
'
)
}}
</p>
</div>
<Toggle
v-model=
"form.ops_monitoring_enabled"
/>
</div>
<div
v-if=
"form.ops_monitoring_enabled"
class=
"mt-5 flex items-center justify-between"
>
<div>
<label
class=
"font-medium text-gray-900 dark:text-white"
>
{{
t
(
'
admin.settings.opsMonitoring.realtimeEnabled
'
)
}}
</label>
<p
class=
"text-sm text-gray-500 dark:text-gray-400"
>
{{
t
(
'
admin.settings.opsMonitoring.realtimeEnabledHint
'
)
}}
</p>
</div>
<Toggle
v-model=
"form.ops_realtime_monitoring_enabled"
/>
</div>
<div
v-if=
"form.ops_monitoring_enabled"
class=
"mt-5 flex items-center justify-between"
>
<div>
<label
class=
"font-medium text-gray-900 dark:text-white"
>
{{
t
(
'
admin.settings.opsMonitoring.queryMode
'
)
}}
</label>
<p
class=
"text-sm text-gray-500 dark:text-gray-400"
>
{{
t
(
'
admin.settings.opsMonitoring.queryModeHint
'
)
}}
</p>
</div>
<Select
v-model=
"form.ops_query_mode_default"
:options=
"opsQueryModeOptions"
class=
"w-[220px]"
/>
</div>
<div
v-if=
"form.ops_monitoring_enabled"
class=
"mt-5 flex items-center justify-between"
>
<div>
<label
class=
"font-medium text-gray-900 dark:text-white"
>
{{
t
(
'
admin.settings.opsMonitoring.metricsInterval
'
)
}}
</label>
<p
class=
"text-sm text-gray-500 dark:text-gray-400"
>
{{
t
(
'
admin.settings.opsMonitoring.metricsIntervalHint
'
)
}}
</p>
</div>
<input
v-model.number=
"form.ops_metrics_interval_seconds"
type=
"number"
min=
"60"
max=
"3600"
step=
"10"
class=
"w-[220px] rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 shadow-sm focus:border-primary-500 focus:outline-none focus:ring-1 focus:ring-primary-500 dark:border-dark-600 dark:bg-dark-800 dark:text-white"
/>
</div>
</div>
</div>
<!-- Save Button -->
<div
class=
"flex justify-end"
>
<button
type=
"submit"
:disabled=
"saving"
class=
"btn btn-primary"
>
...
...
@@ -779,13 +707,6 @@
</button>
</div>
</form>
<!-- Ops settings and management (only show when enabled) -->
<div
v-if=
"showOpsSettings"
class=
"space-y-6"
>
<OpsRuntimeSettingsCard
/>
<OpsEmailNotificationCard
/>
<OpsAlertRulesCard
/>
</div>
</div>
</AppLayout>
</
template
>
...
...
@@ -800,9 +721,6 @@ import Icon from '@/components/icons/Icon.vue'
import
Toggle
from
'
@/components/common/Toggle.vue
'
import
Select
from
'
@/components/common/Select.vue
'
import
{
useAdminSettingsStore
,
useAppStore
}
from
'
@/stores
'
import
OpsAlertRulesCard
from
'
@/views/admin/ops/components/OpsAlertRulesCard.vue
'
import
OpsEmailNotificationCard
from
'
@/views/admin/ops/components/OpsEmailNotificationCard.vue
'
import
OpsRuntimeSettingsCard
from
'
@/views/admin/ops/components/OpsRuntimeSettingsCard.vue
'
const
{
t
}
=
useI18n
()
const
appStore
=
useAppStore
()
...
...
@@ -860,22 +778,9 @@ const form = reactive<SettingsForm>({
fallback_model_antigravity
:
'
gemini-2.5-pro
'
,
// Identity patch (Claude -> Gemini)
enable_identity_patch
:
true
,
identity_patch_prompt
:
''
,
// Ops Monitoring (vNext)
ops_monitoring_enabled
:
true
,
ops_realtime_monitoring_enabled
:
true
,
ops_query_mode_default
:
'
auto
'
,
ops_metrics_interval_seconds
:
60
identity_patch_prompt
:
''
})
const
opsQueryModeOptions
=
computed
(()
=>
[
{
value
:
'
auto
'
,
label
:
t
(
'
admin.settings.opsMonitoring.queryModeAuto
'
)
},
{
value
:
'
raw
'
,
label
:
t
(
'
admin.settings.opsMonitoring.queryModeRaw
'
)
},
{
value
:
'
preagg
'
,
label
:
t
(
'
admin.settings.opsMonitoring.queryModePreagg
'
)
}
])
const
showOpsSettings
=
computed
(()
=>
!!
form
.
ops_monitoring_enabled
)
function
handleLogoUpload
(
event
:
Event
)
{
const
input
=
event
.
target
as
HTMLInputElement
const
file
=
input
.
files
?.[
0
]
...
...
@@ -961,19 +866,12 @@ async function saveSettings() {
fallback_model_gemini
:
form
.
fallback_model_gemini
,
fallback_model_antigravity
:
form
.
fallback_model_antigravity
,
enable_identity_patch
:
form
.
enable_identity_patch
,
identity_patch_prompt
:
form
.
identity_patch_prompt
,
ops_monitoring_enabled
:
form
.
ops_monitoring_enabled
,
ops_realtime_monitoring_enabled
:
form
.
ops_realtime_monitoring_enabled
,
ops_query_mode_default
:
form
.
ops_query_mode_default
,
ops_metrics_interval_seconds
:
form
.
ops_metrics_interval_seconds
identity_patch_prompt
:
form
.
identity_patch_prompt
}
const
updated
=
await
adminAPI
.
settings
.
updateSettings
(
payload
)
Object
.
assign
(
form
,
updated
)
form
.
smtp_password
=
''
form
.
turnstile_secret_key
=
''
adminSettingsStore
.
setOpsMonitoringEnabledLocal
(
!!
updated
.
ops_monitoring_enabled
)
adminSettingsStore
.
setOpsRealtimeMonitoringEnabledLocal
(
!!
updated
.
ops_realtime_monitoring_enabled
)
adminSettingsStore
.
setOpsQueryModeDefaultLocal
(
updated
.
ops_query_mode_default
||
'
auto
'
)
// Refresh cached public settings so sidebar/header update immediately
await
appStore
.
fetchPublicSettings
(
true
)
appStore
.
showSuccess
(
t
(
'
admin.settings.settingsSaved
'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment