Merge ~ya-bo-ng/maas:event-logs-vanilla into maas:master

Proposed by Anthony Dillon
Status: Merged
Approved by: Anthony Dillon
Approved revision: 502d4b4c7eac27e8bd1b350ba311070a4055909f
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ya-bo-ng/maas:event-logs-vanilla
Merge into: maas:master
Diff against target: 74 lines (+14/-4)
5 files modified
src/maasserver/static/js/angular/directives/code_lines.js (+2/-1)
src/maasserver/static/js/angular/directives/tests/test_code_lines.js (+3/-1)
src/maasserver/static/partials/pods-list.html (+2/-2)
src/maasserver/static/scss/_patterns_code.scss (+5/-0)
src/maasserver/static/scss/build.scss (+2/-0)
Reviewer Review Type Date Requested Status
Steve Rydz (community) Approve
Review via email: mp+369973@code.launchpad.net

Commit message

Fix the machine details log layout

Description of the change

## Done
- Updated the code-line pattern to use the new Vanilla 2.0 classnames.
- Drive by fix up the layout of the empty pod view

## QA
- I have pushed the branch to karura so visit: http://karura.internal:5240/MAAS/#/machine/dxsdpb?area=logs

## Screenshot
https://drive.google.com/file/d/1vPA9ol1t6rTeFkApWwcXfBVLalpjT6Wc/view?usp=sharing

To post a comment you must log in.
Revision history for this message
Steve Rydz (steverydz) wrote :

LGTM +1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
~ya-bo-ng/maas:event-logs-vanilla updated
502d4b4... by Anthony Dillon

Fix lint

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 49b66d2..e1a7aa1 100644
3--- a/src/maasserver/static/js/angular/directives/code_lines.js
4+++ b/src/maasserver/static/js/angular/directives/code_lines.js
5@@ -30,7 +30,8 @@ function maasCodeLines() {
6 // Each line is to be wrapped by a span which is style & given
7 // its appropriate line number
8 angular.forEach(lines, function(line) {
9- insert += newLine + '<span class="code-line">' + line + "</span>";
10+ insert +=
11+ newLine + '<span class="p-code-numbered__line">' + line + "</span>";
12 });
13 insert += "</code>";
14
15diff --git a/src/maasserver/static/js/angular/directives/tests/test_code_lines.js b/src/maasserver/static/js/angular/directives/tests/test_code_lines.js
16index 09802e3..2bf91b0 100644
17--- a/src/maasserver/static/js/angular/directives/tests/test_code_lines.js
18+++ b/src/maasserver/static/js/angular/directives/tests/test_code_lines.js
19@@ -40,6 +40,8 @@ describe("maasCodeLines", function() {
20 };
21
22 var directive = compileDirective("getText()");
23- expect(directive.find("code span").hasClass("code-line")).toBe(true);
24+ expect(directive.find("code span").hasClass("p-code-numbered__line")).toBe(
25+ true
26+ );
27 });
28 });
29diff --git a/src/maasserver/static/partials/pods-list.html b/src/maasserver/static/partials/pods-list.html
30index 5655193..3b9d478 100644
31--- a/src/maasserver/static/partials/pods-list.html
32+++ b/src/maasserver/static/partials/pods-list.html
33@@ -131,8 +131,8 @@
34 </g>
35 </g>
36 </svg>
37- <h3 class="p-heading-icon__title p-heading--four">You have not added any KVMs yet.</h3>
38- <button class="p-button--positive is-inline ng-scope" data-ng-click="addPod()" data-ng-if="!add.open && canAddPod()">Add {$ getPageHeading() $}</button>
39+ <h3 class="p-heading-icon__title p-heading--four u-no-max-width u-sv3">You have not added any KVMs yet.</h3>
40+ <button class="p-button--positive is-inline u-no-margin--left ng-scope" data-ng-click="addPod()" data-ng-if="!add.open && canAddPod()">Add {$ getPageHeading() $}</button>
41 </div>
42 </div>
43 <div class="row">
44diff --git a/src/maasserver/static/scss/_patterns_code.scss b/src/maasserver/static/scss/_patterns_code.scss
45new file mode 100644
46index 0000000..5f692b1
47--- /dev/null
48+++ b/src/maasserver/static/scss/_patterns_code.scss
49@@ -0,0 +1,5 @@
50+@mixin maas-p-code {
51+ .p-code-numbered__line {
52+ display: block;
53+ }
54+}
55diff --git a/src/maasserver/static/scss/build.scss b/src/maasserver/static/scss/build.scss
56index c3ae410..d6f2802 100644
57--- a/src/maasserver/static/scss/build.scss
58+++ b/src/maasserver/static/scss/build.scss
59@@ -19,6 +19,7 @@
60 @import 'patterns_action-button';
61 @import 'patterns_button';
62 @import 'patterns_cta';
63+@import 'patterns_code';
64 @import 'patterns_icons';
65 @import 'patterns_navigation';
66 @import 'patterns_page-header';
67@@ -66,6 +67,7 @@
68 @include maas-tag-input;
69 @include maas-p-buttons;
70 @include maas-p-cta;
71+@include maas-p-code;
72 @include maas-p-forms;
73 @include maas-p-hr;
74 @include maas-p-notifications;

Subscribers

People subscribed via source and target branches