зеркало из 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()) {
|
||||
return util.exec([this.command(), 'tls-regenerate-certs', '-f', machineName]);
|
||||
},
|
||||
state: function (machineName = this.name()) {
|
||||
return this.info(machineName).then(info => {
|
||||
return info ? info.state : null;
|
||||
status: function (machineName = this.name()) {
|
||||
return util.exec([this.command(), 'status', machineName]).then(stdout => {
|
||||
return Promise.resolve(stdout.trim().replace('\n', ''));
|
||||
});
|
||||
},
|
||||
disk: function (machineName = this.name()) {
|
||||
|
|
|
@ -73,7 +73,7 @@ export default {
|
|||
} catch (err) {}
|
||||
await machine.create();
|
||||
} else {
|
||||
let state = await machine.state();
|
||||
let state = await machine.status();
|
||||
if (state !== 'Running') {
|
||||
if (state === 'Saved') {
|
||||
router.get().transitionTo('setup');
|
||||
|
|
Загрузка…
Ссылка в новой задаче