File tree Expand file tree Collapse file tree 7 files changed +41
-2
lines changed
packages/grafana-runtime/src
app/features/migrate-to-cloud Expand file tree Collapse file tree 7 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
179179 rootFolderUID : string | undefined ;
180180 localFileSystemAvailable : boolean | undefined ;
181181 cloudMigrationIsTarget : boolean | undefined ;
182+ cloudMigrationFeedbackURL = '' ;
182183 reportingStaticContext ?: Record < string , string > ;
183184 exploreDefaultTimeOffset = '1h' ;
184185
Original file line number Diff line number Diff line change @@ -256,7 +256,8 @@ type FrontendSettingsDTO struct {
256256 PublicDashboardAccessToken string `json:"publicDashboardAccessToken"`
257257 PublicDashboardsEnabled bool `json:"publicDashboardsEnabled"`
258258
259- CloudMigrationIsTarget bool `json:"cloudMigrationIsTarget"`
259+ CloudMigrationIsTarget bool `json:"cloudMigrationIsTarget"`
260+ CloudMigrationFeedbackURL string `json:"cloudMigrationFeedbackURL"`
260261
261262 DateFormats setting.DateFormats `json:"dateFormats,omitempty"`
262263
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
223223 PublicDashboardAccessToken : c .PublicDashboardAccessToken ,
224224 PublicDashboardsEnabled : hs .Cfg .PublicDashboardsEnabled ,
225225 CloudMigrationIsTarget : isCloudMigrationTarget ,
226+ CloudMigrationFeedbackURL : hs .Cfg .CloudMigration .FeedbackURL ,
226227 SharedWithMeFolderUID : folder .SharedWithMeFolderUID ,
227228 RootFolderUID : accesscontrol .GeneralFolderUID ,
228229 LocalFileSystemAvailable : hs .Cfg .LocalFileSystemAvailable ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ type CloudMigrationSettings struct {
2323 CreateTokenTimeout time.Duration
2424 DeleteTokenTimeout time.Duration
2525 TokenExpiresAfter time.Duration
26+ FeedbackURL string
2627
2728 IsDeveloperMode bool
2829}
@@ -47,6 +48,7 @@ func (cfg *Cfg) readCloudMigrationSettings() {
4748 cfg .CloudMigration .DeleteTokenTimeout = cloudMigration .Key ("delete_token_timeout" ).MustDuration (5 * time .Second )
4849 cfg .CloudMigration .TokenExpiresAfter = cloudMigration .Key ("token_expires_after" ).MustDuration (7 * 24 * time .Hour )
4950 cfg .CloudMigration .IsDeveloperMode = cloudMigration .Key ("developer_mode" ).MustBool (false )
51+ cfg .CloudMigration .FeedbackURL = cloudMigration .Key ("feedback_url" ).MustString ("" )
5052
5153 if cfg .CloudMigration .SnapshotFolder == "" {
5254 homeDir , _ := os .UserHomeDir ()
Original file line number Diff line number Diff line change 11import { config } from '@grafana/runtime' ;
2+ import { Alert } from '@grafana/ui' ;
23import { Page } from 'app/core/components/Page/Page' ;
34
5+ import { Trans , t } from '../../core/internationalization' ;
6+
47import { Page as CloudPage } from './cloud/Page' ;
58import { Page as OnPremPage } from './onprem/Page' ;
69
710export default function MigrateToCloud ( ) {
8- return < Page navId = "migrate-to-cloud" > { config . cloudMigrationIsTarget ? < CloudPage /> : < OnPremPage /> } </ Page > ;
11+ const feedbackURL = config . cloudMigrationFeedbackURL ;
12+ return (
13+ < Page navId = "migrate-to-cloud" >
14+ < Alert
15+ title = { t ( 'migrate-to-cloud.public-preview.title' , 'Migrate to Grafana Cloud is in public preview' ) }
16+ buttonContent = { t ( 'migrate-to-cloud.public-preview.button-text' , 'Give feedback' ) }
17+ severity = { 'info' }
18+ onRemove = {
19+ feedbackURL
20+ ? ( ) => {
21+ window . location . href = feedbackURL ;
22+ }
23+ : undefined
24+ }
25+ >
26+ < Trans i18nKey = "migrate-to-cloud.public-preview.message" >
27+ Help us improve this feature by providing feedback and reporting any issues.
28+ </ Trans >
29+ </ Alert >
30+ { config . cloudMigrationIsTarget ? < CloudPage /> : < OnPremPage /> }
31+ </ Page >
32+ ) ;
933}
Original file line number Diff line number Diff line change 10701070 "link-title" : " Grafana Cloud pricing" ,
10711071 "title" : " How much does it cost?"
10721072 },
1073+ "public-preview" : {
1074+ "button-text" : " Give feedback" ,
1075+ "message" : " Help us improve this feature by providing feedback and reporting any issues." ,
1076+ "title" : " Migrate to Grafana Cloud is in public preview"
1077+ },
10731078 "resource-status" : {
10741079 "error-details-button" : " Details" ,
10751080 "failed" : " Error" ,
Original file line number Diff line number Diff line change 10701070 "link-title" : " Ğřäƒäʼnä Cľőūđ přįčįʼnģ" ,
10711071 "title" : " Ħőŵ mūčĥ đőęş įŧ čőşŧ?"
10721072 },
1073+ "public-preview" : {
1074+ "button-text" : " Ğįvę ƒęęđþäčĸ" ,
1075+ "message" : " Ħęľp ūş įmpřővę ŧĥįş ƒęäŧūřę þy přővįđįʼnģ ƒęęđþäčĸ äʼnđ řępőřŧįʼnģ äʼny įşşūęş." ,
1076+ "title" : " Mįģřäŧę ŧő Ğřäƒäʼnä Cľőūđ įş įʼn pūþľįč přęvįęŵ"
1077+ },
10731078 "resource-status" : {
10741079 "error-details-button" : " Đęŧäįľş" ,
10751080 "failed" : " Ēřřőř" ,
You can’t perform that action at this time.
0 commit comments