|
|
@ -285,22 +285,17 @@
|
|
|
|
<!-- Docker Host -->
|
|
|
|
<!-- Docker Host -->
|
|
|
|
<!-- For Docker Type -->
|
|
|
|
<!-- For Docker Type -->
|
|
|
|
<div v-if="monitor.type === 'docker'" class="my-3">
|
|
|
|
<div v-if="monitor.type === 'docker'" class="my-3">
|
|
|
|
<h2 class="mb-2">{{ $t("Docker Host") }}</h2>
|
|
|
|
<div class="mb-3">
|
|
|
|
<p v-if="$root.dockerHostList.length === 0">
|
|
|
|
|
|
|
|
{{ $t("Not available, please setup.") }}
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-else class="mb-3">
|
|
|
|
|
|
|
|
<label for="docker-host" class="form-label">{{ $t("Docker Host") }}</label>
|
|
|
|
<label for="docker-host" class="form-label">{{ $t("Docker Host") }}</label>
|
|
|
|
<select id="docket-host" v-model="monitor.docker_host" class="form-select">
|
|
|
|
<ActionSelect
|
|
|
|
<option v-for="host in $root.dockerHostList" :key="host.id" :value="host.id">{{ host.name }}</option>
|
|
|
|
v-model="monitor.docker_host"
|
|
|
|
</select>
|
|
|
|
:options="dockerHostOptionsList"
|
|
|
|
<a href="#" @click="$refs.dockerHostDialog.show(monitor.docker_host)">{{ $t("Edit") }}</a>
|
|
|
|
:disabled="$root.dockerHostList == null || $root.dockerHostList.length === 0"
|
|
|
|
|
|
|
|
:icon="'plus'"
|
|
|
|
|
|
|
|
:action="() => $refs.dockerHostDialog.show()"
|
|
|
|
|
|
|
|
:required="true"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-primary me-2" type="button" @click="$refs.dockerHostDialog.show()">
|
|
|
|
|
|
|
|
{{ $t("Setup Docker Host") }}
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- MQTT -->
|
|
|
|
<!-- MQTT -->
|
|
|
@ -1119,6 +1114,21 @@ message HealthCheckResponse {
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dockerHostOptionsList() {
|
|
|
|
|
|
|
|
if (this.$root.dockerHostList && this.$root.dockerHostList.length > 0) {
|
|
|
|
|
|
|
|
return this.$root.dockerHostList.map((host) => {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
label: host.name,
|
|
|
|
|
|
|
|
value: host.id
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return [{
|
|
|
|
|
|
|
|
label: this.$t("noDockerHostMsg"),
|
|
|
|
|
|
|
|
value: null,
|
|
|
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
"$root.proxyList"() {
|
|
|
|
"$root.proxyList"() {
|
|
|
@ -1351,6 +1361,12 @@ message HealthCheckResponse {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.monitor.type === "docker") {
|
|
|
|
|
|
|
|
if (this.monitor.docker_host == null) {
|
|
|
|
|
|
|
|
toast.error(this.$t("DockerHostRequired"));
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|