Skip to content

Commit d60f5a9

Browse files
committed
Feat: enable the free-typing for "Repositories to scan" selector
1 parent 2a7af5e commit d60f5a9

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

pkg/sbombastic-image-vulnerability-scanner/edit/sbombastic.rancher.io.registry.vue

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import CreateEditView from '@shell/mixins/create-edit-view';
33
import Footer from '@shell/components/form/Footer';
44
import { LabeledInput } from '@components/Form/LabeledInput';
5-
import { RadioGroup } from '@components/Form/Radio';
65
import NameNsDescription from '@shell/components/form/NameNsDescription';
76
import CruResource from '@shell/components/CruResource';
87
import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
@@ -21,7 +20,6 @@ export default {
2120
2221
components: {
2322
Footer,
24-
RadioGroup,
2523
LabeledInput,
2624
NameNsDescription,
2725
CruResource,
@@ -54,11 +52,6 @@ export default {
5452
},
5553
5654
computed: {
57-
namespace(){
58-
console.log('this.value.spec.type:',this.value.spec.type);
59-
return this.value.spec.type === 'ecr'?"kube-system":""
60-
},
61-
6255
inStore() {
6356
return this.$store.getters['currentProduct']?.inStore || MANAGEMENT;
6457
},
@@ -163,16 +156,25 @@ export default {
163156
<div class="row">
164157
<div class="col span-6" >
165158
<LabeledSelect
159+
data-testid="registry-scanning-repository-names"
166160
v-model:value="value.spec.repositories"
167-
:options="value.spec.repositories"
161+
:taggable="true"
162+
:searchable="true"
163+
:push-tags="true"
164+
:close-on-select="false"
165+
:mode="mode"
166+
:multiple="true"
167+
:label="t('imageScanner.registries.configuration.cru.scan.repoName')"
168168
:placeholder="t('imageScanner.registries.configuration.cru.scan.placeholder')"
169-
:label="t('imageScanner.registries.configuration.cru.scan.type')"
169+
:options="value.spec.repositories"
170+
:disabled="mode==='view'"
171+
@update:value="update"
170172
/>
171173
</div>
172174
<div class="col span-3">
173175
<LabeledSelect
174176
v-model:value="value.spec.scanInterval"
175-
data-testid="registry-scan-interval-select"
177+
data-testid="registry-scanning-interval-select"
176178
:options = "SCAN_INTERVAL_OPTIONS"
177179
option-key="value"
178180
option-label="label"

pkg/sbombastic-image-vulnerability-scanner/l10n/en-us.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ imageScanner:
4444
label: Authentication
4545
scan:
4646
label: Scanning
47-
type: Repositories to scan
48-
placeholder: Type and press Enter ...
47+
repoName: Repositories to scan
48+
placeholder: Leave empty to scan all. Type and press Enter to add repositories.
4949
schedule:
5050
label: Scan Interval
5151
scan: Start Scan

0 commit comments

Comments
 (0)