Skip to content

Fix incorrect ProviderConfig usage counter #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 5, 2025
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