Skip to content

Commit dd3ccf3

Browse files
authored
Revert "Resolves #2922 - create CNA search box for non-CNA reporting/requests (dev)" (#3367)
1 parent b7aded5 commit dd3ccf3

File tree

4 files changed

+10
-49
lines changed

4 files changed

+10
-49
lines changed

package-lock.json

Lines changed: 0 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"@fortawesome/free-solid-svg-icons": "^6.5.1",
2323
"@fortawesome/vue-fontawesome": "^3.0.5",
2424
"axios": "^1.6.5",
25-
"buefy": "npm:@ntohq/buefy-next@^0.1.4",
2625
"bulma": "^0.9.4",
2726
"bulma-timeline": "^3.0.5",
2827
"lodash": "^4.17.21",

src/main.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11

22
import { createApp } from 'vue';
3-
import Buefy from 'buefy';
4-
import 'buefy/dist/buefy.css';
53
import { createPinia } from 'pinia';
64
import VueGtag from 'vue-gtag';
75
import LoadScript from 'vue-plugin-load-script';
@@ -33,7 +31,6 @@ library.add(
3331

3432

3533
const app = createApp(App);
36-
app.use(Buefy);
3734
const pinia = createPinia();
3835
pinia.use(({ store }) => {
3936
store.router = router;

src/views/ReportRequest/ReportRequestForNonCNAs.vue

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
<h4 class="title">Find the CVE Numbering Authority (CNA)</h4>
3232
<p>
3333
Find the CNA partner whose scope includes the product affected by the vulnerability on the
34-
<router-link to="/PartnerInformation/ListofPartners">List of Partners</router-link>
35-
page or in the search box below.
34+
<router-link to="/PartnerInformation/ListofPartners">List of Partners</router-link> page or in the search box below.
3635
</p>
3736
<b-field>
3837
<b-autocomplete
@@ -189,34 +188,17 @@ export default {
189188
},
190189
computed: {
191190
filteredDataObj() {
192-
const normalizedName = this.name.toLowerCase();
193-
if (!normalizedName.length)
194-
return;
191+
const results = this.data.filter((option) => (
192+
option.organizationName
193+
.toString()
194+
.toLowerCase()
195+
.indexOf(this.name.toLowerCase()) >= 0
196+
));
195197
196-
let results = this.data.filter((option) => (
197-
option.organizationName.toLowerCase()
198-
.indexOf(normalizedName) >= 0));
199-
200-
function cmp(cna1, cna2) {
201-
// Sorts the list of organization names based on the characters
202-
// entered by the user in the search box. For example, if the user
203-
// has entered "br", then "Brocade Communications" is listed before
204-
// "Jetbrains" because "br" is closest to the beginning of the
205-
// string in "Brocade Communications".
206-
207-
const cna1NormalName = cna1.organizationName.toLowerCase();
208-
const cna2NormalName = cna2.organizationName.toLowerCase()
209-
const cna1Index = cna1NormalName.indexOf(normalizedName);
210-
const cna2Index = cna2NormalName.indexOf(normalizedName);
211-
212-
return cna1Index < cna2Index ? -1 : cna1Index > cna2Index ? 1 :
213-
cna1NormalName.localeCompare(cna2NormalName);
198+
if (results.length > 10) {
199+
return results.splice(0, 10);
214200
}
215-
216-
// Limit the choices presented to the user to the first 10 organizations
217-
// in the list.
218-
219-
return results.sort(cmp).slice(0, 10);
201+
return results;
220202
},
221203
},
222204
methods: {

0 commit comments

Comments
 (0)