UNCLASSIFIED - NO CUI

Skip to content

DeliveryMetricsDashboard component refactor

abhayashrestha requested to merge DeliveryMetricsDashboard-re2 into master
  • Fixing team view type in api and mocks
  • Changing CostGraphs to take in other type of props instead of the calculated metrics as a first step of getting rid of complexity of the metricsCalculation function refactor. Calling the createMetrics deprecated functions in the graphs instead now.
  • Getting rid of AccessDeniedAlert in favor of a generic /401 redirect for both CostMetricsDashboard and DeliveryMetricsDashboard
  • Fixing some styling bugs from the Main component container that affects the rest of the component rendering.
  • Getting rid of createDashboard since it was doing too much for a higher order component, and decided to divide the functionality with another higher order component called withAPIMetrics and other higher order components for each specific admin dashboard (withOrganizationAdminDashboard, withValueStreamAdminDashboard, withTeamAdminDashboard). This will then be used for cost dashboards. Also, now we do not have one big hook for redirects, and redirects are handled by the higher order components for each specific admin dashboard.
  • Decided to pull out TeamAutocomplete into its own component file from createDashboard, and wrap it around a flag instead of always repeating the code conditionally in every dashboard for better readability.
  • Renamed Dashboard as component name for DeliveryMetricsDashboard to DeliveryMetricsDashboard; likewise for CostDashboard to CostMetricsDashboard because it was getting confusing which file I had opened.
  • Had to change the PRIVILEGE_LEVELS enum in javascript file to make it compatible with DashboardType enum.
  • We have a new loading screen now, which will serve as a placeholder before user visits the Dashboard; this is also initial step in reducing the tech debts in the codebase. Screen_Shot_2023-05-26_at_2.07.27_PM
Edited by abhayashrestha

Merge request reports