Skip to content

Commit 60db274

Browse files
xingzhang-suselsongsuse
authored andcommitted
Fixed PR review issues
1 parent bfa791c commit 60db274

4 files changed

Lines changed: 29 additions & 9 deletions

File tree

pkg/neuvector-ui-ext/components/Dashboard/charts/BarChart4TopVulnerableContainers.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,23 @@
1515
/>
1616
</div>
1717
</div>
18-
18+
1919
</template>
2020

2121
<script>
2222
import { BarChart } from 'vue-chart-3';
2323
import { Chart, registerables } from 'chart.js';
24-
import { ref, defineComponent, computed } from 'vue';
24+
import { ref, defineComponent } from 'vue';
2525
import EmptyDataMessage from '../contents/EmptyDataMessage';
2626
2727
Chart.register(...registerables);
2828
2929
export default defineComponent({
3030
name: 'BarChart4TopVulnerableContainers',
31-
components: { BarChart, EmptyDataMessage },
31+
components: {
32+
BarChart,
33+
EmptyDataMessage,
34+
},
3235
props: {
3336
width: { type: Number, default: 400 },
3437
height: { type: Number, default: 300 },
@@ -130,4 +133,4 @@
130133
display: flex;
131134
justify-content: center;
132135
}
133-
</style>
136+
</style>

pkg/neuvector-ui-ext/components/Dashboard/contents/ScoreFactor.vue

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ export default {
4646
<div class="subtitle">
4747
</div>
4848
</div>
49-
<div class="risk-section-details d-flex align-items-center justify-content-center" v-if="!riskFactor.isFactorError">
50-
<div class="">
49+
<div class="risk-section-details risk-factor-layout" v-if="!riskFactor.isFactorError">
50+
<div class="risk-factor-rank">
5151
<div class="secure-rank-wrap">
5252
<div class="secure-rank"></div>
5353
<div class="empty" :style="riskFactor.subScore"></div>
5454
</div>
5555
</div>
56-
<table class="">
56+
<table class="table risk-factor-table">
5757
<tr v-for="factor in riskFactor.factors" :key="factor">
5858
<td>{{factor.category}}</td>
5959
<td style="text-align: left;">
@@ -227,6 +227,23 @@ export default {
227227
}
228228
}
229229
230+
.risk-factor-layout {
231+
display: flex;
232+
align-items: center;
233+
justify-content: space-between;
234+
}
235+
236+
.risk-factor-rank {
237+
flex: 0 0 auto;
238+
order: 2;
239+
}
240+
241+
.risk-factor-table {
242+
flex: 1 1 auto;
243+
margin-bottom: 0;
244+
order: 1;
245+
}
246+
230247
.secure-rank-wrap {
231248
height: 90px;
232249
width: 10px;

pkg/neuvector-ui-ext/components/Dashboard/panels/Exposures.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default {
211211
</div>
212212
</template>
213213
214-
<style>
214+
<style lang="scss" scoped>
215215
.exposure-chart {
216216
width: 100%;
217217
max-width: 600px;

pkg/neuvector-ui-ext/components/common/contents/FlagIpFqdn.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</script>
1919

2020
<template>
21-
<a :href="'https://www.whois.com/whois/' + ip" target="_blank" style="display:inline-flex;">
21+
<a :href="'https://www.whois.com/whois/' + ip" target="_blank" rel="noopener noreferrer" style="display:inline-flex;">
2222
<country-flag v-if="countryCode !== '-'" class="mr-2" style="margin-top: -6px; position: relative; margin-right: 1em;" :country='countryCode.toLowerCase()' size='normal' v-tooltip.top="{
2323
content: isTooltipVisible ? countryName : '',
2424
}"/>

0 commit comments

Comments
 (0)