Skip to content

Commit 35629de

Browse files
committed
fix: unknown label
1 parent 6523c45 commit 35629de

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

apps/insights/src/components/Publisher/performance.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ const PerformanceImpl = (props: PerformanceImplProps) => (
174174
fields={[
175175
{ id: "ranking", name: "Ranking" },
176176
{ id: "averageScore", name: "Average Score" },
177-
{ id: "permissionedFeeds", name: "Permissioned Feeds" },
178-
{ id: "unpermissionedFeeds", name: "Unpermissioned Feeds" },
177+
{ id: "permissionedFeeds", name: "Permissioned" },
178+
{ id: "unpermissionedFeeds", name: "Unpermissioned" },
179179
]}
180180
{...(props.isLoading
181181
? { isLoading: true }

apps/insights/src/components/Publishers/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export const Publishers = async () => {
3333
]);
3434
const rankingTime = pythnetPublishers[0]?.timestamp;
3535
const scoreTime = pythnetPublishers[0]?.scoreTime;
36+
// eslint-disable-next-line no-console
37+
console.log({ pythnetPublishers, pythtestConformancePublishers });
3638

3739
return (
3840
<div className={styles.publishers}>

apps/insights/src/components/Status/index.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const Status = ({ status }: { status: StatusType }) => (
1111
{getText(status)}
1212
</StatusComponent>
1313
);
14-
1514
export const StatusLive = ({
1615
cluster,
1716
feedKey,
@@ -22,7 +21,9 @@ export const StatusLive = ({
2221
publisherKey: string;
2322
}) => {
2423
const status = useGetStatus(cluster, feedKey, publisherKey);
25-
24+
if (!status) {
25+
return;
26+
}
2627
return <Status status={status} />;
2728
};
2829

@@ -42,7 +43,7 @@ export const getStatus = (
4243
publisherKey: string,
4344
) => {
4445
if (!currentPriceData) {
45-
return StatusType.Unknown;
46+
return;
4647
}
4748
const lastPublishedSlot = currentPriceData.priceComponents.find(
4849
(price) => price.publisher.toString() === publisherKey,
@@ -61,9 +62,6 @@ const getVariant = (status: StatusType) => {
6162
case StatusType.Down: {
6263
return "error";
6364
}
64-
case StatusType.Unknown: {
65-
return "disabled";
66-
}
6765
}
6866
};
6967

@@ -75,8 +73,5 @@ const getText = (status: StatusType) => {
7573
case StatusType.Down: {
7674
return "Down";
7775
}
78-
case StatusType.Unknown: {
79-
return "Unknown";
80-
}
8176
}
8277
};

apps/insights/src/status.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
export enum Status {
22
Down,
33
Live,
4-
Unknown,
54
}
65

76
export const STATUS_NAMES = {
87
[Status.Live]: "Live",
98
[Status.Down]: "Down",
10-
[Status.Unknown]: "Unknown",
119
} as const;
1210

1311
export type StatusName = (typeof STATUS_NAMES)[Status];
@@ -20,9 +18,6 @@ export const statusNameToStatus = (name: string): Status | undefined => {
2018
case "Down": {
2119
return Status.Down;
2220
}
23-
case "Unknown": {
24-
return Status.Unknown;
25-
}
2621
default: {
2722
return undefined;
2823
}

0 commit comments

Comments
 (0)