From d02ac48434de03784b0ce61651425063694a0a3f Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Tue, 13 Feb 2024 05:01:56 +0000 Subject: [PATCH 1/3] prettier index.html --- src/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/index.html b/src/index.html index 825e55204b..99bdc7312b 100644 --- a/src/index.html +++ b/src/index.html @@ -1,10 +1,10 @@ - + - - - <%= htmlWebpackPlugin.options.applicationName %> - - -
- + + + <%= htmlWebpackPlugin.options.applicationName %> + + +
+ From 2fd5ebb3838e5be1c28c42581607d480df697e68 Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Tue, 13 Feb 2024 05:02:49 +0000 Subject: [PATCH 2/3] sort prettierignore --- .prettierignore | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.prettierignore b/.prettierignore index b655c93ae7..64f2848920 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,15 +1,14 @@ -src/index.html *.json -.*.sw[po] -*.xml -*.sh -Dockerfile -.DS_Store *.md -*.png *.mp4 +*.png *.po +*.sh +*.xml +.*.sw[po] +.DS_Store +.eslintrc +Dockerfile test/cypress.env.json.template -test/cypress/fixtures/ test/cypress/e2e/*/compose.env -.eslintrc +test/cypress/fixtures/ From 4225ba4ea71c72cd52b492e3c7e95ffd0d1b5d63 Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Wed, 14 Feb 2024 18:14:14 +0000 Subject: [PATCH 3/3] collection-filter: hardcode default tags for insights mode Issue: AAH-3073 --- CHANGES/3073.bug | 1 + .../collection-list/collection-filter.ts | 34 +++++++++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 CHANGES/3073.bug diff --git a/CHANGES/3073.bug b/CHANGES/3073.bug new file mode 100644 index 0000000000..ad8666c804 --- /dev/null +++ b/CHANGES/3073.bug @@ -0,0 +1 @@ +insights: hardcode list of default filter tags diff --git a/src/components/collection-list/collection-filter.ts b/src/components/collection-list/collection-filter.ts index 334acf1072..c3476403ce 100644 --- a/src/components/collection-list/collection-filter.ts +++ b/src/components/collection-list/collection-filter.ts @@ -12,14 +12,34 @@ const loadRepos = (inputText) => })), ); +// insights-only +const defaultTags = [ + 'application', + 'cloud', + 'database', + 'eda', + 'infrastructure', + 'linux', + 'monitoring', + 'networking', + 'security', + 'storage', + 'tools', + 'windows', +].map((tag) => ({ id: tag, title: tag })); + const loadTags = (inputText) => - TagAPI.listCollections({ name__icontains: inputText, sort: '-count' }).then( - ({ data: { data } }) => - data.map(({ name, count }) => ({ - id: name, - title: count === undefined ? name : t`${name} (${count})`, - })), - ); + !inputText && IS_INSIGHTS + ? Promise.resolve(defaultTags) + : TagAPI.listCollections({ + name__icontains: inputText, + sort: '-count', + }).then(({ data: { data } }) => + data.map(({ name, count }) => ({ + id: name, + title: count === undefined ? name : t`${name} (${count})`, + })), + ); export const collectionFilter = ({ featureFlags: { display_signatures, display_repositories },