Fix error case in uploading tar, more comments

This commit is contained in:
Sam Chow 2018-06-22 13:21:44 -04:00
parent d6d0bb640a
commit 872be8605a
6 changed files with 37 additions and 17 deletions

View file

@ -31,10 +31,9 @@ const templateUrl = require('./setup.html');
$scope.HOSTNAME_REGEX = '^[a-zA-Z-0-9_\.\-]+(:[0-9]+)?$';
$scope.validateHostname = function(hostname) {
// TODO(sam): maybe revert?
// if (hostname.indexOf('127.0.0.1') == 0 || hostname.indexOf('localhost') == 0) {
// return 'Please specify a non-localhost hostname. "localhost" will refer to the container, not your machine.'
// }
if (hostname.indexOf('127.0.0.1') == 0 || hostname.indexOf('localhost') == 0) {
return 'Please specify a non-localhost hostname. "localhost" will refer to the container, not your machine.'
}
return null;
};