mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-11-01 00:15:05 +01:00
Merge branch 'dev' of github.com:ClusterCockpit/cc-backend into dev
This commit is contained in:
@@ -129,6 +129,7 @@ func (r *UserRepository) AddUser(user *schema.User) error {
|
||||
|
||||
cclog.Infof("new user %#v created (roles: %s, auth-source: %d, projects: %s)", user.Username, rolesJson, user.AuthSource, projectsJson)
|
||||
|
||||
// DEPRECATED: SUPERSEDED BY NEW USER CONFIG - userConfig.go / web.go
|
||||
defaultMetricsCfg, err := config.LoadDefaultMetricsConfig()
|
||||
if err != nil {
|
||||
cclog.Errorf("Error loading default metrics config: %v", err)
|
||||
@@ -140,7 +141,8 @@ func (r *UserRepository) AddUser(user *schema.User) error {
|
||||
cclog.Errorf("Error marshaling default metrics for cluster %s: %v", cluster.Name, err)
|
||||
continue
|
||||
}
|
||||
confKey := "job_view_selectedMetrics:" + cluster.Name
|
||||
// Note: StatisticsTable now has different key (metricConfig_jobViewTableMetrics): Not updated here.
|
||||
confKey := "metricConfig_jobViewPlotMetrics:" + cluster.Name
|
||||
if _, err := sq.Insert("configuration").
|
||||
Columns("username", "confkey", "value").
|
||||
Values(user.Username, confKey, string(metricsJSON)).
|
||||
@@ -151,6 +153,7 @@ func (r *UserRepository) AddUser(user *schema.User) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
// END DEPRECATION
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -91,8 +91,8 @@ func (uCfg *UserCfgRepo) GetUIConfig(user *schema.User) (map[string]any, error)
|
||||
uiconfig[key] = val
|
||||
}
|
||||
|
||||
// Add global ShortRunningJobsDuration setting as plot_list_hideShortRunningJobs
|
||||
uiconfig["plot_list_hideShortRunningJobs"] = config.Keys.ShortRunningJobsDuration
|
||||
// Add global ShortRunningJobsDuration setting as jobList_hideShortRunningJobs
|
||||
uiconfig["jobList_hideShortRunningJobs"] = config.Keys.ShortRunningJobsDuration
|
||||
|
||||
return uiconfig, 24 * time.Hour, size
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user