diff --git a/dashboard/src/lib/porter-apps/services.ts b/dashboard/src/lib/porter-apps/services.ts index 9440d0fe05..1593fe9d5f 100644 --- a/dashboard/src/lib/porter-apps/services.ts +++ b/dashboard/src/lib/porter-apps/services.ts @@ -231,10 +231,9 @@ export function serializeService(service: ClientService): SerializedService { name: domain.name.value, })), ingressAnnotations: Object.fromEntries( - config.ingressAnnotations.map((annotation) => [ - annotation.key, - annotation.value, - ]) + config.ingressAnnotations + .filter((a) => a.key.length > 0 && a.value.length > 0) + .map((annotation) => [annotation.key, annotation.value]) ), private: config.private?.value, }, diff --git a/dashboard/src/main/home/app-dashboard/app-view/tabs/Settings.tsx b/dashboard/src/main/home/app-dashboard/app-view/tabs/Settings.tsx index 78d2cdaf38..1b9b64040e 100644 --- a/dashboard/src/main/home/app-dashboard/app-view/tabs/Settings.tsx +++ b/dashboard/src/main/home/app-dashboard/app-view/tabs/Settings.tsx @@ -19,7 +19,7 @@ const Settings: React.FC = () => { const queryClient = useQueryClient(); const history = useHistory(); const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false); - const { porterApp, clusterId, projectId } = useLatestRevision(); + const { porterApp, clusterId, projectId, latestProto } = useLatestRevision(); const { updateAppStep } = useAppAnalytics(); const [isDeleting, setIsDeleting] = useState(false); @@ -139,7 +139,9 @@ const Settings: React.FC = () => { return ( - {currentProject?.preview_envs_enabled && } + {currentProject?.preview_envs_enabled && !!latestProto.build ? ( + + ) : null} Delete "{porterApp.name}"