mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-11-04 01:25:06 +01:00 
			
		
		
		
	chore: Add 404 page for not found routes
This commit is contained in:
		@@ -343,7 +343,6 @@ func main() {
 | 
				
			|||||||
		rw.Header().Add("Content-Type", "text/html; charset=utf-8")
 | 
							rw.Header().Add("Content-Type", "text/html; charset=utf-8")
 | 
				
			||||||
		web.RenderTemplate(rw, "404.tmpl", &web.Page{Title: "Page not found", Build: buildInfo})
 | 
							web.RenderTemplate(rw, "404.tmpl", &web.Page{Title: "Page not found", Build: buildInfo})
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
-
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	secured := r.PathPrefix("/").Subrouter()
 | 
						secured := r.PathPrefix("/").Subrouter()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,7 @@
 | 
				
			|||||||
// All rights reserved.
 | 
					// All rights reserved.
 | 
				
			||||||
// Use of this source code is governed by a MIT-style
 | 
					// Use of this source code is governed by a MIT-style
 | 
				
			||||||
// license that can be found in the LICENSE file.
 | 
					// license that can be found in the LICENSE file.
 | 
				
			||||||
 | 
					// TODO : Here is the route config
 | 
				
			||||||
package routerConfig
 | 
					package routerConfig
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
@@ -47,11 +48,11 @@ var routes []Route = []Route{
 | 
				
			|||||||
	{"/monitoring/control/{cluster}", "monitoring/control.tmpl", "Status of <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
						{"/monitoring/control/{cluster}", "monitoring/control.tmpl", "Status of <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
				
			||||||
	{"/monitoring/partition/{cluster}", "partitions/systems.tmpl", "Cluster <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
						{"/monitoring/partition/{cluster}", "partitions/systems.tmpl", "Cluster <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
				
			||||||
	{"/monitoring/history/", "monitoring/history.tmpl", "Cluster <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
						{"/monitoring/history/", "monitoring/history.tmpl", "Cluster <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func setupHomeRoute(i InfoType, r *http.Request) InfoType {
 | 
					func setupHomeRoute(i InfoType, r *http.Request) InfoType {
 | 
				
			||||||
	jobRepo := repository.GetJobRepository()
 | 
						jobRepo := repository.GetJobRepository()
 | 
				
			||||||
	groupBy := model.AggregateCluster
 | 
						groupBy := model.AggregateCluster
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user