Renamed thing.py to system.py and set a proper title
This commit is contained in:
parent
eb8f666823
commit
a235041277
3 changed files with 3 additions and 3 deletions
30
dashboard/system.py
Normal file
30
dashboard/system.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright (c) 2025, Julian Müller (ChaoticByte)
|
||||
|
||||
|
||||
from enum import Enum
|
||||
|
||||
|
||||
# base classes and types and stuff
|
||||
|
||||
class SystemState(Enum):
|
||||
OK = 0
|
||||
FAILED = 1
|
||||
UNKNOWN = 2
|
||||
|
||||
class System:
|
||||
|
||||
def __init__(self, name: str, description: str):
|
||||
self.name = name
|
||||
self.description = description
|
||||
self.state = SystemState.UNKNOWN
|
||||
self.state_verbose = ""
|
||||
|
||||
def get_actions(self) -> dict:
|
||||
# to be overridden
|
||||
# return {'ActionName': callable, ...}
|
||||
return {}
|
||||
|
||||
def update_state(self):
|
||||
# to be overridden
|
||||
self.state = SystemState.UNKNOWN
|
||||
self.state_verbose = ""
|
Loading…
Add table
Add a link
Reference in a new issue