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

Allow PP filters to be added/updated via the UI or a REST call #21823

Closed
swicken-dotcms opened this issue Mar 7, 2022 · 4 comments · Fixed by #21837 or #22234
Closed

Allow PP filters to be added/updated via the UI or a REST call #21823

swicken-dotcms opened this issue Mar 7, 2022 · 4 comments · Fixed by #21837 or #22234

Comments

@swicken-dotcms
Copy link
Contributor

swicken-dotcms commented Mar 7, 2022

Is your feature request related to a problem? Please describe.
Currently the only way to list PP filters is by directly playing the updated YML files into the PP filter directory. This adds unnecessary complexity to updating these filters, especially for cloud customers as they need to engage support for updates to filters.

Describe the solution you'd like
While having a UI that allows users to create/configure PP filters directly would be ideal, it is a complex thing to add.

Allow users to perform CRUD operations on the YML files, either via the backend or via a REST call. Also allow them to download their current configuration, as they need to know what they are working with.

The following GoogleDoc created by Jonathan: https://docs.google.com/document/d/1sbrX3711dsQe2t1U5snnuFpqMIQ3jaxiSmKEwrJZT1Q has all the details for every action that can be executed on Push Publishing Filters.

@wezell
Copy link
Contributor

wezell commented Mar 17, 2022

PR: #21837

fmontes pushed a commit that referenced this issue May 9, 2022
…#21837)

* #21823 first draft of the PP filters endpoint

* #21823 adding final work for PP filter crud

* #21823 adding curl test

* #21823 fixing curl test
@fmontes fmontes reopened this May 9, 2022
@jdotcms
Copy link
Contributor

jdotcms commented May 11, 2022

Doc
https://docs.google.com/document/d/1sbrX3711dsQe2t1U5snnuFpqMIQ3jaxiSmKEwrJZT1Q/edit?usp=drivesdk

@jcastro-dotcms
Copy link
Contributor

As per requirements established in this ticket: #18715 - PP Filters: Allow users to specify the order filters appear in the list

Technical Approach

  • Add an "order" property (integer) to the PP filter .yml file.
  • If an "order" property exists in the file, set the order value to that number.
    • If no "order" property exists in the file, set the order value to some large number (so these get sorted last).
  • Sort the filters in the list based on the order value.
    • If multiple filters have the same "order" value, sort them in alphabetical order at the appropriate point in the list.

So in summary, if the filter has no "order" property then treat is as having an order of 10000 or something like that, and then make the sort order basically order, filterName.

Right now, the PP Filters are not being returned in alphabetical order. This needs to be fixed.

@bryanboza
Copy link
Member

Fixed, tested adding new filter from the REST API call, and this is working as expected, also the postman test are running and passing

oidacra pushed a commit that referenced this issue Jun 13, 2022
Also, update  required CURL Tests, and adding Javadoc.
@wezell wezell closed this as completed Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment