зеркало из https://github.com/docker/kitematic.git
Use machine status subcommand
Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Родитель
591ec5cbcd
Коммит
32ae93dae7
|
@ -85,9 +85,9 @@ var DockerMachine = {
|
||||||
regenerateCerts: function (machineName = this.name()) {
|
regenerateCerts: function (machineName = this.name()) {
|
||||||
return util.exec([this.command(), 'tls-regenerate-certs', '-f', machineName]);
|
return util.exec([this.command(), 'tls-regenerate-certs', '-f', machineName]);
|
||||||
},
|
},
|
||||||
state: function (machineName = this.name()) {
|
status: function (machineName = this.name()) {
|
||||||
return this.info(machineName).then(info => {
|
return util.exec([this.command(), 'status', machineName]).then(stdout => {
|
||||||
return info ? info.state : null;
|
return Promise.resolve(stdout.trim().replace('\n', ''));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
disk: function (machineName = this.name()) {
|
disk: function (machineName = this.name()) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ export default {
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
await machine.create();
|
await machine.create();
|
||||||
} else {
|
} else {
|
||||||
let state = await machine.state();
|
let state = await machine.status();
|
||||||
if (state !== 'Running') {
|
if (state !== 'Running') {
|
||||||
if (state === 'Saved') {
|
if (state === 'Saved') {
|
||||||
router.get().transitionTo('setup');
|
router.get().transitionTo('setup');
|
||||||
|
|
Загрузка…
Ссылка в новой задаче