Some small fixes and start on handling SSL better
This commit is contained in:
parent
30209e2bda
commit
98d63e00ee
5 changed files with 23 additions and 8 deletions
|
@ -280,7 +280,6 @@
|
|||
|
||||
.config-file-field-element input {
|
||||
display: inline-block;
|
||||
width: 78px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
@ -552,6 +551,10 @@
|
|||
min-height: 100px;
|
||||
}
|
||||
|
||||
.co-dialog .modal-body h4 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.co-dialog .modal-content {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
|
|
@ -1290,7 +1290,7 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
}, 2000);
|
||||
};
|
||||
|
||||
containerService.checkStatus = function(callback) {
|
||||
containerService.checkStatus = function(callback, force_ssl) {
|
||||
var errorHandler = function(resp) {
|
||||
if (resp.status == 404 || resp.status == 502) {
|
||||
// Container has not yet come back up, so we schedule another check.
|
||||
|
@ -1301,7 +1301,8 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
|||
return ApiService.errorDisplay('Cannot load status. Please report this to support')(resp);
|
||||
};
|
||||
|
||||
ApiService.scRegistryStatus(null, null).then(callback, errorHandler, /* background */true);
|
||||
ApiService.scRegistryStatus(null, null)
|
||||
.then(callback, errorHandler, /* background */true, /* force ssl*/force_ssl);
|
||||
};
|
||||
|
||||
return containerService;
|
||||
|
|
|
@ -68,6 +68,8 @@ function SetupCtrl($scope, $timeout, ApiService, Features, UserService, Containe
|
|||
$scope.currentStep = $scope.States.LOADING;
|
||||
$scope.errors = {};
|
||||
$scope.stepProgress = [];
|
||||
$scope.hasSSL = false;
|
||||
$scope.hostname = null;
|
||||
|
||||
$scope.$watch('currentStep', function(currentStep) {
|
||||
$scope.stepProgress = $scope.getProgress(currentStep);
|
||||
|
@ -111,10 +113,14 @@ function SetupCtrl($scope, $timeout, ApiService, Features, UserService, Containe
|
|||
|
||||
$scope.showSuperuserPanel = function() {
|
||||
$('#setupModal').modal('hide');
|
||||
window.location = '/superuser';
|
||||
var prefix = scope.hasSSL ? 'https' : 'http';
|
||||
var hostname = $scope.hostname;
|
||||
window.location = prefix + '://' + hostname + '/superuser';
|
||||
};
|
||||
|
||||
$scope.configurationSaved = function() {
|
||||
$scope.configurationSaved = function(config) {
|
||||
$scope.hasSSL = config['PREFERRED_URL_SCHEME'] == 'https';
|
||||
$scope.hostname = config['SERVER_HOSTNAME'];
|
||||
$scope.currentStep = $scope.States.VALID_CONFIG;
|
||||
};
|
||||
|
||||
|
@ -255,7 +261,7 @@ function SetupCtrl($scope, $timeout, ApiService, Features, UserService, Containe
|
|||
$scope.checkStatus = function() {
|
||||
ContainerService.checkStatus(function(resp) {
|
||||
$scope.currentStep = resp['status'];
|
||||
});
|
||||
}, $scope.hasSSL);
|
||||
};
|
||||
|
||||
// Load the initial status.
|
||||
|
|
|
@ -180,7 +180,7 @@ angular.module("core-config-setup", ['angularFileUpload'])
|
|||
$scope.savingConfiguration = false;
|
||||
$scope.mapped.$hasChanges = false;
|
||||
$('#validateAndSaveModal').modal('hide');
|
||||
$scope.configurationSaved({});
|
||||
$scope.configurationSaved({'config': $scope.config});
|
||||
}, ApiService.errorDisplay('Could not save configuration. Please report this error.'));
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
|
||||
<div class="config-setup-tool" is-active="isStep(currentStep, States.CONFIG)"
|
||||
configuration-saved="configurationSaved()"></div>
|
||||
configuration-saved="configurationSaved(config)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -107,6 +107,11 @@
|
|||
<h4>Installation and setup of <span class="registry-name"></span> is complete</h4>
|
||||
You can now invite users to join, create organizations and start pushing and pulling
|
||||
repositories.
|
||||
|
||||
<strong ng-if="hasSSL" style="margin-top: 20px;">
|
||||
Note: SSL is enabled. Please make sure to visit with
|
||||
an <u>https</u> prefix
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<!-- Content: VALID_CONFIG -->
|
||||
|
|
Reference in a new issue