diff --git a/fabric_cf/orchestrator/core/orchestrator_handler.py b/fabric_cf/orchestrator/core/orchestrator_handler.py index aed7f5de..e3f1b5ea 100644 --- a/fabric_cf/orchestrator/core/orchestrator_handler.py +++ b/fabric_cf/orchestrator/core/orchestrator_handler.py @@ -980,7 +980,7 @@ def get_metrics_overview(self, *, token: str = None, excluded_projects: List[str active_states = SliceState.list_values_ex_closing_dead() active_slice_count = controller.get_slice_count(states=active_states, user_id=user_id, project=project, excluded_projects=excluded_projects) - non_active_metrics = controller.get_metrics(user_id=user_id, project_id=project, + non_active_metrics = controller.get_metrics(oidc_sub=user_id, project_id=project, excluded_projects=excluded_projects) total_slices = 0 for m in non_active_metrics: diff --git a/fabric_cf/orchestrator/swagger_server/response/metrics_controller.py b/fabric_cf/orchestrator/swagger_server/response/metrics_controller.py index 3d263f2d..5161a5b8 100644 --- a/fabric_cf/orchestrator/swagger_server/response/metrics_controller.py +++ b/fabric_cf/orchestrator/swagger_server/response/metrics_controller.py @@ -40,10 +40,10 @@ def metrics_overview_get(excluded_projects: List[str] = None) -> Metrics: # noq metrics = handler.get_metrics_overview(token=token, excluded_projects=excluded_projects) response = Metrics() if metrics: - if isinstance(metrics.json_data, list): - response.results = metrics.json_data + if isinstance(metrics, list): + response.results = metrics else: - response.results = [metrics.json_data] + response.results = [metrics] else: response.results = []