rfellows commented on code in PR #7924:
URL: https://github.com/apache/nifi/pull/7924#discussion_r1372200220
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-policy-management.js:
##########
@@ -1611,60 +1611,6 @@
return loadPolicy().always(showPolicy);
},
- /**
- * Shows the template policy.
- *
- * @param d
- */
- showTemplatePolicy: function (d) {
- initializingComponentPolicy = true;
-
- // reset the policy message
- resetPolicyMessage();
-
- // update the policy controls visibility
- $('#component-policy-controls').show();
- $('#global-policy-controls').hide();
-
- // update the visibility
- if (d.permissions.canRead === true) {
- $('#policy-selected-template-container
div.policy-selected-component-name').text(d.template.name);
- } else {
- $('#policy-selected-template-container
div.policy-selected-component-name').text(d.id);
- }
- $('#policy-selected-template-container').show();
-
- // populate the initial resource
- $('#selected-policy-component-id').text(d.id);
- $('#selected-policy-component-type').text('templates');
- $('#component-policy-target')
- .combo('setOptionEnabled', {
- value: 'operate-component'
- }, false)
- .combo('setOptionEnabled', {
- value: 'write-receive-data'
- }, false)
- .combo('setOptionEnabled', {
- value: 'write-send-data'
- }, false)
- .combo('setOptionEnabled', {
- value: 'read-data'
- }, false)
- .combo('setOptionEnabled', {
- value: 'read-provenance'
- }, false)
- .combo('setOptionEnabled', {
- value: 'write-data'
- }, false)
- .combo('setSelectedOption', {
- value: 'read-component'
- });
-
- initializingComponentPolicy = false;
-
- return loadPolicy().always(showPolicy);
- },
-
Review Comment:
OK, I think I was wrong initially. Based on the rest of the surrounding
code, i believe this to be showing a policy dialog for an existing template.
There are analogous methods named `showControllerServicePolicy`,
`showParameterContextPolicy`, ..., and `showComponentPolicy`. It would then
make sense that `showTemplatePolicy` would be used to show the policy of a
specific template.
So, I think it is good that we are deleting this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]