|
@@ -72,13 +72,15 @@ class type_path(Load):
|
|
|
self.set(
|
|
|
name = u'硬件类型'
|
|
|
,path = '/hardware/type'
|
|
|
- ,button = ({'name':'重启守护进程','link':'/hardware/restart_cron','ajax':True,'icon':''},{'name':'重启mqtt订阅服务','link':'/hardware/restart_sub','ajax':True,'icon':''},{'name':'重启园区服务','link':'/hardware/restart_front','ajax':True,'icon':''},{'name':'重启后台服务','link':'/hardware/restart_admin','ajax':True,'icon':''},{'name':'重启网站服务','link':'/hardware/restart_web','ajax':True,'icon':''})
|
|
|
+ ,button = ({'name':'重启守护进程','link':'/hardware/restart_cron','ajax':True,'icon':''},{'name':'重启mqtt订阅服务','link':'/hardware/restart_sub','ajax':True,'icon':''},{'name':'重启modbus服务','link':'/hardware/restart_modbus','ajax':True,'icon':''},{'name':'重启园区服务','link':'/hardware/restart_front','ajax':True,'icon':''},{'name':'重启后台服务','link':'/hardware/restart_admin','ajax':True,'icon':''})
|
|
|
,width = '600'
|
|
|
,height = '300'
|
|
|
,search = (('name-input-mlike',), (u'类型名称',))
|
|
|
,thead = (u'类型ID',u'类型名称',u'类型key', u'更新时间')
|
|
|
,tbody = ('id', 'name', 'key', 'cdate')
|
|
|
,state = False
|
|
|
+ ,add = False
|
|
|
+ ,edit = False
|
|
|
)
|
|
|
self.list('hardware_type')
|
|
|
self.show('list')
|
|
@@ -108,7 +110,7 @@ class restart_cron_path(Load):
|
|
|
@Web.setting
|
|
|
def post(self):
|
|
|
Shell.popen("ps -ef | grep cron.py | grep -v grep |awk '{print $1}'|xargs kill -9")
|
|
|
- Shell.popen('/usr/local/demeter/cron.py >/dev/null &')
|
|
|
+ #Shell.popen('/usr/local/demeter/cron.py >/dev/null &')
|
|
|
|
|
|
class restart_sub_path(Load):
|
|
|
@Web.auth
|
|
@@ -116,6 +118,12 @@ class restart_sub_path(Load):
|
|
|
def post(self):
|
|
|
Shell.popen("ps -ef | grep sub.py | grep -v grep |awk '{print $1}'|xargs kill -9")
|
|
|
|
|
|
+class restart_modbus_path(Load):
|
|
|
+ @Web.auth
|
|
|
+ @Web.setting
|
|
|
+ def post(self):
|
|
|
+ Shell.popen("ps -ef | grep modbus.py | grep -v grep |awk '{print $1}'|xargs kill -9")
|
|
|
+
|
|
|
class restart_admin_path(Load):
|
|
|
@Web.auth
|
|
|
@Web.setting
|