2022-11-02 10:25:43 +01:00
|
|
|
"""Everything to do with Apps"""
|
|
|
|
|
|
|
|
from database import db
|
2022-11-02 13:55:12 +01:00
|
|
|
from .models import App, AppRole
|
2022-11-02 10:25:43 +01:00
|
|
|
|
|
|
|
class LITApp(App):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
def get_url(self):
|
|
|
|
return self.url
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
"""
|
|
|
|
represent this object as a dict, compatible for JSON output
|
|
|
|
"""
|
|
|
|
return {"id": self.id,
|
|
|
|
"name": self.name,
|
|
|
|
"slug": self.slug,
|
|
|
|
"external": self.external,
|
|
|
|
"status": self.get_status(),
|
|
|
|
"url": self.get_url()}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_status(self):
|
|
|
|
"""Returns an AppStatus object that describes the current cluster state"""
|
|
|
|
return {
|
|
|
|
"installed": "",
|
|
|
|
"ready": "",
|
|
|
|
"message": "",
|
2022-11-02 13:55:12 +01:00
|
|
|
}
|