prepare for docker

This commit is contained in:
LouisLam
2021-07-11 14:20:31 +08:00
parent 5f89940ab6
commit ae07cd9c35
6 changed files with 32 additions and 7 deletions

View File

@@ -29,7 +29,14 @@ export default {
},
created() {
socket = io(":3001", {
let wsHost;
if (localStorage.dev === "dev") {
wsHost = ":3001"
} else {
wsHost = ""
}
socket = io(wsHost, {
transports: ['websocket']
});

View File

@@ -27,10 +27,11 @@
<input type="url" class="form-control" id="url" v-model="monitor.url" pattern="https?://.+" required>
</div>
<div class="mb-3" v-if="monitor.type === 'keyword' ">
<label for="keyword" class="form-label">Keyword <span style="color: #AAA">(search keyword in plain html response)</span></label>
<input type="text" class="form-control" id="keyword" v-model="monitor.keyword" required>
</div>
<div class="mb-3" v-if="monitor.type === 'keyword' ">
<label for="keyword" class="form-label">Keyword</label>
<input type="text" class="form-control" id="keyword" v-model="monitor.keyword" required>
<div class="form-text">Search keyword in plain html response and it is case-sensitive</div>
</div>
<div class="mb-3" v-if="monitor.type === 'port' || monitor.type === 'ping' ">
<label for="hostname" class="form-label">Hostname</label>

View File

@@ -53,6 +53,7 @@
<div class="col-md-6">
<h2>Notifications</h2>
<p v-if="$root.notificationList.length === 0">Not available, please setup.</p>
<p v-else>Please assign the notification to monitor(s) to get it works.</p>
<ul class="list-group mb-3" style="border-radius: 1rem;">
<li class="list-group-item" v-for="notification in $root.notificationList">