Skip to content

Commit

Permalink
Merge pull request #3169 from CVEProject/tat-3160-content
Browse files Browse the repository at this point in the history
#3160 content update and other fixes
  • Loading branch information
athu-tran authored Oct 15, 2024
2 parents b0827d2 + 679aa2e commit c71d83a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/assets/data/faqs.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"questionText": "How do I search the CVE List",
"questionResponseParagraphs": [
"<b><i>Search Tips<i></b>",
"<ul><li>By CVE ID<ul><li>Must include only one CVE ID per search.</li><li>CVE ID must include all letters, numbers, and hyphens associated with the CVE ID, e.g., CVE-2024-12345678.</li><li>“CVE” may be entered as “cve”, “CVE”, or as a combination of uppercase and lowercase, as casing is ignored during search.</li></ul></li><li>By other keyword(s)<ul><li>Must contain only alphanumeric characters.</li><li>May contain one or more keywords, separated by a space.</li><li>Keywords may be entered in lowercase, uppercase, or a combination of both. Casing is ignored during search, e.g., Vulnerabilities, vulnerabilities, VULNERABILITIES.</li></ul></li></ul>"
"<ul><li>By CVE ID<ul><li>Must include only one CVE ID per search.</li><li>CVE ID must include all letters, numbers, and hyphens associated with the CVE ID, e.g., CVE-2024-12345678.</li><li>“CVE” may be entered as “cve”, “CVE”, or as a combination of uppercase and lowercase, as casing is ignored during search.</li></ul></li><li>By other keyword(s)<ul><li>Must contain only alphanumeric characters, e.g., letters or numbers.</li><li>May contain one or more keywords, separated by a space.</li><li>Keywords may be entered in lowercase, uppercase, or a combination of both. Casing is ignored during search, e.g., Vulnerabilities, vulnerabilities, VULNERABILITIES.</li></ul></li></ul>"
]
},
{
Expand Down
18 changes: 11 additions & 7 deletions src/components/cveRecordSearchModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
The Test website (test.cve.org) has a new drop-down menu below.
<span class="button is-ghost cve-inner-btn">Read {{ showSearchHelpText ? 'less...' : 'more...' }}</span>
</button>
<div v-if="showSearchHelpText" id="searchHelpText" class="cve-help-text" style="max-width: 860px">
<div v-if="showSearchHelpText" id="searchHelpText" class="cve-help-text" style="max-width: 810px">
<ol>
<li>
<span class="has-text-weight-bold">Search Capability (Beta) Community testers</span> – To beta-test the new search feature, select
Expand Down Expand Up @@ -65,7 +65,7 @@
<button @click="validate" class="button cve-button cve-button-accent-warm"
:class="{ 'is-loading': cveListSearchStore.isSearching, 'disabled': cveListSearchStore.isSeachButtonDisabled }"
:aria-disabled="cveListSearchStore.isSeachButtonDisabled">
Search
{{ searchTypeBoolean ? 'Search' : 'Find'}}
</button>
</div>
</div>
Expand Down Expand Up @@ -112,10 +112,7 @@ let searchTypeBoolean = computed(() => {
});
watch(searchType, () => {
cveListSearchStore.searchType = (searchType.value === 'Search CVE List (Beta)') ? true : false;
cveId = cveRecordStore.cveId = '';
queryString.value = cveListSearchStore.query = '';
errorMessage.value = '';
resetStates();
});
watch(
Expand All @@ -131,6 +128,14 @@ watch(
}
)
function resetStates() {
cveListSearchStore.searchType = cveGenericGlobalsStore.useSearch = searchTypeBoolean.value;
cveId = '';
queryString.value = cveListSearchStore.query = '';
errorMessage.value = '';
cveListSearchStore.showHelpText = false;
cveListSearchStore.isSeachButtonDisabled = true;
}
function startSearch() {
// We only want to flip the search item _When we actually do a search_ otherwise we should default back to what we were on a page refresh
Expand All @@ -156,7 +161,6 @@ function startSearch() {
const lookupPath = `/CVERecord?id=${cveId}`;
router.push(lookupPath)
}
}
function validateQueryString() {
Expand Down
5 changes: 3 additions & 2 deletions src/views/CVERecord/SearchResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<!-- cveListSearchStore.totalSearchResultCount < 1 so when there are results this doesn't flash while user is typing keyword -->
<p class="has-text-centered">
Please use the help text below the search box above to fix your keyword(s).
</p></div>
</p>
</div>
<div v-else>
<div v-if="cveListSearchStore.isSearching"
class="cve-loading-message has-text-centered"
Expand Down Expand Up @@ -234,11 +235,11 @@
<router-link to="/ResourcesSupport/FAQs#pc_cve_list_basicssearch_cve">search tips</router-link>.
</p>
</div>
<SurveyLinkComponent/>
</div>
</div>
</div>
</div>
<SurveyLinkComponent/>
</main>
</div>
</div>
Expand Down

0 comments on commit c71d83a

Please sign in to comment.