Skip to content

Commit b5261d7

Browse files
committed
Add a link to go to agent status report page from cluster status report page
1 parent 50eee49 commit b5261d7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/java/cd/go/contrib/elasticagent/model/KubernetesCluster.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030

3131
public class KubernetesCluster {
3232
private final List<KubernetesNode> nodes;
33+
private final String pluginId;
3334

3435
public KubernetesCluster(KubernetesClient client) throws ParseException {
36+
pluginId = Constants.PLUGIN_ID;
3537
nodes = client.nodes().list().getItems().stream().map(node -> new KubernetesNode(node)).collect(toList());
3638
LOG.info("Running kubernetes nodes " + nodes.size());
3739
fetchPods(client);
@@ -58,4 +60,8 @@ private void fetchPods(KubernetesClient dockerClient) throws ParseException {
5860
public List<KubernetesNode> getNodes() {
5961
return nodes;
6062
}
63+
64+
public String getPluginId() {
65+
return pluginId;
66+
}
6167
}

src/main/resources/status-report.template.ftlh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@
234234
<#if node.pods?size != 0>
235235
<#list node.pods as pod>
236236
<tr>
237-
<td>${pod.podName!}</td>
237+
<td>
238+
<a href="/go/admin/status_reports/${pluginId}/${pod.podName!}"> ${pod.podName!} </a>
239+
</td>
238240
<td>${pod.jobInformation!}</td>
239241
<td>${pod.image!}</td>
240242
<td>${pod.podIP!}</td>

0 commit comments

Comments
 (0)