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

Baremetal Node overview #4971

Merged
merged 1 commit into from Apr 16, 2020

Conversation

rawagner
Copy link
Contributor

@rawagner rawagner commented Apr 8, 2020

Depends on #4911

@openshift-ci-robot openshift-ci-robot added component/ceph Related to ceph-storage-plugin component/core Related to console core functionality labels Apr 8, 2020
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dashboard Related to dashboard component/kubevirt Related to kubevirt-plugin component/metal3 Related to metal3-plugin component/noobaa Related to noobaa-storage-plugin component/olm Related to OLM component/sdk Related to console-plugin-sdk component/shared Related to console-shared labels Apr 8, 2020
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2020
@rawagner rawagner changed the title Node dashboard bmn Node overview bmn Apr 14, 2020
@rawagner rawagner force-pushed the node-dashboard-bmn branch 2 times, most recently from 31ef8a0 to d03adee Compare April 14, 2020 13:18
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 14, 2020
@rawagner rawagner changed the title Node overview bmn Baremetal Node overview Apr 14, 2020
@@ -140,7 +140,7 @@ const BareMetalHostDetails: React.FC<BareMetalHostDetailsProps> = ({
<dl>
<dt>Status</dt>
<dd>
<BareMetalHostStatus {...status} />
<BareMetalHostStatus {...status} maintenance={nodeMaintenance} host={host} />

Choose a reason for hiding this comment

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

Is this change necessary? The {...status} already includes maintenance or host. See host-status.ts

@@ -64,4 +70,8 @@ const BareMetalHostStatus: React.FC<StatusProps> = ({ status, title, description
}
};

type BareMetalHostStatusProps = StatusProps & {

Choose a reason for hiding this comment

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

I think we should keep the StatusProps in tact and specify it further here. The host should be optional as it is not necessary in all states

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, but I removed the [key: string]: any from StatusProps which basically removes any type-checking :) and added optional nodeMaintenance to both BMN and BMH statuses

Choose a reason for hiding this comment

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

hmm, the goal of that was that status object has status, title, description and any amount of additional data which can be used by the status components so it does not have to be passed there explicitly and it is already included in the status object. With this in place, you can just do <BareMetalHostStatus {...status} /> without explicitly passing host and maintenance objects because they are already included in status object.

@@ -93,7 +93,7 @@ const HostsTableRow: RowFunction<BareMetalHostBundle> = ({
/>
</TableData>
<TableData className={tableColumnClasses.status}>
<BareMetalHostStatus {...status} />
<BareMetalHostStatus {...status} maintenance={nodeMaintenance} host={host} />

Choose a reason for hiding this comment

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

maintenance and (or) host are provided through {...status}

Comment on lines 13 to 17
maintenance?: K8sResourceKind;
className?: string;

Choose a reason for hiding this comment

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

I wouldn't add these two, this defines general shape of the status where it has status, title, description and a set of optional props which are provided as needed. These can be further specified in 'BareMetalHostStatusProps' and 'BareMetalNodeStatusProps'

@rawagner rawagner force-pushed the node-dashboard-bmn branch 4 times, most recently from d0ed0d8 to c19f776 Compare April 16, 2020 07:30
@@ -64,4 +70,8 @@ const BareMetalHostStatus: React.FC<StatusProps> = ({ status, title, description
}
};

type BareMetalHostStatusProps = StatusProps & {

Choose a reason for hiding this comment

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

hmm, the goal of that was that status object has status, title, description and any amount of additional data which can be used by the status components so it does not have to be passed there explicitly and it is already included in the status object. With this in place, you can just do <BareMetalHostStatus {...status} /> without explicitly passing host and maintenance objects because they are already included in status object.

@@ -93,7 +93,7 @@ const HostsTableRow: RowFunction<BareMetalHostBundle> = ({
/>
</TableData>
<TableData className={tableColumnClasses.status}>
<BareMetalHostStatus {...status} />
<BareMetalHostStatus {...status} nodeMaintenance={nodeMaintenance} host={host} />

Choose a reason for hiding this comment

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

nodeMaintenance and host are already included in status object, so no need to pass them explicitly here.

@@ -140,7 +140,7 @@ const BareMetalHostDetails: React.FC<BareMetalHostDetailsProps> = ({
<dl>
<dt>Status</dt>
<dd>
<BareMetalHostStatus {...status} />
<BareMetalHostStatus {...status} nodeMaintenance={nodeMaintenance} host={host} />

Choose a reason for hiding this comment

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

no need to add these as they are already included in status object

@rawagner rawagner force-pushed the node-dashboard-bmn branch 3 times, most recently from aaec165 to d9c2b37 Compare April 16, 2020 09:19
Copy link

@jtomasek jtomasek 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-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2020
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2020
@jtomasek
Copy link

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jtomasek, rawagner

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

@rawagner
Copy link
Contributor Author

/retest

1 similar comment
@rawagner
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit ce14284 into openshift:master Apr 16, 2020
@spadgett spadgett added this to the v4.5 milestone Apr 20, 2020
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 component/core Related to console core functionality component/dashboard Related to dashboard component/kubevirt Related to kubevirt-plugin component/metal3 Related to metal3-plugin component/noobaa Related to noobaa-storage-plugin component/olm Related to OLM component/sdk Related to console-plugin-sdk component/shared Related to console-shared 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