Skip to content

Commit cc81245

Browse files
authored
Merge pull request #3243 from CVEProject/tat-3237-hide-lookup
hide cve id/record lookup
2 parents 69e434e + cccd264 commit cc81245

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

src/components/cveRecordSearchModule.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="mt-1">
3-
<div role="alert" class="notification is-warning is-light">
3+
<div v-if="websiteEnv !== 'prd'" role="alert" class="notification is-warning is-light">
44
<div class="is-flex is-align-items-flex-start mt-1" style="max-width: 820px; column-gap: 1rem;">
55
<div class="pl-3">
66
<p id="alertIconVariousFormts" class="is-hidden">alert</p>

src/views/CVERecord/CVERecord.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
</div>
2222
<div v-else>
2323
<div v-if="usecveRecordStore.isIdOrRecordFound">
24-
<div class="notification is-warning is-light" role="alert">
25-
<div v-if="websiteEnv !== 'prd'" class="is-flex" style="justify-content: center;">
24+
<div v-if="websiteEnv !== 'prd'" class="notification is-warning is-light" role="alert">
25+
<div class="is-flex" style="justify-content: center;">
2626
<p id="alertIconCveRecordsRequestErrored" class="is-hidden">alert</p>
2727
<font-awesome-icon style="flex: 0 0 40px;" size="1x" icon="triangle-exclamation" role="img"
2828
aria-labelledby="alertIconCveRecordsRequestErrored" aria-hidden="false" />

src/views/CVERecord/SearchResults.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<ServiceUnavailable></ServiceUnavailable>
2727
</div>
2828
<div v-else>
29-
<div class="notification is-warning is-light" role="alert">
30-
<div v-if="websiteEnv !== 'prd'" class="is-flex is-justify-content-center">
29+
<div v-if="websiteEnv !== 'prd'" class="notification is-warning is-light" role="alert">
30+
<div class="is-flex is-justify-content-center">
3131
<p id="alertIconCveRecordsRequestErrored" class="is-hidden">alert</p>
3232
<font-awesome-icon style="flex: 0 0 40px;" size="1x" icon="triangle-exclamation" role="alert"
3333
aria-labelledby="alertIconCveRecordsRequestErrored" aria-hidden="false" />
@@ -248,7 +248,7 @@
248248
<script setup>
249249
import { useCveListSearchStore } from '@/stores/cveListSearch';
250250
import { usePartnerStore } from '@/stores/partners';
251-
import { createApp, ref, watch } from 'vue';
251+
import { computed, createApp, ref, watch } from 'vue';
252252
import { useRouter } from 'vue-router';
253253
import ServiceUnavailable from '@/components/ServiceUnavailable.vue'
254254
@@ -274,6 +274,10 @@ function backToTop() {
274274
replace: true
275275
});
276276
}
277+
278+
const websiteEnv = computed(() => {
279+
return import.meta.env.VITE_WEBSITE_ENVIRONMENT;
280+
});
277281
</script>
278282
279283
<style lang="scss">

src/views/ResourcesSupport/FAQs.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<div :id="item.sectionId + qAndA.questionId + 'response'" class="message-body"
7070
:class="{'is-hidden': accordion[item.sectionId + qAndA.questionId]}">
7171
<div v-if="qAndA.questionId == 'search_cve'" class="pb-3">
72-
<span class="has-text-weight-bold">TEST.CVE.ORG Search CVE List (Beta) Tips</span>
72+
<p class="has-text-weight-bold"><span v-if="websiteEnv !== 'prd'">TEST.CVE.ORG </span>Search CVE List (Beta) Tips</p>
7373
<ul>
7474
<li>Search the CVE List by keywords using the
7575
<router-link :to="{ hash: '#cve-secondary-navbar' }">search box</router-link> at the top of this page.
@@ -107,6 +107,11 @@ export default {
107107
created() {
108108
this.setAccordion('sectionId', 'questionId');
109109
},
110+
computed: {
111+
websiteEnv() {
112+
return import.meta.env.VITE_WEBSITE_ENVIRONMENT;
113+
}
114+
},
110115
methods: {
111116
isExactPath(onPageLink) {
112117
return useLinkStore().isExactPath(`${this.$route.path}${onPageLink}`, this.$route.fullPath);

0 commit comments

Comments
 (0)