• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / crdc-datahub-ui / 14890067621

07 May 2025 05:58PM UTC coverage: 62.514% (-0.01%) from 62.524%
14890067621

Pull #696

github

web-flow
Merge 5a62d2117 into cde0cf17d
Pull Request #696: CRDCDH-2600 Support custom mapping of DMN icons

3445 of 5911 branches covered (58.28%)

Branch coverage included in aggregate %.

8 of 16 new or added lines in 3 files covered. (50.0%)

1 existing line in 1 file now uncovered.

4765 of 7222 relevant lines covered (65.98%)

198.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/content/ModelNavigator/NavigatorView.tsx
1
import { FC } from "react";
2
import { Box } from "@mui/material";
3
// eslint-disable-next-line import/no-extraneous-dependencies -- Required to use legacy version from DMN
4
import { Provider } from "react-redux";
5
import { ReduxDataDictionary } from "data-model-navigator";
6
import SuspenseLoader from "../../components/SuspenseLoader";
7
import { Status, useDataCommonContext } from "../../components/Contexts/DataCommonContext";
8
import useBuildReduxStore from "../../hooks/useBuildReduxStore";
9

10
type ModelNavigatorProps = {
11
  /**
12
   * The version of the model to display
13
   */
14
  version: string;
15
};
16

17
/**
18
 * Encapsulates the Data Model Navigator component
19
 *
20
 * This component handles the following:
21
 * - Loading the Data Common assets
22
 * - Building the Redux store for the Data Model Navigator
23
 * - Rendering the Data Model Navigator
24
 *
25
 * @returns The Model Navigator view
26
 */
27
const ModelNavigator: FC<ModelNavigatorProps> = ({ version = "latest" }) => {
×
28
  const { status, DataCommon } = useDataCommonContext();
×
NEW
29
  const [{ status: buildStatus, store }, populate] = useBuildReduxStore();
×
30

31
  if (status === Status.LOADING || buildStatus === "loading") {
×
32
    return <SuspenseLoader />;
×
33
  }
34

35
  if (status === Status.LOADED && buildStatus === "waiting") {
×
36
    populate(DataCommon, version);
×
37
    return <SuspenseLoader />;
×
38
  }
39

40
  if (!DataCommon || status === Status.ERROR || buildStatus === "error") {
×
41
    throw new Error("Oops! Unable to show the requested data model or model version.");
×
42
  }
43

44
  return (
×
45
    <Box sx={{ mt: "40px" }}>
46
      <Provider store={store}>
47
        <ReduxDataDictionary />
48
      </Provider>
49
    </Box>
50
  );
51
};
52

53
export default ModelNavigator;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc