@@ -66,6 +66,27 @@ <h1 class="h3 mb-0">
6666 </ div >
6767 </ div >
6868 </ div >
69+ < div class ="col-6 col-md-3 ">
70+ < div class ="bg-body-secondary rounded-3 p-3 ">
71+ < div class ="small text-body-secondary mb-1 "> {% trans "Policy violations" %}</ div >
72+ {% if products_with_policy_violations %}
73+ < a href ="?policy_violations=true " class ="fs-4 fw-medium lh-sm text-danger ">
74+ {{ products_with_policy_violations }}
75+ </ a >
76+ {% else %}
77+ < div class ="fs-4 fw-medium lh-sm text-success ">
78+ {{ products_with_policy_violations }}
79+ </ div >
80+ {% endif %}
81+ < div class ="text-body-tertiary fs-xs mt-1 ">
82+ {% if products_with_policy_violations %}
83+ {% trans "products with active rule violations" %}
84+ {% else %}
85+ {% trans "No active policy violations" %}
86+ {% endif %}
87+ </ div >
88+ </ div >
89+ </ div >
6990 < div class ="col-6 col-md-3 ">
7091 < div class ="bg-body-secondary rounded-3 p-3 ">
7192 < div class ="small text-body-secondary mb-1 "> {% trans "License compliance" %}</ div >
@@ -104,27 +125,6 @@ <h1 class="h3 mb-0">
104125 </ div >
105126 </ div >
106127 </ div >
107- < div class ="col-6 col-md-3 ">
108- < div class ="bg-body-secondary rounded-3 p-3 ">
109- < div class ="small text-body-secondary mb-1 "> {% trans "Policy violations" %}</ div >
110- {% if products_with_policy_violations %}
111- < a href ="?policy_violations=true " class ="fs-4 fw-medium lh-sm text-danger ">
112- {{ products_with_policy_violations }}
113- </ a >
114- {% else %}
115- < div class ="fs-4 fw-medium lh-sm text-success ">
116- {{ products_with_policy_violations }}
117- </ div >
118- {% endif %}
119- < div class ="text-body-tertiary fs-xs mt-1 ">
120- {% if products_with_policy_violations %}
121- {% trans "products with active rule violations" %}
122- {% else %}
123- {% trans "No active policy violations" %}
124- {% endif %}
125- </ div >
126- </ div >
127- </ div >
128128 </ div >
129129
130130 < div class ="border rounded-3 p-3 pt-2 mb-3 ">
@@ -133,9 +133,9 @@ <h1 class="h3 mb-0">
133133 < tr >
134134 < th class ="fw-medium "> {% trans "Product" %}</ th >
135135 < th class ="fw-medium text-end "> {% trans "Packages" %}</ th >
136+ < th class ="fw-medium text-end "> {% trans "Policy violations" %}</ th >
136137 < th class ="fw-medium text-end "> {% trans "License compliance" %}</ th >
137138 < th class ="fw-medium text-end "> {% trans "Vulnerabilities" %}</ th >
138- < th class ="fw-medium text-end "> {% trans "Policy violations" %}</ th >
139139 </ tr >
140140 </ thead >
141141 < tbody >
@@ -152,6 +152,15 @@ <h1 class="h3 mb-0">
152152 {{ product.package_count|intcomma }}
153153 </ a >
154154 </ td >
155+ < td class ="text-end ">
156+ {% if product.policy_violation_count %}
157+ < a href ="{{ product_url }}#compliance " class ="badge bg-danger-subtle text-danger-emphasis text-decoration-none ">
158+ {{ product.policy_violation_count }} {% trans "rule" %}{{ product.policy_violation_count|pluralize }} {% trans "triggered" %}
159+ </ a >
160+ {% else %}
161+ < span class ="text-body-tertiary small "> {% trans "None" %}</ span >
162+ {% endif %}
163+ </ td >
155164 < td class ="text-end ">
156165 {% if product.license_error_count %}
157166 < a href ="{{ product_url }}?licenses-usage_policy__compliance_alert=error#licenses " class ="badge bg-danger-subtle text-danger-emphasis ">
@@ -189,15 +198,6 @@ <h1 class="h3 mb-0">
189198 < span class ="text-body-tertiary small "> {% trans "None" %}</ span >
190199 {% endif %}
191200 </ td >
192- < td class ="text-end ">
193- {% if product.policy_violation_count %}
194- < a href ="{{ product_url }}#compliance " class ="badge bg-danger-subtle text-danger-emphasis text-decoration-none ">
195- {{ product.policy_violation_count }} {% trans "rule" %}{{ product.policy_violation_count|pluralize }} {% trans "triggered" %}
196- </ a >
197- {% else %}
198- < span class ="text-body-tertiary small "> {% trans "None" %}</ span >
199- {% endif %}
200- </ td >
201201 </ tr >
202202 {% endwith %}
203203 {% empty %}
0 commit comments