Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

427 marketplace #141

Merged
merged 5 commits into from
Nov 16, 2015
Merged

427 marketplace #141

merged 5 commits into from
Nov 16, 2015

Conversation

msecret
Copy link
Contributor

@msecret msecret commented Nov 13, 2015

Check commits for more information on decision making.

Marco Segreto added 3 commits November 13, 2015 14:39
Also made changes in the cf api tests to move similar functionality
for the fetch error tests. This was done to reduce duplication.
I separated the service instance store and the service store to make
the code easier to follow. The other alternative would be to make new
getAll and get methods on the existing service store for instances vs
services and store both in separate places which would be more code.
This way keeps all stores in a similar state.
Notes:
- Changed file name of ServiceInstanceList to service_instance_list
  because it's a more accurate name and allows a separate service_list
  file here.
- Used the pattern of having a wrapper component that maintains state
  from store and would be call to fetch data because it's a good react
  practice and allows more separation.
- Had to split the services response because that's how it wil come in
  from actual API.
}

_handleDelete = (instanceGuid, ev) => {
ev.preventDefault();
Copy link
Contributor

Choose a reason for hiding this comment

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

what does the preventDefault() do for the event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prevent default ensures that the default action for the event doesn't happen. So if you have an a tag with a link, then the default action would be for the browser to go to the link. Prevent default will stop that from happening. In general, it's used to ensure browser consistent behavior, although often it's not strictly required.

This was added by mistake and not needed as the button is re-declared below.
case serviceActionTypes.SERVICE_INSTANCES_RECEIVED:
var updates = this.formatSplitResponse(action.serviceInstances);
case serviceActionTypes.SERVICES_RECEIVED:
var updates = this.formatSplitResponse(action.services);
Copy link
Contributor

Choose a reason for hiding this comment

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

updates -> services

msecret pushed a commit that referenced this pull request Nov 16, 2015
@msecret msecret merged commit f8db284 into cloud-gov:staging-alpha Nov 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants