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