mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-23 00:16:25 +01:00
chore: add support for PAYG billing (#8582)
https://linear.app/unleash/issue/CTO-102/unleash-add-support-for-payg-billing
This commit is contained in:
parent
83f86baf9e
commit
97636bb4ed
@ -14,14 +14,16 @@ interface IApiDetailsProps {
|
|||||||
export const ApiDetails = (props: IApiDetailsProps): ReactElement => {
|
export const ApiDetails = (props: IApiDetailsProps): ReactElement => {
|
||||||
const instanceId = props.uiConfig.versionInfo?.instanceId;
|
const instanceId = props.uiConfig.versionInfo?.instanceId;
|
||||||
const { name, version, buildNumber } = formatCurrentVersion(props.uiConfig);
|
const { name, version, buildNumber } = formatCurrentVersion(props.uiConfig);
|
||||||
const environment = props.uiConfig.environment;
|
const { environment, billing } = props.uiConfig;
|
||||||
const updateNotification = formatUpdateNotification(props.uiConfig);
|
const updateNotification = formatUpdateNotification(props.uiConfig);
|
||||||
|
|
||||||
const buildInfo = buildNumber ? <small>({buildNumber})</small> : '';
|
const buildInfo = buildNumber ? <small>({buildNumber})</small> : '';
|
||||||
return (
|
return (
|
||||||
<section title='API details'>
|
<section title='API details'>
|
||||||
<FooterTitle>
|
<FooterTitle>
|
||||||
{name} {environment ? environment : ''} {version} {buildInfo}
|
{name} {environment ? environment : ''}
|
||||||
|
{billing === 'pay-as-you-go' ? ' Pay-as-You-Go' : ''} {version}{' '}
|
||||||
|
{buildInfo}
|
||||||
</FooterTitle>
|
</FooterTitle>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={Boolean(updateNotification)}
|
condition={Boolean(updateNotification)}
|
||||||
|
@ -5,6 +5,7 @@ export interface IPartialUiConfig {
|
|||||||
version: string;
|
version: string;
|
||||||
slogan?: string;
|
slogan?: string;
|
||||||
environment?: string;
|
environment?: string;
|
||||||
|
billing?: string;
|
||||||
versionInfo?: IVersionInfo;
|
versionInfo?: IVersionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ export interface IUiConfig {
|
|||||||
name: string;
|
name: string;
|
||||||
slogan: string;
|
slogan: string;
|
||||||
environment?: string;
|
environment?: string;
|
||||||
|
billing?: 'subscription' | 'pay-as-you-go';
|
||||||
unleashUrl?: string;
|
unleashUrl?: string;
|
||||||
version: string;
|
version: string;
|
||||||
versionInfo?: IVersionInfo;
|
versionInfo?: IVersionInfo;
|
||||||
|
@ -33,6 +33,12 @@ export const uiConfigSchema = {
|
|||||||
'What kind of Unleash instance it is: Enterprise, Pro, or Open source',
|
'What kind of Unleash instance it is: Enterprise, Pro, or Open source',
|
||||||
example: 'Enterprise',
|
example: 'Enterprise',
|
||||||
},
|
},
|
||||||
|
billing: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'The billing model in use for this Unleash instance.',
|
||||||
|
example: 'subscription',
|
||||||
|
enum: ['subscription', 'pay-as-you-go'],
|
||||||
|
},
|
||||||
unleashUrl: {
|
unleashUrl: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: 'The URL of the Unleash instance.',
|
description: 'The URL of the Unleash instance.',
|
||||||
|
Loading…
Reference in New Issue
Block a user