adding and removing functions as result of merge conflict
This commit is contained in:
parent
8eb8d83bea
commit
c6aa2be273
3 changed files with 23 additions and 28 deletions
|
|
@ -21,14 +21,6 @@ CONFIG_DATA = [
|
|||
}
|
||||
]
|
||||
|
||||
APPS_DATA = [
|
||||
{"id": 1, "name": "Nextcloud", "enabled": True, "status": "ON for everyone"},
|
||||
{"id": 2, "name": "Rocketchat", "enabled": True, "status": "ON for everyone"},
|
||||
{"id": 3, "name": "Wordpress", "enabled": False, "status": "ON for everyone"}
|
||||
]
|
||||
|
||||
APP_DATA = {"id": 1, "name": "Nextcloud", "selected": True, "status": "ON for everyone", "config": CONFIG_DATA},
|
||||
|
||||
@api_v1.route('/apps', methods=['GET'])
|
||||
@jwt_required()
|
||||
@cross_origin()
|
||||
|
|
|
|||
|
|
@ -172,26 +172,6 @@ class App(db.Model):
|
|||
"""Returns the kustomization object for this app"""
|
||||
return k8s.get_kustomization(self.slug)
|
||||
|
||||
@staticmethod
|
||||
def check_condition(status):
|
||||
"""
|
||||
Returns a tuple that has true/false for readiness and a message
|
||||
|
||||
Ready, in this case means that the condition's type == "Ready" and its
|
||||
status == "True". If the condition type "Ready" does not occur, the
|
||||
status is interpreted as not ready.
|
||||
|
||||
The message that is returned is the message that comes with the
|
||||
condition with type "Ready"
|
||||
|
||||
:param status: Kubernetes resource's "status" object.
|
||||
:type status: dict
|
||||
"""
|
||||
for condition in status["conditions"]:
|
||||
if condition["type"] == "Ready":
|
||||
return condition["status"] == "True", condition["message"]
|
||||
return False, "Condition with type 'Ready' not found"
|
||||
|
||||
def to_json(self):
|
||||
"""
|
||||
represent this object as a json object. Return JSON object
|
||||
|
|
|
|||
Reference in a new issue