Fixes installer including some c# bits, fixes the hash bang to be back to normal
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
// fixme - this should live in its own independent file! NOT web.config!
|
||||
var value = ConfigurationManager.AppSettings["umbracoConfigurationStatus"];
|
||||
return SemVersion.TryParse(value, out var semver) ? semver : null;
|
||||
return value.IsNullOrWhiteSpace() ? null : SemVersion.TryParse(value, out var semver) ? semver : null;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
LazyLoad.js([
|
||||
'lib/jquery/jquery.min.js',
|
||||
/* 1.1.5 */
|
||||
'lib/angular/1.1.5/angular.min.js',
|
||||
'lib/angular/1.1.5/angular-cookies.min.js',
|
||||
'lib/angular/1.1.5/angular-mobile.min.js',
|
||||
'lib/angular/1.1.5/angular-mocks.js',
|
||||
'lib/angular/1.1.5/angular-sanitize.min.js',
|
||||
|
||||
'lib/angular/angular.js',
|
||||
'lib/angular-cookies/angular-cookies.js',
|
||||
'lib/angular-touch/angular-touch.js',
|
||||
'lib/angular-sanitize/angular-sanitize.js',
|
||||
'lib/underscore/underscore-min.js',
|
||||
'lib/angular-ui-sortable/sortable.js',
|
||||
'lib/angular-ui-sortable/sortable.js',
|
||||
'js/installer.app.js',
|
||||
'js/umbraco.directives.js',
|
||||
'js/umbraco.installer.js'
|
||||
|
||||
@@ -2,6 +2,6 @@ var app = angular.module('umbraco', [
|
||||
'umbraco.directives',
|
||||
'umbraco.install',
|
||||
'ngCookies',
|
||||
'ngMobile',
|
||||
'ngSanitize'
|
||||
]);
|
||||
'ngSanitize',
|
||||
'ngTouch'
|
||||
]);
|
||||
|
||||
@@ -233,56 +233,59 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
|
||||
|
||||
function processInstallStep() {
|
||||
|
||||
$http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostPerformInstall", _installerModel)
|
||||
.success(function(data, status, headers, config) {
|
||||
if (!data.complete) {
|
||||
$http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostPerformInstall", _installerModel)
|
||||
.then(function (response) {
|
||||
var data = response.data;
|
||||
if (!data.complete) {
|
||||
|
||||
//progress feedback
|
||||
service.status.progress = calculateProgress(service.status.steps, data.nextStep);
|
||||
//progress feedback
|
||||
service.status.progress = calculateProgress(service.status.steps, data.nextStep);
|
||||
|
||||
if (data.view) {
|
||||
//set the current view and model to whatever the process returns, the view is responsible for retriggering install();
|
||||
var v = resolveView(data.view);
|
||||
service.status.current = { view: v, model: data.model };
|
||||
if (data.view) {
|
||||
//set the current view and model to whatever the process returns, the view is responsible for retriggering install();
|
||||
var v = resolveView(data.view);
|
||||
service.status.current = { view: v, model: data.model };
|
||||
|
||||
//turn off loading bar and feedback
|
||||
service.switchToConfiguration();
|
||||
}
|
||||
else {
|
||||
var desc = getDescriptionForStepName(service.status.steps, data.nextStep);
|
||||
if (desc) {
|
||||
service.status.feedback = desc;
|
||||
}
|
||||
processInstallStep();
|
||||
}
|
||||
}
|
||||
else {
|
||||
service.complete();
|
||||
}
|
||||
}).error(function(data, status, headers, config) {
|
||||
//need to handle 500's separately, this will happen if something goes wrong outside
|
||||
// of the installer (like app startup events or something) and these will get returned as text/html
|
||||
// not as json. If this happens we can't actually load in external views since they will YSOD as well!
|
||||
//turn off loading bar and feedback
|
||||
service.switchToConfiguration();
|
||||
}
|
||||
else {
|
||||
var desc = getDescriptionForStepName(service.status.steps, data.nextStep);
|
||||
if (desc) {
|
||||
service.status.feedback = desc;
|
||||
}
|
||||
processInstallStep();
|
||||
}
|
||||
}
|
||||
else {
|
||||
service.complete();
|
||||
}
|
||||
}, function (response) {
|
||||
|
||||
var data = response.data;
|
||||
var status = response.status;
|
||||
//need to handle 500's separately, this will happen if something goes wrong outside
|
||||
// of the installer (like app startup events or something) and these will get returned as text/html
|
||||
// not as json. If this happens we can't actually load in external views since they will YSOD as well!
|
||||
// so we need to display this in our own internal way
|
||||
|
||||
if (status >= 500 && status < 600) {
|
||||
service.status.current = { view: "ysod", model: null };
|
||||
var ysod = data;
|
||||
//we need to manually write the html to the iframe - the html contains full html markup
|
||||
$timeout(function () {
|
||||
document.getElementById('ysod').contentDocument.write(ysod);
|
||||
}, 500);
|
||||
}
|
||||
else {
|
||||
//this is where we handle installer error
|
||||
var v = data.view ? resolveView(data.view) : resolveView("error");
|
||||
var model = data.model ? data.model : data;
|
||||
service.status.current = { view: v, model: model };
|
||||
}
|
||||
|
||||
service.switchToConfiguration();
|
||||
|
||||
});
|
||||
if (status >= 500 && status < 600) {
|
||||
service.status.current = { view: "ysod", model: null };
|
||||
var ysod = data;
|
||||
//we need to manually write the html to the iframe - the html contains full html markup
|
||||
$timeout(function () {
|
||||
document.getElementById('ysod').contentDocument.write(ysod);
|
||||
}, 500);
|
||||
}
|
||||
else {
|
||||
//this is where we handle installer error
|
||||
var v = data.view ? resolveView(data.view) : resolveView("error");
|
||||
var model = data.model ? data.model : data;
|
||||
service.status.current = { view: v, model: model };
|
||||
}
|
||||
|
||||
service.switchToConfiguration();
|
||||
});
|
||||
}
|
||||
processInstallStep();
|
||||
},
|
||||
|
||||
@@ -193,5 +193,6 @@ app.config(function ($routeProvider) {
|
||||
.otherwise({ redirectTo: '/login' });
|
||||
}).config(function ($locationProvider) {
|
||||
|
||||
$locationProvider.html5Mode(false).hashPrefix(''); //turn html5 mode off
|
||||
$locationProvider.html5Mode(false); //turn html5 mode off
|
||||
$locationProvider.hashPrefix('');
|
||||
});
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
/// <reference path="../../../../lib/angular/1.1.5/angular.js" />
|
||||
/// <reference path="../../../lib/angular/angular-mocks.js" />
|
||||
/// <reference path="../../../../src/app.js" />
|
||||
/// <reference path="../../../../src/views/templates/edit.controller.js" />
|
||||
|
||||
(function() {
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
describe("templates editor controller",
|
||||
@@ -17,22 +12,6 @@
|
||||
controller,
|
||||
nada = function() {};
|
||||
|
||||
// UNCOMMENT TO RUN WITH RESHARPERS TESTRUNNER FOR JS
|
||||
//beforeEach(function() {
|
||||
// angular.module('umbraco.filters', []);
|
||||
// angular.module('umbraco.directives', []);
|
||||
// angular.module('umbraco.resources', []);
|
||||
// angular.module('umbraco.services', []);
|
||||
// angular.module('umbraco.packages', []);
|
||||
// angular.module('umbraco.views', []);
|
||||
// angular.module('ngCookies', []);
|
||||
// angular.module('ngSanitize', []);
|
||||
// angular.module('ngMobile', []);
|
||||
// angular.module('tmh.dynamicLocale', []);
|
||||
// angular.module('ngFileUpload', []);
|
||||
// angular.module('LocalStorageModule', []);
|
||||
//});
|
||||
|
||||
beforeEach(module("umbraco"));
|
||||
|
||||
beforeEach(inject(function($controller, $rootScope, $q) {
|
||||
|
||||
@@ -2,6 +2,6 @@ var app = angular.module('umbraco', [
|
||||
'umbraco.directives',
|
||||
'umbraco.install',
|
||||
'ngCookies',
|
||||
'ngMobile',
|
||||
'ngSanitize'
|
||||
]);
|
||||
'ngSanitize',
|
||||
'ngTouch'
|
||||
]);
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
<p>This is most likely due to an error during application startup</p>
|
||||
<iframe id="ysod"></iframe>
|
||||
</div>
|
||||
<div ng-switch-default ng-include="installer.current.view"></div>
|
||||
<div ng-switch-default>
|
||||
<div ng-include="installer.current.view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,7 +19,14 @@ namespace Umbraco.Web.Install.InstallSteps
|
||||
{
|
||||
get
|
||||
{
|
||||
var currentVersion = UmbracoVersion.Local.ToString();
|
||||
var currentVersion = UmbracoVersion.Local;
|
||||
|
||||
//fixme - in this case there's a db but the version is cleared which is fine and a normal way to force the upgrader
|
||||
// to execute, but before we would detect the current version via the DB like DatabaseSchemaResult.DetermineInstalledVersion
|
||||
// what now, do we need to?
|
||||
if (currentVersion == null)
|
||||
currentVersion = new Semver.SemVersion(0);
|
||||
|
||||
var newVersion = UmbracoVersion.SemanticVersion.ToString();
|
||||
|
||||
string FormatGuidState(string value)
|
||||
|
||||
Reference in New Issue
Block a user