diff --git a/app/scripts/controllers/create/nextSteps.js b/app/scripts/controllers/create/nextSteps.js index 032bd7124b..ff2f0ad83b 100644 --- a/app/scripts/controllers/create/nextSteps.js +++ b/app/scripts/controllers/create/nextSteps.js @@ -33,6 +33,7 @@ angular.module("openshiftConsole") $scope.projectName = $routeParams.project; $scope.fromSampleRepo = $routeParams.fromSample; + $scope.name = $routeParams.breadcrumbTitle || $routeParams.name; $scope.breadcrumbs = [ { diff --git a/app/scripts/directives/create/nextSteps.js b/app/scripts/directives/create/nextSteps.js index 54369ec18c..7143268521 100644 --- a/app/scripts/directives/create/nextSteps.js +++ b/app/scripts/directives/create/nextSteps.js @@ -13,7 +13,10 @@ loginBaseUrl: '<', fromSampleRepo: '<', createdBuildConfig: '<', - onContinue: '<' + onContinue: '<', + showProjectName: '<', + name: '<', + isDialog: '<' }, templateUrl: 'views/directives/next-steps.html' }); diff --git a/app/scripts/directives/deployImageDialog.js b/app/scripts/directives/deployImageDialog.js index 50da2f24ba..be5ea8eee0 100644 --- a/app/scripts/directives/deployImageDialog.js +++ b/app/scripts/directives/deployImageDialog.js @@ -4,6 +4,7 @@ angular.module('openshiftConsole').component('deployImageDialog', { controller: [ '$scope', + '$routeParams', 'DataService', DeployImageDialog ], @@ -16,12 +17,16 @@ templateUrl: 'views/directives/deploy-image-dialog.html' }); - function DeployImageDialog($scope, DataService) { + function DeployImageDialog($scope, $routeParams, DataService) { var ctrl = this; ctrl.$onInit = function() { ctrl.loginBaseUrl = DataService.openshiftAPIBaseUrl(); ctrl.currentStep = "Image"; + // if on the landing page, show the project name in next-steps + if (!$routeParams.project) { + ctrl.showProjectName = true; + } }; ctrl.deployImage = function() { @@ -30,6 +35,7 @@ $scope.$on('deployImageNewAppCreated', function(event, message) { ctrl.selectedProject = message.project; + ctrl.appName = message.appName; ctrl.deployImageNewAppCreated = true; ctrl.currentStep = "Results"; }); diff --git a/app/scripts/directives/fromFile.js b/app/scripts/directives/fromFile.js index 6fdd30161d..7ea9982e66 100644 --- a/app/scripts/directives/fromFile.js +++ b/app/scripts/directives/fromFile.js @@ -350,11 +350,14 @@ angular.module("openshiftConsole") DataService.create(APIService.kindToResource(resource.kind), null, resource, {namespace: $scope.input.selectedProject.metadata.name}).then( // create resource success function() { - var kind = humanizeKind(resource.kind); - NotificationsService.addNotification({ - type: "success", - message: _.capitalize(kind) + " " + resource.metadata.name + " was successfully created." - }); + if (!$scope.isDialog) { + var kind = humanizeKind(resource.kind); + NotificationsService.addNotification({ + type: "success", + message: _.capitalize(kind) + " " + resource.metadata.name + " was successfully created." + }); + } + redirect(); }, // create resource failure @@ -371,11 +374,14 @@ angular.module("openshiftConsole") DataService.update(APIService.kindToResource(resource.kind), resource.metadata.name, resource, {namespace: $scope.input.selectedProject.metadata.name}).then( // update resource success function() { - var kind = humanizeKind(resource.kind); - NotificationsService.addNotification({ - type: "success", - message: _.capitalize(kind) + " " + resource.metadata.name + " was successfully updated." - }); + if (!$scope.isDialog) { + var kind = humanizeKind(resource.kind); + NotificationsService.addNotification({ + type: "success", + message: _.capitalize(kind) + " " + resource.metadata.name + " was successfully updated." + }); + } + redirect(); }, // update resource failure diff --git a/app/scripts/directives/fromFileDialog.js b/app/scripts/directives/fromFileDialog.js index 06134299da..01c50ca035 100644 --- a/app/scripts/directives/fromFileDialog.js +++ b/app/scripts/directives/fromFileDialog.js @@ -5,6 +5,8 @@ controller: [ '$scope', '$timeout', + '$routeParams', + '$filter', 'DataService', FromFileDialog ], @@ -17,12 +19,16 @@ templateUrl: 'views/directives/from-file-dialog.html' }); - function FromFileDialog($scope, $timeout, DataService) { + function FromFileDialog($scope, $timeout, $routeParams, $filter, DataService) { var ctrl = this; ctrl.$onInit = function() { ctrl.alerts = {}; ctrl.loginBaseUrl = DataService.openshiftAPIBaseUrl(); + // if on the landing page, show the project name in next-steps + if (!$routeParams.project) { + ctrl.showProjectName = true; + } }; function getIconClass() { @@ -42,6 +48,7 @@ ctrl.selectedProject = message.project; ctrl.template = message.template; ctrl.iconClass = getIconClass(); + ctrl.name = "YAML / JSON"; // Need to let the current digest loop finish so the template config step becomes visible or the wizard will throw an error // from the change to currentStep $timeout(function() { @@ -51,6 +58,7 @@ $scope.$on('templateInstantiated', function(event, message) { ctrl.selectedProject = message.project; + ctrl.name = $filter('displayName')(ctrl.template); ctrl.currentStep = "Results"; }); @@ -73,7 +81,7 @@ } }; - ctrl.currentStep = "JSON / YAML"; + ctrl.currentStep = "YAML / JSON"; ctrl.nextCallback = function (step) { if (step.stepId === 'file') { diff --git a/app/scripts/directives/processTemplateDialog.js b/app/scripts/directives/processTemplateDialog.js index c64bb7d83e..67a7c3520c 100644 --- a/app/scripts/directives/processTemplateDialog.js +++ b/app/scripts/directives/processTemplateDialog.js @@ -5,6 +5,7 @@ controller: [ '$scope', '$filter', + '$routeParams', 'Catalog', 'DataService', 'KeywordService', @@ -25,6 +26,7 @@ function ProcessTemplateDialog($scope, $filter, + $routeParams, Catalog, DataService, KeywordService, @@ -78,7 +80,6 @@ onShow: showResults }; - ctrl.$onInit = function() { ctrl.loginBaseUrl = DataService.openshiftAPIBaseUrl(); ctrl.preSelectedProject = ctrl.selectedProject = ctrl.project; @@ -113,6 +114,10 @@ appliedFilters: [], onFilterChange: filterChange }; + // if on the landing page, show the project name in next-steps + if (!$routeParams.project) { + ctrl.showProjectName = true; + } }; ctrl.$onChanges = function(changes) { diff --git a/app/styles/_core.less b/app/styles/_core.less index 6829314460..8e8e260510 100644 --- a/app/styles/_core.less +++ b/app/styles/_core.less @@ -703,16 +703,13 @@ label.checkbox { } .template-message { - background-color: #d9edf7; - border-color: #31708f; - border-style: solid; - border-width: 1px; - color: black; + background-color: transparent; + border: 1px solid @color-pf-black-300; .resource-description { - margin-bottom: 0; font-family: @font-family-monospace; // Consistent font-size with the CLI examples in code blocks below the template message. font-size: (@font-size-base - 1); + margin-bottom: 0; } } diff --git a/app/views/create/next-steps.html b/app/views/create/next-steps.html index bb67fe0d8a..d7ef9d5186 100644 --- a/app/views/create/next-steps.html +++ b/app/views/create/next-steps.html @@ -1,15 +1,16 @@
+ Continue to the project overview. +
-Go to the overview page to see more details about this project. Make sure you don't already have services, build configs, deployment configs, or other resources with the same names you are trying to create. Refer to the documentation for creating new applications for more information.
-You may want to use the oc
command line tool to help with troubleshooting. After downloading and installing it, you can log in, switch to this particular project, and try some commands :
oc login {{$ctrl.loginBaseUrl}} -oc project {{$ctrl.projectName}} -oc logs -h- -
For more information about the command line tools, check the CLI Reference and Basic CLI Operations.
-The web console is convenient, but if you need deeper control you may want to try our command line tools.
- -Download and install the oc
command line tool. After that, you can start by logging in, switching to this particular project, and displaying an overview of it, by doing:
oc login {{$ctrl.loginBaseUrl}} -oc project {{$ctrl.projectName}} -oc status- -
For more information about the command line tools, check the CLI Reference and Basic CLI Operations.
-
+ You are set up to use the example git repository. If you would like to modify the source code, fork the
+ A GitHub webhook trigger has been created for the {{$ctrl.createdBuildConfig.metadata.name}} build config. +
- You are set up to use the example git repository. If you would like to modify the source code, fork the
- A GitHub webhook trigger has been created for the {{$ctrl.createdBuildConfig.metadata.name}} build config. -
-- You can configure the webhook in the forked repository's settings, using the following payload URL: -
-
-
- You can now set up the webhook in the GitHub repository settings if you own it, in {{$ctrl.createdBuildConfig.spec.source.git.uri | githubLink}}/settings/hooks, using the following payload URL and specifying a Content type of application/json
:
-
-
- Your source does not appear to be a URL to a GitHub repository. If you have a GitHub repository that you want to trigger this build from then use the following payload URL and specifying a Content type of application/json
:
-
-
+
+ You can now set up the webhook in the GitHub repository settings if you own it, in {{$ctrl.createdBuildConfig.spec.source.git.uri | githubLink}}/settings/hooks, using the following payload URL and specifying a Content type of application/json
:
+
+
+ Your source does not appear to be a URL to a GitHub repository. If you have a GitHub repository that you want to trigger this build from then use the following payload URL and specifying a Content type of application/json
:
+
+
These parameters often include things like passwords. If you will need to reference these values later, copy them to a safe location. Parameters {{paramName}}, were generated automatically. Parameter {{$ctrl.parameters.generated[0]}} was generated automatically. diff --git a/app/views/directives/process-template-dialog/process-template-results.html b/app/views/directives/process-template-dialog/process-template-results.html index ab4b4151e1..9aada385db 100644 --- a/app/views/directives/process-template-dialog/process-template-results.html +++ b/app/views/directives/process-template-dialog/process-template-results.html @@ -3,6 +3,9 @@ project="$ctrl.selectedProject" project-name="$ctrl.selectedProject.metadata.name" login-base-url="$ctrl.loginBaseUrl" - on-continue="$ctrl.close"> + on-continue="$ctrl.close" + show-project-name="$ctrl.showProjectName" + name="$ctrl.template | displayName" + is-dialog="true">
\n" + + "Continue to the project overview.\n" + + "
\n" + + "\n" + + "Go to the overview page to see more details about this project. Make sure you don't already have services, build configs, deployment configs, or other resources with the same names you are trying to create. Refer to the documentation for creating new applications for more information.
\n" + - "You may want to use the oc
command line tool to help with troubleshooting. After downloading and installing it, you can log in, switch to this particular project, and try some commands :
oc login {{$ctrl.loginBaseUrl}}\n" + - "oc project {{$ctrl.projectName}}\n" + - "oc logs -h\n" + - "
For more information about the command line tools, check the CLI Reference and Basic CLI Operations.
\n" + - "The web console is convenient, but if you need deeper control you may want to try our command line tools.
\n" + - "Download and install the oc
command line tool. After that, you can start by logging in, switching to this particular project, and displaying an overview of it, by doing:
oc login {{$ctrl.loginBaseUrl}}\n" + - "oc project {{$ctrl.projectName}}\n" + - "oc status\n" + - "
For more information about the command line tools, check the CLI Reference and Basic CLI Operations.
\n" + - "\n" +
"You are set up to use the example git repository. If you would like to modify the source code, fork the
These parameters often include things like passwords. If you will need to reference these values later, copy them to a safe location.\n" + " 1\">Parameters {{paramName}}, were generated automatically.\n" + "Parameter {{$ctrl.parameters.generated[0]}} was generated automatically.\n" + @@ -8914,7 +8937,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function( $templateCache.put('views/directives/process-template-dialog/process-template-results.html', "
\n Sample Repository:\n \x3c!-- TODO: Use Git link filter, needs to be added to origin-web-common --\x3e\n \n
\n\n Continue to your project to check the status of your application as it builds and deploys.\n
\n\n Continue to the project overview to check the status of your application as it builds and deploys.\n
\n\n \n Plan {{$ctrl.selectedPlan.externalMetadata.displayName}}\n –\n \n {{$ctrl.selectedPlan.description}}\n
\n \n \n\n \n Plan {{$ctrl.selectedPlan.externalMetadata.displayName}}\n –\n \n {{$ctrl.selectedPlan.description}}\n
\n \n \nThe binding will be created after the service has been provisioned.
\nThis may take several minutes.
\nContinue to the project overview to check the status of your service.
\nContinue to the project overview to bind this service to your application. Binding this service creates a secret containing the information necessary for your application to use the service.
\nor
\nBrowse resources for {{$ctrl.serviceClass.name}}:
\n