Skip to content

Commit

Permalink
fix: add instanceName to license display (#6065)
Browse files Browse the repository at this point in the history
## About the changes
- Shows the instanceName from the license
- add new feature flag `enableLicenseChecker` used to enforce a valid
license.
  • Loading branch information
ivarconr committed Jan 30, 2024
1 parent 3ff19f3 commit 38df2e1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
14 changes: 11 additions & 3 deletions frontend/src/component/admin/license/License.tsx
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/hooks/api/getters/useLicense/useLicense.ts
Expand Up @@ -21,6 +21,7 @@ export interface License {
license?: {
token: string;
customer: string;
instanceName: string;
plan: string;
seats: number;
expireAt: Date;
Expand Down
1 change: 1 addition & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -90,6 +90,7 @@ exports[`should create default config 1`] = `
"embedProxy": true,
"embedProxyFrontend": true,
"enableLicense": false,
"enableLicenseChecker": false,
"encryptEmails": false,
"executiveDashboard": false,
"extendedUsageMetrics": false,
Expand Down
2 changes: 2 additions & 0 deletions src/lib/types/experimental.ts
Expand Up @@ -7,6 +7,7 @@ export type IFlagKey =
| 'anonymiseEventLog'
| 'encryptEmails'
| 'enableLicense'
| 'enableLicenseChecker'
| 'embedProxy'
| 'embedProxyFrontend'
| 'responseTimeWithAppNameKillSwitch'
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 38df2e1

Please sign in to comment.