mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
task: upgrade edge banner now toggleable by flag (#6363)
So, since our assumption about client instances ended up being wrong (or, less than stable). This PR moves the EdgeUpgradeBanner to be displayed if the featureflag displayEdgeBanner is enabled. That way, if customers comes back and says they have upgraded but still get the banner, we can remove them from the segment.
This commit is contained in:
parent
3aff5d80a0
commit
c9e7bec690
@ -86,6 +86,7 @@ exports[`should create default config 1`] = `
|
|||||||
"disableNotifications": false,
|
"disableNotifications": false,
|
||||||
"disablePublishUnannouncedEvents": false,
|
"disablePublishUnannouncedEvents": false,
|
||||||
"disableUpdateMaxRevisionId": false,
|
"disableUpdateMaxRevisionId": false,
|
||||||
|
"displayEdgeBanner": false,
|
||||||
"edgeBulkMetrics": false,
|
"edgeBulkMetrics": false,
|
||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
|
@ -7,8 +7,8 @@ import Controller from '../controller';
|
|||||||
import VersionService from '../../services/version-service';
|
import VersionService from '../../services/version-service';
|
||||||
import SettingService from '../../services/setting-service';
|
import SettingService from '../../services/setting-service';
|
||||||
import {
|
import {
|
||||||
simpleAuthSettingsKey,
|
|
||||||
SimpleAuthSettings,
|
SimpleAuthSettings,
|
||||||
|
simpleAuthSettingsKey,
|
||||||
} from '../../types/settings/simple-auth-settings';
|
} from '../../types/settings/simple-auth-settings';
|
||||||
import { ADMIN, NONE } from '../../types/permissions';
|
import { ADMIN, NONE } from '../../types/permissions';
|
||||||
import { createResponseSchema } from '../../openapi/util/create-response-schema';
|
import { createResponseSchema } from '../../openapi/util/create-response-schema';
|
||||||
@ -153,7 +153,9 @@ class ConfigController extends Controller {
|
|||||||
const flags = {
|
const flags = {
|
||||||
...this.config.ui.flags,
|
...this.config.ui.flags,
|
||||||
...expFlags,
|
...expFlags,
|
||||||
displayUpgradeEdgeBanner: usesOldEdge,
|
displayUpgradeEdgeBanner:
|
||||||
|
usesOldEdge ||
|
||||||
|
this.config.flagResolver.isEnabled('displayEdgeBanner'),
|
||||||
};
|
};
|
||||||
|
|
||||||
const response: UiConfigSchema = {
|
const response: UiConfigSchema = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Variant, PayloadType } from 'unleash-client';
|
import { PayloadType, Variant } from 'unleash-client';
|
||||||
import { parseEnvVarBoolean } from '../util';
|
import { parseEnvVarBoolean } from '../util';
|
||||||
import { getDefaultVariant } from 'unleash-client/lib/variant';
|
import { getDefaultVariant } from 'unleash-client/lib/variant';
|
||||||
|
|
||||||
@ -51,7 +51,8 @@ export type IFlagKey =
|
|||||||
| 'disableUpdateMaxRevisionId'
|
| 'disableUpdateMaxRevisionId'
|
||||||
| 'disablePublishUnannouncedEvents'
|
| 'disablePublishUnannouncedEvents'
|
||||||
| 'sdkReporting'
|
| 'sdkReporting'
|
||||||
| 'scimApi';
|
| 'scimApi'
|
||||||
|
| 'displayEdgeBanner';
|
||||||
|
|
||||||
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
|
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
|
||||||
|
|
||||||
@ -252,6 +253,10 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_SCIM_API,
|
process.env.UNLEASH_EXPERIMENTAL_SCIM_API,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
displayEdgeBanner: parseEnvVarBoolean(
|
||||||
|
process.env.UNLEASH_EXPERIMENTAL_DISPLAY_EDGE_BANNER,
|
||||||
|
false,
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultExperimentalOptions: IExperimentalOptions = {
|
export const defaultExperimentalOptions: IExperimentalOptions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user