-
Notifications
You must be signed in to change notification settings - Fork 0
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
Issue/1192 garden connection buttons #4
base: garden_connection_config_feature
Are you sure you want to change the base?
Issue/1192 garden connection buttons #4
Conversation
@@ -19,17 +19,13 @@ class GardenBaseSchema(Schema): | |||
def validate_all_keys(self, post_load_data, original_data, **kwargs): | |||
# do not allow extraneous keys when operating on a dictionary | |||
if isinstance(original_data, dict): | |||
extra_args = original_data.keys() - post_load_data.keys() | |||
|
|||
extra_args = post_load_data.keys() - original_data.keys() |
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 changes made here in this commit are not actually related to any work in adding the buttons. But because this line was backwards, this code was firing and it revealed that the error messages were uninterpretable.
@@ -307,6 +387,12 @@ export default function gardenService($http) { | |||
'stomp.username', | |||
'stomp.password', | |||
'stomp.ssl', | |||
{ |
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.
angular-schema-forms
is abandonware. It hasn't been updated in 5 years and it has outstanding PRs from 7 years ago. It has problems. At any rate, many cycles were wasted trying to get the form to properly update on the page when the data was updated, all for nothing. The issue appears to be with the library itself. This message to the user to refresh the page is acknowledgement of defeat. :(
@@ -9,7 +9,7 @@ | |||
"es6": true | |||
}, | |||
"parserOptions": { | |||
"ecmaVersion": 6, | |||
"ecmaVersion": 2018, |
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 doesn't really matter what this is set to, as long as it's set to something sensible. ecmaVersion 2018
is very nearly ecmaVersion 6
. It just adds a few constructs that are more modern. In any case, babel
compiles to the same version of JavaScript regardless of this setting. This is only to tell eslint
which version to try to parse.
e014106
to
187d0e7
Compare
97c5701
to
f76c1d7
Compare
Overview
There are five commits in this PR to be concerned with:
eslint
. Care was taken to ensure the correct version ofeslint
was used with the correct.eslintrc.json
file. How we came to the place where there were thousands of errors is unknown, but the easy fixes are in place with this commit. There are further corrections that need to be made by hand and will occur in a later commit. Should be safe to trust.a. Testing revealed that
GardenBaseSchema
was returning error messages that were not useful in their current state (strings with single quotes embedded in them don't play well with JSON).b. Code was added to disallow updating a garden to have no connection parameters at all.
c. Code was added to interpret error messages received because of missing non-optional parameters and update the UI with that information.
Testing
Other
AttributeError: 'dict' object has no attribute 'id'
from a malformed call to a logger) and in other cases it updates without issue with the disallowed blank field. Other times everything works as expected. This behavior is believed to not be related to this work and will be investigated under a different ticket.