mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 19:14:06 +08:00
Fixing linting & adding documentation
This commit is contained in:
@@ -12,8 +12,8 @@ class DockerHost extends BeanModel {
|
||||
daemon: this._dockerDaemon,
|
||||
type: this._dockerType,
|
||||
name: this._name,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DockerHost;
|
||||
module.exports = DockerHost;
|
||||
|
@@ -470,7 +470,7 @@ class Monitor extends BeanModel {
|
||||
} else if (this.type === "docker") {
|
||||
log.debug(`[${this.name}] Prepare Options for Axios`);
|
||||
|
||||
const docker_host = await R.load("docker_host", this.docker_host);
|
||||
const dockerHost = await R.load("docker_host", this.docker_host);
|
||||
|
||||
const options = {
|
||||
url: `/containers/${this.docker_container}/json`,
|
||||
@@ -484,10 +484,10 @@ class Monitor extends BeanModel {
|
||||
}),
|
||||
};
|
||||
|
||||
if (docker_host._dockerType === "socket") {
|
||||
options.socketPath = docker_host._dockerDaemon;
|
||||
} else if (docker_host._dockerType === "tcp") {
|
||||
options.baseURL = docker_host._dockerDaemon;
|
||||
if (dockerHost._dockerType === "socket") {
|
||||
options.socketPath = dockerHost._dockerDaemon;
|
||||
} else if (dockerHost._dockerType === "tcp") {
|
||||
options.baseURL = dockerHost._dockerDaemon;
|
||||
}
|
||||
|
||||
log.debug(`[${this.name}] Axios Request`);
|
||||
|
Reference in New Issue
Block a user