diff --git a/catalog_reader/app.py b/catalog_reader/app.py index d23a8ee..dc8714b 100644 --- a/catalog_reader/app.py +++ b/catalog_reader/app.py @@ -177,7 +177,7 @@ def get_app_version_details( version_data['values'] = options['default_values_callable'](version_data) app_metadata = version_data['app_metadata'] - # TODO: See if this needs to change for our adaptation of ix-chart + # TODO: See if this needs to change for our adaptation of ix-app version_data.update({ 'human_version': get_human_version(app_metadata['app_version'], app_metadata['version']), 'version': app_metadata['version'], diff --git a/catalog_reader/custom_app.py b/catalog_reader/custom_app.py new file mode 100644 index 0000000..23e2272 --- /dev/null +++ b/catalog_reader/custom_app.py @@ -0,0 +1,35 @@ +from datetime import datetime + + +APP_VERSION = 'custom' +VERSION = '1.0.0' + + +def get_version_details() -> dict: + """ + This is basically a stub which will be used in middleware to get version details of custom app + """ + return { + 'app_metadata': { + 'name': 'custom-app', + 'train': 'stable', + 'version': VERSION, + 'app_version': APP_VERSION, + 'title': 'Custom App', + 'description': 'This is a custom app where user can use his/her ' + 'own docker compose file for deploying services', + 'home': '', + 'sources': [], + 'maintainers': [], + 'run_as_context': [], + 'capabilities': [], + 'host_mounts': [], + }, + 'version': VERSION, + 'human_version': f'{VERSION}_{APP_VERSION}', + 'supported': True, + 'healthy': True, + 'healthy_error': None, + 'location': None, + 'last_update': datetime.now().strftime('%Y-%m-%d %H:%M:%S'), + }