|
226 | 226 | </Tbody>
|
227 | 227 | </Table>
|
228 | 228 | </div>
|
| 229 | + {#if authorized} |
| 230 | + <div class="wrapper"> |
| 231 | + {#if errormessage !== ''} |
| 232 | + <Alert variant="error"> |
| 233 | + {errormessage} |
| 234 | + </Alert> |
| 235 | + {/if} |
| 236 | + <p> |
| 237 | + Please provide a reason for suppressing this finding. This will be recorded in the analysis |
| 238 | + audit log. Suppression will be in effect for all workloads using this image. |
| 239 | + </p> |
| 240 | + <Select size="small" label="Analysis" bind:value={selectedReason}> |
| 241 | + {#each SUPPRESS_OPTIONS as option (option)} |
| 242 | + {#if option.value === finding.state} |
| 243 | + <option value={option.value}>{option.text} </option> |
| 244 | + {:else} |
| 245 | + <option value={option.value}>{option.text}</option> |
| 246 | + {/if} |
| 247 | + {/each} |
| 248 | + </Select> |
229 | 249 |
|
230 |
| - <div class="wrapper"> |
231 |
| - {#if errormessage !== ''} |
232 |
| - <Alert variant="error"> |
233 |
| - {errormessage} |
234 |
| - </Alert> |
235 |
| - {/if} |
236 |
| - <p> |
237 |
| - Please provide a reason for suppressing this finding. This will be recorded in the analysis |
238 |
| - audit log. Suppression will be in effect for all workloads using this image. |
239 |
| - </p> |
240 |
| - <Select size="small" label="Analysis" bind:value={selectedReason}> |
241 |
| - {#each SUPPRESS_OPTIONS as option (option)} |
242 |
| - {#if option.value === finding.state} |
243 |
| - <option value={option.value}>{option.text} </option> |
244 |
| - {:else} |
245 |
| - <option value={option.value}>{option.text}</option> |
246 |
| - {/if} |
247 |
| - {/each} |
248 |
| - </Select> |
249 |
| - |
250 |
| - <TextField type="text" bind:value={inputText}> |
251 |
| - {#snippet label()} |
252 |
| - Comment |
253 |
| - {/snippet} |
254 |
| - </TextField> |
255 |
| - <Checkbox bind:checked={suppressed}>Suppress</Checkbox> |
256 |
| - </div> |
| 250 | + <TextField type="text" bind:value={inputText}> |
| 251 | + {#snippet label()} |
| 252 | + Comment |
| 253 | + {/snippet} |
| 254 | + </TextField> |
| 255 | + <Checkbox bind:checked={suppressed}>Suppress</Checkbox> |
| 256 | + </div> |
| 257 | + {/if} |
257 | 258 | {#snippet footer()}
|
258 |
| - <Button variant="primary" size="small" onclick={triggerSuppress} disabled={!authorized} |
259 |
| - >Update</Button |
260 |
| - > |
261 |
| - <Button variant="secondary" size="small" onclick={close}>Cancel</Button> |
| 259 | + {#if authorized} |
| 260 | + <Button variant="primary" size="small" onclick={triggerSuppress} disabled={!authorized} |
| 261 | + >Update</Button |
| 262 | + > |
| 263 | + <Button variant="secondary" size="small" onclick={close}>Cancel</Button> |
| 264 | + {:else} |
| 265 | + <Button variant="secondary" size="small" onclick={close}>Close</Button> |
| 266 | + {/if} |
262 | 267 | {/snippet}
|
263 | 268 | </Modal>
|
264 | 269 |
|
|
0 commit comments