Merge lp:~andreserl/maas/lp1598028_2.0 into lp:maas/2.0

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 5164
Proposed branch: lp:~andreserl/maas/lp1598028_2.0
Merge into: lp:maas/2.0
Diff against target: 133 lines (+14/-12)
6 files modified
docs/changelog.rst (+2/-0)
src/maasserver/static/js/angular/controllers/node_events.js (+2/-2)
src/maasserver/static/js/angular/controllers/tests/test_node_events.js (+4/-4)
src/maasserver/static/js/angular/factories/events.js (+1/-1)
src/maasserver/static/js/angular/factories/tests/test_events.js (+3/-3)
src/maasserver/static/partials/node-events.html (+2/-2)
To merge this branch: bzr merge lp:~andreserl/maas/lp1598028_2.0
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+300212@code.launchpad.net

Commit message

Backport trunk rev: 5179. Ensure we only shown the events for the last day, with the ability to see more events per day, to ensure WebUI doesn't freeze due to having tons of events.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

self approved as has landed in trunk rev5179

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (1.3 MiB)

The attempt to merge lp:~andreserl/maas/lp1598028_2.0 into lp:maas/2.0 failed. Below is the output from the failed tests.

Hit:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Hit:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Get:5 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [315 kB]
Get:6 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [294 kB]
Get:7 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [4,688 B]
Fetched 804 kB in 0s (1,775 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bash bind9 bind9utils build-essential bzr bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-all python3-apt python3-bson python3-convoy python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-netaddr python3-netifaces python3-novaclient python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-simplejson python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
build-essential is already the newest version (12.1ubuntu2).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubuntu3).
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest versi...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/changelog.rst'
--- docs/changelog.rst 2016-07-15 02:22:48 +0000
+++ docs/changelog.rst 2016-07-15 15:39:53 +0000
@@ -17,6 +17,8 @@
1717
18LP: #1576116 MAAS adds regions controller as DNS resolver18LP: #1576116 MAAS adds regions controller as DNS resolver
1919
20LP: #1598028 [2.0] Loading latest machine events can make web browser unresponsive
21
2022
212.0.0 (rc2)232.0.0 (rc2)
22===========24===========
2325
=== modified file 'src/maasserver/static/js/angular/controllers/node_events.js'
--- src/maasserver/static/js/angular/controllers/node_events.js 2016-03-28 13:54:47 +0000
+++ src/maasserver/static/js/angular/controllers/node_events.js 2016-07-15 15:39:53 +0000
@@ -23,7 +23,7 @@
23 $scope.node = null;23 $scope.node = null;
24 $scope.events = [];24 $scope.events = [];
25 $scope.eventsLoaded = false;25 $scope.eventsLoaded = false;
26 $scope.days = 30;26 $scope.days = 1;
2727
28 // Called once the node is loaded.28 // Called once the node is loaded.
29 function nodeLoaded(node) {29 function nodeLoaded(node) {
@@ -56,7 +56,7 @@
5656
57 // Called to load more events.57 // Called to load more events.
58 $scope.loadMore = function() {58 $scope.loadMore = function() {
59 $scope.days += 30;59 $scope.days += 1;
60 eventsManager.loadMaximumDays($scope.days);60 eventsManager.loadMaximumDays($scope.days);
61 };61 };
6262
6363
=== modified file 'src/maasserver/static/js/angular/controllers/tests/test_node_events.js'
--- src/maasserver/static/js/angular/controllers/tests/test_node_events.js 2016-03-28 13:54:47 +0000
+++ src/maasserver/static/js/angular/controllers/tests/test_node_events.js 2016-07-15 15:39:53 +0000
@@ -101,7 +101,7 @@
101 expect($scope.node).toBeNull();101 expect($scope.node).toBeNull();
102 expect($scope.events).toEqual([]);102 expect($scope.events).toEqual([]);
103 expect($scope.eventsLoaded).toEqual(false);103 expect($scope.eventsLoaded).toEqual(false);
104 expect($scope.days).toEqual(30);104 expect($scope.days).toEqual(1);
105 });105 });
106106
107 it("calls loadManager with MachinesManager", function() {107 it("calls loadManager with MachinesManager", function() {
@@ -235,7 +235,7 @@
235235
236 describe("loadMore", function() {236 describe("loadMore", function() {
237237
238 it("adds 30 days to $scope.days", function() {238 it("adds 1 days to $scope.days", function() {
239 var defer = $q.defer();239 var defer = $q.defer();
240 var controller = makeController(defer);240 var controller = makeController(defer);
241 MachinesManager._activeItem = node;241 MachinesManager._activeItem = node;
@@ -244,7 +244,7 @@
244 $rootScope.$digest();244 $rootScope.$digest();
245 $scope.loadMore();245 $scope.loadMore();
246246
247 expect($scope.days).toBe(60);247 expect($scope.days).toBe(2);
248 });248 });
249249
250 it("calls loadMaximumDays with $scope.days", function() {250 it("calls loadMaximumDays with $scope.days", function() {
@@ -258,7 +258,7 @@
258 $rootScope.$digest();258 $rootScope.$digest();
259 $scope.loadMore();259 $scope.loadMore();
260260
261 expect(manager.loadMaximumDays).toHaveBeenCalledWith(60);261 expect(manager.loadMaximumDays).toHaveBeenCalledWith(2);
262 });262 });
263 });263 });
264});264});
265265
=== modified file 'src/maasserver/static/js/angular/factories/events.js'
--- src/maasserver/static/js/angular/factories/events.js 2015-03-30 18:57:08 +0000
+++ src/maasserver/static/js/angular/factories/events.js 2016-07-15 15:39:53 +0000
@@ -19,7 +19,7 @@
19 this._handler = "event";19 this._handler = "event";
20 this._nodeId = nodeId;20 this._nodeId = nodeId;
21 this._factory = factory;21 this._factory = factory;
22 this._maxDays = 30;22 this._maxDays = 1;
23 }23 }
2424
25 EventsManager.prototype = new Manager();25 EventsManager.prototype = new Manager();
2626
=== modified file 'src/maasserver/static/js/angular/factories/tests/test_events.js'
--- src/maasserver/static/js/angular/factories/tests/test_events.js 2015-03-30 14:45:39 +0000
+++ src/maasserver/static/js/angular/factories/tests/test_events.js 2016-07-15 15:39:53 +0000
@@ -139,7 +139,7 @@
139 expect(eventManager._nodeId).toBe(nodeId);139 expect(eventManager._nodeId).toBe(nodeId);
140 expect(eventManager._handler).toBe("event");140 expect(eventManager._handler).toBe("event");
141 expect(eventManager._factory).toBe(EventsManagerFactory);141 expect(eventManager._factory).toBe(EventsManagerFactory);
142 expect(eventManager._maxDays).toBe(30);142 expect(eventManager._maxDays).toBe(1);
143 });143 });
144144
145 describe("_initBatchLoadParameters", function() {145 describe("_initBatchLoadParameters", function() {
@@ -147,7 +147,7 @@
147 it("returns parameters with node_id and max_days", function() {147 it("returns parameters with node_id and max_days", function() {
148 expect(eventManager._initBatchLoadParameters()).toEqual({148 expect(eventManager._initBatchLoadParameters()).toEqual({
149 "node_id": nodeId,149 "node_id": nodeId,
150 "max_days": 30150 "max_days": 1
151 });151 });
152 });152 });
153 });153 });
@@ -198,7 +198,7 @@
198 defer.promise);198 defer.promise);
199 spyOn(eventManager, "isLoading").and.returnValue(true);199 spyOn(eventManager, "isLoading").and.returnValue(true);
200 eventManager.loadMaximumDays(maxDays);200 eventManager.loadMaximumDays(maxDays);
201 expect(eventManager._maxDays).toBe(30);201 expect(eventManager._maxDays).toBe(1);
202202
203 defer.resolve();203 defer.resolve();
204 $rootScope.$digest();204 $rootScope.$digest();
205205
=== modified file 'src/maasserver/static/partials/node-events.html'
--- src/maasserver/static/partials/node-events.html 2016-04-11 16:23:26 +0000
+++ src/maasserver/static/partials/node-events.html 2016-07-15 15:39:53 +0000
@@ -11,8 +11,8 @@
11 <h1 class="page-header__title eight-col">11 <h1 class="page-header__title eight-col">
12 {$ node.fqdn $}12 {$ node.fqdn $}
13 <span class="page-header__title--identicator">13 <span class="page-header__title--identicator">
14 {$ events.length $} machine events in the past {$ days $} days14 {$ events.length $} machine events in the past {$ days $} day(s)
15 <a href="" class="page-header__title-loadmore" data-ng-click="loadMore()">load 30 more days</a>15 <a href="" class="page-header__title-loadmore" data-ng-click="loadMore()">load 1 more day</a>
16 </span>16 </span>
17 </h1>17 </h1>
18 <div class="page-header__actions four-col last-col">18 <div class="page-header__actions four-col last-col">

Subscribers

People subscribed via source and target branches