<commit_before># Nomad UI

Something something something Hashicorp doesn't provide a free UI for Nomad something.

### Prerequisites
Enable CORS on the HTTP API endpoint by adding the following to your Nomad agent configuration:
```
http_api_response_headers {
    "Access-Control-Allow-Origin" = "*"
}
```

### Usage
```
docker run -itd -e "NOMAD_URL=http://<base_url>:<port>" -e "ASPNETCORE_URLS=http://*:5000" -p 5000:5000 cvandal/nomad-ui:0.3.0
```

### Development
1. Run `git clone <EMAIL>:cvandal/nomad-ui.git` or `git clone https://github.com/cvandal/nomad-ui.git`
2. Run `dotnet restore`, followed by `dotnet build`, followed by `dotnet publish`
3. Run `cd .\Nomad\bin\Debug\netcoreapp1.1\publish\` and create a `Dockerfile` in the publish output directory with the following content:
```
FROM microsoft/dotnet

COPY . /app

WORKDIR /app

ENTRYPOINT ["dotnet", "Nomad.dll"]
```
4. Run `docker build <image_name>:<image_tag> .`
5. Run `docker run -itd -e "NOMAD_URL=http://<base_url>:<port>" -e "ASPNETCORE_URLS=http://*:5000" -p 5000:5000 <image_name>:<image_tag>`

### Screenshots
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/dashboard.png "Dashboard")
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/job.png "Job")
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/allocation.png "Allocation")
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/client.png "Client")

### Known Issues
`¯\_(ツ)_/¯`
<commit_msg>updated image tag in usage section<commit_after># Nomad UI

Something something something Hashicorp doesn't provide a free UI for Nomad something.

### Prerequisites
Enable CORS on the HTTP API endpoint by adding the following to your Nomad agent configuration:
```
http_api_response_headers {
    "Access-Control-Allow-Origin" = "*"
}
```

### Usage
```
docker run -itd -e "NOMAD_URL=http://<base_url>:<port>" -e "ASPNETCORE_URLS=http://*:5000" -p 5000:5000 cvandal/nomad-ui:0.3.1
```

### Development
1. Run `git clone <EMAIL>:cvandal/nomad-ui.git` or `git clone https://github.com/cvandal/nomad-ui.git`
2. Run `dotnet restore`, followed by `dotnet build`, followed by `dotnet publish`
3. Run `cd .\Nomad\bin\Debug\netcoreapp1.1\publish\` and create a `Dockerfile` in the publish output directory with the following content:
```
FROM microsoft/dotnet

COPY . /app

WORKDIR /app

ENTRYPOINT ["dotnet", "Nomad.dll"]
```
4. Run `docker build <image_name>:<image_tag> .`
5. Run `docker run -itd -e "NOMAD_URL=http://<base_url>:<port>" -e "ASPNETCORE_URLS=http://*:5000" -p 5000:5000 <image_name>:<image_tag>`

### Screenshots
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/dashboard.png "Dashboard")
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/job.png "Job")
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/allocation.png "Allocation")
![alt text](https://github.com/cvandal/nomad-ui/raw/master/Nomad/wwwroot/images/client.png "Client")

### Known Issues
`¯\_(ツ)_/¯`

{'fraction_non_alphanumeric': 0.171648987463838, 'fraction_numerical': 0.02185792349726776, 'mean_word_length': 4.849624060150376, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 10, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5334619', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1111, 'n_words': 257}