mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-08-02 09:04:44 +02:00
Improved login errors,
Added user disable option, Fix groups selection in tasks, Improved Auto updater, Fixed sorting of scan reports, Some pro feature
This commit is contained in:
parent
c39721de96
commit
30d60a72ad
12 changed files with 115 additions and 38 deletions
|
@ -21,6 +21,12 @@ from libs.check_routeros.routeros_check.resource import RouterOSCheckResource
|
|||
from typing import Dict
|
||||
import json
|
||||
import datetime
|
||||
try:
|
||||
from libs import utilpro
|
||||
ISPRO=True
|
||||
except ImportError:
|
||||
ISPRO=False
|
||||
pass
|
||||
|
||||
sensor_pile = queue.LifoQueue()
|
||||
other_sensor_pile = queue.LifoQueue()
|
||||
|
@ -429,10 +435,6 @@ def scan_with_ip(*args, **kwargs):
|
|||
task.save()
|
||||
return True
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@spool(pass_arguments=True)
|
||||
def exec_snipet(*args, **kwargs):
|
||||
task=db_tasks.exec_snipet_status()
|
||||
|
@ -488,3 +490,22 @@ def exec_snipet(*args, **kwargs):
|
|||
task.status=0
|
||||
task.save()
|
||||
return False
|
||||
|
||||
@spool(pass_arguments=True)
|
||||
def exec_vault(*args, **kwargs):
|
||||
Tasks=db_tasks.Tasks
|
||||
task=Tasks.select().where(Tasks.signal == 170).get()
|
||||
if not task.status:
|
||||
try:
|
||||
task.status=1
|
||||
task.save()
|
||||
utask=kwargs.get('utask',False)
|
||||
res=utilpro.run_vault_task(utask)
|
||||
except Exception as e:
|
||||
log.error(e)
|
||||
task.status=0
|
||||
task.save()
|
||||
return False
|
||||
task.status=0
|
||||
task.save()
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue