Skip to content

Commit

Permalink
hide cve id/record lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
athu-tran committed Oct 30, 2024
1 parent 69e434e commit cccd264
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/cveRecordSearchModule.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="mt-1">
<div role="alert" class="notification is-warning is-light">
<div v-if="websiteEnv !== 'prd'" role="alert" class="notification is-warning is-light">
<div class="is-flex is-align-items-flex-start mt-1" style="max-width: 820px; column-gap: 1rem;">
<div class="pl-3">
<p id="alertIconVariousFormts" class="is-hidden">alert</p>
Expand Down
4 changes: 2 additions & 2 deletions src/views/CVERecord/CVERecord.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</div>
<div v-else>
<div v-if="usecveRecordStore.isIdOrRecordFound">
<div class="notification is-warning is-light" role="alert">
<div v-if="websiteEnv !== 'prd'" class="is-flex" style="justify-content: center;">
<div v-if="websiteEnv !== 'prd'" class="notification is-warning is-light" role="alert">
<div class="is-flex" style="justify-content: center;">
<p id="alertIconCveRecordsRequestErrored" class="is-hidden">alert</p>
<font-awesome-icon style="flex: 0 0 40px;" size="1x" icon="triangle-exclamation" role="img"
aria-labelledby="alertIconCveRecordsRequestErrored" aria-hidden="false" />
Expand Down
10 changes: 7 additions & 3 deletions src/views/CVERecord/SearchResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<ServiceUnavailable></ServiceUnavailable>
</div>
<div v-else>
<div class="notification is-warning is-light" role="alert">
<div v-if="websiteEnv !== 'prd'" class="is-flex is-justify-content-center">
<div v-if="websiteEnv !== 'prd'" class="notification is-warning is-light" role="alert">
<div class="is-flex is-justify-content-center">
<p id="alertIconCveRecordsRequestErrored" class="is-hidden">alert</p>
<font-awesome-icon style="flex: 0 0 40px;" size="1x" icon="triangle-exclamation" role="alert"
aria-labelledby="alertIconCveRecordsRequestErrored" aria-hidden="false" />
Expand Down Expand Up @@ -248,7 +248,7 @@
<script setup>
import { useCveListSearchStore } from '@/stores/cveListSearch';
import { usePartnerStore } from '@/stores/partners';
import { createApp, ref, watch } from 'vue';
import { computed, createApp, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import ServiceUnavailable from '@/components/ServiceUnavailable.vue'
Expand All @@ -274,6 +274,10 @@ function backToTop() {
replace: true
});
}
const websiteEnv = computed(() => {
return import.meta.env.VITE_WEBSITE_ENVIRONMENT;
});
</script>
<style lang="scss">
Expand Down
7 changes: 6 additions & 1 deletion src/views/ResourcesSupport/FAQs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<div :id="item.sectionId + qAndA.questionId + 'response'" class="message-body"
:class="{'is-hidden': accordion[item.sectionId + qAndA.questionId]}">
<div v-if="qAndA.questionId == 'search_cve'" class="pb-3">
<span class="has-text-weight-bold">TEST.CVE.ORG Search CVE List (Beta) Tips</span>
<p class="has-text-weight-bold"><span v-if="websiteEnv !== 'prd'">TEST.CVE.ORG </span>Search CVE List (Beta) Tips</p>
<ul>
<li>Search the CVE List by keywords using the
<router-link :to="{ hash: '#cve-secondary-navbar' }">search box</router-link> at the top of this page.
Expand Down Expand Up @@ -107,6 +107,11 @@ export default {
created() {
this.setAccordion('sectionId', 'questionId');
},
computed: {
websiteEnv() {
return import.meta.env.VITE_WEBSITE_ENVIRONMENT;
}
},
methods: {
isExactPath(onPageLink) {
return useLinkStore().isExactPath(`${this.$route.path}${onPageLink}`, this.$route.fullPath);
Expand Down

0 comments on commit cccd264

Please sign in to comment.