(cherry picked from commit 6c1994cb86)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
co-authored by
Alex Khomenko
parent
644b23aba2
commit
301be18d86
@@ -42,6 +42,7 @@ export interface LicenseInfo {
|
||||
stateInfo: string;
|
||||
edition: GrafanaEdition;
|
||||
enabledFeatures: { [key: string]: boolean };
|
||||
trialExpiry?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { config } from '@grafana/runtime/src';
|
||||
|
||||
export function isTrial() {
|
||||
const settings = (config as any).licensing;
|
||||
return settings?.isTrial;
|
||||
const expiry = config.licenseInfo?.trialExpiry;
|
||||
return !!(expiry && expiry > 0);
|
||||
}
|
||||
|
||||
export const highlightTrial = () => isTrial() && config.featureToggles.featureHighlights;
|
||||
|
||||
Reference in New Issue
Block a user