provision: fix issues when refreshing
This commit is contained in:
@@ -294,18 +294,21 @@ function onCopyToClipboard(value) {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
let [error, result] = await provisionModel.status();
|
||||
const [error, status] = await provisionModel.status();
|
||||
if (error) return console.error(error);
|
||||
|
||||
if (redirectIfNeeded(result, 'restore')) return; // redirected to some other view...
|
||||
if (redirectIfNeeded(status, 'restore')) return; // redirected to some other view...
|
||||
|
||||
[error, result] = await provisionModel.detectIp();
|
||||
if (error) return console.error(error);
|
||||
const [error2, result] = await provisionModel.detectIp();
|
||||
if (error2) return console.error(error2);
|
||||
|
||||
ipv4Provider.value = result.ipv4 ? 'generic' : 'noop';
|
||||
ipv6Provider.value = result.ipv6 ? 'generic' : 'noop';
|
||||
|
||||
ready.value = true;
|
||||
|
||||
if (status.restore.active) return waitForRestore();
|
||||
formError.value.generic = status.restore.errorMessage; // show any previous error
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -317,7 +320,7 @@ onMounted(async () => {
|
||||
<Transition name="fade-scale" mode="out-in">
|
||||
<div class="view" v-if="waitingForRestore" style="max-width: unset; height: 100%;">
|
||||
<div style="display: flex; flex-direction: column; height: 100%; align-items: center;">
|
||||
<Whirlpool v-if="waitingForDnsSetup" />
|
||||
<Whirlpool/>
|
||||
<h1>Please wait while Cloudron is restoring ...</h1>
|
||||
<h4 style="margin-top: 0">{{ progressMessage }}</h4>
|
||||
<small>You can follow the logs on the server at <code @click="onCopyToClipboard('/home/yellowtent/platformdata/logs/box.log')">/home/yellowtent/platformdata/logs/box.log</code></small>
|
||||
|
||||
Reference in New Issue
Block a user