Commit 20ce81f8 authored by 郭阔's avatar 郭阔

feat(panel): schedule board shows only enabled sources

Disabled/fully-off sources (skill off + schedule not active) no longer
appear; transitional state (skill off but schedule still active) stays
visible until reconciled.
parent f8c64487
...@@ -1293,6 +1293,10 @@ def schedule_board(): ...@@ -1293,6 +1293,10 @@ def schedule_board():
now = datetime.now() now = datetime.now()
skills = pl.skill_sources() skills = pl.skill_sources()
names = sorted((set(skills) | set(pl.list_schedules())) - {"digest"}) names = sorted((set(skills) | set(pl.list_schedules())) - {"digest"})
# 只展示已启用的栏目(技能启用,或调度仍在跑的过渡态);彻底关停的隐藏
names = [n for n in names
if skills.get(n, {}).get("enabled", False)
or pl.schedule_state(n) == "active"]
rows = [] rows = []
for n in names: for n in names:
state = pl.schedule_state(n) state = pl.schedule_state(n)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment