refactor:MoviePilot服务监控

This commit is contained in:
jxxghp
2024-10-19 23:23:07 +08:00
parent b02c0b81c9
commit a99bd81431
2 changed files with 21 additions and 4 deletions

View File

@@ -771,11 +771,14 @@
"name": "MoviePilot服务器监控",
"description": "在仪表板中实时显示MoviePilot公共服务器状态。",
"labels": "仪表板",
"version": "1.0",
"version": "1.1",
"icon": "Duplicati_A.png",
"author": "jxxghp",
"level": 1,
"v2": true
"v2": true,
"history": {
"v1.1": "增加详情界面显示"
}
},
"CleanInvalidSeed": {
"name": "清理QB无效做种",

View File

@@ -15,7 +15,7 @@ class MPServerStatus(_PluginBase):
# 插件图标
plugin_icon = "Duplicati_A.png"
# 插件版本
plugin_version = "1.0"
plugin_version = "1.1"
# 插件作者
plugin_author = "jxxghp"
# 作者主页
@@ -73,7 +73,21 @@ class MPServerStatus(_PluginBase):
}
def get_page(self) -> List[dict]:
pass
"""
获取插件页面
"""
if not self._enable:
return [
{
'component': 'div',
'text': '插件未启用',
'props': {
'class': 'text-center',
}
}
]
_, _, elements = self.get_dashboard()
return elements
def get_dashboard(self) -> Optional[Tuple[Dict[str, Any], Dict[str, Any], List[dict]]]:
"""