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

Fix time in Loading deployments main net. #1278

Merged
merged 6 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix deposit dialog && ad <br< instead of -
  • Loading branch information
AlaaElattar committed Oct 26, 2023
commit 78d878ee58b1212759f973c704218985132fb0a4
20 changes: 10 additions & 10 deletions packages/playground/public/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
window.env = {
NETWORK: "dev",
GRAPHQL_URL: "https://graphql.dev.grid.tf/graphql",
GRIDPROXY_URL: "https://gridproxy.dev.grid.tf",
SUBSTRATE_URL: "wss://tfchain.dev.grid.tf/ws",
ACTIVATION_SERVICE_URL: "https://activation.dev.grid.tf",
RELAY_DOMAIN: "relay.dev.grid.tf",
BRIDGE_TFT_ADDRESS: "GDHJP6TF3UXYXTNEZ2P36J5FH7W4BJJQ4AYYAXC66I2Q2AH5B6O6BCFG",
STELLAR_NETWORK: "test",
STELLAR_HORIZON_URL: "https://horizon-testnet.stellar.org",
TFT_ASSET_ISSUER: "GA47YZA3PKFUZMPLQ3B5F2E3CJIB57TGGU7SPCQT2WAEYKN766PWIMB3",
NETWORK: "main",
GRAPHQL_URL: "https://graphql.grid.tf/graphql",
GRIDPROXY_URL: "https://gridproxy.grid.tf",
SUBSTRATE_URL: "wss://tfchain.grid.tf/ws",
ACTIVATION_SERVICE_URL: "https://activation.grid.tf",
RELAY_DOMAIN: "relay.grid.tf",
BRIDGE_TFT_ADDRESS: "GBNOTAYUMXVO5QDYWYO2SOCOYIJ3XFIP65GKOQN7H65ZZSO6BK4SLWSC",
STELLAR_NETWORK: "main",
STELLAR_HORIZON_URL: "https://horizon.stellar.org",
TFT_ASSET_ISSUER: "GBOVQKJYHXRR3DX6NOX2RRYFRCUMSADGDESTDNBDS6CDVLGVESRTAC47",
};
12 changes: 7 additions & 5 deletions packages/playground/src/components/k8s_deployment_table.vue
Original file line number Diff line number Diff line change
@@ -124,17 +124,19 @@ async function loadDeployments() {
}

function formatFailedDeployments(failedDeployments: []) {
let formattedText = "";
let formattedText = "<ul>";
for (const deployment of failedDeployments as { name: string; nodes: string[] }[]) {
if (deployment.nodes.length > 0) {
formattedText += `- ${deployment.name} on node${deployment.nodes.length > 1 ? "s" : ""}: ${deployment.nodes.join(
", ",
)}<br>`;
formattedText += ` <li>${deployment.name} on node${
deployment.nodes.length > 1 ? "s" : ""
}: ${deployment.nodes.join(", ")}</li>`;
} else {
formattedText += `- <strong>${deployment.name}<br>`;
formattedText += ` <li>${deployment.name}</li>`;
showEncryption.value = true;
}
}
formattedText += "</ul>";

return formattedText;
}

12 changes: 7 additions & 5 deletions packages/playground/src/components/vm_deployment_table.vue
Original file line number Diff line number Diff line change
@@ -140,17 +140,19 @@ async function loadDeployments() {
}

function formatFailedDeployments(failedDeployments: []) {
let formattedText = "";
let formattedText = "<ul>";
for (const deployment of failedDeployments as { name: string; nodes: string[] }[]) {
if (deployment.nodes.length > 0) {
formattedText += `- ${deployment.name} on node${deployment.nodes.length > 1 ? "s" : ""}: ${deployment.nodes.join(
", ",
)}<br>`;
formattedText += ` <li>${deployment.name} on node${
deployment.nodes.length > 1 ? "s" : ""
}: ${deployment.nodes.join(", ")}</li>`;
} else {
formattedText += `- <strong>${deployment.name}<br>`;
formattedText += ` <li>${deployment.name}</li>`;
showEncryption.value = true;
}
}
formattedText += "</ul>";

return formattedText;
}

6 changes: 6 additions & 0 deletions packages/playground/src/utils/load_deployment.ts
Original file line number Diff line number Diff line change
@@ -42,6 +42,9 @@ export async function loadVms(grid: GridClient, options: LoadVMsOptions = {}) {
if (result instanceof Error && result.message === "Timeout") {
console.log(`%c[Error] Timeout loading deployment with name ${name}`, "color: rgb(207, 102, 121)");
return null;
} else if ((result as any).length === 0) {
console.log(`%c[Error] failed to load deployment with name ${name}}`, "color: rgb(207, 102, 121)");
failedDeployments.push({ name, nodes: nodeIds });
} else {
return result;
}
@@ -135,6 +138,9 @@ export async function loadK8s(grid: GridClient) {
if (result instanceof Error && result.message === "Timeout") {
console.log(`%c[Error] Timeout loading deployment with name ${name}`, "color: rgb(207, 102, 121)");
return null;
} else if ((result as any).masters.length === 0 && (result as any).workers.length === 0) {
console.log(`%c[Error] failed to load deployment with name ${name}}`, "color: rgb(207, 102, 121)");
failedDeployments.push({ name, nodes: nodeIds });
} else {
return result;
}
Loading