mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-13 22:31:48 +08:00

* feat: query service changes base setup for preferences * feat: added handlers for user and org preferences * chore: added base for all user and all org preferences * feat: added handlers for all user and all org preferences * feat: register the preference routes and initDB in pkg/query-service * feat: code refactor * chore: too much fun code refactor * chore: little little missing attributes * fix: handle range queries better * fix: handle range queries better * chore: address review comments * chore: use struct inheritance for the all preferences struct * chore: address review comments * chore: address review comments * chore: correct preference routes * chore: low hanging optimisations * chore: address review comments * chore: address review comments * chore: added extra validations for the check in allowed values * fix: better handling for the jwt claims * fix: better handling for the jwt claims * chore: move the error to preference apis * chore: move the error to preference apis * fix: move the 401 logic to the auth middleware
38 lines
1008 B
Go
38 lines
1008 B
Go
package preferences
|
|
|
|
var preferenceMap = map[string]Preference{
|
|
"DASHBOARDS_LIST_VIEW": {
|
|
Key: "DASHBOARDS_LIST_VIEW",
|
|
Name: "Dashboards List View",
|
|
Description: "",
|
|
ValueType: "string",
|
|
DefaultValue: "grid",
|
|
AllowedValues: []interface{}{"grid", "list"},
|
|
IsDiscreteValues: true,
|
|
AllowedScopes: []string{"user", "org"},
|
|
},
|
|
"LOGS_TOOLBAR_COLLAPSED": {
|
|
Key: "LOGS_TOOLBAR_COLLAPSED",
|
|
Name: "Logs toolbar",
|
|
Description: "",
|
|
ValueType: "boolean",
|
|
DefaultValue: false,
|
|
AllowedValues: []interface{}{true, false},
|
|
IsDiscreteValues: true,
|
|
AllowedScopes: []string{"user", "org"},
|
|
},
|
|
"MAX_DEPTH_ALLOWED": {
|
|
Key: "MAX_DEPTH_ALLOWED",
|
|
Name: "Max Depth Allowed",
|
|
Description: "",
|
|
ValueType: "integer",
|
|
DefaultValue: 10,
|
|
IsDiscreteValues: false,
|
|
Range: Range{
|
|
Min: 0,
|
|
Max: 100,
|
|
},
|
|
AllowedScopes: []string{"user", "org"},
|
|
},
|
|
}
|