Files
docker-docs/src/actions/ContainerActions.js
2015-05-26 00:08:47 -07:00

40 lines
726 B
JavaScript

import alt from '../alt';
import dockerUtil from '../utils/DockerUtil';
class ContainerActions {
start (name) {
this.dispatch({name});
dockerUtil.start(name);
}
destroy (name) {
this.dispatch({name});
dockerUtil.destroy(name);
}
rename (name, newName) {
this.dispatch({name, newName});
dockerUtil.rename(name, newName);
}
stop (name) {
this.dispatch({name});
dockerUtil.stop(name);
}
update (name, container) {
this.dispatch({name, container});
dockerUtil.updateContainer(name, container);
}
clearPending () {
this.dispatch();
}
run (name, repo, tag) {
dockerUtil.run(name, repo, tag);
}
}
export default alt.createActions(ContainerActions);