Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/views/DeploymentDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1798,23 +1798,8 @@ const fetchProxyStatus = async () => {
const handleAddDomain = async (newDomain: any) => {
if (!deployment.value?.metadata) return;

const currentDomain = deployment.value.metadata.networking?.domain;
const currentPort = deployment.value.metadata.networking?.container_port || 80;
const currentSSL = deployment.value.metadata.ssl || { enabled: false, auto_cert: false };

addingDomain.value = true;
try {
// First, convert existing legacy domain to a domain config
if (currentDomain) {
await deploymentsApi.addDomain(route.params.name as string, {
service: deployment.value.metadata.name || (route.params.name as string),
container_port: currentPort,
domain: currentDomain,
ssl: currentSSL,
});
}

// Then add the new domain
await deploymentsApi.addDomain(route.params.name as string, {
service: newDomain.service || deployment.value.metadata.name || (route.params.name as string),
container_port: newDomain.container_port || 80,
Expand Down