hashicorp / hashicorp/nomad

UI - Customize link in allocation page - Feature Request

Open
#24,154 0 comments 0 reactions 0 assignees View on GitHub
theme/ui type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

Hello,

### Proposal

On the ui/allocations page, in the 'ports' pane of the page, each ip/port that has been assigned is listed.

![image](https://github.com/user-attachments/assets/1d06d2c2-7583-43db-8b05-3b48a98918ef)

In this case, you can see the service in the container is on port 80 and nomad has allocated port 29480.

The link in the 'Ports' pane is constructed by taking 'http://' + IP address + ':'+ port, this is a great default.

However it would be practical to be able to change this default. For example, I might want to have the protocol as 'https' or 'ssh' or 'ftp' or something , or perhaps I'll want to add a path to the end of the link.

Example, reproducing the default config might look like this:

```
network {
port "web" {
to = 80
uri_protocol="http"
uri_suffix=""
}
}
```

### Use-cases

I open a port for Prometheus metrics scrapping, prometheus are generally listed /metrics. It would be nice for the Nomad Operator validating the service that they could click the link and go straight to prometheus.

```
network {
port "web" {
to = 80
uri_protocol="http"
uri_suffix="/metrics"
}
}
```

This would render http://theip:theport/metrics/

Or maybe the job writer has an FTP service that has been opened that the Operator wants to inspect:

```
network {
port "fileshare" {
to = 21
uri_protocol="ftp"
}
}
```
This would be rendered as ftp://theip:theport

Basically any protocol that is supported by modern browsers can potentially be listed in the uri_protocol.

### Attempted Solutions

Attempted solution is user copies the IP/port and enters the protocol and path manually each time from human memory.

With this feature added, the Operators can more quickly assess service health when in the UI.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the ui/allocations page and its Ports pane, then trace how the network port configuration reaches the rendered link. Define how uri_protocol and uri_suffix should affect the existing default while preserving current behavior, and verify that HTTP, HTTPS, FTP, and the /metrics example render as described.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.