Unistore: refactor provisioning to work with folder service (#99473)

This commit is contained in:
maicon
2025-01-29 05:19:38 +02:00
committed by GitHub
parent 6908f91428
commit 20f02ec12f
13 changed files with 180 additions and 77 deletions
+14 -10
View File
@@ -4,17 +4,21 @@ import (
"github.com/grafana/grafana/pkg/setting"
)
// Search Fallback was returning both Folders and Dashboards which resulted
// in issues with rendering the Folder UI. Also, filters are not implemented
// yet. For those reasons, we will be disabling Search Fallback for now
func NewSearchClient(cfg *setting.Cfg, unifiedStorageConfigKey string, unifiedClient ResourceIndexClient, legacyClient ResourceIndexClient) ResourceIndexClient {
/*config, ok := cfg.UnifiedStorage[unifiedStorageConfigKey]
if !ok {
return legacyClient
}
// config, ok := cfg.UnifiedStorage[unifiedStorageConfigKey]
// if !ok {
// return legacyClient
// }
// switch config.DualWriterMode {
// case rest.Mode0, rest.Mode1, rest.Mode2:
// return legacyClient
// default:
// return unifiedClient
// }
switch config.DualWriterMode {
case rest.Mode0, rest.Mode1, rest.Mode2:
return legacyClient
default:
return unifiedClient
}*/
return unifiedClient
}