Merge lp:~andreserl/maas/lp1660185 into lp:~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 5775
Proposed branch: lp:~andreserl/maas/lp1660185
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 51 lines (+10/-5)
2 files modified
src/maasserver/static/js/angular/controllers/nodes_list.js (+6/-1)
src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js (+4/-4)
To merge this branch: bzr merge lp:~andreserl/maas/lp1660185
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+318717@code.launchpad.net

Commit message

Only shows the release title for a machine that's 'Deployed'.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/static/js/angular/controllers/nodes_list.js'
2--- src/maasserver/static/js/angular/controllers/nodes_list.js 2016-10-07 18:48:30 +0000
3+++ src/maasserver/static/js/angular/controllers/nodes_list.js 2017-03-02 04:56:36 +0000
4@@ -619,7 +619,12 @@
5 if(node.osystem === "ubuntu") {
6 releaseTitle = releaseTitle.split('"')[0].trim();
7 }
8- return node.status + ' ' + releaseTitle;
9+ if(node.status === "Deployed") {
10+ return releaseTitle;
11+ }
12+ if(node.status === "Deploying") {
13+ return node.status + ' ' + releaseTitle;
14+ }
15 }
16 };
17
18
19=== modified file 'src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js'
20--- src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js 2016-10-07 18:48:30 +0000
21+++ src/maasserver/static/js/angular/controllers/tests/test_nodes_list.js 2017-03-02 04:56:36 +0000
22@@ -200,7 +200,7 @@
23 'Deploying Ubuntu Xenial');
24 });
25
26- it("returns status with release title when deployed", function() {
27+ it("returns release title when deployed", function() {
28 var controller = makeController();
29 var node = {
30 status: "Deployed",
31@@ -213,10 +213,10 @@
32 ]
33 };
34 expect($scope.getStatusText(node)).toBe(
35- 'Deployed Ubuntu Xenial');
36+ 'Ubuntu Xenial');
37 });
38
39- it("returns status with release title without codename", function() {
40+ it("returns release title without codename when deployed", function() {
41 var controller = makeController();
42 var node = {
43 status: "Deployed",
44@@ -229,7 +229,7 @@
45 ]
46 };
47 expect($scope.getStatusText(node)).toBe(
48- 'Deployed Ubuntu 16.04 LTS');
49+ 'Ubuntu 16.04 LTS');
50 });
51 });
52