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

OperatorInstance view #1594

Merged
merged 4 commits into from
Mar 23, 2020
Merged

OperatorInstance view #1594

merged 4 commits into from
Mar 23, 2020

Conversation

andresmgot
Copy link
Contributor

@andresmgot andresmgot commented Mar 19, 2020

Description of the change

Draft for the OperatorInstance view:
Screenshot from 2020-03-19 13-32-37

For the moment we are showing just some basic info. The current status (as a YAML) and the installation values along with a Card with basic information about the CRD and the ClusterServiceVersion. The plan is to keep adding things but in other PRs to facilitate the review. The next things I plan to add are:

  • Make the Delete button works (currently is a dummy button)
  • Retrieve resources associated to the operator instance and show the same things than for other apps:
    • Application status (worklads running)
    • Resource tables.

We should also be able to modify the instance but I will leave that for later.

Applicable issues

Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

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

The plan is to keep adding things but in other PRs to facilitate the review.

Great, thanks.

return (
<InfoCard
key={resource.metadata.name}
link={`/operators-instances/ns/${resource.metadata.namespace}/${resource.metadata.name}`}
link={`/operators-instances/ns/${resource.metadata.namespace}/${csv.metadata.name}/${crd?.name}/${resource.metadata.name}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't the crd?.name leave either the string 'undefined' or at best, '' so there will be two slashes?

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, the thing is that crd will never be empty if resource is populated since the crd is required to obtain the resource. Typescript is not helping here a lot but I will try to make it more readable.

@@ -227,7 +227,9 @@ class DeploymentFormBody extends React.Component<
this.setState({ submittedResourceName: resourceName });
const created = await createResource(namespace, resource.apiVersion, resourceType, resource);
if (created) {
push(`/operators-instances/ns/${namespace}/${resourceName}`);
push(
`/operators-instances/ns/${namespace}/${csv?.metadata.name}/${crd?.name}/${resourceName}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto here.

Andres Martinez Gotor and others added 3 commits March 20, 2020 11:33
* Add delete button

* Reset state when changing the namespace
@andresmgot andresmgot merged commit de6afe9 into master Mar 23, 2020
@andresmgot andresmgot deleted the OperatorInstance branch April 7, 2020 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants