mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-10 09:02:42 +08:00
parent
75612879c7
commit
e87fb7b50e
6 changed files with 148 additions and 185 deletions
|
@ -6,6 +6,7 @@ export namespace Backup {
|
|||
type: string;
|
||||
accessKey: string;
|
||||
bucket: string;
|
||||
bucketInput: boolean;
|
||||
credential: string;
|
||||
backupPath: string;
|
||||
vars: string;
|
||||
|
|
|
@ -54,18 +54,17 @@
|
|||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Bucket" prop="bucket">
|
||||
<el-select
|
||||
@change="errBuckets = false"
|
||||
style="width: 80%"
|
||||
v-model="cosData.rowData!.bucket"
|
||||
>
|
||||
<el-form-item label="Bucket" prop="bucket" :rules="Rules.requiredInput">
|
||||
<el-checkbox v-model="cosData.rowData!.bucketInput" :label="$t('container.input')" />
|
||||
<el-input clearable v-if="cosData.rowData!.bucketInput" v-model="cosData.rowData!.bucket" />
|
||||
<div v-else class="w-full">
|
||||
<el-select style="width: 80%" v-model="cosData.rowData!.bucket">
|
||||
<el-option v-for="item in buckets" :key="item" :value="item" />
|
||||
</el-select>
|
||||
<el-button style="width: 20%" plain @click="getBuckets(formRef)">
|
||||
<el-button style="width: 20%" plain @click="getBuckets()">
|
||||
{{ $t('setting.loadBucket') }}
|
||||
</el-button>
|
||||
<span v-if="errBuckets" class="input-error">{{ $t('commons.rule.requiredSelect') }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('setting.scType')"
|
||||
|
@ -122,7 +121,6 @@ type FormInstance = InstanceType<typeof ElForm>;
|
|||
const formRef = ref<FormInstance>();
|
||||
const buckets = ref();
|
||||
const regionInput = ref();
|
||||
const errBuckets = ref();
|
||||
|
||||
const endpointProto = ref('http');
|
||||
const emit = defineEmits(['search']);
|
||||
|
@ -181,10 +179,7 @@ const handleClose = () => {
|
|||
drawerVisible.value = false;
|
||||
};
|
||||
|
||||
const getBuckets = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
const getBuckets = async () => {
|
||||
loading.value = true;
|
||||
let item = deepCopy(cosData.value.rowData!.varsJson);
|
||||
item['endpoint'] = spliceHttp(endpointProto.value, cosData.value.rowData!.varsJson['endpointItem']);
|
||||
|
@ -202,14 +197,9 @@ const getBuckets = async (formEl: FormInstance | undefined) => {
|
|||
buckets.value = [];
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
if (!cosData.value.rowData.bucket) {
|
||||
errBuckets.value = true;
|
||||
return;
|
||||
}
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
|
|
|
@ -36,18 +36,21 @@
|
|||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Bucket" prop="bucket">
|
||||
<el-select
|
||||
@change="errBuckets = false"
|
||||
style="width: 80%"
|
||||
<el-form-item label="Bucket" prop="bucket" :rules="Rules.requiredInput">
|
||||
<el-checkbox v-model="kodoData.rowData!.bucketInput" :label="$t('container.input')" />
|
||||
<el-input
|
||||
clearable
|
||||
v-if="kodoData.rowData!.bucketInput"
|
||||
v-model="kodoData.rowData!.bucket"
|
||||
>
|
||||
/>
|
||||
<div v-else class="w-full">
|
||||
<el-select style="width: 80%" v-model="kodoData.rowData!.bucket">
|
||||
<el-option v-for="item in buckets" :key="item" :value="item" />
|
||||
</el-select>
|
||||
<el-button style="width: 20%" plain @click="getBuckets(formRef)">
|
||||
<el-button style="width: 20%" plain @click="getBuckets()">
|
||||
{{ $t('setting.loadBucket') }}
|
||||
</el-button>
|
||||
<span v-if="errBuckets" class="input-error">{{ $t('commons.rule.requiredSelect') }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('cronjob.requestExpirationTime')" prop="varsJson.timeout">
|
||||
|
@ -95,7 +98,6 @@ const loading = ref(false);
|
|||
type FormInstance = InstanceType<typeof ElForm>;
|
||||
const formRef = ref<FormInstance>();
|
||||
const buckets = ref();
|
||||
const errBuckets = ref();
|
||||
|
||||
const domainProto = ref('http');
|
||||
const emit = defineEmits(['search']);
|
||||
|
@ -129,10 +131,7 @@ const handleClose = () => {
|
|||
drawerVisible.value = false;
|
||||
};
|
||||
|
||||
const getBuckets = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
const getBuckets = async () => {
|
||||
loading.value = true;
|
||||
let item = deepCopy(kodoData.value.rowData!.varsJson);
|
||||
item['domain'] = spliceHttp(domainProto.value, kodoData.value.rowData!.varsJson['domainItem']);
|
||||
|
@ -150,14 +149,9 @@ const getBuckets = async (formEl: FormInstance | undefined) => {
|
|||
buckets.value = [];
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
if (!kodoData.value.rowData.bucket) {
|
||||
errBuckets.value = true;
|
||||
return;
|
||||
}
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
|
|
|
@ -32,18 +32,21 @@
|
|||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Bucket" prop="bucket">
|
||||
<el-select
|
||||
style="width: 80%"
|
||||
@change="errBuckets = false"
|
||||
<el-form-item label="Bucket" prop="bucket" :rules="Rules.requiredInput">
|
||||
<el-checkbox v-model="minioData.rowData!.bucketInput" :label="$t('container.input')" />
|
||||
<el-input
|
||||
clearable
|
||||
v-if="minioData.rowData!.bucketInput"
|
||||
v-model="minioData.rowData!.bucket"
|
||||
>
|
||||
/>
|
||||
<div v-else class="w-full">
|
||||
<el-select style="width: 80%" v-model="minioData.rowData!.bucket">
|
||||
<el-option v-for="item in buckets" :key="item" :value="item" />
|
||||
</el-select>
|
||||
<el-button style="width: 20%" plain @click="getBuckets(formRef)">
|
||||
<el-button style="width: 20%" plain @click="getBuckets()">
|
||||
{{ $t('setting.loadBucket') }}
|
||||
</el-button>
|
||||
<span v-if="errBuckets" class="input-error">{{ $t('commons.rule.requiredSelect') }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('setting.backupDir')" prop="backupPath">
|
||||
<el-input clearable v-model.trim="minioData.rowData!.backupPath" placeholder="/1panel" />
|
||||
|
@ -80,7 +83,6 @@ const loading = ref(false);
|
|||
type FormInstance = InstanceType<typeof ElForm>;
|
||||
const formRef = ref<FormInstance>();
|
||||
const buckets = ref();
|
||||
const errBuckets = ref();
|
||||
|
||||
const endpointProto = ref('http');
|
||||
const emit = defineEmits(['search']);
|
||||
|
@ -111,10 +113,7 @@ const handleClose = () => {
|
|||
drawerVisible.value = false;
|
||||
};
|
||||
|
||||
const getBuckets = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
const getBuckets = async () => {
|
||||
loading.value = true;
|
||||
let item = deepCopy(minioData.value.rowData!.varsJson);
|
||||
item['endpoint'] = spliceHttp(endpointProto.value, minioData.value.rowData!.varsJson['endpointItem']);
|
||||
|
@ -133,14 +132,9 @@ const getBuckets = async (formEl: FormInstance | undefined) => {
|
|||
buckets.value = [];
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
if (!minioData.value.rowData.bucket) {
|
||||
errBuckets.value = true;
|
||||
return;
|
||||
}
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
|
|
|
@ -32,18 +32,17 @@
|
|||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Bucket" prop="bucket">
|
||||
<el-select
|
||||
@change="errBuckets = false"
|
||||
style="width: 80%"
|
||||
v-model="ossData.rowData!.bucket"
|
||||
>
|
||||
<el-form-item label="Bucket" prop="bucket" :rules="Rules.requiredInput">
|
||||
<el-checkbox v-model="ossData.rowData!.bucketInput" :label="$t('container.input')" />
|
||||
<el-input clearable v-if="ossData.rowData!.bucketInput" v-model="ossData.rowData!.bucket" />
|
||||
<div v-else class="w-full">
|
||||
<el-select style="width: 80%" v-model="ossData.rowData!.bucket">
|
||||
<el-option v-for="item in buckets" :key="item" :value="item" />
|
||||
</el-select>
|
||||
<el-button style="width: 20%" plain @click="getBuckets(formRef)">
|
||||
<el-button style="width: 20%" plain @click="getBuckets()">
|
||||
{{ $t('setting.loadBucket') }}
|
||||
</el-button>
|
||||
<span v-if="errBuckets" class="input-error">{{ $t('commons.rule.requiredSelect') }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('setting.scType')"
|
||||
|
@ -99,7 +98,6 @@ const loading = ref(false);
|
|||
type FormInstance = InstanceType<typeof ElForm>;
|
||||
const formRef = ref<FormInstance>();
|
||||
const buckets = ref();
|
||||
const errBuckets = ref();
|
||||
|
||||
const endpointProto = ref('http');
|
||||
const emit = defineEmits(['search']);
|
||||
|
@ -133,10 +131,7 @@ const handleClose = () => {
|
|||
drawerVisible.value = false;
|
||||
};
|
||||
|
||||
const getBuckets = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
const getBuckets = async () => {
|
||||
loading.value = true;
|
||||
let item = deepCopy(ossData.value.rowData!.varsJson);
|
||||
item['endpoint'] = spliceHttp(endpointProto.value, ossData.value.rowData!.varsJson['endpointItem']);
|
||||
|
@ -154,14 +149,9 @@ const getBuckets = async (formEl: FormInstance | undefined) => {
|
|||
buckets.value = [];
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
if (!ossData.value.rowData.bucket) {
|
||||
errBuckets.value = true;
|
||||
return;
|
||||
}
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
|
|
|
@ -35,14 +35,17 @@
|
|||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Bucket" prop="bucket">
|
||||
<el-select @change="errBuckets = false" style="width: 80%" v-model="s3Data.rowData!.bucket">
|
||||
<el-form-item label="Bucket" prop="bucket" :rules="Rules.requiredInput">
|
||||
<el-checkbox v-model="s3Data.rowData!.bucketInput" :label="$t('container.input')" />
|
||||
<el-input clearable v-if="s3Data.rowData!.bucketInput" v-model="s3Data.rowData!.bucket" />
|
||||
<div v-else class="w-full">
|
||||
<el-select style="width: 80%" v-model="s3Data.rowData!.bucket">
|
||||
<el-option v-for="item in buckets" :key="item" :value="item" />
|
||||
</el-select>
|
||||
<el-button style="width: 20%" plain @click="getBuckets(formRef)">
|
||||
<el-button style="width: 20%" plain @click="getBuckets()">
|
||||
{{ $t('setting.loadBucket') }}
|
||||
</el-button>
|
||||
<span v-if="errBuckets" class="input-error">{{ $t('commons.rule.requiredSelect') }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('setting.scType')"
|
||||
|
@ -98,7 +101,6 @@ const loading = ref(false);
|
|||
type FormInstance = InstanceType<typeof ElForm>;
|
||||
const formRef = ref<FormInstance>();
|
||||
const buckets = ref();
|
||||
const errBuckets = ref();
|
||||
|
||||
const endpointProto = ref('http');
|
||||
const emit = defineEmits(['search']);
|
||||
|
@ -132,10 +134,7 @@ const handleClose = () => {
|
|||
drawerVisible.value = false;
|
||||
};
|
||||
|
||||
const getBuckets = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
const getBuckets = async () => {
|
||||
loading.value = true;
|
||||
let item = deepCopy(s3Data.value.rowData!.varsJson);
|
||||
item['endpoint'] = spliceHttp(endpointProto.value, s3Data.value.rowData!.varsJson['endpointItem']);
|
||||
|
@ -153,14 +152,9 @@ const getBuckets = async (formEl: FormInstance | undefined) => {
|
|||
buckets.value = [];
|
||||
loading.value = false;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
if (!s3Data.value.rowData.bucket) {
|
||||
errBuckets.value = true;
|
||||
return;
|
||||
}
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) return;
|
||||
|
|
Loading…
Reference in a new issue