зеркало из https://github.com/docker/kitematic.git
Only show progress on starting or creating the VM
Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Родитель
4c502b0d7c
Коммит
49e5e55ec9
|
@ -61,9 +61,9 @@ export default {
|
|||
throw new Error('Docker Machine is not installed. Please install it via the Docker Toolbox.');
|
||||
}
|
||||
|
||||
setupServerActions.started({started: true});
|
||||
let exists = await virtualBox.vmExists(machine.name()) && fs.existsSync(path.join(util.home(), '.docker', 'machine', 'machines', machine.name()));
|
||||
if (!exists) {
|
||||
setupServerActions.started({started: true});
|
||||
this.simulateProgress(60);
|
||||
try {
|
||||
await machine.rm();
|
||||
|
@ -73,9 +73,11 @@ export default {
|
|||
let state = await machine.state();
|
||||
if (state !== 'Running') {
|
||||
if (state === 'Saved') {
|
||||
setupServerActions.started({started: true});
|
||||
router.get().transitionTo('setup');
|
||||
this.simulateProgress(10);
|
||||
} else if (state === 'Stopped') {
|
||||
setupServerActions.started({started: true});
|
||||
router.get().transitionTo('setup');
|
||||
this.simulateProgress(25);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче