mirror of
https://github.com/grafana/grafana.git
synced 2024-12-28 18:01:40 -06:00
Cloud migration UI: Add migrate-to-cloud
route (#83072)
* add migrate-to-cloud route * fix chunk name * gate route behind feature toggle * update permission checks
This commit is contained in:
parent
e1edec02d0
commit
c75502dd8c
@ -142,6 +142,7 @@ func (root *NavTreeRoot) ApplyAdminIA() {
|
||||
generalNodeLinks = AppendIfNotNil(generalNodeLinks, root.FindById("global-orgs"))
|
||||
generalNodeLinks = AppendIfNotNil(generalNodeLinks, root.FindById("feature-toggles"))
|
||||
generalNodeLinks = AppendIfNotNil(generalNodeLinks, root.FindById("storage"))
|
||||
generalNodeLinks = AppendIfNotNil(generalNodeLinks, root.FindById("migrate-to-cloud"))
|
||||
|
||||
generalNode := &NavLink{
|
||||
Text: "General",
|
||||
|
@ -135,6 +135,16 @@ func (s *ServiceImpl) getAdminNode(c *contextmodel.ReqContext) (*navtree.NavLink
|
||||
configNodes = append(configNodes, storage)
|
||||
}
|
||||
|
||||
if s.features.IsEnabled(ctx, featuremgmt.FlagOnPremToCloudMigrations) && c.SignedInUser.IsGrafanaAdmin {
|
||||
migrateToCloud := &navtree.NavLink{
|
||||
Text: "Migrate to Grafana Cloud",
|
||||
Id: "migrate-to-cloud",
|
||||
SubTitle: "Copy data sources, dashboards, and alerts from this installation to a cloud stack",
|
||||
Url: s.cfg.AppSubURL + "/admin/migrate-to-cloud",
|
||||
}
|
||||
configNodes = append(configNodes, migrateToCloud)
|
||||
}
|
||||
|
||||
configNode := &navtree.NavLink{
|
||||
Id: navtree.NavIDCfg,
|
||||
Text: "Administration",
|
||||
|
@ -118,6 +118,8 @@ export function getNavTitle(navId: string | undefined) {
|
||||
return t('nav.server-settings.title', 'Settings');
|
||||
case 'storage':
|
||||
return t('nav.storage.title', 'Storage');
|
||||
case 'migrate-to-cloud':
|
||||
return t('nav.migrate-to-cloud.title', 'Migrate to Grafana Cloud');
|
||||
case 'upgrading':
|
||||
return t('nav.upgrading.title', 'Stats and license');
|
||||
case 'monitoring':
|
||||
@ -248,6 +250,11 @@ export function getNavSubTitle(navId: string | undefined) {
|
||||
return t('nav.server-settings.subtitle', 'View the settings defined in your Grafana config');
|
||||
case 'storage':
|
||||
return t('nav.storage.subtitle', 'Manage file storage');
|
||||
case 'migrate-to-cloud':
|
||||
return t(
|
||||
'nav.migrate-to-cloud.subtitle',
|
||||
'Copy data sources, dashboards, and alerts from this installation to a cloud stack'
|
||||
);
|
||||
case 'support-bundles':
|
||||
return t('nav.support-bundles.subtitle', 'Download support bundles');
|
||||
case 'admin':
|
||||
|
@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
|
||||
export default function MigrateToCloud() {
|
||||
return <Page navId="migrate-to-cloud">TODO</Page>;
|
||||
}
|
@ -362,6 +362,13 @@ export function getAppRoutes(): RouteDescriptor[] {
|
||||
() => import(/* webpackChunkName: "ServerStats" */ 'app/features/admin/ServerStats')
|
||||
),
|
||||
},
|
||||
config.featureToggles.onPremToCloudMigrations && {
|
||||
path: '/admin/migrate-to-cloud',
|
||||
roles: () => ['ServerAdmin'],
|
||||
component: SafeDynamicImport(
|
||||
() => import(/* webpackChunkName: "MigrateToCloud" */ 'app/features/admin/migrate-to-cloud/MigrateToCloud')
|
||||
),
|
||||
},
|
||||
// LOGIN / SIGNUP
|
||||
{
|
||||
path: '/login',
|
||||
|
@ -876,6 +876,10 @@
|
||||
"manage-folder": {
|
||||
"subtitle": "Manage folder dashboards and permissions"
|
||||
},
|
||||
"migrate-to-cloud": {
|
||||
"subtitle": "Copy data sources, dashboards, and alerts from this installation to a cloud stack",
|
||||
"title": "Migrate to Grafana Cloud"
|
||||
},
|
||||
"monitoring": {
|
||||
"subtitle": "Monitoring and infrastructure apps",
|
||||
"title": "Observability"
|
||||
|
@ -876,6 +876,10 @@
|
||||
"manage-folder": {
|
||||
"subtitle": "Mäʼnäģę ƒőľđęř đäşĥþőäřđş äʼnđ pęřmįşşįőʼnş"
|
||||
},
|
||||
"migrate-to-cloud": {
|
||||
"subtitle": "Cőpy đäŧä şőūřčęş, đäşĥþőäřđş, äʼnđ äľęřŧş ƒřőm ŧĥįş įʼnşŧäľľäŧįőʼn ŧő ä čľőūđ şŧäčĸ",
|
||||
"title": "Mįģřäŧę ŧő Ğřäƒäʼnä Cľőūđ"
|
||||
},
|
||||
"monitoring": {
|
||||
"subtitle": "Mőʼnįŧőřįʼnģ äʼnđ įʼnƒřäşŧřūčŧūřę äppş",
|
||||
"title": "Øþşęřväþįľįŧy"
|
||||
|
Loading…
Reference in New Issue
Block a user