mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-05 06:04:35 +08:00
fix: Resolve the issue of failed push certificate to all nodes.
This commit is contained in:
parent
dcb004e983
commit
2286cfd0fd
4 changed files with 17 additions and 16 deletions
|
@ -747,6 +747,7 @@ func (w WebsiteSSLService) ImportMasterSSL(create model.WebsiteSSL) error {
|
|||
websiteSSL.Pem = create.Pem
|
||||
websiteSSL.Type = create.Type
|
||||
websiteSSL.Organization = create.Organization
|
||||
websiteSSL.MasterSSLID = create.ID
|
||||
if err := websiteSSLRepo.Save(websiteSSL); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</template>
|
||||
<template #main>
|
||||
<div>
|
||||
<MainDiv :heightDiff="350">
|
||||
<MainDiv :heightDiff="300">
|
||||
<el-alert type="info" :title="$t('app.appHelper')" :closable="false" />
|
||||
<el-row :gutter="5" v-if="apps.length > 0">
|
||||
<el-col
|
||||
|
|
|
@ -140,7 +140,7 @@ import { App } from '@/api/interface/app';
|
|||
import { getAppByKey, getAppDetail, getAppInstalledByID } from '@/api/modules/app';
|
||||
import { Rules, checkNumberRange } from '@/global/form-rules';
|
||||
import { FormInstance, FormRules } from 'element-plus';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import Params from '../params/index.vue';
|
||||
import { Container } from '@/api/interface/container';
|
||||
import CodemirrorPro from '@/components/codemirror-pro/index.vue';
|
||||
|
@ -222,10 +222,10 @@ const initFormData = () => ({
|
|||
restartPolicy: 'always',
|
||||
});
|
||||
|
||||
const formData = reactive(props.modelValue || initFormData());
|
||||
const formData = ref(props.modelValue || initFormData());
|
||||
|
||||
watch(
|
||||
formData,
|
||||
formData.value,
|
||||
(newVal) => {
|
||||
emit('update:modelValue', newVal);
|
||||
},
|
||||
|
@ -236,14 +236,14 @@ watch(
|
|||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
Object.assign(formData, newVal);
|
||||
Object.assign(formData.value, newVal);
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true },
|
||||
);
|
||||
|
||||
const changeUnit = () => {
|
||||
if (formData.memoryUnit == 'M') {
|
||||
if (formData.value.memoryUnit == 'M') {
|
||||
limits.value.memory = oldMemory.value;
|
||||
} else {
|
||||
limits.value.memory = Number((oldMemory.value / 1024).toFixed(2));
|
||||
|
@ -257,8 +257,8 @@ const handleVersionChange = async (version: string) => {
|
|||
const getVersionDetail = async (version: string) => {
|
||||
try {
|
||||
const res = await getAppDetail(currentApp.value.id, version, 'app', operateNode.value);
|
||||
formData.appDetailId = res.data.id;
|
||||
formData.dockerCompose = res.data.dockerCompose;
|
||||
formData.value.appDetailId = res.data.id;
|
||||
formData.value.dockerCompose = res.data.dockerCompose;
|
||||
isHostMode.value = res.data.hostMode;
|
||||
if (env.value) {
|
||||
installParams.value = addMasterParams(res.data.params);
|
||||
|
@ -273,13 +273,13 @@ const getVersionDetail = async (version: string) => {
|
|||
};
|
||||
|
||||
const initForm = async (appKey: string) => {
|
||||
formData.name = appKey;
|
||||
formData.value.name = appKey;
|
||||
const res = await getAppByKey(appKey);
|
||||
currentApp.value = res.data;
|
||||
appVersions.value = currentApp.value.versions;
|
||||
if (appVersions.value.length > 0) {
|
||||
const defaultVersion = appVersions.value[0];
|
||||
formData.version = defaultVersion;
|
||||
formData.value.version = defaultVersion;
|
||||
getVersionDetail(defaultVersion);
|
||||
}
|
||||
};
|
||||
|
@ -332,10 +332,10 @@ const initClusterForm = async (props: ClusterProps) => {
|
|||
return v.includes(props.role) && v.includes(props.masterVersion);
|
||||
});
|
||||
const defaultVersion = appVersions.value[0];
|
||||
formData.version = defaultVersion;
|
||||
formData.value.version = defaultVersion;
|
||||
getVersionDetail(defaultVersion);
|
||||
}
|
||||
formData.name = props.key + '-' + props.role;
|
||||
formData.value.name = props.key + '-' + props.role;
|
||||
};
|
||||
|
||||
const resetForm = () => {
|
||||
|
@ -343,7 +343,7 @@ const resetForm = () => {
|
|||
formRef.value.clearValidate();
|
||||
formRef.value.resetFields();
|
||||
}
|
||||
Object.assign(formData, initFormData());
|
||||
Object.assign(formData.value, initFormData());
|
||||
isHostMode.value = false;
|
||||
memoryRequired.value = 0;
|
||||
gpuSupport.value = false;
|
||||
|
@ -367,11 +367,11 @@ const clearValidate = () => {
|
|||
};
|
||||
|
||||
const getFormData = () => {
|
||||
return { ...formData };
|
||||
return { ...formData.value };
|
||||
};
|
||||
|
||||
const setFormData = (data: any) => {
|
||||
Object.assign(formData, data);
|
||||
Object.assign(formData.value, data);
|
||||
};
|
||||
|
||||
const loadLimit = async () => {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
<template #main>
|
||||
<div>
|
||||
<MainDiv :heightDiff="mode === 'upgrade' ? 315 : 350">
|
||||
<MainDiv :heightDiff="mode === 'upgrade' ? 280 : 300">
|
||||
<el-alert type="info" :closable="false" v-if="mode === 'installed'">
|
||||
<template #title>
|
||||
<span class="flx-align-center">
|
||||
|
|
Loading…
Add table
Reference in a new issue