New issue
Advanced search Search tips

Issue 843934 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

JSON schemas + examples lose formatting in GPO editor

Project Member Reported by olsen@chromium.org, May 17 2018

Issue description

Not part of Chrome / Chrome OS, but part of the ADML files which are generated for managing Chrome Policies in Active Directory.

The generated ADML files don't keep the formatting of the JSON that is
present in the source they are generated from. Eg in the source:
{
  'key': 'value',
  'key2': {
    'subkey': 'subvalue'
  }
}

But the generated ADML contains:
{
'key': 'value',
'key2': {
'subkey': 'subvalue'
}
}


 

Comment 1 by olsen@chromium.org, May 17 2018

Attaching a screenshot of the fix in change 1063831 - 
https://chromium-review.googlesource.com/#/c/chromium/src/+/1063831
updated.png
146 KB View Download
Project Member

Comment 2 by bugdroid1@chromium.org, May 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52b0e8f4b55a3230a437f8e441a269724891a0bc

commit 52b0e8f4b55a3230a437f8e441a269724891a0bc
Author: A Olsen <olsen@chromium.org>
Date: Fri May 18 09:26:47 2018

Preserve indentation in policy_templates.json

Currently all leading spaces are stripped from the policy description
text - this leads to hard-to-read JSON examples. This change keeps
the indentation that is useful to users, but strips the common 6-space
indentation that is there only to make policy_templates.json itself
more readable.

See bug for screenshot of this change.

Bug:  843934 
Change-Id: Ic8efe2cb48421fd035470d57c8c1a3c90f69f792
Reviewed-on: https://chromium-review.googlesource.com/1063831
Commit-Queue: A Olsen <olsen@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559842}
[modify] https://crrev.com/52b0e8f4b55a3230a437f8e441a269724891a0bc/components/policy/tools/template_writers/policy_template_generator.py
[modify] https://crrev.com/52b0e8f4b55a3230a437f8e441a269724891a0bc/components/policy/tools/template_writers/policy_template_generator_unittest.py

Comment 3 by olsen@chromium.org, Jun 18 2018

Status: Verified (was: Assigned)

Sign in to add a comment