mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-09 11:55:52 +08:00
fix: add restart-docker option when adding system proxy for the first… (#8845)
This commit is contained in:
parent
610be1755a
commit
27836742a8
3 changed files with 12 additions and 3 deletions
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue