mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +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 => {
|
||||
const instanceId = props.uiConfig.versionInfo?.instanceId;
|
||||
const { name, version, buildNumber } = formatCurrentVersion(props.uiConfig);
|
||||
const environment = props.uiConfig.environment;
|
||||
const { environment, billing } = props.uiConfig;
|
||||
const updateNotification = formatUpdateNotification(props.uiConfig);
|
||||
|
||||
const buildInfo = buildNumber ? <small>({buildNumber})</small> : '';
|
||||
return (
|
||||
<section title='API details'>
|
||||
<FooterTitle>
|
||||
{name} {environment ? environment : ''} {version} {buildInfo}
|
||||
{name} {environment ? environment : ''}
|
||||
{billing === 'pay-as-you-go' ? ' Pay-as-You-Go' : ''} {version}{' '}
|
||||
{buildInfo}
|
||||
</FooterTitle>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(updateNotification)}
|
||||
|
@ -5,6 +5,7 @@ export interface IPartialUiConfig {
|
||||
version: string;
|
||||
slogan?: string;
|
||||
environment?: string;
|
||||
billing?: string;
|
||||
versionInfo?: IVersionInfo;
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ export interface IUiConfig {
|
||||
name: string;
|
||||
slogan: string;
|
||||
environment?: string;
|
||||
billing?: 'subscription' | 'pay-as-you-go';
|
||||
unleashUrl?: string;
|
||||
version: string;
|
||||
versionInfo?: IVersionInfo;
|
||||
|
@ -33,6 +33,12 @@ export const uiConfigSchema = {
|
||||
'What kind of Unleash instance it is: Enterprise, Pro, or Open source',
|
||||
example: 'Enterprise',
|
||||
},
|
||||
billing: {
|
||||
type: 'string',
|
||||
description: 'The billing model in use for this Unleash instance.',
|
||||
example: 'subscription',
|
||||
enum: ['subscription', 'pay-as-you-go'],
|
||||
},
|
||||
unleashUrl: {
|
||||
type: 'string',
|
||||
description: 'The URL of the Unleash instance.',
|
||||
|
Loading…
Reference in New Issue
Block a user