Skip to content

Conversation

@jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented Jan 18, 2020

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 18, 2020
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Jan 18, 2020
@jeff-phillips-18 jeff-phillips-18 changed the title [WIP] Add Topology Edge Selection w/ Side Panel Add Topology Edge Selection w/ Side Panel Jan 20, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 20, 2020
@jeff-phillips-18
Copy link
Member Author

/kind feature

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 20, 2020
Copy link
Contributor

@serenamarie125 serenamarie125 left a comment

Choose a reason for hiding this comment

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

@jeff-phillips-18 this looks great, you don't have the Actual traffic connector shown here, but I assume that's coming in a follow up PR?

@jeff-phillips-18
Copy link
Member Author

@jeff-phillips-18 this looks great, you don't have the Actual traffic connector shown here, but I assume that's coming in a follow up PR?

Correct, we do not have those connectors in yet. see #4026

@christianvogt
Copy link
Contributor

christianvogt commented Jan 22, 2020

Used the Move action on a the connects-to connector and got many warnings / errors logged in the console. The connection did move in topology though.

The source node is showing up in the target dropdown of the Move action. This implies i'm going to reconnect the to the source node. This isn't allow. We should remove the source as an option in the menu.

I don't think we should disable the current target node in the Move action target dropdown. Simply perform no action if the user keeps the current target selected.

Unable to create a service binding request anymore. The tooltip shows it wants to create an SBR but on release, I get an error in in the console and a visual connector is created instead. Found issue on master as well.

@jeff-phillips-18
Copy link
Member Author

Updated as suggested. Not seeing errors any more. Still see some warnings due to patternfly/patternfly-react#3549

Copy link
Contributor

@nemesis09 nemesis09 left a comment

Choose a reason for hiding this comment

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

@jeff-phillips-18
The move action on a visual connector allows event source as a valid dropdown option as target for a deployment. and throws an error on submit (Move)

@nemesis09
Copy link
Contributor

nemesis09 commented Jan 22, 2020

The move action for a visual connector allows database as valid dropdown option as target and throws an error on submit (move). It updates the connection to database on topology though and changes the connector to type binding

@jeff-phillips-18
Copy link
Member Author

@nemesis09 Did you try that after my last push?

@nemesis09
Copy link
Contributor

@nemesis09 Did you try that after my last push?

Sorry, I didn't try it after the latest push when I got the errors.
But now that I have pulled in the latest push-

  • the form shows an error message on submit for event source and database as target, but the error message doesn't describe the error and rather shows error is undefined
  • although the form shows error message for database as target on submit, the connector on topology is updated to connect to database as binding connector
  • the Move button is disabled after submitting with database or event source, but it doesn't get enabled again on selecting other valid options from the dropdown. We need to launch it using the Move action again.

@jeff-phillips-18
Copy link
Member Author

Fixed modal to show the correct error.

Errors updated the edges are reported already in https://issues.redhat.com/browse/ODC-2726 which is fixed in #3986

@nemesis09
Copy link
Contributor

The modal doesn't show any error now, and submitting(Move) with Event Source as a target, just turns out to be a no op

@nemesis09
Copy link
Contributor

I tried locally with changes pulled from #3986,
this solves the errors for moving connection from a deployment as visual connector to a database as a binding connector

@jeff-phillips-18
Copy link
Member Author

Removed event sources from the list of available targets..

@nemesis09
Copy link
Contributor

The modal disables the submit(move) button on error, but doesn't enable it back if a different target is selected from the dropdown.

Copy link
Contributor

@serenamarie125 serenamarie125 left a comment

Choose a reason for hiding this comment

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

looks good!

@nemesis09
Copy link
Contributor

tested locally. works as expected.
/lgtm

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

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

The type issues are minor since they are not exposed methods yet... We definitely need tests for the utilities so when that is being done we can add the types as likely we'll want to export those functions for tests.

@jeff-phillips-18 please log a Task, assign it to yourself, and put it in the next sprint (179), next week we'll need to write the missing tests. Also please fix the types at the same time.

};
};

const deleteConnection = (edge: BaseEdge) => {
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
const deleteConnection = (edge: BaseEdge) => {
const deleteConnection = (edge: BaseEdge): KebabOption => {

We need to make sure we type output of newly created objects to insure they stay properly typed (if anything in the type changes later).

} from '../const';
import { moveConnectionModal } from '../components/MoveConnectionModal';

const moveConnection = (edge: BaseEdge, availableTargets: Node[]) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here...

Suggested change
const moveConnection = (edge: BaseEdge, availableTargets: Node[]) => {
const moveConnection = (edge: BaseEdge, availableTargets: Node[]): KebabOption => {

actions.push(deleteConnection(edge));
break;
default:
break;
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
break;

Default clauses almost never need a break unless you're doing conditional paths within it.


const ConnectedMoveConnectionModal = connect(mapStateToProps)(MoveConnectionModal);

export const moveConnectionModal = createModalLauncher((props: MoveConnectionModalProps) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

😕 There are a lot of different ways to make modals in our codebase. I'll need to take an action up to talk to Christian and find out what the best way is and try to centralize around it.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, jeff-phillips-18, nemesis09, serenamarie125

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 24, 2020
@andrewballantyne
Copy link
Contributor

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@jeff-phillips-18
Copy link
Member Author

Added task https://issues.redhat.com/browse/ODC-2823

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@andrewballantyne
Copy link
Contributor

/retest

Looks like a flake...

Kubernetes resource CRUD operations Pod : displays a YAML editor for creating a new resource instance

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@jeff-phillips-18
Copy link
Member Author

/retest

@spadgett
Copy link
Member

/hold
for merge queue fix #4065

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2020
@spadgett
Copy link
Member

/hold cancel
/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 9a70e79 into openshift:master Jan 25, 2020
@spadgett spadgett added this to the v4.4 milestone Jan 27, 2020
@jeff-phillips-18 jeff-phillips-18 deleted the edge-select branch December 2, 2020 13:37
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/dev-console Related to dev-console kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants