-
+
-
+
-
+
+
+
+
+
+
+
+
+
{{ $t('app.allowPort') }}
{
hostPort: undefined,
containerPort: undefined,
hostIP: '',
+ protocol: 'tcp',
});
};
diff --git a/frontend/src/views/website/runtime/components/volume/index.vue b/frontend/src/views/website/runtime/components/volume/index.vue
index 3cd5753fe685..aed4ca82d35a 100644
--- a/frontend/src/views/website/runtime/components/volume/index.vue
+++ b/frontend/src/views/website/runtime/components/volume/index.vue
@@ -11,6 +11,14 @@
+
+
+
+
+
+
+
+
@@ -48,6 +56,7 @@ const addEnv = () => {
props.volumes.push({
source: '',
target: '',
+ mode: 'rw',
});
};
diff --git a/frontend/src/views/website/runtime/dotnet/operate/index.vue b/frontend/src/views/website/runtime/dotnet/operate/index.vue
index 36f9f085eb7b..b4d8f3ad8733 100644
--- a/frontend/src/views/website/runtime/dotnet/operate/index.vue
+++ b/frontend/src/views/website/runtime/dotnet/operate/index.vue
@@ -122,19 +122,22 @@ const submit = async (formEl: FormInstance | undefined) => {
return;
}
if (runtime.exposedPorts && runtime.exposedPorts.length > 0) {
- const containerPortMap = new Map();
- const hostPortMap = new Map();
+ const containerPortMap = new Map();
+ const hostPortMap = new Map();
for (const port of runtime.exposedPorts) {
- if (containerPortMap[port.containerPort]) {
+ const protocol = port.protocol || 'tcp';
+ const containerPortKey = `${port.containerPort}/${protocol}`;
+ const hostPortKey = `${port.hostPort}/${protocol}`;
+ if (containerPortMap.has(containerPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- if (hostPortMap[port.hostPort]) {
+ if (hostPortMap.has(hostPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- hostPortMap[port.hostPort] = true;
- containerPortMap[port.containerPort] = true;
+ hostPortMap.set(hostPortKey, true);
+ containerPortMap.set(containerPortKey, true);
}
}
diff --git a/frontend/src/views/website/runtime/go/operate/index.vue b/frontend/src/views/website/runtime/go/operate/index.vue
index 60e16a86ec24..8e52b3cd3ac7 100644
--- a/frontend/src/views/website/runtime/go/operate/index.vue
+++ b/frontend/src/views/website/runtime/go/operate/index.vue
@@ -147,19 +147,22 @@ const submit = async (formEl: FormInstance | undefined) => {
return;
}
if (runtime.exposedPorts && runtime.exposedPorts.length > 0) {
- const containerPortMap = new Map();
- const hostPortMap = new Map();
+ const containerPortMap = new Map();
+ const hostPortMap = new Map();
for (const port of runtime.exposedPorts) {
- if (containerPortMap[port.containerPort]) {
+ const protocol = port.protocol || 'tcp';
+ const containerPortKey = `${port.containerPort}/${protocol}`;
+ const hostPortKey = `${port.hostPort}/${protocol}`;
+ if (containerPortMap.has(containerPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- if (hostPortMap[port.hostPort]) {
+ if (hostPortMap.has(hostPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- hostPortMap[port.hostPort] = true;
- containerPortMap[port.containerPort] = true;
+ hostPortMap.set(hostPortKey, true);
+ containerPortMap.set(containerPortKey, true);
}
}
diff --git a/frontend/src/views/website/runtime/java/operate/index.vue b/frontend/src/views/website/runtime/java/operate/index.vue
index c6f0891f2e05..3b25120e6737 100644
--- a/frontend/src/views/website/runtime/java/operate/index.vue
+++ b/frontend/src/views/website/runtime/java/operate/index.vue
@@ -135,19 +135,22 @@ const submit = async (formEl: FormInstance | undefined) => {
return;
}
if (runtime.exposedPorts && runtime.exposedPorts.length > 0) {
- const containerPortMap = new Map();
- const hostPortMap = new Map();
+ const containerPortMap = new Map();
+ const hostPortMap = new Map();
for (const port of runtime.exposedPorts) {
- if (containerPortMap[port.containerPort]) {
+ const protocol = port.protocol || 'tcp';
+ const containerPortKey = `${port.containerPort}/${protocol}`;
+ const hostPortKey = `${port.hostPort}/${protocol}`;
+ if (containerPortMap.has(containerPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- if (hostPortMap[port.hostPort]) {
+ if (hostPortMap.has(hostPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- hostPortMap[port.hostPort] = true;
- containerPortMap[port.containerPort] = true;
+ hostPortMap.set(hostPortKey, true);
+ containerPortMap.set(containerPortKey, true);
}
}
diff --git a/frontend/src/views/website/runtime/node/operate/index.vue b/frontend/src/views/website/runtime/node/operate/index.vue
index 8cba78e0db9f..202e94d378f1 100644
--- a/frontend/src/views/website/runtime/node/operate/index.vue
+++ b/frontend/src/views/website/runtime/node/operate/index.vue
@@ -167,19 +167,22 @@ const submit = async (formEl: FormInstance | undefined) => {
return;
}
if (runtime.exposedPorts && runtime.exposedPorts.length > 0) {
- const containerPortMap = new Map();
- const hostPortMap = new Map();
+ const containerPortMap = new Map();
+ const hostPortMap = new Map();
for (const port of runtime.exposedPorts) {
- if (containerPortMap[port.containerPort]) {
+ const protocol = port.protocol || 'tcp';
+ const containerPortKey = `${port.containerPort}/${protocol}`;
+ const hostPortKey = `${port.hostPort}/${protocol}`;
+ if (containerPortMap.has(containerPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- if (hostPortMap[port.hostPort]) {
+ if (hostPortMap.has(hostPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- hostPortMap[port.hostPort] = true;
- containerPortMap[port.containerPort] = true;
+ hostPortMap.set(hostPortKey, true);
+ containerPortMap.set(containerPortKey, true);
}
}
diff --git a/frontend/src/views/website/runtime/python/operate/index.vue b/frontend/src/views/website/runtime/python/operate/index.vue
index 582d2b61ab68..735a83f36ca4 100644
--- a/frontend/src/views/website/runtime/python/operate/index.vue
+++ b/frontend/src/views/website/runtime/python/operate/index.vue
@@ -111,19 +111,22 @@ const submit = async (formEl: FormInstance | undefined) => {
return;
}
if (runtime.exposedPorts && runtime.exposedPorts.length > 0) {
- const containerPortMap = new Map();
- const hostPortMap = new Map();
+ const containerPortMap = new Map();
+ const hostPortMap = new Map();
for (const port of runtime.exposedPorts) {
- if (containerPortMap[port.containerPort]) {
+ const protocol = port.protocol || 'tcp';
+ const containerPortKey = `${port.containerPort}/${protocol}`;
+ const hostPortKey = `${port.hostPort}/${protocol}`;
+ if (containerPortMap.has(containerPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- if (hostPortMap[port.hostPort]) {
+ if (hostPortMap.has(hostPortKey)) {
MsgError(i18n.global.t('runtime.portError'));
return;
}
- hostPortMap[port.hostPort] = true;
- containerPortMap[port.containerPort] = true;
+ hostPortMap.set(hostPortKey, true);
+ containerPortMap.set(containerPortKey, true);
}
}