mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-11-04 09:35:07 +01:00 
			
		
		
		
	Merge branch 'master' of github.com:ClusterCockpit/cc-backend
This commit is contained in:
		@@ -161,6 +161,11 @@ func setupNodeRoute(i InfoType, r *http.Request) InfoType {
 | 
				
			|||||||
	return i
 | 
						return i
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func setupAnalysisRoute(i InfoType, r *http.Request) InfoType {
 | 
				
			||||||
 | 
						i["cluster"] = mux.Vars(r)["cluster"]
 | 
				
			||||||
 | 
						return i
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var routes []Route = []Route{
 | 
					var routes []Route = []Route{
 | 
				
			||||||
	{"/monitoring/jobs/", "monitoring/jobs.tmpl", "Jobs - ClusterCockpit", true, func(i InfoType, r *http.Request) InfoType { return i }},
 | 
						{"/monitoring/jobs/", "monitoring/jobs.tmpl", "Jobs - ClusterCockpit", true, func(i InfoType, r *http.Request) InfoType { return i }},
 | 
				
			||||||
	{"/monitoring/job/{id:[0-9]+}", "monitoring/job.tmpl", "Job <ID> - ClusterCockpit", false, setupJobRoute},
 | 
						{"/monitoring/job/{id:[0-9]+}", "monitoring/job.tmpl", "Job <ID> - ClusterCockpit", false, setupJobRoute},
 | 
				
			||||||
@@ -169,6 +174,7 @@ var routes []Route = []Route{
 | 
				
			|||||||
	{"/monitoring/user/{id}", "monitoring/user.tmpl", "User <ID> - ClusterCockpit", true, setupUserRoute},
 | 
						{"/monitoring/user/{id}", "monitoring/user.tmpl", "User <ID> - ClusterCockpit", true, setupUserRoute},
 | 
				
			||||||
	{"/monitoring/systems/{cluster}", "monitoring/systems.tmpl", "Cluster <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
						{"/monitoring/systems/{cluster}", "monitoring/systems.tmpl", "Cluster <ID> - ClusterCockpit", false, setupClusterRoute},
 | 
				
			||||||
	{"/monitoring/node/{cluster}/{hostname}", "monitoring/node.tmpl", "Node <ID> - ClusterCockpit", false, setupNodeRoute},
 | 
						{"/monitoring/node/{cluster}/{hostname}", "monitoring/node.tmpl", "Node <ID> - ClusterCockpit", false, setupNodeRoute},
 | 
				
			||||||
 | 
						{"/monitoring/analysis/{cluster}", "monitoring/analysis.tmpl", "Analaysis - ClusterCockpit", true, setupAnalysisRoute},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func main() {
 | 
					func main() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,7 +39,7 @@
 | 
				
			|||||||
                    <th>Name</th>
 | 
					                    <th>Name</th>
 | 
				
			||||||
                    <th>Jobs</th>
 | 
					                    <th>Jobs</th>
 | 
				
			||||||
                    <th>System View</th>
 | 
					                    <th>System View</th>
 | 
				
			||||||
                    <!-- <th>Analysis View</th> -->
 | 
					                    <th>Analysis View</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
            </thead>
 | 
					            </thead>
 | 
				
			||||||
            <tbody>
 | 
					            <tbody>
 | 
				
			||||||
@@ -48,7 +48,7 @@
 | 
				
			|||||||
                        <td>{{.Name}}</td>
 | 
					                        <td>{{.Name}}</td>
 | 
				
			||||||
                        <td><a href="/monitoring/jobs/?cluster={{.Name}}">Jobs</a></td>
 | 
					                        <td><a href="/monitoring/jobs/?cluster={{.Name}}">Jobs</a></td>
 | 
				
			||||||
                        <td><a href="/monitoring/systems/{{.Name}}">System View</a></td>
 | 
					                        <td><a href="/monitoring/systems/{{.Name}}">System View</a></td>
 | 
				
			||||||
                        <!-- <td><a href="/monitoring/analysis/?cluster={{.Name}}">Analysis View</a></td> -->
 | 
					                        <td><a href="/monitoring/analysis/{{.Name}}">Analysis View</a></td>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
                {{end}}
 | 
					                {{end}}
 | 
				
			||||||
            </tbody>
 | 
					            </tbody>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										15
									
								
								templates/monitoring/analysis.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								templates/monitoring/analysis.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
				
			|||||||
 | 
					{{define "content"}}
 | 
				
			||||||
 | 
					    <div id="svelte-app"></div>
 | 
				
			||||||
 | 
					{{end}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{{define "stylesheets"}}
 | 
				
			||||||
 | 
					    <link rel='stylesheet' href='/build/analysis.css'>
 | 
				
			||||||
 | 
					{{end}}
 | 
				
			||||||
 | 
					{{define "javascript"}}
 | 
				
			||||||
 | 
					    <script>
 | 
				
			||||||
 | 
					        const cluster = {{ .Infos.cluster }};
 | 
				
			||||||
 | 
					        const filterPresets = {{ .FilterPresets }};
 | 
				
			||||||
 | 
					        const clusterCockpitConfig = {{ .Config }};
 | 
				
			||||||
 | 
					    </script>
 | 
				
			||||||
 | 
					    <script src='/build/analysis.js'></script>
 | 
				
			||||||
 | 
					{{end}}
 | 
				
			||||||
@@ -33,6 +33,7 @@ func init() {
 | 
				
			|||||||
		"monitoring/user.tmpl",
 | 
							"monitoring/user.tmpl",
 | 
				
			||||||
		"monitoring/systems.tmpl",
 | 
							"monitoring/systems.tmpl",
 | 
				
			||||||
		"monitoring/node.tmpl",
 | 
							"monitoring/node.tmpl",
 | 
				
			||||||
 | 
							"monitoring/analysis.tmpl",
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for _, file := range files {
 | 
						for _, file := range files {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user