-
Notifications
You must be signed in to change notification settings - Fork 1
Fix contentService counting and add find-by scripts #3
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
Conversation
96cc515 to
3d24d6b
Compare
mfyz
left a comment
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.
Everything looks great 👏 Thanks @jpblancoder for the new scripts and improvements on both existing scripts, help and README formatting.
| QUERY="COPY ($QUERY) TO STDOUT WITH (FORMAT CSV, HEADER);" | ||
| else | ||
| # Print the header | ||
| YELLOW='\033[0;33m' |
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.
Excellent. Thanks for fixing the CSV output to be pure for piping.
| WHERE isPageOrTemplate = 'Page' | ||
| AND published IS NOT NULL" | ||
| AND published IS NOT NULL | ||
| ORDER BY uri ASC" |
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.
👌
| 2. all-features-usage.sh [-c] | ||
| Shows all features used in published pages, templates and how many times they are used | ||
| 📄 ${GREEN}describe-page-or-template.sh${RESET} -i <page_or_template_id> |
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 formatting and organizing the help output. Looks great.
|
@mfyz please consider trumpeting these excellent additions in a ArcXP release note or perhaps over at https://github.com/orgs/arcxp/discussions :) |
|
100%. I'll update the corresponding ALC doc, post a gh-discussions post to both celebrate and give credit to awesome TGAM team. |
Hi Arc XP team, initially a bug fix for the content sources issue that I previously mentioned.
Plus additional improvements and some new scripts that I thought would be helpful. I had to make some assumptions about the database schema column values. Let me know if you have any questions, about my intentions.
Breaking changes
all-content-sources-usage.shto newall-content-sources-resolvers.shfile. Both scripts now support CSV output.New features
find-features-by-content-source.shto find features that use a specific content source (with like search). Supports CSV output.find-resolvers-by-content-source.shto find resolvers that use a specific content source (with exact match). Supports CSV output.view-page-or-template.shto dump the view to a file for debugging. Supports CSV output.view-rendering.shto dump the view to a file for debugging. Supports CSV output.view-resolver.shto dump the view to a file for debugging. Supports CSV output._debugfiles and*.csvto.gitignore. For temporary debugging files and saving CSV output files.Improvements
_duckdb-views.sqlto pass down the feature/chainfingerprintcolumn value, to help developer's easier identify the desired block in PB Editor view.describe-page-or-template.shto order bychainNameorfeatureNamecolumn, instead ofcountOfTimesUsedcolumn. This should help a dev scan the items for specific blocks more quickly.all-page-urls.shto addpublished(version Id) column, order byuricolumn, and correct script help output.find-pages-by-chain-name.shto order by 3 column values, instead of none.find-pages-by-feature-name.shto order by 3 column values, instead of none.find-pages-by-uri.shto order by 3 column values, instead of none. Correct script help output.README.mdandhelp.shwith new terminal commands.Bug fixes
_duckdb-views.sqlto moveview_resolverprocessing to top of file, and convert two columns to integers. Not a bug, just reorganizing the file, since I also move the next view._duckdb-views.sqlto moveview_page_and_templateprocessing to top of file. Used by the following view, so it needs to be declared above it, as it's used to help solve the primary bug._duckdb-views.sqltoview_renderingto remove unwanted rendering items when converting.PublishedLayoutItems: Only include rendering items from published versions, according to theview_page_and_templateview.LatestLayoutItems: Only include the latest rendering, by creation date, for each page's published version.unnest()certain column values, by only un-nesting a single level. To avoidvariantsproperty un-nesting found in features. Which I assume we can safely ignore. Correct me, if that's wrong.customFieldsforcontentServicekey. The value saved is a delimited, e.g. "content-service-1|another-service-2|other-service-3". Since feature blocks can have multiple content sources configured via their customFields.