[2.2] Commissioning script output should preserve whitespace

Bug #1676962 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Mike Pontillo

Bug Description

I noticed when looking at commissioning script results that whitespace was missing, such as indentation. (This makes YAML, and any other output which uses indentation for readability, difficult to interpret.)

If I open the inspector and find the <code/> element the commissioning script text is inside, the problem is fixed if I add the following attribute to the <code/> element:

   style="white-space: pre-wrap;"

I also tried "white-space: pre;", but this is not ideal because it would require horizontal scrolling.

Note that pre-wrap should probably also be used on the Settings page for custom commissioning scripts. If a line in a custom commissioning script extends beyond the right margin, currently we have a separate bug that describes how the controls for the script can be hidden (for example, you cannot delete a custom commissioning script in the UI if a line in the script is too long). A fix to that issue should consider applying the same fix there as well.

Related branches

description: updated
description: updated
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Mike Pontillo (mpontillo)
milestone: none → 2.2.0rc2
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.