feature: New diagnostics page, showing SSH keys found. (#344)

This commit is contained in:
James Read
2024-07-03 23:34:07 +00:00
committed by GitHub
parent a1adc2a85d
commit fb6aaa52c7
6 changed files with 56 additions and 9 deletions
+5
View File
@@ -29,6 +29,8 @@ type webUISettings struct {
PageTitle string
SectionNavigationStyle string
DefaultIconForBack string
SshFoundKey string
SshFoundConfig string
}
func findWebuiDir() string {
@@ -111,8 +113,11 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) {
PageTitle: cfg.PageTitle,
SectionNavigationStyle: cfg.SectionNavigationStyle,
DefaultIconForBack: cfg.DefaultIconForBack,
SshFoundKey: installationinfo.Runtime.SshFoundKey,
SshFoundConfig: installationinfo.Runtime.SshFoundConfig,
})
w.Header().Add("Content-Type", "application/json")
_, err := w.Write([]byte(jsonRet))
if err != nil {