update
This commit is contained in:
@@ -76,8 +76,8 @@ class PluginManager:
|
||||
if _ in plugin_loading_list:
|
||||
new_plugins.append(_)
|
||||
else:
|
||||
cls.all_package_list[t]['loading'] = False
|
||||
cls.all_package_list[t]['status'] = 'not_include_loading_list'
|
||||
cls.all_package_list[_]['loading'] = False
|
||||
cls.all_package_list[_]['status'] = 'not_include_loading_list'
|
||||
plugins = new_plugins
|
||||
except Exception as exception:
|
||||
F.logger.error('Exception:%s', exception)
|
||||
@@ -92,8 +92,8 @@ class PluginManager:
|
||||
if _ not in plugin_except_list:
|
||||
new_plugins.append(_)
|
||||
else:
|
||||
cls.all_package_list[t]['loading'] = False
|
||||
cls.all_package_list[t]['status'] = 'include_except_list'
|
||||
cls.all_package_list[_]['loading'] = False
|
||||
cls.all_package_list[_]['status'] = 'include_except_list'
|
||||
plugins = new_plugins
|
||||
except Exception as exception:
|
||||
F.logger.error('Exception:%s', exception)
|
||||
|
||||
@@ -1 +1 @@
|
||||
VERSION="4.0.41"
|
||||
VERSION="4.0.42"
|
||||
@@ -13,6 +13,7 @@ class PluginModuleBase(object):
|
||||
self.name = name
|
||||
self.socketio_list = None
|
||||
self.page_list = None
|
||||
self.web_list_model = None
|
||||
|
||||
def get_module(self, module_name):
|
||||
try:
|
||||
@@ -143,6 +144,7 @@ class PluginPageBase(object):
|
||||
self.name = name
|
||||
self.scheduler_desc = scheduler_desc
|
||||
self.socketio_list = None
|
||||
self.web_list_model = None
|
||||
|
||||
def process_menu(self, req):
|
||||
try:
|
||||
|
||||
@@ -102,12 +102,7 @@ def default_route(P):
|
||||
def second_ajax(module_name, cmd):
|
||||
try:
|
||||
for module in P.module_list:
|
||||
if module_name == module.name:
|
||||
if cmd == 'command':
|
||||
return module.process_command(request.form['command'], request.form.get('arg1'), request.form.get('arg2'), request.form.get('arg3'), request)
|
||||
else:
|
||||
return module.process_ajax(cmd, request)
|
||||
elif cmd == 'scheduler':
|
||||
if cmd == 'scheduler':
|
||||
go = request.form['scheduler']
|
||||
if go == 'true':
|
||||
P.logic.scheduler_start(module_name)
|
||||
@@ -123,6 +118,16 @@ def default_route(P):
|
||||
elif cmd == 'immediately_execute':
|
||||
ret = P.logic.immediately_execute(module_name)
|
||||
return jsonify(ret)
|
||||
elif cmd == 'web_list':
|
||||
model = P.logic.get_module(module_name).web_list_model
|
||||
if model != None:
|
||||
return jsonify(model.web_list(request))
|
||||
|
||||
if module_name == module.name:
|
||||
if cmd == 'command':
|
||||
return module.process_command(request.form['command'], request.form.get('arg1'), request.form.get('arg2'), request.form.get('arg3'), request)
|
||||
else:
|
||||
return module.process_ajax(cmd, request)
|
||||
except Exception as exception:
|
||||
P.logger.error('Exception:%s', exception)
|
||||
P.logger.error(traceback.format_exc())
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user