fix plugin config
This commit is contained in:
parent
eeee0249cf
commit
d95808edef
@ -27,7 +27,6 @@ from app.schemas.types import EventType
|
|||||||
|
|
||||||
|
|
||||||
class AutoSignIn(_PluginBase):
|
class AutoSignIn(_PluginBase):
|
||||||
|
|
||||||
# 插件名称
|
# 插件名称
|
||||||
plugin_name = "站点自动签到"
|
plugin_name = "站点自动签到"
|
||||||
# 插件描述
|
# 插件描述
|
||||||
@ -131,13 +130,17 @@ class AutoSignIn(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'model': 'enabled',
|
'props': {
|
||||||
'label': '启用插件',
|
'model': 'enabled',
|
||||||
|
'label': '启用插件',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'model': 'notify',
|
'props': {
|
||||||
'label': '签到通知',
|
'model': 'notify',
|
||||||
|
'label': '签到通知',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -151,25 +154,31 @@ class AutoSignIn(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'cols': 12,
|
'props': {
|
||||||
'md': 6,
|
'cols': 12,
|
||||||
'model': 'cron',
|
'md': 6,
|
||||||
'label': '执行周期',
|
'model': 'cron',
|
||||||
'placeholder': '0 9,18 * * *'
|
'label': '执行周期',
|
||||||
|
'placeholder': '0 9,18 * * *'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'cols': 12,
|
'props': {
|
||||||
'md': 6,
|
'cols': 12,
|
||||||
'model': 'queue_cnt',
|
'md': 6,
|
||||||
'label': '队列数量'
|
'model': 'queue_cnt',
|
||||||
|
'label': '队列数量'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'cols': 12,
|
'props': {
|
||||||
'md': 6,
|
'cols': 12,
|
||||||
'model': 'retry_keyword',
|
'md': 6,
|
||||||
'label': '重试关键字'
|
'model': 'retry_keyword',
|
||||||
|
'label': '重试关键字'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -183,11 +192,13 @@ class AutoSignIn(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSelect',
|
'component': 'VSelect',
|
||||||
'chips': True,
|
'props': {
|
||||||
'multiple': True,
|
'chips': True,
|
||||||
'model': 'sign_sites',
|
'multiple': True,
|
||||||
'label': '签到站点',
|
'model': 'sign_sites',
|
||||||
'items': []
|
'label': '签到站点',
|
||||||
|
'items': []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -201,11 +212,13 @@ class AutoSignIn(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSelect',
|
'component': 'VSelect',
|
||||||
'chips': True,
|
'props': {
|
||||||
'multiple': True,
|
'chips': True,
|
||||||
'model': 'sign_sites',
|
'multiple': True,
|
||||||
'label': '签到站点',
|
'model': 'sign_sites',
|
||||||
'items': []
|
'label': '签到站点',
|
||||||
|
'items': []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -258,7 +271,7 @@ class AutoSignIn(_PluginBase):
|
|||||||
} for s in status])
|
} for s in status])
|
||||||
# 发送通知
|
# 发送通知
|
||||||
self.chain.post_message(Notification(title="站点自动签到",
|
self.chain.post_message(Notification(title="站点自动签到",
|
||||||
text="\n".join([f'【{s[0]}】{s[1]}' for s in status if s])))
|
text="\n".join([f'【{s[0]}】{s[1]}' for s in status if s])))
|
||||||
else:
|
else:
|
||||||
logger.error("站点签到任务失败!")
|
logger.error("站点签到任务失败!")
|
||||||
|
|
||||||
|
@ -134,13 +134,17 @@ class SiteStatistic(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'model': 'enabled',
|
'props': {
|
||||||
'label': '启用插件',
|
'model': 'enabled',
|
||||||
|
'label': '启用插件',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'model': 'notify',
|
'props': {
|
||||||
'label': '发送通知',
|
'model': 'notify',
|
||||||
|
'label': '发送通知',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -154,18 +158,22 @@ class SiteStatistic(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'cols': 12,
|
'props': {
|
||||||
'md': 6,
|
'cols': 12,
|
||||||
'model': 'cron',
|
'md': 6,
|
||||||
'label': '执行周期',
|
'model': 'cron',
|
||||||
'placeholder': '0 9,18 * * *'
|
'label': '执行周期',
|
||||||
|
'placeholder': '0 9,18 * * *'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'cols': 12,
|
'props': {
|
||||||
'md': 6,
|
'cols': 12,
|
||||||
'model': 'queue_cnt',
|
'md': 6,
|
||||||
'label': '队列数量'
|
'model': 'queue_cnt',
|
||||||
|
'label': '队列数量'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -179,11 +187,13 @@ class SiteStatistic(_PluginBase):
|
|||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSelect',
|
'component': 'VSelect',
|
||||||
'chips': True,
|
'props': {
|
||||||
'multiple': True,
|
'chips': True,
|
||||||
'model': 'statistic_sites',
|
'multiple': True,
|
||||||
'label': '统计站点',
|
'model': 'statistic_sites',
|
||||||
'items': []
|
'label': '统计站点',
|
||||||
|
'items': []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user