Repository navigation
Expand file tree
/
Copy pathIndex.tsx
More file actions
54 lines (48 loc) · 1.6 KB
/
Copy pathIndex.tsx
File metadata and controls
54 lines (48 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import React, { useContext } from "react";
import {
EuiPageTemplate,
EuiTitle,
EuiSpacer,
EuiSkeletonText,
EuiEmptyPrompt,
} from "@elastic/eui";
import { useDocumentTitle } from "../../hooks/useDocumentTitle";
import useLoadRegistry from "../../queries/useLoadRegistry";
import RegistryPathContext from "../../contexts/RegistryPathContext";
import RegistryVisualizationTab from "../../components/RegistryVisualizationTab";
import { useParams } from "react-router-dom";
const LineagePage = () => {
useDocumentTitle("Feast Lineage");
const registryUrl = useContext(RegistryPathContext);
const { isLoading, isSuccess, isError, data } = useLoadRegistry(registryUrl);
const { projectName } = useParams<{ projectName: string }>();
return (
<EuiPageTemplate panelled>
<EuiPageTemplate.Section>
<EuiTitle size="l">
<h1>
{isLoading && <EuiSkeletonText lines={1} />}
{isSuccess && data?.project && `${data.project} Lineage`}
</h1>
</EuiTitle>
<EuiSpacer />
{isError && (
<EuiEmptyPrompt
iconType="alert"
color="danger"
title={<h2>Error Loading Project Configs</h2>}
body={
<p>
There was an error loading the Project Configurations. Please
check that <code>feature_store.yaml</code> file is available and
well-formed.
</p>
}
/>
)}
{isSuccess && <RegistryVisualizationTab />}
</EuiPageTemplate.Section>
</EuiPageTemplate>
);
};
export default LineagePage;