-
Notifications
You must be signed in to change notification settings - Fork 310
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 Gateway Page #628
Add Gateway Page #628
Conversation
068dcad
to
59a02b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The frequency plan selector in the gateway add form cannot be displayed properly (gets clipped by the viewport):
I'm sure there is an option in react-select
to show the options above the field.
We now mix strategies a little in terms of connecting to formik, but I think it's ok to do a gradual transition. Formik's connect()
look promising indeed.
getGsFrequencyPlans, | ||
} = this.props | ||
|
||
if (source === 'ns') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need to dispatch if it is not already in the store.
FrequencyPlansSelect.defaultProps = { | ||
title: sharedMessages.frequencyPlan, | ||
autoFocus: false, | ||
horizontal: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
horizontal: true, | |
horizontal: false, |
I know it is not really in line with how we mostly use fields, but it is also false by default in the <Field />
component.
return { userId } | ||
}, | ||
dispatch => ({ | ||
createSuccess: () => dispatch(push('/console/gateways')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should redirect to the route of the new gateway.
</Col> | ||
<Col sm={12} md={8}> | ||
<Form | ||
submitEnabledWhenInvalid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, can you add this prop also to the application add form to be consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, will do it in a separate pr
actually, what is the problem with the add application form? it doesnt suffer from the issue we are trying to solve in add device/gateway pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency. We're likely not going to fix this before MVP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what consistency? the add application form has 3 fields and only the first one is required.
again:
it doesnt suffer from the issue we are trying to solve in add device/gateway pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The consistency of the submit button behavior when creating entities. Even better would be to change it throughout all submit buttons, but that's not important enough right now.
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/* eslint-disable import/prefer-default-export */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* eslint-disable import/prefer-default-export */ |
Should not be necessary.
use frequency plans select component
59a02b3
to
47143ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
This PR adds the Add Gateway page.
Blocked by: #620Closes: #621
References: #26
Changes
<FrequencyPlansSelect />
componentformik
configuration
anduser
selectors<FrequencyPlansSelect />
componentcc @htdvisser