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

[fix] Config editor issues #913

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Conversation

kkreitmair
Copy link
Contributor

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #910.

Description of Changes

To address the first Issue described in #910, an update of the way the selects are initialized by the jsonschema-ui.js is needed.

To address the second Issue described in #910, a call to super has to be removed, because it is not needed in this special case neither in all other cases.

For select fields, with predefined values in the corresponding JSON
schema, when a value is saved other than the default, the field will
be empty after saving in the Device config editor. This happens only,
in combination of the lib select2.  The cause of the issue is, that
the jsonschema-ui.js version does use a deprecated way to initialize
select2 inputs. This commit will fix this issue by updating the way of
initializing the inputs.

Fixes #910

Signed-off-by: Konrad Kreitmair <[email protected]>
…910

This addresses the problem, that the drop-down for Configuration Menu
and Object Properties are not shown anymore in the device config
editor, if a configuration section is saved, which has in its JSON
schema definition a property with type array and should have unique
items. The cause of the problem is a call to super, when there is no
super. This commit will fix this issue by removing the call to super,
because it is not needed in this special case neither in all other
cases.

Fixes #910

Signed-off-by: Konrad Kreitmair <[email protected]>
@coveralls
Copy link

coveralls commented Aug 23, 2024

Coverage Status

coverage: 98.224%. remained the same
when pulling d8e0155 on issues/910-fix-config-editor-issues
into a40adbc on master.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Thanks @kkreitmair

@nemesifier nemesifier merged commit 2302509 into master Sep 5, 2024
15 checks passed
@nemesifier nemesifier deleted the issues/910-fix-config-editor-issues branch September 5, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

[bug] Multiple UI issues in configuration editor for Device
3 participants