mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
Storage: Remove storageLocalUpload flag (#52413)
This commit is contained in:
parent
841e5ae8ad
commit
824f12a993
@ -43,7 +43,6 @@ export interface FeatureToggles {
|
||||
storage?: boolean;
|
||||
dashboardsFromStorage?: boolean;
|
||||
export?: boolean;
|
||||
storageLocalUpload?: boolean;
|
||||
azureMonitorResourcePickerForMetrics?: boolean;
|
||||
explore2Dashboard?: boolean;
|
||||
tracing?: boolean;
|
||||
|
@ -227,17 +227,16 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
})
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagStorage) {
|
||||
apiRoute.Group("/storage", func(orgRoute routing.RouteRegister) {
|
||||
orgRoute.Get("/list/", routing.Wrap(hs.StorageService.List))
|
||||
orgRoute.Get("/list/*", routing.Wrap(hs.StorageService.List))
|
||||
orgRoute.Get("/read/*", routing.Wrap(hs.StorageService.Read))
|
||||
apiRoute.Group("/storage", func(storageRoute routing.RouteRegister) {
|
||||
storageRoute.Get("/list/", routing.Wrap(hs.StorageService.List))
|
||||
storageRoute.Get("/list/*", routing.Wrap(hs.StorageService.List))
|
||||
storageRoute.Get("/read/*", routing.Wrap(hs.StorageService.Read))
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagStorageLocalUpload) {
|
||||
orgRoute.Post("/delete/*", reqGrafanaAdmin, routing.Wrap(hs.StorageService.Delete))
|
||||
orgRoute.Post("/upload", reqGrafanaAdmin, routing.Wrap(hs.StorageService.Upload))
|
||||
orgRoute.Post("/createFolder", reqGrafanaAdmin, routing.Wrap(hs.StorageService.CreateFolder))
|
||||
orgRoute.Post("/deleteFolder", reqGrafanaAdmin, routing.Wrap(hs.StorageService.DeleteFolder))
|
||||
}
|
||||
// Write paths
|
||||
storageRoute.Post("/delete/*", reqGrafanaAdmin, routing.Wrap(hs.StorageService.Delete))
|
||||
storageRoute.Post("/upload", reqGrafanaAdmin, routing.Wrap(hs.StorageService.Upload))
|
||||
storageRoute.Post("/createFolder", reqGrafanaAdmin, routing.Wrap(hs.StorageService.CreateFolder))
|
||||
storageRoute.Post("/deleteFolder", reqGrafanaAdmin, routing.Wrap(hs.StorageService.DeleteFolder))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -152,12 +152,6 @@ var (
|
||||
State: FeatureStateAlpha,
|
||||
RequiresDevMode: true,
|
||||
},
|
||||
{
|
||||
Name: "storageLocalUpload",
|
||||
Description: "allow uploads to local storage",
|
||||
State: FeatureStateAlpha,
|
||||
RequiresDevMode: true,
|
||||
},
|
||||
{
|
||||
Name: "azureMonitorResourcePickerForMetrics",
|
||||
Description: "New UI for Azure Monitor Metrics Query",
|
||||
|
@ -115,10 +115,6 @@ const (
|
||||
// Export grafana instance (to git, etc)
|
||||
FlagExport = "export"
|
||||
|
||||
// FlagStorageLocalUpload
|
||||
// allow uploads to local storage
|
||||
FlagStorageLocalUpload = "storageLocalUpload"
|
||||
|
||||
// FlagAzureMonitorResourcePickerForMetrics
|
||||
// New UI for Azure Monitor Metrics Query
|
||||
FlagAzureMonitorResourcePickerForMetrics = "azureMonitorResourcePickerForMetrics"
|
||||
|
@ -108,15 +108,16 @@ func ProvideService(sql *sqlstore.SQLStore, features featuremgmt.FeatureToggles,
|
||||
|
||||
initializeOrgStorages := func(orgId int64) []storageRuntime {
|
||||
storages := make([]storageRuntime, 0)
|
||||
if features.IsEnabled(featuremgmt.FlagStorageLocalUpload) {
|
||||
storages = append(storages,
|
||||
newSQLStorage(RootResources,
|
||||
"Resources",
|
||||
&StorageSQLConfig{orgId: orgId}, sql).
|
||||
setBuiltin(true).
|
||||
setDescription("Upload custom resource files"))
|
||||
}
|
||||
|
||||
// Custom upload files
|
||||
storages = append(storages,
|
||||
newSQLStorage(RootResources,
|
||||
"Resources",
|
||||
&StorageSQLConfig{orgId: orgId}, sql).
|
||||
setBuiltin(true).
|
||||
setDescription("Upload custom resource files"))
|
||||
|
||||
// System settings
|
||||
storages = append(storages,
|
||||
newSQLStorage(RootSystem,
|
||||
"System",
|
||||
|
@ -94,16 +94,6 @@ export const ResourcePickerPopover = (props: Props) => {
|
||||
<button className={getTabClassName(PickerTabType.URL)} onClick={() => setActivePicker(PickerTabType.URL)}>
|
||||
URL
|
||||
</button>
|
||||
{config.featureToggles['storageLocalUpload'] ? (
|
||||
<button
|
||||
className={getTabClassName(PickerTabType.Upload)}
|
||||
onClick={() => setActivePicker(PickerTabType.Upload)}
|
||||
>
|
||||
Upload
|
||||
</button>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.resourcePickerPopoverContent}>
|
||||
{renderPicker()}
|
||||
|
Loading…
Reference in New Issue
Block a user