[3.1 29] UI: Incorrect line number shown in the error message in config editor

Bug #1618385 reported by Pavana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Won't Fix
Medium
Manoj
R3.2
Fix Committed
Medium
Manoj
Trunk
Fix Committed
Medium
Manoj

Bug Description

1. Go to Configure > Config Editor
2. Click on any of the links displayed (I clicked on virtual DNS records)
3. Click on the href of any of the records
4. Click on Edit
5. Edit the details -- Here I happened to remove a comma
6. Click on Save
7. An error is displayed as expected - "Error : SyntaxError: Unexpected string in JSON at position 1175"
But the line number displayed (1175) is incorrect.
As per the lines on that page, it seems to be line number 35.
The number shown here might be taken from elsewhere. Could this be changed?

Tags: ui
Revision history for this message
Pavana (pavanap) wrote :
information type: Proprietary → Public
Revision history for this message
Manoj (manojgn) wrote :

The error points to the text position of the error and not the line no.

Changed in juniperopenstack:
assignee: nobody → Rajiv Sah (rajivks)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/24810
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/24832
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/24833
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/24834
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/24833
Submitter: Manoj (<email address hidden>)

Revision history for this message
Manoj (manojgn) wrote :

Specific error reporting is a feature of the browser. While firefox gives more detailed error message like the line number and column chrome just displays the position. At this point we are unable to provide a solution for chrome but we have added line numbering to the text area which can assist in some way.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/24810
Committed: http://github.org/Juniper/contrail-third-party-cache/commit/a47efe8ca2195c27def50f648a7850efcad55f8d
Submitter: Zuul
Branch: master

commit a47efe8ca2195c27def50f648a7850efcad55f8d
Author: Manoj Naik <email address hidden>
Date: Wed Oct 12 12:36:09 2016 +0530

Related-Bug: #1618385 - Adding lined text area to the library for use in config editor.

Change-Id: Ib0765adfeaccda987a1f449a0ac27493dcb278a8

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/24832
Committed: http://github.org/Juniper/contrail-webui-third-party/commit/c9e7509083fe68e624ccd7e21ed90fa6d5e69ae9
Submitter: Zuul
Branch: master

commit c9e7509083fe68e624ccd7e21ed90fa6d5e69ae9
Author: Manoj Naik <email address hidden>
Date: Thu Oct 13 10:31:37 2016 +0530

Related-Bug: #1618385 - Adding lined text area to the library in packages.xml for use in config editor.

Change-Id: I372ad2466a8d523c71ce3460c82a6c65c09a7cd9

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/24833
Committed: http://github.org/Juniper/contrail-web-core/commit/400da51bfd98c09734c1db036de2c2093c259ebe
Submitter: Zuul
Branch: master

commit 400da51bfd98c09734c1db036de2c2093c259ebe
Author: Manoj Naik <email address hidden>
Date: Thu Oct 13 10:33:54 2016 +0530

Related-Bug: #1618385 - Adding jquery-linedtextarea to core and copying it to assets.

Change-Id: I8527357ea13863d88450a074cf77f6099d0b8a9b

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/24834
Committed: http://github.org/Juniper/contrail-web-controller/commit/2724d18000d91eb5f1cfe04fe241390e8024ac29
Submitter: Zuul
Branch: master

commit 2724d18000d91eb5f1cfe04fe241390e8024ac29
Author: Manoj Naik <email address hidden>
Date: Thu Oct 13 10:36:57 2016 +0530

Closes-Bug: #1618385 - Using the lined text area while raw json editing in config editor.

Change-Id: I0967390b4879fb51070283288613b35dbc004314

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/26649
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/26655
Submitter: Rajiv Sah (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/26649
Submitter: Manoj (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/26655
Committed: http://github.org/Juniper/contrail-web-controller/commit/9c298f0f6ba4f85a77f11d093f9d11e8bf045355
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 9c298f0f6ba4f85a77f11d093f9d11e8bf045355
Author: Rajiv Kumar Shah <email address hidden>
Date: Tue Nov 8 23:08:29 2016 -0800

Related-Bug: #1614027 - Config Editor changes.
- Form generated from schema
- Create form added
- Deletes implemented.
- Help text displayed as tooltips.
- Required fields * and validation added.
- Config diff implemented.

Change-Id: If4d1eb8975d6c67ec2adb9a02188ba356c72e033

Closes-Bug: #1618385 - Using the lined text area while raw json editing in config editor.

Change-Id: I0967390b4879fb51070283288613b35dbc004314

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/26649
Committed: http://github.org/Juniper/contrail-web-core/commit/6d69279baae4a96c11222f6e36b5ec9786366b70
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 6d69279baae4a96c11222f6e36b5ec9786366b70
Author: Manoj Naik <email address hidden>
Date: Thu Oct 13 10:33:54 2016 +0530

Related-Bug: #1618385 - Adding jquery-linedtextarea to core and copying it to assets.

Closes-Bug: #1593162 - Provided apis to fetch the json schema, list of objects
and get their properties for use in config browser and rbac implementation.
Added to generate-files.sh to generate the schema during build time.

Sample json schemas are provided which are built by generateDS. During build time they will be generated again and path should be updated in config.global.js

Change-Id: I51c54fa8e301007ef294991bdb0acdd0216efeb6
Related-Bug: #1593162 - Added objectList to the sample and made the paths fetch data from config.global.js

Revision history for this message
Manoj (manojgn) wrote :

Some features only available after 3.2 hence will be fixed only for 3.2 and above.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.