Skip to content

Commit

Permalink
Fix/create shoot issues (gardener#1447)
Browse files Browse the repository at this point in the history
* Do not implicitly reset purpose

* Fixed create button greyed out if user changes infrastructure

* Re-added check to WorkerInputGeneric component (let's leave it like this, eventing will be replaced anyway)
Added keys to all rows inside v-expansion-panels as otherwise the intended component (re-)usage is not guaranteed

* use some

---------

Co-authored-by: Holger Koser <[email protected]>
  • Loading branch information
grolu and holgerkoser authored Mar 23, 2023
1 parent 0c78340 commit 6580282
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion frontend/src/components/NewShoot/NewShootDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export default {
},
onPurposeValid (value) {
this.purposeValid = value
this.validateInput()
},
validateInput () {
const valid = !this.$v.$invalid && this.purposeValid
Expand Down Expand Up @@ -274,7 +275,7 @@ export default {
mounted () {
this.userInterActionBus.on('updateSecret', secret => {
this.secret = secret
this.$purpose.dispatch('setDefaultPurpose')
this.$purpose.dispatch('resetPurpose')
})
this.userInterActionBus.on('updateCloudProfileName', cloudProfileName => {
this.cloudProfileName = cloudProfileName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export default {
this.floatingPoolValid = true
this.cloudProfileValid = true

this.secret = head(this.infrastructureSecretsByProfileName)
this.onUpdateSecret(head(this.infrastructureSecretsByProfileName))
this.region = head(this.regionsWithSeed)
if (!this.region && this.showAllRegions) {
this.region = head(this.regionsWithoutSeed)
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/components/Purpose.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ SPDX-License-Identifier: Apache-2.0
import { required } from 'vuelidate/lib/validators'
import { getValidationErrors, purposesForSecret } from '@/utils'
import map from 'lodash/map'
import head from 'lodash/head'

const validationErrors = {
internalPurpose: {
Expand Down Expand Up @@ -100,9 +99,11 @@ export default {
return ''
}
},
setDefaultPurpose () {
this.internalPurpose = head(this.purposes).purpose
this.onInputPurpose()
resetPurpose () {
if (!this.purposes.some(p => p.purpose === this.internalPurpose)) {
this.internalPurpose = undefined
this.onInputPurpose()
}
},
setPurpose (purpose) {
this.internalPurpose = purpose
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ShootDns/ManageDns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SPDX-License-Identifier: Apache-2.0
v-for="id in dnsProviderIds"
:key="id"
>
<v-row class="list-item pt-2">
<v-row class="list-item pt-2" :key="id">
<dns-provider-row :dnsProviderId="id"/>
</v-row>
</v-expand-transition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-License-Identifier: Apache-2.0
v-for="(scheduleEvent, index) in parsedScheduleEvents"
:key="scheduleEvent.id"
>
<v-row class="list-item pt-2">
<v-row class="list-item pt-2" :key="scheduleEvent.id">
<hibernation-schedule-event
ref="scheduleEvents"
:schedule-event="scheduleEvent"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ShootWorkers/ManageWorkers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SPDX-License-Identifier: Apache-2.0
v-for="(worker, index) in internalWorkers"
:key="worker.id"
>
<v-row class="list-item pt-2 my-0 mx-1" >
<v-row class="list-item pt-2 my-0 mx-1" :key="worker.id">
<worker-input-generic
ref="workerInput"
:worker="worker"
Expand Down

0 comments on commit 6580282

Please sign in to comment.