Implement new step-by-step setup

This commit is contained in:
Joseph Schorr 2015-01-23 17:19:15 -05:00
parent 28d319ad26
commit c8229b9c8a
20 changed files with 1393 additions and 599 deletions

View file

@ -7,7 +7,8 @@ angular.module("core-config-setup", ['angularFileUpload'])
transclude: true,
restrict: 'C',
scope: {
'isActive': '=isActive'
'isActive': '=isActive',
'configurationSaved': '&configurationSaved'
},
controller: function($rootScope, $scope, $element, $timeout, ApiService) {
$scope.HOSTNAME_REGEX = '^[a-zA-Z-0-9\.]+(:[0-9]+)?$';
@ -166,6 +167,10 @@ angular.module("core-config-setup", ['angularFileUpload'])
$scope.saveConfiguration = function() {
$scope.savingConfiguration = true;
// Make sure to note that fully verified setup is completed. We use this as a signal
// in the setup tool.
$scope.config['SETUP_COMPLETE'] = true;
var data = {
'config': $scope.config,
'hostname': window.location.host
@ -173,7 +178,9 @@ angular.module("core-config-setup", ['angularFileUpload'])
ApiService.scUpdateConfig(data).then(function(resp) {
$scope.savingConfiguration = false;
$scope.mapped.$hasChanges = false
$scope.mapped.$hasChanges = false;
$('#validateAndSaveModal').modal('hide');
$scope.configurationSaved({});
}, ApiService.errorDisplay('Could not save configuration. Please report this error.'));
};