mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-11-04 13:46:13 +08:00 
			
		
		
		
	UI: Support more monitor types in URL field
This commit is contained in:
		@@ -18,6 +18,21 @@
 | 
				
			|||||||
                    <br>
 | 
					                    <br>
 | 
				
			||||||
                    <span>{{ $t("Last Result") }}:</span> <span class="keyword">{{ monitor.dns_last_result }}</span>
 | 
					                    <span>{{ $t("Last Result") }}:</span> <span class="keyword">{{ monitor.dns_last_result }}</span>
 | 
				
			||||||
                </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>
 | 
					            </p>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <div class="functions">
 | 
					            <div class="functions">
 | 
				
			||||||
@@ -290,6 +305,10 @@ export default {
 | 
				
			|||||||
            const endIndex = startIndex + this.perPage;
 | 
					            const endIndex = startIndex + this.perPage;
 | 
				
			||||||
            return this.heartBeatList.slice(startIndex, endIndex);
 | 
					            return this.heartBeatList.slice(startIndex, endIndex);
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        pushURL() {
 | 
				
			||||||
 | 
					            return this.$root.baseURL + "/api/push/" + this.monitor.pushToken + "?status=up&msg=OK&ping=";
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user