Update - modify hub to support multiple networks. (#4)
Co-authored-by: jdl <jdl@desktop> Reviewed-on: #4
This commit was merged in pull request #4.
	This commit is contained in:
		
							
								
								
									
										50
									
								
								hub/templates/network/network-view.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								hub/templates/network/network-view.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| {{define "body" -}} | ||||
| <p> | ||||
|   <a href="/admin/network/delete/?NetworkID={{.Network.NetworkID}}">Delete</a> / | ||||
|   <a href="/admin/network/hosts/?NetworkID={{.Network.NetworkID}}">Hosts</a> | ||||
| </p> | ||||
|  | ||||
| <table class="def-list"> | ||||
|   <tr> | ||||
|     <td>Network</td> | ||||
|     <td>{{ipToString .Network.Network}}/24</td> | ||||
|   </tr> | ||||
| </table> | ||||
|  | ||||
| <h3>Peers</h3> | ||||
|  | ||||
| <p> | ||||
|   <a href="/admin/peer/create/?NetworkID={{.Network.NetworkID}}">Create</a> | ||||
| </p> | ||||
|  | ||||
| {{if .Peers -}} | ||||
| <table> | ||||
|   <thead> | ||||
|     <tr> | ||||
|       <th>PeerIP</th> | ||||
|       <th>Name</th> | ||||
|       <th>Public IP</th> | ||||
|       <th>Port</th> | ||||
|       <th>Relay</th> | ||||
|     </tr> | ||||
|   </thead> | ||||
|   <tbody> | ||||
|   {{range .Peers -}} | ||||
|   <tr> | ||||
|     <td> | ||||
|       <a href="/admin/peer/view/?NetworkID={{$.Network.NetworkID}}&PeerIP={{.PeerIP}}"> | ||||
|         {{.PeerIP}} | ||||
|       </a> | ||||
|     </td> | ||||
|     <td>{{.Name}}</td> | ||||
|     <td>{{ipToString .PublicIP}}</td> | ||||
|     <td>{{.Port}}</td> | ||||
|     <td>{{if .Relay}}T{{else}}F{{end}}</td> | ||||
|   </tr> | ||||
|   </tbody> | ||||
|   {{- end}} | ||||
| </table> | ||||
| {{- else}} | ||||
| <p>No peers.</p> | ||||
| {{- end}} | ||||
| {{- end}} | ||||
		Reference in New Issue
	
	Block a user