diff --git a/pkg/registry/apps/alerting/historian/register.go b/pkg/registry/apps/alerting/historian/register.go index 78312c326aa..6125469ce10 100644 --- a/pkg/registry/apps/alerting/historian/register.go +++ b/pkg/registry/apps/alerting/historian/register.go @@ -26,7 +26,6 @@ func RegisterAppInstaller( cfg *setting.Cfg, ng *ngalert.AlertNG, ) (*AlertingHistorianAppInstaller, error) { - installer := &AlertingHistorianAppInstaller{} appSpecificConfig := historianAppConfig.RuntimeConfig{} // If we're provided an AlertNG, then call back into that for things we need. @@ -43,6 +42,12 @@ func RegisterAppInstaller( appSpecificConfig.GetAlertStateHistoryHandler = handlers.GetAlertStateHistoryHandler } + return NewAppInstaller(appSpecificConfig) +} + +func NewAppInstaller(appSpecificConfig historianAppConfig.RuntimeConfig) (*AlertingHistorianAppInstaller, error) { + installer := &AlertingHistorianAppInstaller{} + provider := simple.NewAppProvider(apis.LocalManifest(), appSpecificConfig, historianApp.New) appConfig := app.Config{