add percent info when switching dashboard

This commit is contained in:
Girish Ramakrishnan
2022-02-06 11:21:32 -08:00
parent 5048f455a3
commit 23b3070c52
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -328,13 +328,13 @@ async function setupDnsAndCert(subdomain, domain, auditSource, progressCallback)
const ipv6Enabled = await settings.getIPv6Config();
const ipv6 = ipv6Enabled ? await sysinfo.getServerIPv6() : null;
progressCallback({ message: `Updating DNS of ${dashboardFqdn}` });
progressCallback({ percent: 20, message: `Updating DNS of ${dashboardFqdn}` });
await dns.upsertDnsRecords(subdomain, domain, 'A', [ ipv4 ]);
if (ipv6Enabled) await dns.upsertDnsRecords(subdomain, domain, 'AAAA', [ ipv6 ]);
progressCallback({ message: `Waiting for DNS of ${dashboardFqdn}` });
progressCallback({ percent: 40, message: `Waiting for DNS of ${dashboardFqdn}` });
await dns.waitForDnsRecord(subdomain, domain, 'A', ipv4, { interval: 30000, times: 50000 });
if (ipv6Enabled) await dns.waitForDnsRecord(subdomain, domain, 'AAAA', ipv6, { interval: 30000, times: 50000 });
progressCallback({ message: `Getting certificate of ${dashboardFqdn}` });
progressCallback({ percent: 60, message: `Getting certificate of ${dashboardFqdn}` });
await reverseProxy.ensureCertificate(dns.fqdn(subdomain, domainObject), domain, auditSource);
}