fix: add restart-docker option when adding system proxy for the first… (#8845)

This commit is contained in:
CityFun 2025-05-27 11:52:18 +08:00 committed by GitHub
parent 610be1755a
commit 27836742a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View file

@ -32,6 +32,7 @@ const restart = ref(true);
const em = defineEmits(['update:withDockerRestart', 'submit']);
interface DialogProps {
syncList: string;
open: boolean;
}
const emit = () => {
em('update:withDockerRestart', false);
@ -42,6 +43,10 @@ const acceptParams = async (props: DialogProps): Promise<void> => {
emit();
return;
}
if (props.open) {
open.value = true;
return;
}
try {
const res = await getSettingInfo();
if (res.data.proxyType === '' || res.data.proxyType === 'close') {

View file

@ -165,9 +165,11 @@ const loadBindNode = (row: any) => {
if (!row.bindNode && row.freeNodes?.length) {
return row.bindNode;
}
for (const item of row.freeNodes) {
if (item.addr === row.bindNode) {
return item.name === 'local' ? i18n.global.t('xpack.node.master') : item.addr;
if (row.freeNodes) {
for (const item of row.freeNodes) {
if (item.addr === row.bindNode) {
return item.name === 'local' ? i18n.global.t('xpack.node.master') : item.addr;
}
}
}
return row.bindNode;
@ -214,6 +216,7 @@ const search = async () => {
.then((res) => {
loading.value = false;
data.value = res.data.items || [];
console.log(data.value);
for (const item of data.value) {
item.productName = 'product-1panel-pro';
item.expiresAt = item.productPro === '0' ? '' : timestampToDate(Number(item.productPro));

View file

@ -161,6 +161,7 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => {
if (isMasterProductPro.value && (params.proxyDocker || proxyDockerVisible.value)) {
dockerProxyRef.value.acceptParams({
syncList: 'SyncSystemProxy',
open: true,
});
} else {
loading.value = true;