Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add domain fail to list warning #3563

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Changes from 2 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
10 changes: 8 additions & 2 deletions packages/playground/src/components/manage_gateway_dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
type="warning"
variant="tonal"
class="mb-4"
v-if="failedToListGws.length && gatewayTab === 0 && !loadingGateways"
v-if="errorMessage && gatewayTab === 0 && !loadingGateways"
>
Failed to list {{ failedToListGws.length }} domains.
<template #append>
Expand Down Expand Up @@ -266,6 +266,7 @@ export default {
const availableK8SNodesNames = availableK8SNodes.map(node => node.name);
const selectedK8SNodeName = ref(availableK8SNodesNames[0]);
const selectedNode = ref();
const errorMessage = ref("");

watch(selectedK8SNodeName, getSupportedNetworks, { deep: true });
const tableHeaders = ref([
Expand Down Expand Up @@ -330,8 +331,12 @@ export default {
});
gateways.value = gws;
failedToListGws.value = failedToList;
if (failedToListGws.value.length) {
errorMessage.value = `Failed to list ${failedToListGws.value.length} domains`;
xmonader marked this conversation as resolved.
Show resolved Hide resolved
}
} catch (error) {
layout.value.setStatus("failed", normalizeError(error, "Failed to list this deployment's domains."));
errorMessage.value = "Failed to list this deployment's domains";
layout.value.setStatus("failed", normalizeError(error, errorMessage.value));
} finally {
loadingGateways.value = false;
}
Expand Down Expand Up @@ -509,6 +514,7 @@ export default {
isWireGuard,
availableK8SNodesNames,
selectedK8SNodeName,
errorMessage,
};
},
};
Expand Down
Loading