forked from urvishpatelce/lxd-app
fix
This commit is contained in:
@ -77,7 +77,7 @@ class LoginController
|
|||||||
$status = $state['metadata']['status'] ?? 'Stopped';
|
$status = $state['metadata']['status'] ?? 'Stopped';
|
||||||
if ($status !== 'Running') {
|
if ($status !== 'Running') {
|
||||||
return $this->json($response, [
|
return $this->json($response, [
|
||||||
'status' => 'starting',
|
'status' => 'stopped',
|
||||||
'message' => 'Container is not yet running',
|
'message' => 'Container is not yet running',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="page-wrapper">
|
<div class="page-wrapper">
|
||||||
<Spinner :loading="loading" />
|
<Spinner :loading="loading" />
|
||||||
<div v-html="output" />
|
<div v-html="output" />
|
||||||
<div v-if="!loading && status ==='starting'">
|
<div v-if="!loading && status ==='stopped'">
|
||||||
<form name="loginForm" method="post" action="/login.php" @submit.prevent="submitForm" class="login-form" autocomplete="on">
|
<form name="loginForm" method="post" action="/login.php" @submit.prevent="submitForm" class="login-form" autocomplete="on">
|
||||||
<input type="hidden" name="relocation" value="route=search/search&type=simple" />
|
<input type="hidden" name="relocation" value="route=search/search&type=simple" />
|
||||||
|
|
||||||
@ -134,9 +134,10 @@ const submitForm = async () => {
|
|||||||
},
|
},
|
||||||
throwHttpErrors: false
|
throwHttpErrors: false
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res?.status !== 'success') {
|
if (res?.status !== 'success') {
|
||||||
captchaError.value = res?.message || 'Login failed'
|
captchaError.value = res?.message || 'Login failed'
|
||||||
|
} else {
|
||||||
|
status.value = 'starting'
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
captchaError.value = error?.data?.message || 'Internal server error!'
|
captchaError.value = error?.data?.message || 'Internal server error!'
|
||||||
|
|||||||
Reference in New Issue
Block a user