diff options
Diffstat (limited to 'csit.infra.dash/app/cdash/__init__.py')
-rw-r--r-- | csit.infra.dash/app/cdash/__init__.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/csit.infra.dash/app/cdash/__init__.py b/csit.infra.dash/app/cdash/__init__.py index 796dcef01f..3d3f2001a3 100644 --- a/csit.infra.dash/app/cdash/__init__.py +++ b/csit.infra.dash/app/cdash/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Cisco and/or its affiliates. +# Copyright (c) 2024 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -127,6 +127,17 @@ def init_app(): from .coverage.coverage import init_coverage app = init_coverage(app, data_coverage=data["coverage"]) + if all((data["trending"].empty, data["iterative"].empty, + data["coverage"].empty)): + logging.error(( + f'"{C.SEARCH_TITLE}" application not loaded, ' + 'no data available.' + )) + else: + logging.info(C.SEARCH_TITLE) + from .search.search import init_search + app = init_search(app, data) + return app |