diff --git a/server/client.js b/server/client.js index 69892e66..a0c52e1e 100644 --- a/server/client.js +++ b/server/client.js @@ -139,7 +139,7 @@ async function sendDockerHostList(socket) { ]); for (let bean of list) { - result.push(bean.export()); + result.push(bean.toJSON()); } io.to(socket.userID).emit("dockerHostList", result); diff --git a/server/docker.js b/server/docker.js index 1c939d64..177fa6cb 100644 --- a/server/docker.js +++ b/server/docker.js @@ -26,8 +26,8 @@ class DockerHost { } bean.user_id = userID; - bean.docker_daemon = dockerHost.docker_daemon; - bean.docker_type = dockerHost.docker_type; + bean.docker_daemon = dockerHost.dockerDaemon; + bean.docker_type = dockerHost.dockerType; bean.name = dockerHost.name; await R.store(bean); diff --git a/server/model/docker_host.js b/server/model/docker_host.js index 229a9a52..20598292 100644 --- a/server/model/docker_host.js +++ b/server/model/docker_host.js @@ -7,11 +7,11 @@ class DockerHost extends BeanModel { */ toJSON() { return { - id: this._id, - userId: this._user_id, - daemon: this._dockerDaemon, - type: this._dockerType, - name: this._name, + id: this.id, + userID: this.user_id, + dockerDaemon: this.docker_daemon, + dockerType: this.docker_type, + name: this.name, }; } } diff --git a/src/components/DockerHostDialog.vue b/src/components/DockerHostDialog.vue index d7cf2de0..681cc244 100644 --- a/src/components/DockerHostDialog.vue +++ b/src/components/DockerHostDialog.vue @@ -52,8 +52,9 @@