Skip to content

[fix] Config editor issues#913

Merged
nemesifier merged 3 commits into
masterfrom
issues/910-fix-config-editor-issues
Sep 5, 2024
Merged

[fix] Config editor issues#913
nemesifier merged 3 commits into
masterfrom
issues/910-fix-config-editor-issues

Conversation

@kkreitmair

Copy link
Copy Markdown
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 <kkreitmair@tdt.de>
…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 <kkreitmair@tdt.de>
@coveralls

coveralls commented Aug 23, 2024

Copy link
Copy Markdown

Coverage Status

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

@nemesifier nemesifier left a comment

Copy link
Copy Markdown
Member

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
@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