(function() {
/**
* The Incomplete Setup page provides information to the user about what's wrong with the current configuration
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('incomplete-setup', 'incomplete-setup.html', IncompleteSetupCtrl,
{
'newLayout': true,
'title': 'Quay Enterprise Setup Incomplete'
})
}]);
function IncompleteSetupCtrl($scope, $timeout, ApiService, Features, UserService, ContainerService, CoreDialog) {
if (!Features.SUPER_USERS) {
return;
}
$scope.States = {
// Loading the state of the product.
'LOADING': 'loading',
// The configuration directory is missing.
'MISSING_CONFIG_DIR': 'missing-config-dir',
// The config.yaml exists but it is invalid.
'INVALID_CONFIG': 'config-invalid',
};
$scope.currentStep = $scope.States.LOADING;
$scope.$watch('currentStep', function(currentStep) {
switch (currentStep) {
case $scope.States.MISSING_CONFIG_DIR:
$scope.showMissingConfigDialog();
break;
case $scope.States.INVALID_CONFIG:
$scope.showInvalidConfigDialog();
break;
}
});
$scope.showInvalidConfigDialog = function() {
var message = "The config.yaml
file found in conf/stack
could not be parsed."
var title = "Invalid configuration file";
CoreDialog.fatal(title, message);
};
$scope.showMissingConfigDialog = function() {
var title = "Missing configuration volume";
var message = "It looks like Quay was not mounted with a configuration volume. The volume should be " +
"mounted into the container at /conf/stack
. " +
"
If you have a tarball, please ensure you untar it into a directory and re-run this container with: " +
"
docker run -v /path/to/config:/conf/stack" + "
docker run <name-of-image> config" + "For more information, " + "" + "Read the Setup Guide"; if (window.__is_kubernetes) { title = "Configuration Secret Missing"; message = "It looks like the Quay Enterprise secret is not present in this Kubernetes namespace." + "