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