|
147 | 147 | {% endwith %} |
148 | 148 | </td> |
149 | 149 | <td class="p-1 text-nowrap"> |
150 | | - <span data-bs-toggle="modal" |
151 | | - data-bs-target="#vulnerability-analysis-modal" |
152 | | - data-advisory-uid="{{ vulnerability.advisory_uid }}" |
153 | | - data-package-identifier="{{ product_package.package.identifier }}" |
154 | | - data-edit-url="{% url 'product_portfolio:vulnerability_analysis_form' product_package.uuid vulnerability.advisory_uid %}" |
155 | | - > |
156 | | - <button type="button" data-bs-toggle="tooltip" title="Edit" class="btn btn-link p-0" aria-label="Edit"> |
157 | | - <i class="far fa-edit fa-sm"></i> |
158 | | - </button> |
159 | | - </span> |
160 | | - {% if analysis_presets and not vulnerability.vulnerability_analysis %} |
161 | | - <span class="dropdown d-inline ms-1" data-bs-toggle="tooltip" title="Apply analysis preset"> |
162 | | - <button type="button" class="btn btn-link p-0" data-bs-toggle="dropdown" aria-label="Quick action"> |
163 | | - <i class="fas fa-bolt fa-sm text-warning"></i> |
164 | | - </button> |
165 | | - <ul class="dropdown-menu dropdown-menu-end"> |
166 | | - <li><h6 class="dropdown-header small">Apply preset</h6></li> |
167 | | - {% for preset in analysis_presets %} |
168 | | - <li> |
169 | | - <button type="button" class="dropdown-item small quick-preset-btn" |
170 | | - data-apply-url="{% url 'product_portfolio:apply_analysis_preset' product_package.uuid preset.pk vulnerability.advisory_uid %}"> |
171 | | - {{ preset.name }} |
172 | | - </button> |
173 | | - </li> |
174 | | - {% endfor %} |
175 | | - </ul> |
| 150 | + <div class="d-flex flex-column align-items-center"> |
| 151 | + <span data-bs-toggle="modal" |
| 152 | + data-bs-target="#vulnerability-analysis-modal" |
| 153 | + data-advisory-uid="{{ vulnerability.advisory_uid }}" |
| 154 | + data-package-identifier="{{ product_package.package.identifier }}" |
| 155 | + data-edit-url="{% url 'product_portfolio:vulnerability_analysis_form' product_package.uuid vulnerability.advisory_uid %}" |
| 156 | + > |
| 157 | + {% if vulnerability.vulnerability_analysis %} |
| 158 | + <button type="button" data-bs-toggle="tooltip" title="Edit analysis" class="btn btn-link p-0" aria-label="Edit analysis"> |
| 159 | + <i class="far fa-edit fa-sm"></i> |
| 160 | + </button> |
| 161 | + {% else %} |
| 162 | + <button type="button" data-bs-toggle="tooltip" title="Add analysis" class="btn btn-link p-0" aria-label="Add analysis"> |
| 163 | + <i class="far fa-edit fa-sm"></i> |
| 164 | + </button> |
| 165 | + {% endif %} |
176 | 166 | </span> |
177 | | - {% endif %} |
| 167 | + {% if analysis_presets and not vulnerability.vulnerability_analysis %} |
| 168 | + <span class="dropdown d-inline mt-1" data-bs-toggle="tooltip" title="Apply analysis preset"> |
| 169 | + <button type="button" class="btn btn-link p-0" data-bs-toggle="dropdown" aria-label="Quick action"> |
| 170 | + <i class="fas fa-bolt fa-sm text-warning"></i> |
| 171 | + </button> |
| 172 | + <ul class="dropdown-menu dropdown-menu-end"> |
| 173 | + <li><h6 class="dropdown-header small">Apply preset</h6></li> |
| 174 | + {% for preset in analysis_presets %} |
| 175 | + <li> |
| 176 | + <button type="button" class="dropdown-item small quick-preset-btn" |
| 177 | + data-apply-url="{% url 'product_portfolio:apply_analysis_preset' product_package.uuid preset.pk vulnerability.advisory_uid %}"> |
| 178 | + {{ preset.name }} |
| 179 | + </button> |
| 180 | + </li> |
| 181 | + {% endfor %} |
| 182 | + </ul> |
| 183 | + </span> |
| 184 | + {% endif %} |
| 185 | + </div> |
178 | 186 | </td> |
179 | 187 | {% if not forloop.first %}</tr>{% endif %} |
180 | 188 | {% endfor %} |
|
0 commit comments