mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-02-04 13:59:05 +08:00
fix: Fix the issue of abnormal application port forwarding (#10910)
This commit is contained in:
parent
51ae668154
commit
977a4be3c1
4 changed files with 10 additions and 5 deletions
|
|
@ -5,7 +5,6 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/core/global"
|
||||
"github.com/1Panel-dev/1Panel/core/utils/cmd"
|
||||
"github.com/1Panel-dev/1Panel/core/utils/ssh"
|
||||
)
|
||||
|
|
@ -21,7 +20,6 @@ func handlerErr(out string, err error) error {
|
|||
}
|
||||
|
||||
func run(client *ssh.SSHClient, name string, args ...string) (string, error) {
|
||||
global.LOG.Debugf("handle with controller `%s %s`", name, strings.Join(args, " "))
|
||||
if client == nil {
|
||||
return cmd.NewCommandMgr(cmd.WithTimeout(10*time.Second)).RunWithStdoutBashCf("LANGUAGE=en_US:en %s %s", name, strings.Join(args, " "))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ const acceptParams = async (params: DialogProps): Promise<void> => {
|
|||
let protocol = params.protocol === 'https' ? 'https' : 'http';
|
||||
const res = await getAgentSettingInfo();
|
||||
if (!res.data.systemIP) {
|
||||
if (!globalStore.currentNodeAddr) {
|
||||
if (!globalStore.isMaster || globalStore.currentNodeAddr != '127.0.0.1') {
|
||||
res.data.systemIP = globalStore.currentNodeAddr;
|
||||
} else {
|
||||
open.value = true;
|
||||
return;
|
||||
} else {
|
||||
res.data.systemIP = globalStore.currentNodeAddr;
|
||||
}
|
||||
}
|
||||
if (res.data.systemIP.indexOf(':') === -1) {
|
||||
|
|
|
|||
|
|
@ -444,6 +444,8 @@ import Tags from '@/views/app-store/components/tag.vue';
|
|||
import SvgIcon from '@/components/svg-icon/svg-icon.vue';
|
||||
import MainDiv from '@/components/main-div/index.vue';
|
||||
import { routerToFileWithPath, routerToNameWithQuery } from '@/utils/router';
|
||||
import { GlobalStore } from '@/store';
|
||||
const globalStore = GlobalStore();
|
||||
|
||||
const data = ref<any>();
|
||||
const loading = ref(false);
|
||||
|
|
@ -755,6 +757,10 @@ const getConfig = async () => {
|
|||
const res = await getAgentSettingByKey('SystemIP');
|
||||
if (res.data != '') {
|
||||
defaultLink.value = res.data;
|
||||
return;
|
||||
}
|
||||
if (!globalStore.isMaster || globalStore.currentNodeAddr != '127.0.0.1') {
|
||||
defaultLink.value = globalStore.currentNodeAddr;
|
||||
}
|
||||
} catch (error) {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ const groupList = ref();
|
|||
|
||||
const acceptParams = (): void => {
|
||||
visible.value = true;
|
||||
selects.value = [];
|
||||
loadGroups();
|
||||
currentGroup.value = '';
|
||||
data.value = [];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue