Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ControlPlane/ProvidersConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function ProvidersConfig() {
rows.push({
parent: provider.provider,
name: config.metadata.name,
usage: config.metadata.usage ? config.metadata.usage : '0',
usage: config?.status?.users ?? '0',
created: timeAgo.format(new Date(config.metadata.creationTimestamp)),
resource: config,
});
Expand Down
1 change: 1 addition & 0 deletions src/lib/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type ProviderConfigs = {
};
status: {
count: string;
users: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check that this is a string? With the provider that I checked, it looks like to come through as a number. I’m not sure if each provider could define this differently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also keep it like this and tackle proper typings with the move to gql

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, with generated types it won't be an issue anymore. And here we don't do any math but only display it.

};
},
];
Expand Down
Loading