mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 01:06:58 +00:00
Update
This commit is contained in:
parent
bf7adf9ca9
commit
7689ebcac5
@ -164,7 +164,7 @@ class PeerJobs:
|
||||
except Exception as e:
|
||||
return False, str(e)
|
||||
|
||||
def updateJobConfigurationName(self, ConfigurationName: str, NewConfigurationName: str) -> tuple[bool, str]:
|
||||
def updateJobConfigurationName(self, ConfigurationName: str, NewConfigurationName: str) -> tuple[bool, str] | tuple[bool, None]:
|
||||
try:
|
||||
with self.jobdb:
|
||||
jobdbCursor = self.jobdb.cursor()
|
||||
@ -173,6 +173,7 @@ class PeerJobs:
|
||||
''', (NewConfigurationName, ConfigurationName, ))
|
||||
self.jobdb.commit()
|
||||
self.__getJobs()
|
||||
return True, None
|
||||
except Exception as e:
|
||||
return False, str(e)
|
||||
|
||||
|
@ -101,15 +101,16 @@ class NetworkInterfaces:
|
||||
self.getData()
|
||||
return self.interfaces
|
||||
|
||||
class Process:
|
||||
def __init__(self, name, command, pid, percent):
|
||||
self.name = name
|
||||
self.command = command
|
||||
self.pid = pid
|
||||
self.percent = percent
|
||||
def toJson(self):
|
||||
return self.__dict__
|
||||
|
||||
class Processes:
|
||||
class Process:
|
||||
def __init__(self, name, command, pid, percent):
|
||||
self.name = name
|
||||
self.command = command
|
||||
self.pid = pid
|
||||
self.percent = percent
|
||||
def toJson(self):
|
||||
return self.__dict__
|
||||
def __init__(self):
|
||||
self.CPU_Top_10_Processes: list[Processes.Process] = []
|
||||
self.Memory_Top_10_Processes: list[Processes.Process] = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user