Skip to content

Commit 274152c

Browse files
rushk014xingzhang-suse
authored andcommitted
fix(vulnerabilities): Use dynamic BlockPercentageBar
Still need to set responsiveness behavior by fixed height
1 parent 1110c0e commit 274152c

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

pkg/sbombastic-image-vulnerability-scanner/components/common/SevereVulnerabilitiesItem.vue

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
<div class="impacted-container">
88
<div class="impacted">
99
<span>{{ vulnerability.impactedImages }}</span>
10-
<BlockPercentageBarAlt
10+
<BlockPercentageBar
11+
class="percentage-bar"
1112
:percentage="(vulnerability.impactedImages / total) * 100"
12-
:ticks="23"
1313
/>
1414
</div>
1515
</div>
1616
</div>
1717
</template>
1818

1919
<script>
20-
import BlockPercentageBarAlt from './BlockPercentageBarAlt.vue';
20+
import BlockPercentageBar from './BlockPercentageBar.vue';
2121
import ScoreBadge from './ScoreBadge.vue';
2222
2323
export default {
2424
name: 'severeVulnerabilitiesItem',
2525
components: {
2626
ScoreBadge,
27-
BlockPercentageBarAlt
27+
BlockPercentageBar
2828
},
2929
props: {
3030
vulnerability: {
@@ -46,24 +46,26 @@
4646

4747
<style lang="scss" scoped>
4848
.vulnerability-record {
49-
display: flex;
49+
display: grid;
50+
grid-template-columns: 1fr 0.75fr 1.25fr;
5051
padding: 4px 0;
5152
align-items: center;
5253
align-self: stretch;
54+
max-height: 28px;
5355
5456
.cve {
5557
display: flex;
5658
padding: 0 16px;
5759
align-items: flex-start;
5860
gap: 8px;
59-
flex: 1 0 0;
6061
}
6162
6263
.impacted-container {
6364
display: flex;
64-
width: 260px;
6565
padding: 0 16px;
6666
align-items: center;
67+
justify-content: end;
68+
min-width: 230px;
6769
}
6870
6971
.impacted {
@@ -73,6 +75,10 @@
7375
gap: 16px;
7476
flex: 1 0 0;
7577
align-self: stretch;
78+
79+
.percentage-bar {
80+
width: 158px;
81+
}
7682
}
7783
}
7884
</style>

0 commit comments

Comments
 (0)