[2.2] Commissioning script output should preserve whitespace
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=
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
- Lee Trager (community): Approve
-
Diff: 178 lines (+34/-39)9 files modifiedsrc/maasserver/static/css/build.css (+1/-1)
src/maasserver/static/js/angular/controllers/node_details.js (+1/-4)
src/maasserver/static/js/angular/controllers/node_result.js (+12/-22)
src/maasserver/static/js/angular/controllers/tests/test_node_details.js (+2/-2)
src/maasserver/static/js/angular/controllers/tests/test_node_result.js (+5/-6)
src/maasserver/static/js/angular/directives/code_lines.js (+2/-1)
src/maasserver/static/partials/node-result.html (+1/-2)
src/maasserver/static/scss/_pages.scratch.scss (+9/-0)
src/provisioningserver/refresh/node_info_scripts.py (+1/-1)
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 |