Skip to content

Commit d3d3035

Browse files
authored
Merge pull request #3221 from CVEProject/jd-3077-dev
Resolves #3077 Dev version of PR #3193
2 parents ac6e1ce + 3074f16 commit d3d3035

File tree

4 files changed

+74
-67
lines changed

4 files changed

+74
-67
lines changed

src/assets/style/globals.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,15 @@ label {
561561
overflow-x: auto
562562
}
563563

564+
.cve-scroll-box {
565+
max-height: 15rem;
566+
border-bottom: 1px solid lightgray;
567+
overflow-y: scroll;
568+
border-top: 1px solid lightgray;
569+
padding: .75rem
570+
}
571+
572+
564573
.cve-w-100 {
565574
width: 100%;
566575
}
@@ -575,6 +584,7 @@ label {
575584
background-color: rgba(0, 0, 0, .5);
576585
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
577586
}
587+
578588
/* Other ends here*/
579589

580590
/* Third party CSS */

src/components/AdpVulnerabilityEnrichment.vue

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@
7171
</div>
7272
</div>
7373
</div>
74-
<div id="cve-kevs" v-if="kevs.length > 0 && roleName === 'adp'" class="cve-scroll-border-bottom mt-5">
74+
<div id="cve-kevs" v-if="kevs.length > 0 && roleName === 'adp'" class="mt-5">
7575
<h4 class="title mb-0">KEV <span class="tag">{{ kevs.length }} Total</span></h4>
76-
<div class="cve-learn-more cve-scroll-border-bottom">
76+
<div class="cve-learn-more ">
7777
<router-link to="/CVERecord/UserGuide/#cve-kev" class="cve-learn-more-link">Learn more</router-link>
7878
</div>
79-
<div class="cve-y-scroll mt-3 mb-3">
79+
<div class="cve-y-scroll cve-scroll-box mt-3">
8080
<ul class="mt-1">
8181
<li v-for="kev in kevs" :key="kev.key">
8282
<a :href="kev.reference" target="_blank">{{ kev.reference }}</a><span class="is-italic cve-help-text"> ({{ kev.dateAdded }})</span>
@@ -131,13 +131,13 @@
131131
</div>
132132
</div>
133133
<div v-if="roleName !== 'cveProgram'">
134-
<div id="cve-cwes" v-if="cwes.length > 0" class="cve-scroll-border-bottom mt-5">
134+
<div id="cve-cwes" v-if="cwes.length > 0" class="mt-5">
135135
<h4 class="title mb-0">CWE <span class="tag">{{ cwes.length }} Total</span></h4>
136-
<div class="cve-learn-more cve-scroll-border-bottom mb-5">
136+
<div class="cve-learn-more mb-3">
137137
<router-link to="/CVERecord/UserGuide/#cve-cwe" class="cve-learn-more-link">Learn more</router-link>
138138
</div>
139-
<div class="cve-y-scroll">
140-
<ul class="mt-0 mb-3">
139+
<div class="cve-y-scroll cve-scroll-box">
140+
<ul class="mt-0 mb-0">
141141
<li v-for="cwe in cwes" :key="cwe.key">
142142
<a v-if="cwe.cweId !== 'CWE ID not provided'" :href="`https://cwe.mitre.org/data/definitions/${cwe.cweNumber}.html`" target="_blank">
143143
<span class="has-text-weight-bold">{{ cwe.cweId }}<span v-if="cwe.description.length > 0">: </span></span>
@@ -461,7 +461,4 @@ export default {
461461
overflow-y: scroll;
462462
}
463463
464-
.cve-scroll-border-bottom {
465-
border-bottom: 1px solid lightgray;
466-
}
467464
</style>

src/components/CveRecordReferences.vue

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@
33
class="mt-5"
44
style="word-break:break-all;"
55
>
6-
<h4 class="title mb-0">References</h4>
7-
<ul>
8-
<li v-for="(reference, index) in references" :key="`link-${index}`" class="cve-word-wrap">
9-
<span class="icon-text">
10-
<a :href="reference.url" target="_blank">
11-
{{ (typeof reference.name !== 'undefined' && reference.name.length > 0) ? `${reference.hostname}: ${reference.name}` : reference.url }}
12-
<span class="icon cve-icon-xxs">
13-
<p id="enewsletter" class="is-hidden">external site</p>
14-
<font-awesome-icon icon="external-link-alt" aria-labelledby="enewsletter"></font-awesome-icon>
15-
</span>
16-
</a>
17-
</span>
18-
<span v-for="tag in reference.tags" :key="tag">
19-
<span class="tag ml-2" v-if="tag.length > 0">{{tag}}</span>
20-
</span>
21-
</li>
22-
</ul>
6+
<h4 class="title mb-3">References <span class="tag">{{ references.length }} Total</span></h4>
7+
<div class="cve-scroll-box">
8+
<ul class="mt-0">
9+
<li v-for="(reference, index) in references" :key="`link-${index}`" class="cve-word-wrap">
10+
<span class="icon-text">
11+
<a :href="reference.url" target="_blank">
12+
{{ (typeof reference.name !== 'undefined' && reference.name.length > 0) ? `${reference.hostname}: ${reference.name}` : reference.url }}
13+
<span class="icon cve-icon-xxs">
14+
<p id="enewsletter" class="is-hidden">external site</p>
15+
<font-awesome-icon icon="external-link-alt" aria-labelledby="enewsletter"></font-awesome-icon>
16+
</span>
17+
</a>
18+
</span>
19+
<span v-for="tag in reference.tags" :key="tag">
20+
<span class="tag ml-2" v-if="tag.length > 0">{{tag}}</span>
21+
</span>
22+
</li>
23+
</ul>
24+
</div>
2325
</div>
2426
</template>
2527

@@ -32,4 +34,7 @@ export default {
3234
}
3335
}
3436
}
35-
</script>
37+
</script>
38+
<style lang="scss">
39+
@import '@/assets/style/globals.scss';
40+
</style>

src/components/ProductStatus.vue

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,47 @@
3030
</div>
3131
</nav>
3232
<div id="cve-affected-unaffected-unknown-versions">
33-
<p class="cve-product-status-heading pb-1" style="border-bottom: 1px solid lightgray;">
33+
<p class="cve-product-status-heading pb-1" >
3434
Versions <span class="tag">{{ versionsCount(product) }} Total</span>
3535
</p>
36-
37-
<div class="column is-12-desktop cve-versions-scroll mb-4">
38-
<div id="cve-version-default-status">
39-
<p v-if="product.defaultStatus" class="cve-help-text is-italic">
40-
<span class="has-text-weight-bold">Default Status: </span>{{product.defaultStatus}}
41-
</p>
42-
<p v-else class="cve-help-text is-italic"><span class="has-text-weight-bold">Default Status: </span>unknown</p>
43-
</div>
44-
<div v-for="header in product.versionsColumns.headers" :key="header.key">
45-
<div :id="header" class="mt-1">
46-
<p style="text-transform: capitalize;">{{ header }}</p>
47-
<ul class="menu-list mt-1" v-for="row in product.versionsColumns.twoDTable[header]" :key="row.key">
48-
<li>
49-
<span v-if="row.versionsChanges.length > 0">
50-
<p>
51-
{{row.parentVersionStatus}}
52-
<span v-for="word in row.parentVersionRange" :key="word.key" :class="isAversion(word) ? 'cve-version' : ''">{{word}}&nbsp;</span>
53-
</p>
54-
<ul style="border-left: none !important;">
55-
<li v-for="change in row.versionsChanges" :key="change.key">
56-
<span v-for="word in change" :key="word.key" :class="isAversion(word) ? 'cve-version' : ''">{{word}}&nbsp;</span>
57-
</li>
58-
</ul>
59-
</span>
60-
<span v-else>
61-
<span v-if="row.parentVersionRange.length > 0">{{row.parentVersionStatus}}
62-
<span v-for="word in row.parentVersionRange" :key="word.key" :class="isAversion(word) ? 'cve-version' : ''">{{word}}&nbsp;</span>
36+
<div class="cve-scroll-box pt-1">
37+
<div class="column is-12-desktop mb-4">
38+
<div id="cve-version-default-status">
39+
<p v-if="product.defaultStatus" class="cve-help-text is-italic">
40+
<span class="has-text-weight-bold">Default Status: </span>{{product.defaultStatus}}
41+
</p>
42+
<p v-else class="cve-help-text is-italic"><span class="has-text-weight-bold">Default Status: </span>unknown</p>
43+
</div>
44+
<div v-for="header in product.versionsColumns.headers" :key="header.key">
45+
<div :id="header" class="mt-1">
46+
<p style="text-transform: capitalize;">{{ header }}</p>
47+
<ul class="menu-list mt-1" v-for="row in product.versionsColumns.twoDTable[header]" :key="row.key">
48+
<li>
49+
<span v-if="row.versionsChanges.length > 0">
50+
<p>
51+
{{row.parentVersionStatus}}
52+
<span v-for="word in row.parentVersionRange" :key="word.key" :class="isAversion(word) ? 'cve-version' : ''">{{word}}&nbsp;</span>
53+
</p>
54+
<ul style="border-left: none !important;">
55+
<li v-for="change in row.versionsChanges" :key="change.key">
56+
<span v-for="word in change" :key="word.key" :class="isAversion(word) ? 'cve-version' : ''">{{word}}&nbsp;</span>
57+
</li>
58+
</ul>
6359
</span>
6460
<span v-else>
65-
{{row.parentVersionStatus}} {{row.parentVersionRange}}
61+
<span v-if="row.parentVersionRange.length > 0">{{row.parentVersionStatus}}
62+
<span v-for="word in row.parentVersionRange" :key="word.key" :class="isAversion(word) ? 'cve-version' : ''">{{word}}&nbsp;</span>
63+
</span>
64+
<span v-else>
65+
{{row.parentVersionStatus}} {{row.parentVersionRange}}
66+
</span>
6667
</span>
67-
</span>
68-
</li>
69-
</ul>
68+
</li>
69+
</ul>
70+
</div>
7071
</div>
7172
</div>
72-
</div>
73+
</div>
7374
</div>
7475
<!-- <div id="cve-cpes" v-if="product.cpes.length > 0">
7576
<p class="cve-product-status-heading" style="border-bottom: 1px solid lightgray;">CPEs</p>
@@ -177,11 +178,5 @@ export default {
177178
.level-item {
178179
justify-content: left!important;
179180
}
180-
181-
.cve-versions-scroll {
182-
max-height: 15rem;
183-
border-bottom: 1px solid lightgray;
184-
overflow-y: scroll;
185-
}
186181
</style>
187182

0 commit comments

Comments
 (0)