Skip to content

Commit 41c46f9

Browse files
Added policy violations to component view
1 parent cca2aaf commit 41c46f9

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

src/views/portfolio/projects/ComponentDashboard.vue

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,38 @@
6565
</b-row>
6666
</div>
6767
</b-card>
68+
<b-row>
69+
<b-col sm="6">
70+
<b-card>
71+
<b-row>
72+
<b-col sm="5">
73+
<h4 id="chart-policy-violations" class="card-title mb-0">{{ $t('message.policy_violations') }}</h4>
74+
<div class="small text-muted">
75+
{{$t('message.policy_violations_by_state')}}
76+
</div>
77+
</b-col>
78+
<b-col sm="7" class="d-none d-md-block">
79+
</b-col>
80+
</b-row>
81+
<chart-policy-violations ref="chartPolicyViolations" chartId="chartPolicyViolations" class="chart-wrapper" style="height:200px;margin-top:40px;" :height="200"></chart-policy-violations>
82+
</b-card>
83+
</b-col>
84+
<b-col sm="6">
85+
<b-card>
86+
<b-row>
87+
<b-col sm="5">
88+
<h4 id="chart-policy-violation-breakdown" class="card-title mb-0">{{ $t('message.policy_violations') }}</h4>
89+
<div class="small text-muted">
90+
{{$t('message.policy_violations_by_classification')}}
91+
</div>
92+
</b-col>
93+
<b-col sm="7" class="d-none d-md-block">
94+
</b-col>
95+
</b-row>
96+
<chart-policy-violation-breakdown ref="chartPolicyViolationBreakdown" chartId="chartPolicyViolationBreakdown" class="chart-wrapper" style="height:200px;margin-top:40px;" :height="200"></chart-policy-violation-breakdown>
97+
</b-card>
98+
</b-col>
99+
</b-row>
68100
</div>
69101
</template>
70102

@@ -73,14 +105,18 @@
73105
import { Callout } from '@coreui/vue'
74106
import ChartAuditingProgress from "../../dashboard/ChartAuditingProgress";
75107
import ChartComponentVulnerabilities from "../../dashboard/ChartComponentVulnerabilities";
76-
import ChartPortfolioVulnerabilities from '../../dashboard/ChartPortfolioVulnerabilities'
108+
import ChartPortfolioVulnerabilities from '../../dashboard/ChartPortfolioVulnerabilities';
109+
import ChartPolicyViolations from "@/views/dashboard/ChartPolicyViolations";
110+
import ChartPolicyViolationBreakdown from '@/views/dashboard/ChartPolicyViolationBreakdown';
77111
78112
export default {
79113
name: 'ComponentDashboard',
80114
components: {
81115
ChartAuditingProgress,
82116
ChartComponentVulnerabilities,
83117
ChartPortfolioVulnerabilities,
118+
ChartPolicyViolations,
119+
ChartPolicyViolationBreakdown,
84120
Callout,
85121
86122
},
@@ -145,6 +181,8 @@
145181
let url = `${this.$api.BASE_URL}/${this.$api.URL_METRICS}/component/${uuid}/days/${daysBack}`;
146182
this.axios.get(url).then((response) => {
147183
this.$refs.chartComponentVulnerabilities.render(response.data);
184+
this.$refs.chartPolicyViolations.render(response.data);
185+
this.$refs.chartPolicyViolationBreakdown.render(response.data);
148186
this.extractStats(response.data);
149187
});
150188
}

0 commit comments

Comments
 (0)