From cd046bf2fc8a4df67e33b223f4d4d9436876e546 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 3 May 2022 19:39:56 -0500 Subject: [PATCH] Website: Update default filters for query library, remove tag capitalization (#5523) * update tag formatting + query library default filters * make all tags lower case --- website/assets/js/pages/query-library.page.js | 4 ++-- website/scripts/build-static-content.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/assets/js/pages/query-library.page.js b/website/assets/js/pages/query-library.page.js index 402f055265..d05e9287f9 100644 --- a/website/assets/js/pages/query-library.page.js +++ b/website/assets/js/pages/query-library.page.js @@ -6,9 +6,9 @@ parasails.registerPage('query-library', { inputTextValue: '', inputTimers: {}, searchString: '', // The user input string to be searched against the query library - selectedKind: 'all queries', // Initially set to all, the user may select a different option to filter queries by purpose (e.g., "all queries", "informational", "policies") + selectedKind: 'policy', // Initially set to 'policy', the user may select a different option to filter queries by purpose (e.g., "all queries", "informational", "policies") selectedPlatform: 'all platforms', // Initially set to all, the user may select a different option to filter queries by platform (e.g., "all platforms", "macOS", "Windows", "Linux") - selectedTag: '', // Initially set to a blank string, the user may select a tag filter queries by. + selectedTag: 'built-in', // Initially set to the 'built-in' tag, the user may select a different tag to filter queries by. }, computed: { diff --git a/website/scripts/build-static-content.js b/website/scripts/build-static-content.js index dce8dfba1f..7c6b84bd16 100644 --- a/website/scripts/build-static-content.js +++ b/website/scripts/build-static-content.js @@ -50,8 +50,8 @@ module.exports = { let formattedTags = []; for (let tag of tagsToFormat) { if(tag !== '') {// « Ignoring any blank tags caused by trailing commas in the YAML. - // Formatting tags in sentence case, and removing any extra whitespace. - formattedTags.push(_.capitalize(_.trim(tag))); + // Removing any extra whitespace from tags and changing them to be in lower case. + formattedTags.push(_.trim(tag.toLowerCase())); } } // Removing any duplicate tags.