diff --git a/app/scripts/directives/create/nextSteps.js b/app/scripts/directives/create/nextSteps.js
index 36fa63e034..0f5cafc621 100644
--- a/app/scripts/directives/create/nextSteps.js
+++ b/app/scripts/directives/create/nextSteps.js
@@ -3,6 +3,7 @@
angular.module('openshiftConsole').component('nextSteps', {
controller: [
'ProcessedTemplateService',
+ 'Navigate',
NextSteps
],
bindings: {
@@ -10,12 +11,13 @@ angular.module('openshiftConsole').component('nextSteps', {
projectName: '<',
loginBaseUrl: '<',
fromSampleRepo: '<',
- createdBuildConfig: '<'
+ createdBuildConfig: '<',
+ onContinue: '<'
},
templateUrl: 'views/directives/next-steps.html'
});
-function NextSteps(ProcessedTemplateService) {
+function NextSteps(ProcessedTemplateService, Navigate) {
var ctrl = this;
ctrl.showParamsTable = false;
@@ -68,4 +70,11 @@ function NextSteps(ProcessedTemplateService) {
ctrl.showParamsTable = true;
};
+ ctrl.goToOverview = function() {
+ if (_.isFunction(ctrl.onContinue)) {
+ ctrl.onContinue();
+ }
+ Navigate.toProjectOverview(ctrl.projectName);
+ };
+
}
diff --git a/app/scripts/directives/deployImage.js b/app/scripts/directives/deployImage.js
index 40c6ec240c..8c84f82549 100644
--- a/app/scripts/directives/deployImage.js
+++ b/app/scripts/directives/deployImage.js
@@ -17,7 +17,7 @@ angular.module("openshiftConsole")
return {
restrict: 'E',
scope: {
- projectName: '=',
+ project: '=',
context: '=',
alerts: '=',
isDialog: '='
@@ -52,7 +52,7 @@ angular.module("openshiftConsole")
var configMapDataOrdered = [];
var secretDataOrdered = [];
- var context = {namespace: $scope.projectName};
+ var context = {namespace: $scope.project.metadata.name};
$scope.valueFromObjects = [];
DataService.list("configmaps", context, null, { errorNotification: false }).then(function(configMapData) {
@@ -213,12 +213,12 @@ angular.module("openshiftConsole")
var generatedResources;
var createResources = function() {
var titles = {
- started: "Deploying image " + $scope.app.name + " to project " + $scope.projectName + ".",
- success: "Deployed image " + $scope.app.name + " to project " + $scope.projectName + ".",
- failure: "Failed to deploy image " + $scope.app.name + " to project " + $scope.projectName + "."
+ started: "Deploying image " + $scope.app.name + " to project " + $scope.project.metadata.name + ".",
+ success: "Deployed image " + $scope.app.name + " to project " + $scope.project.metadata.name + ".",
+ failure: "Failed to deploy image " + $scope.app.name + " to project " + $scope.project.metadata.name + "."
};
TaskList.clear();
- TaskList.add(titles, {}, $scope.projectName, function() {
+ TaskList.add(titles, {}, $scope.project.metadata.name, function() {
var d = $q.defer();
DataService.batch(generatedResources, $scope.context).then(function(result) {
var alerts, hasErrors = !_.isEmpty(result.failure);
@@ -252,11 +252,11 @@ angular.module("openshiftConsole")
});
if ($scope.isDialog) {
$scope.$emit('deployImageNewAppCreated', {
- project: $scope.projectName,
+ project: $scope.project,
appName: $scope.app.name
});
} else {
- Navigate.toNextSteps($scope.app.name, $scope.projectName);
+ Navigate.toNextSteps($scope.app.name, $scope.project.metadata.name);
}
};
@@ -303,7 +303,7 @@ angular.module("openshiftConsole")
$scope.alerts = {};
generatedResources = getResources();
- var nameTakenPromise = ApplicationGenerator.ifResourcesDontExist(generatedResources, $scope.projectName);
+ var nameTakenPromise = ApplicationGenerator.ifResourcesDontExist(generatedResources, $scope.project.metadata.name);
var checkQuotaPromise = QuotaService.getLatestQuotaAlerts(generatedResources, $scope.context);
// Don't want to wait for the name checks to finish before making the calls to quota
// so kick off the requests above and then chain the promises here
diff --git a/app/scripts/directives/deployImageDialog.js b/app/scripts/directives/deployImageDialog.js
index 1fa555f022..0d6c8da1f6 100644
--- a/app/scripts/directives/deployImageDialog.js
+++ b/app/scripts/directives/deployImageDialog.js
@@ -30,8 +30,6 @@ function DeployImageDialog($scope, DataService) {
$scope.$on('deployImageNewAppCreated', function(event, message) {
ctrl.selectedProject = message.project;
- console.log("DEPLOYED IMAGE", message);
- // showResults(); go to "Next Steps" wizard step
});
ctrl.close = function() {
diff --git a/app/views/create.html b/app/views/create.html
index 18c46bd950..b451c0a3f2 100644
--- a/app/views/create.html
+++ b/app/views/create.html
@@ -13,7 +13,7 @@