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
Add list page for Storage Systems and Inject it via Horizontal Nav #9609
Conversation
const addStorage = (kind: K8sKind, resource: K8sResourceKind) => ({ | ||
labelKey: 'ceph-storage-plguin~Add Capacity', | ||
callback: () => addCapacityModal({ kind, ocsConfig: resource }), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check you are not getting any i18n errors ?
Otherwise do something like:
const addStorage = (kind: K8sKind, resource: K8sResourceKind) => ({ | |
labelKey: 'ceph-storage-plguin~Add Capacity', | |
callback: () => addCapacityModal({ kind, ocsConfig: resource }), | |
}); | |
const addStorage = (kind: K8sKind, resource: K8sResourceKind) => ({ | |
// t('ceph-storage-plguin~Add Capacity',) | |
labelKey:t('ceph-storage-plguin~Add Capacity',), | |
callback: () => addCapacityModal({ kind, ocsConfig: resource }), | |
}); |
); | ||
}; | ||
|
||
const StorageSystemListPage: React.FC = (props) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add types for props
@@ -0,0 +1,15 @@ | |||
export enum ODFQueries { | |||
LATENCY = 'LAT', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LATENCY = 'LAT', | |
LATENCY = 'LATENCY', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more for type checking. The value on the right side of enum really doesn't matter much..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still looks wierd
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
export const normalizeMetrics: MetricNormalize = ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_latency, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_throughput, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_rawCapacity, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_usedCapacity, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
_iops, | ||
) => { | ||
// Todo(bipuladh): Add parsing logic for above items | ||
return { | ||
metrics: {} as any, | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add when ready
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it as it is now. It's a skeleton and rest of parsing is dependent on this function's return type.
// Operator uses`<kind>.<apiGroup>/<apiVersion>` don't ask why | ||
export const getGVK = (weirdLabel: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Operator uses`<kind>.<apiGroup>/<apiVersion>` don't ask why | |
export const getGVK = (weirdLabel: string) => { | |
// Operator uses`<kind>.<apiGroup>/<apiVersion>` | |
export const getGVK = (kind: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afreen23, bipuladh, vbnrh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Currently Metrics are not supported as reliable Metrics Exporter is not present.
Will send a different PR to update
Add Storage
.