Skip to content

Commit

Permalink
Update task_manager_index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jun 3, 2024
1 parent 50f44af commit 39676d1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/task_manager/task_manager_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,16 @@ def get_service_list(self, get = {}):
data['serviceList'] = self.search_service(data['serviceList'], get['search'])
return data

def search_service(self, data, search):
try:
ldata = []
for i in data:
if search in i['name'] or search in i['ps']:
ldata.append(i)
return ldata
except:
return data

# 获取存放计划任务的路径
def get_cron_file(self):
filename = '/var/spool/cron/crontabs/root'
Expand Down

0 comments on commit 39676d1

Please sign in to comment.