Admin: Add support bundles (#60536)

* Add support bundles

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

* tweak code owners

* rename and lint frontend

* lint

* fix backend lint

* register feature flag

* add feature toggle. fix small backend issues

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
This commit is contained in:
Jo
2022-12-20 10:13:37 +00:00
committed by GitHub
parent 6e2b148745
commit 2c7410c87d
24 changed files with 1174 additions and 4 deletions

View File

@@ -514,6 +514,7 @@ export function getAppRoutes(): RouteDescriptor[] {
...getBrowseStorageRoutes(),
...getDynamicDashboardRoutes(),
...getPluginCatalogRoutes(),
...getSupportBundleRoutes(),
...getLiveRoutes(),
...getAlertingRoutes(),
...getProfileRoutes(),
@@ -552,6 +553,28 @@ export function getBrowseStorageRoutes(cfg = config): RouteDescriptor[] {
];
}
export function getSupportBundleRoutes(cfg = config): RouteDescriptor[] {
if (!cfg.featureToggles.supportBundles) {
return [];
}
return [
{
path: '/admin/support-bundles',
component: SafeDynamicImport(
() => import(/* webpackChunkName: "SupportBundles" */ 'app/features/support-bundles/SupportBundles')
),
},
{
path: '/admin/support-bundles/create',
component: SafeDynamicImport(
() =>
import(/* webpackChunkName: "ServiceAccountCreatePage" */ 'app/features/support-bundles/SupportBundlesCreate')
),
},
];
}
export function getDynamicDashboardRoutes(cfg = config): RouteDescriptor[] {
if (!cfg.featureToggles.scenes) {
return [];