Merge ~ya-bo-ng/maas:fix-numbered-code into ~deadlight/maas:vanilla

Proposed by Anthony Dillon
Status: Merged
Approved by: Karl Williams
Approved revision: 2674c1ab1957357bd3b340c1008c58f28179c99a
Merged at revision: 76b9946649de9588c5795aa011a1f1692d2acbbe
Proposed branch: ~ya-bo-ng/maas:fix-numbered-code
Merge into: ~deadlight/maas:vanilla
Diff against target: 23 lines (+4/-3)
1 file modified
src/maasserver/static/js/angular/directives/code_lines.js (+4/-3)
Reviewer Review Type Date Requested Status
Karl Williams Approve
Review via email: mp+337165@code.launchpad.net

Description of the change

Fixed the layout of the code numbered pattern.

- Go to Nodes -> Controllers -> Logs

To post a comment you must log in.
Revision history for this message
Karl Williams (deadlight) wrote :

LGTM +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/static/js/angular/directives/code_lines.js b/src/maasserver/static/js/angular/directives/code_lines.js
2index 255af71..9dd8c6c 100644
3--- a/src/maasserver/static/js/angular/directives/code_lines.js
4+++ b/src/maasserver/static/js/angular/directives/code_lines.js
5@@ -27,14 +27,15 @@
6
7 // Count the line contents
8 var lines = element.html().split('\n'),
9- insert = "";
10+ insert = "<code>";
11
12 // Each line is to be wrapped by a span which is style & given
13 // its appropriate line number
14 $.each(lines, function() {
15- insert += '<code><span class="code-line">' +
16- this + '</span></code>\n';
17+ insert += '<span class="code-line">' +
18+ this + '</span>\n';
19 });
20+ insert += "</code>";
21
22 // Re-insert the contents
23 element.html(insert);

Subscribers

People subscribed via source and target branches

to all changes: