Remove old setup page from main app
Change page for incomplete setup Remove old endpoints not in use
This commit is contained in:
parent
8eb7d73f22
commit
6afc00bf77
28 changed files with 100 additions and 4710 deletions
74
static/js/pages/incomplete-setup.js
Normal file
74
static/js/pages/incomplete-setup.js
Normal file
|
@ -0,0 +1,74 @@
|
|||
(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 <code>config.yaml</code> file found in <code>conf/stack</code> could not be parsed."
|
||||
var title = "Invalid configuration file";
|
||||
CoreDialog.fatal(title, message);
|
||||
};
|
||||
|
||||
|
||||
$scope.showMissingConfigDialog = function() {
|
||||
var message = "It looks like Quay was not mounted with a configuration volume. The volume should be " +
|
||||
"mounted into the container at <code>/conf/stack</code>. " +
|
||||
"<br>If you have a tarball, please ensure you untar it into a directory and re-run this container with: " +
|
||||
"<br><br><pre>docker run -v /path/to/config:/conf/stack</pre>" +
|
||||
"<br>If you haven't configured your Quay instance, please run the container with: " +
|
||||
"<br><br><pre>docker run <name-of-image> config </pre>" +
|
||||
"For more information, " +
|
||||
"<a href='https://coreos.com/docs/enterprise-registry/initial-setup/'>" +
|
||||
"Read the Setup Guide</a>";
|
||||
|
||||
var title = "Missing configuration volume";
|
||||
CoreDialog.fatal(title, message);
|
||||
};
|
||||
|
||||
$scope.checkStatus = function() {
|
||||
ContainerService.checkStatus(function(resp) {
|
||||
$scope.currentStep = resp['status'];
|
||||
}, $scope.currentConfig);
|
||||
};
|
||||
|
||||
// Load the initial status.
|
||||
$scope.checkStatus();
|
||||
};
|
||||
})();
|
Reference in a new issue