CloudMigrations: Remove public preview banner (#102354)

pull/102323/head
Matheus Macabu 2 months ago committed by GitHub
parent b8c627c566
commit 20f9902ed5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      conf/defaults.ini
  2. 2
      conf/sample.ini
  3. 1
      packages/grafana-runtime/src/config.ts
  4. 5
      pkg/api/dtos/frontend_settings.go
  5. 1
      pkg/api/frontendsettings.go
  6. 2
      pkg/setting/setting_cloud_migration.go
  7. 41
      public/app/features/migrate-to-cloud/MigrateToCloud.tsx
  8. 6
      public/locales/en-US/grafana.json

@ -2089,8 +2089,6 @@ delete_access_policy_timeout = 5s
domain = grafana.net
# Folder used to store snapshot files. Defaults to the home dir
snapshot_folder = ""
# Link to form to give feedback on the feature
feedback_url = https://docs.google.com/forms/d/e/1FAIpQLSeEE33vhbSpR8A8S1A1ocZ1ByVRRwiRl1GZr2FSrEer_tSa8w/viewform?usp=sf_link
# How frequently should the frontend UI poll for changes while resources are migrating
frontend_poll_interval = 2s
# Controls how the Alert Rules are migrated. Available choices: "paused" and "unchanged". Default: "paused".

@ -1987,8 +1987,6 @@ default_datasource_uid =
;domain = grafana-dev.net
# Folder used to store snapshot files. Defaults to the home dir
;snapshot_folder = ""
# Link to form to give feedback on the feature
;feedback_url = ""
# How frequently should the frontend UI poll for changes while resources are migrating
;frontend_poll_interval = 2s
# Controls how the Alert Rules are migrated. Available choices: "paused" and "unchanged". Default: "paused".

@ -198,7 +198,6 @@ export class GrafanaBootConfig implements GrafanaConfig {
rootFolderUID: string | undefined;
localFileSystemAvailable: boolean | undefined;
cloudMigrationIsTarget: boolean | undefined;
cloudMigrationFeedbackURL = '';
cloudMigrationPollIntervalMs = 2000;
reportingStaticContext?: Record<string, string>;
exploreDefaultTimeOffset = '1h';

@ -269,9 +269,8 @@ type FrontendSettingsDTO struct {
PublicDashboardAccessToken string `json:"publicDashboardAccessToken"`
PublicDashboardsEnabled bool `json:"publicDashboardsEnabled"`
CloudMigrationIsTarget bool `json:"cloudMigrationIsTarget"`
CloudMigrationFeedbackURL string `json:"cloudMigrationFeedbackURL"`
CloudMigrationPollIntervalMs int `json:"cloudMigrationPollIntervalMs"`
CloudMigrationIsTarget bool `json:"cloudMigrationIsTarget"`
CloudMigrationPollIntervalMs int `json:"cloudMigrationPollIntervalMs"`
DateFormats setting.DateFormats `json:"dateFormats,omitempty"`

@ -240,7 +240,6 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
PublicDashboardAccessToken: c.PublicDashboardAccessToken,
PublicDashboardsEnabled: hs.Cfg.PublicDashboardsEnabled,
CloudMigrationIsTarget: isCloudMigrationTarget,
CloudMigrationFeedbackURL: hs.Cfg.CloudMigration.FeedbackURL,
CloudMigrationPollIntervalMs: int(hs.Cfg.CloudMigration.FrontendPollInterval.Milliseconds()),
SharedWithMeFolderUID: folder.SharedWithMeFolderUID,
RootFolderUID: accesscontrol.GeneralFolderUID,

@ -32,7 +32,6 @@ type CloudMigrationSettings struct {
CreateTokenTimeout time.Duration
DeleteTokenTimeout time.Duration
TokenExpiresAfter time.Duration
FeedbackURL string
FrontendPollInterval time.Duration
AlertRulesState string
@ -60,7 +59,6 @@ func (cfg *Cfg) readCloudMigrationSettings() {
cfg.CloudMigration.DeleteTokenTimeout = cloudMigration.Key("delete_token_timeout").MustDuration(5 * time.Second)
cfg.CloudMigration.TokenExpiresAfter = cloudMigration.Key("token_expires_after").MustDuration(7 * 24 * time.Hour)
cfg.CloudMigration.IsDeveloperMode = cloudMigration.Key("developer_mode").MustBool(false)
cfg.CloudMigration.FeedbackURL = cloudMigration.Key("feedback_url").MustString("")
cfg.CloudMigration.FrontendPollInterval = cloudMigration.Key("frontend_poll_interval").MustDuration(2 * time.Second)
cfg.CloudMigration.AlertRulesState = cloudMigration.Key("alert_rules_state").In(GMSAlertRulesPaused, []string{GMSAlertRulesPaused, GMSAlertRulesUnchanged})

@ -1,48 +1,9 @@
import { config } from '@grafana/runtime';
import { Alert, TextLink } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { Trans, t } from '../../core/internationalization';
import { Page as CloudPage } from './cloud/Page';
import { Page as OnPremPage } from './onprem/Page';
export default function MigrateToCloud() {
const feedbackURL = config.cloudMigrationFeedbackURL;
return (
<Page navId="migrate-to-cloud">
<Alert
title={t('migrate-to-cloud.public-preview.title', 'Migrate to Grafana Cloud is in public preview')}
buttonContent={t('migrate-to-cloud.public-preview.button-text', 'Give feedback')}
severity={'info'}
onRemove={
feedbackURL
? () => {
window.open(feedbackURL, '_blank');
}
: undefined
}
>
<Trans i18nKey="migrate-to-cloud.public-preview.message">
<TextLink
href="https://grafana.com/docs/grafana-cloud/account-management/migration-guide/cloud-migration-assistant/"
external
>
Visit our docs
</TextLink>{' '}
to learn more about this feature!
</Trans>
{config.cloudMigrationIsTarget && (
<>
&nbsp;
<Trans i18nKey="migrate-to-cloud.public-preview.message-cloud">
Your self-managed instance of Grafana requires version 11.5+, or 11.2+ with the onPremToCloudMigrations
feature flag enabled.
</Trans>
</>
)}
</Alert>
{config.cloudMigrationIsTarget ? <CloudPage /> : <OnPremPage />}
</Page>
);
return <Page navId="migrate-to-cloud">{config.cloudMigrationIsTarget ? <CloudPage /> : <OnPremPage />}</Page>;
}

@ -2701,12 +2701,6 @@
"link-title": "Grafana Cloud pricing",
"title": "How much does it cost?"
},
"public-preview": {
"button-text": "Give feedback",
"message": "<0>Visit our docs</0> to learn more about this feature!",
"message-cloud": "Your self-managed instance of Grafana requires version 11.5+, or 11.2+ with the onPremToCloudMigrations feature flag enabled.",
"title": "Migrate to Grafana Cloud is in public preview"
},
"resource-details": {
"dismiss-button": "OK",
"error-messages": {

Loading…
Cancel
Save