Skip to content

Commit

Permalink
Merge pull request #2361 from jhadvig/preselect
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Preselect current project in 'Select from Project'

Preselecting the current project in the `Selection` step will remove the selectbox from the `Configuration` step.


![7fee4eaa-e28f-44fd-y677-2e1bf20d1eeb](https://user-images.githubusercontent.com/1668218/31939948-9731867a-b8bc-11e7-89df-c4ed15a28196.gif)

@spadgett PTAL


Closes #2335
  • Loading branch information
openshift-merge-robot authored Oct 24, 2017
2 parents 849dda4 + 826a81a commit 77f200e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/scripts/directives/processTemplateDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
ctrl.$onInit = function() {
ctrl.loginBaseUrl = DataService.openshiftAPIBaseUrl();
ctrl.preSelectedProject = ctrl.selectedProject = ctrl.project;
if (ctrl.project) {
ctrl.templateProject = ctrl.project;
ctrl.templateProjectChange();
}
listProjects();

ctrl.projectEmptyState = {
Expand Down
2 changes: 1 addition & 1 deletion app/views/directives/header/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@
<overlay-panel show-panel="ordering.panelName" handle-close="closeOrderingPanel">
<deploy-image-dialog ng-if="ordering.panelName === 'deployImage'" project="currentProject" context="context" on-dialog-closed="closeOrderingPanel"></deploy-image-dialog>
<from-file-dialog ng-if="ordering.panelName === 'fromFile'" project="currentProject" context="context" on-dialog-closed="closeOrderingPanel"></from-file-dialog>
<process-template-dialog ng-if="ordering.panelName === 'fromProject'" project="project" use-project-template="true" on-dialog-closed="closeOrderingPanel"></process-template-dialog>
<process-template-dialog ng-if="ordering.panelName === 'fromProject'" project="currentProject" use-project-template="true" on-dialog-closed="closeOrderingPanel"></process-template-dialog>
</overlay-panel>
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13224,7 +13224,7 @@ onShow: function() {
b.infoStep.selected = !1, b.selectStep.selected = !1, b.configStep.selected = !1, b.resultsStep.selected = !0, b.nextTitle = "Close", m(), b.wizardDone = !0;
}
}, b.$onInit = function() {
b.loginBaseUrl = r.openshiftAPIBaseUrl(), b.preSelectedProject = b.selectedProject = b.project, h(), b.projectEmptyState = {
b.loginBaseUrl = r.openshiftAPIBaseUrl(), b.preSelectedProject = b.selectedProject = b.project, b.project && (b.templateProject = b.project, b.templateProjectChange()), h(), b.projectEmptyState = {
title: "No Project Selected",
info: "Please select a project from the dropdown to load Templates from that project."
}, b.templatesEmptyState = {
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -7306,7 +7306,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<overlay-panel show-panel=\"ordering.panelName\" handle-close=\"closeOrderingPanel\">\n" +
"<deploy-image-dialog ng-if=\"ordering.panelName === 'deployImage'\" project=\"currentProject\" context=\"context\" on-dialog-closed=\"closeOrderingPanel\"></deploy-image-dialog>\n" +
"<from-file-dialog ng-if=\"ordering.panelName === 'fromFile'\" project=\"currentProject\" context=\"context\" on-dialog-closed=\"closeOrderingPanel\"></from-file-dialog>\n" +
"<process-template-dialog ng-if=\"ordering.panelName === 'fromProject'\" project=\"project\" use-project-template=\"true\" on-dialog-closed=\"closeOrderingPanel\"></process-template-dialog>\n" +
"<process-template-dialog ng-if=\"ordering.panelName === 'fromProject'\" project=\"currentProject\" use-project-template=\"true\" on-dialog-closed=\"closeOrderingPanel\"></process-template-dialog>\n" +
"</overlay-panel>"
);

Expand Down

0 comments on commit 77f200e

Please sign in to comment.