Skip to content

Commit

Permalink
Merge branch 'master' into mknop/RHCLOUD-27269-frontends-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
maknop authored Aug 8, 2023
2 parents a45c4c0 + 89291cb commit 5dabc50
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence.
* @Hyperkid123 @ryelo @karelhala
* @Hyperkid123 @ryelo @karelhala @florkbr
20 changes: 10 additions & 10 deletions Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,43 @@
{$CADDY_TLS_CERT}
log
@app_match {
path_regexp /apps/chrome(.*)
path /apps/chrome*
}
handle @app_match {
uri strip_prefix /apps/chrome
file_server * {
root /opt/app-root/src/build
index opt/app-root/src/build/index.html
root /opt/app-root/src/build/stable
index opt/app-root/src/build/stable/index.html
browse
}
}

@beta_match {
path_regexp /beta/apps/chrome(.*)
path /beta/apps/chrome*
}
handle @beta_match {
uri strip_prefix /beta/apps/chrome
file_server * {
root /opt/app-root/src/build
index opt/app-root/src/build/index.html
root /opt/app-root/src/build/preview
index opt/app-root/src/build/preview/index.html
browse
}
}

@preview_match {
path_regexp /preview/apps/chrome(.*)
path /preview/apps/chrome*
}
handle @preview_match {
uri strip_prefix /preview/apps/chrome
file_server * {
root /opt/app-root/src/build
index opt/app-root/src/build/index.html
root /opt/app-root/src/build/preview
index opt/app-root/src/build/preview/index.html
browse
}
}

@config_match {
path_regexp /config/(.*)
path /config*
}
handle @config_match {
uri strip_prefix /config
Expand Down
1 change: 1 addition & 0 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export COMPONENT="insights-chrome-frontend"
export IMAGE="quay.io/cloudservices/$COMPONENT"
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace
export APP_ROOT=$(pwd)
export DIST_FOLDER=build
export INCLUDE_CHROME_CONFIG="true"
cat /etc/redhat-release
COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master
Expand Down
7 changes: 5 additions & 2 deletions src/components/Search/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ const FUZZY_RANGE_TAG = 'FUZZY_RANGE_TAG';
*/

const BASE_SEARCH = new URLSearchParams();
BASE_SEARCH.append('q', `${REPLACE_TAG}*~${FUZZY_RANGE_TAG}`); // add query replacement tag and enable fuzzy search with ~1
BASE_SEARCH.append(
'q',
`${REPLACE_TAG} OR *${REPLACE_TAG}~${FUZZY_RANGE_TAG} OR ${REPLACE_TAG}*~${FUZZY_RANGE_TAG} OR ${REPLACE_TAG}~${FUZZY_RANGE_TAG}`
); // add query replacement tag and enable fuzzy search with ~ and wildcards
BASE_SEARCH.append('fq', 'documentKind:ModuleDefinition'); // search for ModuleDefinition documents
BASE_SEARCH.append('rows', '10'); // request 10 results
BASE_SEARCH.append('hl', 'true'); // enable highlight
Expand Down Expand Up @@ -216,7 +219,7 @@ const SearchInput = ({ onStateChange }: SearchInputListener) => {
}, [isOpen, menuRef]);

const handleFetch = (value = '') => {
return fetch(SEARCH_QUERY.replace(REPLACE_TAG, value).replace(FUZZY_RANGE_TAG, value.length > 3 ? '2' : '1'))
return fetch(SEARCH_QUERY.replaceAll(REPLACE_TAG, value).replaceAll(FUZZY_RANGE_TAG, value.length > 3 ? '2' : '1'))
.then((r) => r.json())
.then(({ response, highlighting }: { highlighting: HighlightingResponseType; response: SearchResponseType }) => {
if (isMounted.current) {
Expand Down
10 changes: 10 additions & 0 deletions src/sass/chrome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,19 @@ aside {
z-index: 19001;
position: fixed;
bottom: 0;
padding-left: var(--pf-global--spacer--xl);
padding-right: var(--pf-global--spacer--xl);
width: 100%;

@media only screen and (max-width: $pf-global--breakpoint--lg) {
.truste-banner {
display: flex;
flex-direction: column;
}
}
}


// centers modals when a quick start drawer is open
.pfext-quick-start-drawer__body {
.pf-c-backdrop {
Expand Down

0 comments on commit 5dabc50

Please sign in to comment.