-
Notifications
You must be signed in to change notification settings - Fork 900
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
fix(core): Display template inherited items (mptv2) as read only #7102
fix(core): Display template inherited items (mptv2) as read only #7102
Conversation
a2ccab7
to
a54d707
Compare
<div className="checkbox"> | ||
<label> | ||
<input type="checkbox" checked={required} onChange={handleRequiredChange} /> | ||
<fieldset disabled={inherited} className={classNames({ 'templated-pipeline-item': inherited })}> |
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.
this large diff comes from indenting pre-existing elements in the added <fieldset>
container and from making the delete button conditional to inheritance (line 154)
|
||
const configWithInheritedValues = { | ||
...config, | ||
...(inheritTemplateParameters && parameterConfig ? { parameterConfig } : {}), | ||
...(inheritTemplateNotifications && notifications ? { notifications } : {}), | ||
...(inheritTemplateTriggers && triggers ? { triggers } : {}), | ||
...(inheritTemplateExpectedArtifacts && expectedArtifacts ? { expectedArtifacts } : {}), | ||
...(expectedArtifacts ? { expectedArtifacts } : {}), |
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.
As of this PR, inheritance of expectedArtifacts changed from opt in to always inherited. Currently only parameters, triggers, and notifications can be marked for exclusion.
<option value="">Select...</option> | ||
</select> | ||
{{description}} | ||
<fieldset ng-disabled="trigger.inherited" ng-class="{'templated-pipeline-item': trigger.inherited}"> |
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.
Similar to Parameter.tsx changes, much of this is shifting elements and Prettier. Inheritance related changes are on lines 3, 22-32, 55
a54d707
to
bbdfc27
Compare
05dc6ce
to
554e049
Compare
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 for the helpful comments, your PRs are always a breeze to review and it also helps keep me in the loop about MPTv2 updates 😀
@spinnakerbot cherry-pick 1.14 |
Cherry pick successful: #7110 |
939d608 fix(pipeline): fix invisible parameter when default is not in options (spinnaker#7125) 5c4facb fix(core/pipeline): stop searching stage context, being greedy about parentExecutions (spinnaker#7127) 8fe74bc fix(core): do not inject default execution window values on render (spinnaker#7122) ee6fbe0 fix(core/pipeline): use correct visibility default for stage durations (spinnaker#7121) c88234c refactor(stages): Fixed alias matching, added fallback and unit tests (spinnaker#7080) c358801 refactor(core): Reactify ExecutionWindows component (spinnaker#7113) 744123d fix(artifact): use artifact icons in server group link (spinnaker#7118) b8aebd7 fix(forms): Fixed SpelText not firing onChange upon autocomplete (spinnaker#7114) 4e2f749 refactor(core): reactify overrideFailure component (spinnaker#7107) 4f07aeb fix(core): Make template table list scrollable (spinnaker#7111) e5d6115 fix(core): Display template inherited items (mptv2) as read only (spinnaker#7102)
939d608 fix(pipeline): fix invisible parameter when default is not in options (#7125) 5c4facb fix(core/pipeline): stop searching stage context, being greedy about parentExecutions (#7127) 8fe74bc fix(core): do not inject default execution window values on render (#7122) ee6fbe0 fix(core/pipeline): use correct visibility default for stage durations (#7121) c88234c refactor(stages): Fixed alias matching, added fallback and unit tests (#7080) c358801 refactor(core): Reactify ExecutionWindows component (#7113) 744123d fix(artifact): use artifact icons in server group link (#7118) b8aebd7 fix(forms): Fixed SpelText not firing onChange upon autocomplete (#7114) 4e2f749 refactor(core): reactify overrideFailure component (#7107) 4f07aeb fix(core): Make template table list scrollable (#7111) e5d6115 fix(core): Display template inherited items (mptv2) as read only (#7102)
MPTv1 saved inherited items (notifications, triggers, parameters) directly to the pipeline config which allowed them to be displayed while configuring in deck. MPTv2 pipelines saved in spin do not save them to the pipeline config and instead rely on them being inherited during the plan phase. This PR renders items inherited from the plan and marks them as read only since they cannot be edited or deleted directly through the pipeline config.
spinnaker/spinnaker#4451
Inherited Trigger
![image](https://user-images.githubusercontent.com/2623242/59228232-51d09680-8ba5-11e9-8f82-6db97fb420f9.png)
Inherited Notification
![image](https://user-images.githubusercontent.com/2623242/59228325-7d538100-8ba5-11e9-9b31-71c83046c65e.png)
Inherited Parameter
![image](https://user-images.githubusercontent.com/2623242/59228410-be4b9580-8ba5-11e9-8164-924371e4e71d.png)