Skip to content
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

Merged
merged 1 commit into from Jul 24, 2021

Conversation

bipuladh
Copy link
Contributor

Currently Metrics are not supported as reliable Metrics Exporter is not present.
Will send a different PR to update Add Storage.
Screenshot from 2021-07-23 19-47-05

@openshift-ci openshift-ci bot requested review from afreen23 and shyRozen July 23, 2021 14:25
@openshift-ci openshift-ci bot added component/ceph Related to ceph-storage-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 23, 2021
Comment on lines 7 to 10
const addStorage = (kind: K8sKind, resource: K8sResourceKind) => ({
labelKey: 'ceph-storage-plguin~Add Capacity',
callback: () => addCapacityModal({ kind, ocsConfig: resource }),
});
Copy link
Contributor

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:

Suggested change
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) => {
Copy link
Contributor

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',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
LATENCY = 'LAT',
LATENCY = 'LATENCY',

Copy link
Contributor Author

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..

Copy link
Contributor

Choose a reason for hiding this comment

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

still looks wierd

Comment on lines +32 to +49
// 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,
};
};
Copy link
Contributor

Choose a reason for hiding this comment

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

add when ready

Copy link
Contributor Author

@bipuladh bipuladh Jul 23, 2021

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.

Comment on lines 4 to 5
// Operator uses`<kind>.<apiGroup>/<apiVersion>` don't ask why
export const getGVK = (weirdLabel: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Operator uses`<kind>.<apiGroup>/<apiVersion>` don't ask why
export const getGVK = (weirdLabel: string) => {
// Operator uses`<kind>.<apiGroup>/<apiVersion>`
export const getGVK = (kind: string) => {

Copy link
Contributor

@afreen23 afreen23 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2021
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2021
@vbnrh
Copy link
Contributor

vbnrh commented Jul 24, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 24, 2021

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 196201c into openshift:master Jul 24, 2021
@spadgett spadgett added this to the v4.9 milestone Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/ceph Related to ceph-storage-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants