1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

fix: add instanceName to license display (#6065)

## About the changes
- Shows the instanceName from the license
- add new feature flag `enableLicenseChecker` used to enforce a valid
license.
This commit is contained in:
Ivar Conradi Østhus 2024-01-30 11:05:27 +01:00 committed by GitHub
parent 3ff19f3eb6
commit 38df2e1831
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 3 deletions

View File

@ -80,19 +80,27 @@ export const License = () => {
Customer
</StyledPropertyName>
<StyledPropertyDetails>
{license?.customer}
{license.customer}
</StyledPropertyDetails>
</StyledDataCollectionPropertyRow>
<StyledDataCollectionPropertyRow>
<StyledPropertyName>
Instance Name
</StyledPropertyName>
<StyledPropertyDetails>
{license.instanceName}
</StyledPropertyDetails>
</StyledDataCollectionPropertyRow>
<StyledDataCollectionPropertyRow>
<StyledPropertyName>Plan</StyledPropertyName>
<StyledPropertyDetails>
{license?.plan}
{license.plan}
</StyledPropertyDetails>
</StyledDataCollectionPropertyRow>
<StyledDataCollectionPropertyRow>
<StyledPropertyName>Seats</StyledPropertyName>
<StyledPropertyDetails>
{license?.seats}
{license.seats}
</StyledPropertyDetails>
</StyledDataCollectionPropertyRow>
<StyledDataCollectionPropertyRow>

View File

@ -21,6 +21,7 @@ export interface License {
license?: {
token: string;
customer: string;
instanceName: string;
plan: string;
seats: number;
expireAt: Date;

View File

@ -90,6 +90,7 @@ exports[`should create default config 1`] = `
"embedProxy": true,
"embedProxyFrontend": true,
"enableLicense": false,
"enableLicenseChecker": false,
"encryptEmails": false,
"executiveDashboard": false,
"extendedUsageMetrics": false,

View File

@ -7,6 +7,7 @@ export type IFlagKey =
| 'anonymiseEventLog'
| 'encryptEmails'
| 'enableLicense'
| 'enableLicenseChecker'
| 'embedProxy'
| 'embedProxyFrontend'
| 'responseTimeWithAppNameKillSwitch'
@ -55,6 +56,7 @@ export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
const flags: IFlags = {
anonymiseEventLog: false,
enableLicense: false,
enableLicenseChecker: false,
embedProxy: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY,
true,