-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preselect current project in 'Select from Project' #2361
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhadvig Thanks, looks good. Just one comment on the name change.
@@ -184,7 +185,7 @@ | |||
}; | |||
|
|||
ctrl.templateProjectChange = function () { | |||
ctrl.templateProjectName = _.get(ctrl.templateProject, 'metadata.name'); | |||
ctrl.templateProjectName = _.get(ctrl.selectedProject, 'metadata.name'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of like the original templateProject
name better. selectedProject
sounds like the project you are instantiating the template into.
@spadgett comment addressed :) |
@@ -137,7 +138,7 @@ | |||
}; | |||
|
|||
$scope.$on('templateInstantiated', function(event, message) { | |||
ctrl.selectedProject = message.project; | |||
ctrl.templateProject = message.project; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhadvig There are two different projects. We need to make sure we're not getting them mixed up:
templateProject
-- the source project the template is fromselectedProject
-- the target project the template is instantiated into
You can selected a project to instantiate into on the landing page, but current project is always used when showing the dialog inside the project.
I think this is probably a two line fix: calling ctrl.templateProjectChange()
on init and setting currentProject
as the project in the view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spadgett we need also the change the process-template-select
so it uses the ctrl.selectedProject
not to use the ctrl.templateProject
, cause we are not even initiating that var
61bbb8a
to
0480c55
Compare
@spadgett updated the PR so it covers all the cases, in the landing page and also in projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jhadvig
/lgtm |
@jhadvig dist mismatch :/ |
You might need to rebase, install assets, and rebuild? |
/lgtm Need to wait for #2367 or merge will fail |
/hold cancel |
Automatic merge from submit-queue. |
Preselecting the current project in the
Selection
step will remove the selectbox from theConfiguration
step.@spadgett PTAL
Closes #2335