|
|
@ -717,12 +717,14 @@ class mainClass(object): |
|
|
|
self.new_info['time'] = time.time() |
|
|
|
self.new_info['time'] = time.time() |
|
|
|
self.get_process_net_list() |
|
|
|
self.get_process_net_list() |
|
|
|
|
|
|
|
|
|
|
|
sortx = 'all' |
|
|
|
|
|
|
|
if 'sortx' in get: sortx = get['sortx'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not 'sortx' in get: |
|
|
|
if not 'sortx' in get: |
|
|
|
get['sortx'] = 'status' |
|
|
|
get['sortx'] = 'all' |
|
|
|
if get['sortx'] == 'status': res = False |
|
|
|
|
|
|
|
|
|
|
|
res = True |
|
|
|
|
|
|
|
if get['sortx'] == 'status': |
|
|
|
|
|
|
|
res = False |
|
|
|
|
|
|
|
|
|
|
|
if 'reverse' in get: |
|
|
|
if 'reverse' in get: |
|
|
|
if get['reverse'] in ['undefined', 'null']: |
|
|
|
if get['reverse'] in ['undefined', 'null']: |
|
|
|
get['reverse'] = 'True' |
|
|
|
get['reverse'] = 'True' |
|
|
@ -784,8 +786,8 @@ class mainClass(object): |
|
|
|
continue |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
processList = self.__pro_s_s(processList) |
|
|
|
processList = self.__pro_s_s(processList) |
|
|
|
res = True |
|
|
|
|
|
|
|
if sortx not in ['all']: |
|
|
|
if get['sortx'] not in ['all']: |
|
|
|
processList = sorted(processList, key=lambda x: x[get['sortx']], reverse=res) |
|
|
|
processList = sorted(processList, key=lambda x: x[get['sortx']], reverse=res) |
|
|
|
else: |
|
|
|
else: |
|
|
|
processList = sorted(processList, key=lambda x: [x['cpu_percent'], x['up'], x['down'], x['io_write_speed'], |
|
|
|
processList = sorted(processList, key=lambda x: [x['cpu_percent'], x['up'], x['down'], x['io_write_speed'], |
|
|
|