summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/views/Logs/Dumps/DumpsForm.vue5
-rw-r--r--src/views/Logs/Dumps/DumpsModalConfirmation.vue20
2 files changed, 20 insertions, 5 deletions
diff --git a/src/views/Logs/Dumps/DumpsForm.vue b/src/views/Logs/Dumps/DumpsForm.vue
index 17257d1ec..b27aebac0 100644
--- a/src/views/Logs/Dumps/DumpsForm.vue
+++ b/src/views/Logs/Dumps/DumpsForm.vue
@@ -28,7 +28,10 @@
{{ $t('pageDumps.form.initiateDump') }}
</b-button>
</b-form>
- <modal-confirmation @ok="createSystemDump" />
+ <modal-confirmation
+ :require-confirmation="selectedDumpType === 'system'"
+ @ok="createSystemDump"
+ />
</div>
</template>
diff --git a/src/views/Logs/Dumps/DumpsModalConfirmation.vue b/src/views/Logs/Dumps/DumpsModalConfirmation.vue
index 05b868dba..fd1cb78cb 100644
--- a/src/views/Logs/Dumps/DumpsModalConfirmation.vue
+++ b/src/views/Logs/Dumps/DumpsModalConfirmation.vue
@@ -46,6 +46,12 @@ import { useI18n } from 'vue-i18n';
export default {
components: { StatusIcon },
mixins: [VuelidateMixin],
+ props: {
+ requireConfirmation: {
+ type: Boolean,
+ default: false,
+ },
+ },
setup() {
return {
v$: useVuelidate(),
@@ -55,12 +61,17 @@ export default {
return {
$t: useI18n().t,
confirmed: false,
+ isOpen: this.requireConfirmation,
};
},
- validations: {
- confirmed: {
- mustBeTrue: (value) => value === true,
- },
+ validations() {
+ return this.isOpen
+ ? {
+ confirmed: {
+ mustBeTrue: (value) => value === true,
+ },
+ }
+ : {};
},
methods: {
closeModal() {
@@ -76,6 +87,7 @@ export default {
},
resetForm() {
this.confirmed = false;
+ this.isOpen = false;
this.v$.$reset();
},
},