Skip to content
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

NIFI-12260: Remove templates from frontend #7924

Merged
merged 4 commits into from
Oct 26, 2023
Merged

Conversation

sardell
Copy link
Contributor

@sardell sardell commented Oct 24, 2023

Summary

NIFI-12260

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@rfellows
Copy link
Contributor

rfellows commented Oct 24, 2023

There are build failures:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:24 min
[INFO] Finished at: 2023-10-24T00:29:02Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress (minify) on project nifi-web-ui: wrap: /home/runner/work/nifi/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/target/tmp/js/nf/canvas/header/components/nf-ng-template-component.js (No such file or directory) -> [Help 1]

That file seems to be referenced in 2 places...
looks like it is referenced in 2 places:

  • line 561 in nifi-web-ui/pom.xml
  • and line 91 in nifi-web-ui/src/main/resources/filters/canvas.properties

Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the canvas context menu, there are 2 template-related options that need to be removed.

Screenshot 2023-10-24 at 12 30 24 PM

Clicking them now produces an error on the console:

nf-context-menu.js?2.0.0-SNAPSHOT:794 Uncaught TypeError: nfActions[action] is not a function
    at executeAction (nf-context-menu.js?2.0.0-SNAPSHOT:794:26)
    at HTMLDivElement.<anonymous> (nf-context-menu.js?2.0.0-SNAPSHOT:945:21)
    at HTMLDivElement.dispatch (jquery.min.js:2:43184)
    at $event.dispatch (jquery.event.drag-2.3.0.js:387:30)
    at y.handle (jquery.min.js:2:41168)

There are quite a few remaining references to templates in the app.

There might be others, but these are the ones that I found.

@sardell
Copy link
Contributor Author

sardell commented Oct 24, 2023

@rfellows Thanks for taking a look. I see all these leftover references now and will update shortly.

Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly there. I think you got a bit overzealous with your removing of template stuff. In particular the stuff about policy templates. those aren't related.

There are a handful (10 i think) css styles in main.css that we could probably remove as well. #new-template-description { position: absolute; top: 81px; bottom: 0px; height: inherit; min-height: 32px; }
as well as others named like xxx-template-xxx

Copy link
Contributor

@elcsiga elcsiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 once the policy-selected-templates are clarified. Looks good, I couldn't find any remaining template related code

@elcsiga
Copy link
Contributor

elcsiga commented Oct 25, 2023

(just to make sure: there is an icon-template-import used here:

image

I can still import a complete flow here, so I suppose this is ok as is.)

@rfellows
Copy link
Contributor

(just to make sure: there is an icon-template-import used here:

image I can still import a complete flow here, so I suppose this is ok as is.)

I think this is OK. It is just the icon. You can either select a file to upload or you enter a name to give an empty process group. You can't pick a template here.

Copy link
Contributor

@rfellows rfellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes look good. Thanks @sardell!

@rfellows rfellows merged commit c4ff8de into apache:main Oct 26, 2023
3 of 6 checks passed
ChrisSamo632 pushed a commit to ChrisSamo632/nifi that referenced this pull request Oct 29, 2023
* remove templates from frontend

* remove more references to removed files

* removing more template references

* remove unused css template styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants