Skip to content

Commit

Permalink
Disable Model Metrics (opendatahub-io#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewballantyne authored and bartoszmajsak committed Mar 30, 2023
1 parent f038c59 commit 15c2490
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions frontend/src/pages/modelServing/useModelMetricsEnabled.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { useAppContext } from '~/app/AppContext';
import { useDashboardNamespace } from '~/redux/selectors';
import { isModelMetricsEnabled } from './screens/metrics/utils';
// import { useAppContext } from '~/app/AppContext';
// import { useDashboardNamespace } from '~/redux/selectors';
// import { isModelMetricsEnabled } from './screens/metrics/utils';
//
// const useModelMetricsEnabled = (): [modelMetricsEnabled: boolean] => {
// const { dashboardNamespace } = useDashboardNamespace();
// const { dashboardConfig } = useAppContext();
//
// const checkModelMetricsEnabled = () => isModelMetricsEnabled(dashboardNamespace, dashboardConfig);
//
// return [checkModelMetricsEnabled()];
// };

const useModelMetricsEnabled = (): [modelMetricsEnabled: boolean] => {
const { dashboardNamespace } = useDashboardNamespace();
const { dashboardConfig } = useAppContext();

const checkModelMetricsEnabled = () => isModelMetricsEnabled(dashboardNamespace, dashboardConfig);

return [checkModelMetricsEnabled()];
};
const useModelMetricsEnabled = () => [false];

export default useModelMetricsEnabled;

0 comments on commit 15c2490

Please sign in to comment.