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
diff --git a/src/maasserver/static/js/angular/directives/code_lines.js b/src/maasserver/static/js/angular/directives/code_lines.js
index 49b66d2..e1a7aa1 100644
--- a/src/maasserver/static/js/angular/directives/code_lines.js
+++ b/src/maasserver/static/js/angular/directives/code_lines.js
@@ -30,7 +30,8 @@ function maasCodeLines() {
30 // Each line is to be wrapped by a span which is style & given30 // Each line is to be wrapped by a span which is style & given
31 // its appropriate line number31 // its appropriate line number
32 angular.forEach(lines, function(line) {32 angular.forEach(lines, function(line) {
33 insert += newLine + '<span class="code-line">' + line + "</span>";33 insert +=
34 newLine + '<span class="p-code-numbered__line">' + line + "</span>";
34 });35 });
35 insert += "</code>";36 insert += "</code>";
3637
diff --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
index 09802e3..2bf91b0 100644
--- a/src/maasserver/static/js/angular/directives/tests/test_code_lines.js
+++ b/src/maasserver/static/js/angular/directives/tests/test_code_lines.js
@@ -40,6 +40,8 @@ describe("maasCodeLines", function() {
40 };40 };
4141
42 var directive = compileDirective("getText()");42 var directive = compileDirective("getText()");
43 expect(directive.find("code span").hasClass("code-line")).toBe(true);43 expect(directive.find("code span").hasClass("p-code-numbered__line")).toBe(
44 true
45 );
44 });46 });
45});47});
diff --git a/src/maasserver/static/partials/pods-list.html b/src/maasserver/static/partials/pods-list.html
index 5655193..3b9d478 100644
--- a/src/maasserver/static/partials/pods-list.html
+++ b/src/maasserver/static/partials/pods-list.html
@@ -131,8 +131,8 @@
131 </g>131 </g>
132 </g>132 </g>
133 </svg>133 </svg>
134 <h3 class="p-heading-icon__title p-heading--four">You have not added any KVMs yet.</h3>134 <h3 class="p-heading-icon__title p-heading--four u-no-max-width u-sv3">You have not added any KVMs yet.</h3>
135 <button class="p-button--positive is-inline ng-scope" data-ng-click="addPod()" data-ng-if="!add.open && canAddPod()">Add {$ getPageHeading() $}</button>135 <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>
136 </div>136 </div>
137 </div>137 </div>
138 <div class="row">138 <div class="row">
diff --git a/src/maasserver/static/scss/_patterns_code.scss b/src/maasserver/static/scss/_patterns_code.scss
139new file mode 100644139new file mode 100644
index 0000000..5f692b1
--- /dev/null
+++ b/src/maasserver/static/scss/_patterns_code.scss
@@ -0,0 +1,5 @@
1@mixin maas-p-code {
2 .p-code-numbered__line {
3 display: block;
4 }
5}
diff --git a/src/maasserver/static/scss/build.scss b/src/maasserver/static/scss/build.scss
index c3ae410..d6f2802 100644
--- a/src/maasserver/static/scss/build.scss
+++ b/src/maasserver/static/scss/build.scss
@@ -19,6 +19,7 @@
19@import 'patterns_action-button';19@import 'patterns_action-button';
20@import 'patterns_button';20@import 'patterns_button';
21@import 'patterns_cta';21@import 'patterns_cta';
22@import 'patterns_code';
22@import 'patterns_icons';23@import 'patterns_icons';
23@import 'patterns_navigation';24@import 'patterns_navigation';
24@import 'patterns_page-header';25@import 'patterns_page-header';
@@ -66,6 +67,7 @@
66@include maas-tag-input;67@include maas-tag-input;
67@include maas-p-buttons;68@include maas-p-buttons;
68@include maas-p-cta;69@include maas-p-cta;
70@include maas-p-code;
69@include maas-p-forms;71@include maas-p-forms;
70@include maas-p-hr;72@include maas-p-hr;
71@include maas-p-notifications;73@include maas-p-notifications;

Subscribers

People subscribed via source and target branches