Merge lp:~blake-rouse/maas/fix-1484696-2 into lp:maas/trunk

Proposed by Blake Rouse on 2015-09-24
Status: Merged
Approved by: Andres Rodriguez on 2015-09-24
Approved revision: 4306
Merged at revision: 4311
Proposed branch: lp:~blake-rouse/maas/fix-1484696-2
Merge into: lp:maas/trunk
Diff against target: 41 lines (+19/-1)
2 files modified
src/maasserver/static/js/angular/factories/region.js (+6/-1)
src/maasserver/static/js/angular/factories/tests/test_region.js (+13/-0)
To merge this branch: bzr merge lp:~blake-rouse/maas/fix-1484696-2
Reviewer Review Type Date Requested Status
Andres Rodriguez Approve on 2015-09-24
Gavin Panella (community) 2015-09-24 Approve on 2015-09-24
Review via email: mp+272274@code.launchpad.net

Commit message

Only include the ':' in _buildUrl if a port is defined.

This fixes an issue where if the ':' is included apache will not proxy the connection.

To post a comment you must log in.
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve
Gavin Panella (allenap) wrote :

One issue, couple of typos, but +1.

review: Approve
Blake Rouse (blake-rouse) :
MAAS Lander (maas-lander) wrote :
Download full text (973.1 KiB)

The attempt to merge lp:~blake-rouse/maas/fix-1484696-2 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [63.5 kB]
Get:5 http://security.ubuntu.com trusty-security/main Sources [95.8 kB]
Get:6 http://security.ubuntu.com trusty-security/universe Sources [31.1 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Get:7 http://security.ubuntu.com trusty-security/main amd64 Packages [344 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:8 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [236 kB]
Get:9 http://security.ubuntu.com trusty-security/universe amd64 Packages [116 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Get:10 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [138 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:11 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [622 kB]
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [319 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 2,031 kB in 3s (611 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential 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 pep8 phantomjs postgresql pyflakes python-apt python-bson python-bzrlib python-convoy python-coverage python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth python-ope...

MAAS Lander (maas-lander) wrote :
Download full text (973.4 KiB)

The attempt to merge lp:~blake-rouse/maas/fix-1484696-2 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [63.5 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Get:5 http://security.ubuntu.com trusty-security/main Sources [95.8 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:6 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [236 kB]
Get:7 http://security.ubuntu.com trusty-security/universe Sources [31.1 kB]
Get:8 http://security.ubuntu.com trusty-security/main amd64 Packages [344 kB]
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [138 kB]
Get:10 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [622 kB]
Get:11 http://security.ubuntu.com trusty-security/universe amd64 Packages [116 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [319 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 2,031 kB in 3s (617 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential 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 pep8 phantomjs postgresql pyflakes python-apt python-bson python-bzrlib python-convoy python-coverage python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth python-ope...

MAAS Lander (maas-lander) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

MAAS Lander (maas-lander) wrote :
Download full text (1.1 MiB)

The attempt to merge lp:~blake-rouse/maas/fix-1484696-2 into lp:maas failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Get:2 http://security.ubuntu.com trusty-security Release [63.5 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Get:3 http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Get:4 http://nova.clouds.archive.ubuntu.com trusty-updates Release [63.5 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Get:5 http://security.ubuntu.com trusty-security/main Sources [95.8 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Get:6 http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources [236 kB]
Get:7 http://security.ubuntu.com trusty-security/universe Sources [31.1 kB]
Get:8 http://security.ubuntu.com trusty-security/main amd64 Packages [344 kB]
Get:9 http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources [138 kB]
Get:10 http://security.ubuntu.com trusty-security/universe amd64 Packages [116 kB]
Get:11 http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [622 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:12 http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [319 kB]
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 2,031 kB in 3s (617 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 authbind bind9 bind9utils build-essential 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 pep8 phantomjs postgresql pyflakes python-apt python-bson python-bzrlib python-convoy python-coverage python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-extras python-fixtures python-flake8 python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lxml python-mock python-netaddr python-netifaces python-nose python-oauth python-ope...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/maasserver/static/js/angular/factories/region.js'
--- src/maasserver/static/js/angular/factories/region.js 2015-08-19 15:22:03 +0000
+++ src/maasserver/static/js/angular/factories/region.js 2015-09-24 18:41:19 +0000
@@ -188,7 +188,12 @@
188 path += '/';188 path += '/';
189 }189 }
190190
191 url = proto + "://" + host + ":" + port + path + "ws";191 // Build the URL. Include the :port only if it has a value.
192 url = proto + "://" + host;
193 if(angular.isString(port) && port.length > 0){
194 url += ":" + port;
195 }
196 url += path + "ws";
192197
193 // Include the csrftoken in the URL if it's defined.198 // Include the csrftoken in the URL if it's defined.
194 csrftoken = $cookies.csrftoken;199 csrftoken = $cookies.csrftoken;
195200
=== modified file 'src/maasserver/static/js/angular/factories/tests/test_region.js'
--- src/maasserver/static/js/angular/factories/tests/test_region.js 2015-08-19 15:22:39 +0000
+++ src/maasserver/static/js/angular/factories/tests/test_region.js 2015-09-24 18:41:19 +0000
@@ -356,6 +356,19 @@
356 angular.element.and.callThrough();356 angular.element.and.callThrough();
357 });357 });
358358
359 it("doesnt include ':' when no port given", function() {
360 if(angular.isString($window.location.port) &&
361 $window.location.port.length > 0) {
362 expect(RegionConnection._buildUrl()).toBe(
363 "ws://" + $window.location.hostname + ":" +
364 $window.location.port + $window.location.pathname + "/ws");
365 } else {
366 expect(RegionConnection._buildUrl()).toBe(
367 "ws://" + $window.location.hostname +
368 $window.location.pathname + "/ws");
369 }
370 });
371
359 it("includes csrftoken if cookie defined", function() {372 it("includes csrftoken if cookie defined", function() {
360 csrftoken = makeName('csrftoken');373 csrftoken = makeName('csrftoken');
361 // No need to organize a cleanup: cookies are reset before each374 // No need to organize a cleanup: cookies are reset before each