diff --git a/admin/templates/queries.html b/admin/templates/queries.html
index d2b7f431..554ca6aa 100644
--- a/admin/templates/queries.html
+++ b/admin/templates/queries.html
@@ -122,7 +122,7 @@
data: 'query',
render: function (data, type, row, meta) {
if (type === 'display') {
- return queryResultLink(data.link, data.name, "/query/{{ .EnvUUID }}/logs/" + data.name);
+ return queryResultLink(data.link, data.query, "/query/{{ .EnvUUID }}/logs/" + data.name);
} else {
return data;
}