satellite/console, web/satellite: feature flag for new objects flow

Added a feature flag to switch between old and new objects flow

Change-Id: Id1802f9fb1230928445f16e4d0a62aecdc91c038
This commit is contained in:
Vitalii Shpital 2021-11-02 15:36:28 +02:00
parent 91158fd3bf
commit 3c683998f5
7 changed files with 21 additions and 0 deletions

View File

@ -94,6 +94,7 @@ type Config struct {
NewOnboarding bool `help:"indicates if new onboarding flow should be rendered" default:"true"`
NewNavigation bool `help:"indicates if new navigation structure should be rendered" default:"false"`
NewBrowser bool `help:"indicates if new browser should be used" default:"false"`
NewObjectsFlow bool `help:"indicates if new objects flow should be used" default:"false"`
// RateLimit defines the configuration for the IP and userID rate limiters.
RateLimit web.RateLimiterConfig
@ -380,6 +381,7 @@ func (server *Server) appHandler(w http.ResponseWriter, r *http.Request) {
DefaultPaidBandwidthLimit memory.Size
NewNavigation bool
NewBrowser bool
NewObjectsFlow bool
}
data.ExternalAddress = server.config.ExternalAddress
@ -410,6 +412,7 @@ func (server *Server) appHandler(w http.ResponseWriter, r *http.Request) {
data.NewOnboarding = server.config.NewOnboarding
data.NewNavigation = server.config.NewNavigation
data.NewBrowser = server.config.NewBrowser
data.NewObjectsFlow = server.config.NewObjectsFlow
templates, err := server.loadTemplates()
if err != nil || templates.index == nil {

View File

@ -133,6 +133,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# indicates if new navigation structure should be rendered
# console.new-navigation: false
# indicates if new objects flow should be used
# console.new-objects-flow: false
# indicates if new onboarding flow should be rendered
# console.new-onboarding: true

View File

@ -30,6 +30,7 @@
<meta name="default-paid-bandwidth-limit" content="{{ .DefaultPaidBandwidthLimit }}">
<meta name="new-navigation-structure" content="{{ .NewNavigation }}">
<meta name="new-browser" content="{{ .NewBrowser }}">
<meta name="new-objects-flow" content="{{ .NewObjectsFlow }}">
<title>{{ .SatelliteName }}</title>
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAA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0FeZBdTtpSQRvgAoKtuMqmBdpKxvKYjXJ+o+cx0WBRPFO6ABHuesMheLghIdePiutc7AoqBLchZchVMSFgUr9HTS8sEgL1C0E1XBRNGUeeV6OlFONjbqSjY2Nv7mKjnzMyXqYQrW2OsYS8smLkOE5OpsFSkdQ6PlUAU9EgtXq6MFdZ3EkpVKNVAFc8TKW6QbURVMFK1slOyGuSFdUkLOoQtZwSRXaRmpKLgj1y1eMjdIImguTMHCCAnvGcuXQhIMPMl1O8hnrOy31GtfnaNi3oRIcohEu7ZY20DZK0DGTCV7NVKi5UVK40vDJVatU/dfgCTEw8AsgsSdLx+TKjUdOeMAsycnMr/BzrIcmc8ByrycuDMvByM4f7PyCmLL/gK8LEBJALYsGEdXEyupAAAAAElFTkSuQmCC" type="image/x-icon">
<link rel="dns-prefetch" href="https://js.stripe.com">

View File

@ -41,6 +41,7 @@ export default class App extends Vue {
const couponCodeSignupUIEnabled = MetaUtils.getMetaContent('coupon-code-signup-ui-enabled');
const isNewOnboardingFlow = MetaUtils.getMetaContent('new-onboarding-flow');
const isNewNavStructure = MetaUtils.getMetaContent('new-navigation-structure');
const isNewObjectsFlow = MetaUtils.getMetaContent('new-objects-flow');
if (satelliteName) {
this.$store.dispatch(APP_STATE_ACTIONS.SET_SATELLITE_NAME, satelliteName);
@ -78,6 +79,10 @@ export default class App extends Vue {
if (isNewNavStructure) {
this.$store.dispatch(APP_STATE_ACTIONS.SET_NAV_STRUCTURE_STATUS, isNewNavStructure === 'true');
}
if (isNewObjectsFlow) {
this.$store.dispatch(APP_STATE_ACTIONS.SET_OBJECTS_FLOW_STATUS, isNewObjectsFlow === 'true');
}
}
}
</script>

View File

@ -42,6 +42,7 @@ class State {
public couponCodeSignupUIEnabled = false,
public isNewOnbCLIFlow = false,
public isNewNavStructure = false,
public isNewObjectsFlow = false,
){}
}
@ -147,6 +148,9 @@ export const appStateModule = {
[APP_STATE_MUTATIONS.SET_NAV_STRUCTURE_STATUS](state: State, isNewNavStructure: boolean): void {
state.isNewNavStructure = isNewNavStructure;
},
[APP_STATE_MUTATIONS.SET_OBJECTS_FLOW_STATUS](state: State, isNewObjectsFlow: boolean): void {
state.isNewObjectsFlow = isNewObjectsFlow;
},
[APP_STATE_MUTATIONS.SET_COUPON_CODE_BILLING_UI_STATUS](state: State, couponCodeBillingUIEnabled: boolean): void {
state.couponCodeBillingUIEnabled = couponCodeBillingUIEnabled;
},
@ -284,6 +288,9 @@ export const appStateModule = {
[APP_STATE_ACTIONS.SET_NAV_STRUCTURE_STATUS]: function ({commit}: AppContext, isNewNavStructure: boolean): void {
commit(APP_STATE_MUTATIONS.SET_NAV_STRUCTURE_STATUS, isNewNavStructure);
},
[APP_STATE_ACTIONS.SET_OBJECTS_FLOW_STATUS]: function ({commit}: AppContext, isNewObjectsFlow: boolean): void {
commit(APP_STATE_MUTATIONS.SET_OBJECTS_FLOW_STATUS, isNewObjectsFlow);
},
[APP_STATE_ACTIONS.SET_COUPON_CODE_BILLING_UI_STATUS]: function ({commit}: AppContext, couponCodeBillingUIEnabled: boolean): void {
commit(APP_STATE_MUTATIONS.SET_COUPON_CODE_BILLING_UI_STATUS, couponCodeBillingUIEnabled);
},

View File

@ -37,4 +37,5 @@ export const APP_STATE_MUTATIONS = {
SET_COUPON_CODE_SIGNUP_UI_STATUS: 'SET_COUPON_CODE_SIGNUP_UI_STATUS',
SET_ONB_CLI_FLOW_STATUS: 'SET_ONB_CLI_FLOW_STATUS',
SET_NAV_STRUCTURE_STATUS: 'SET_NAV_STRUCTURE_STATUS',
SET_OBJECTS_FLOW_STATUS: 'SET_OBJECTS_FLOW_STATUS',
};

View File

@ -31,6 +31,7 @@ export const APP_STATE_ACTIONS = {
SET_COUPON_CODE_SIGNUP_UI_STATUS: 'SET_COUPON_CODE_SIGNUP_UI_STATUS',
SET_ONB_CLI_FLOW_STATUS: 'SET_ONB_CLI_FLOW_STATUS',
SET_NAV_STRUCTURE_STATUS: 'SET_NAV_STRUCTURE_STATUS',
SET_OBJECTS_FLOW_STATUS: 'SET_OBJECTS_FLOW_STATUS',
};
export const NOTIFICATION_ACTIONS = {