Skip to content

Commit 1c24842

Browse files
authored
Merge pull request #247 from sahibamittal/quick-fix-osv-ecosystem-list
Quick-fix : OSV ecosystem toggle handling
2 parents 4713f98 + 647aaec commit 1c24842

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/views/administration/vuln-sources/VulnSourceOSVAdvisories.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
label
1010
v-bind="labelIcon"
1111
v-model="vulnsourceEnabled"
12-
@change="handleVulnsourceEnabled"
1312
:disabled="enabledEcosystems.length === 0"
1413
/>
1514
{{$t('admin.vulnsource_osv_advisories_enable')}}
@@ -58,6 +57,16 @@ export default {
5857
},
5958
}
6059
},
60+
watch: {
61+
vulnsourceEnabled(toggleChange) {
62+
if(toggleChange === false) {
63+
this.enabledEcosystems = [];
64+
this.updateConfigProperties([
65+
{groupName: 'vuln-source', propertyName: 'google.osv.enabled', propertyValue: null}
66+
]);
67+
}
68+
}
69+
},
6170
methods: {
6271
removeEcosystem: function(ecosystem) {
6372
this.enabledEcosystems = this.enabledEcosystems.filter(e => e !== ecosystem);
@@ -76,14 +85,6 @@ export default {
7685
this.updateConfigProperties([
7786
{groupName: 'vuln-source', propertyName: 'google.osv.enabled', propertyValue: this.enabledEcosystems.join(";")}
7887
]);
79-
},
80-
handleVulnsourceEnabled: function(vulnsourceEnabled) {
81-
if (vulnsourceEnabled === false) {
82-
this.enabledEcosystems = [];
83-
this.updateConfigProperties([
84-
{groupName: 'vuln-source', propertyName: 'google.osv.enabled', propertyValue: null}
85-
]);
86-
}
8788
}
8889
},
8990
created () {

0 commit comments

Comments
 (0)