Skip to content

Commit

Permalink
UI: Support more monitor types in URL field
Browse files Browse the repository at this point in the history
  • Loading branch information
chakflying committed May 21, 2023
1 parent 0d1b532 commit 446b5fa
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/pages/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
<br>
<span>{{ $t("Last Result") }}:</span> <span class="keyword">{{ monitor.dns_last_result }}</span>
</span>
<span v-if="monitor.type === 'docker'">Docker container: {{ monitor.docker_container }}</span>
<span v-if="monitor.type === 'gamedig'">Gamedig - {{ monitor.game }}: {{ monitor.hostname }}:{{ monitor.port }}</span>
<span v-if="monitor.type === 'grpc-keyword'">gRPC - {{ monitor.grpcUrl }}
<br>
<span>{{ $t("Keyword") }}:</span> <span class="keyword">{{ monitor.keyword }}</span>
</span>
<span v-if="monitor.type === 'mongodb'">{{ monitor.databaseConnectionString }}</span>
<span v-if="monitor.type === 'mqtt'">MQTT: {{ monitor.hostname }}:{{ monitor.port }}/{{ monitor.mqttTopic }}</span>
<span v-if="monitor.type === 'mysql'">{{ monitor.databaseConnectionString }}</span>
<span v-if="monitor.type === 'postgres'">{{ monitor.databaseConnectionString }}</span>
<span v-if="monitor.type === 'push'">Push: <a :href="pushURL" target="_blank" rel="noopener noreferrer">{{ pushURL }}</a></span>
<span v-if="monitor.type === 'radius'">Radius: {{ monitor.hostname }}</span>
<span v-if="monitor.type === 'redis'">{{ monitor.databaseConnectionString }}</span>
<span v-if="monitor.type === 'sqlserver'">SQL Server: {{ monitor.databaseConnectionString }}</span>
<span v-if="monitor.type === 'steam'">Steam Game Server: {{ monitor.hostname }}:{{ monitor.port }}</span>
</p>

<div class="functions">
Expand Down Expand Up @@ -290,6 +305,10 @@ export default {
const endIndex = startIndex + this.perPage;
return this.heartBeatList.slice(startIndex, endIndex);
},
pushURL() {
return this.$root.baseURL + "/api/push/" + this.monitor.pushToken + "?status=up&msg=OK&ping=";
},
},
mounted() {
Expand Down

0 comments on commit 446b5fa

Please sign in to comment.