Skip to content

Commit 2783674

Browse files
fix: add restart-docker option when adding system proxy for the first… (#8845)
1 parent 610be17 commit 2783674

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

frontend/src/components/docker-proxy/dialog.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const restart = ref(true);
3232
const em = defineEmits(['update:withDockerRestart', 'submit']);
3333
interface DialogProps {
3434
syncList: string;
35+
open: boolean;
3536
}
3637
const emit = () => {
3738
em('update:withDockerRestart', false);
@@ -42,6 +43,10 @@ const acceptParams = async (props: DialogProps): Promise<void> => {
4243
emit();
4344
return;
4445
}
46+
if (props.open) {
47+
open.value = true;
48+
return;
49+
}
4550
try {
4651
const res = await getSettingInfo();
4752
if (res.data.proxyType === '' || res.data.proxyType === 'close') {

frontend/src/views/setting/license/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ const loadBindNode = (row: any) => {
165165
if (!row.bindNode && row.freeNodes?.length) {
166166
return row.bindNode;
167167
}
168-
for (const item of row.freeNodes) {
169-
if (item.addr === row.bindNode) {
170-
return item.name === 'local' ? i18n.global.t('xpack.node.master') : item.addr;
168+
if (row.freeNodes) {
169+
for (const item of row.freeNodes) {
170+
if (item.addr === row.bindNode) {
171+
return item.name === 'local' ? i18n.global.t('xpack.node.master') : item.addr;
172+
}
171173
}
172174
}
173175
return row.bindNode;
@@ -214,6 +216,7 @@ const search = async () => {
214216
.then((res) => {
215217
loading.value = false;
216218
data.value = res.data.items || [];
219+
console.log(data.value);
217220
for (const item of data.value) {
218221
item.productName = 'product-1panel-pro';
219222
item.expiresAt = item.productPro === '0' ? '' : timestampToDate(Number(item.productPro));

frontend/src/views/setting/panel/proxy/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ const submitChangePassword = async (formEl: FormInstance | undefined) => {
161161
if (isMasterProductPro.value && (params.proxyDocker || proxyDockerVisible.value)) {
162162
dockerProxyRef.value.acceptParams({
163163
syncList: 'SyncSystemProxy',
164+
open: true,
164165
});
165166
} else {
166167
loading.value = true;

0 commit comments

Comments
 (0)