mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
e0994b088a
Provides store method for retrieving traffic usage data based on period parameter, and UI + ui hook with the new chart for displaying traffic usage data spread out over selectable month. ![Skjermbilde 2024-03-21 kl 12 40 38](https://github.com/Unleash/unleash/assets/707867/539c6c98-b6f6-488a-97fb-baf4fccec687) In this PR we copied and adapted a plugin written by DX for highlighting a column in the chart: ![image](https://github.com/Unleash/unleash/assets/707867/70532b22-44ed-44c0-a9b4-75f65ed6a63d) There are some minor improvements planned which will come in a separate PR, reversing the order in legend and tooltip so the colors go from light to dark, and adding a month -sum below the legend ## Discussion points - Should any of this be extracted as a separate reusable component? --------- Co-authored-by: Nuno Góis <github@nunogois.com>
104 lines
2.6 KiB
TypeScript
104 lines
2.6 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
import type { Variant } from 'utils/variants';
|
|
|
|
export interface IUiConfig {
|
|
authenticationType?: string;
|
|
baseUriPath?: string;
|
|
feedbackUriPath?: string;
|
|
/**
|
|
* @deprecated `useUiFlags` can be used instead
|
|
* @example
|
|
* ```ts
|
|
* const yourFlag = useUiFlag("yourFlag")
|
|
* ```
|
|
*/
|
|
flags: UiFlags;
|
|
name: string;
|
|
slogan: string;
|
|
environment?: string;
|
|
unleashUrl?: string;
|
|
version: string;
|
|
versionInfo?: IVersionInfo;
|
|
links: ILinks[];
|
|
disablePasswordAuth?: boolean;
|
|
emailEnabled?: boolean;
|
|
networkViewEnabled: boolean;
|
|
maintenanceMode?: boolean;
|
|
toast?: IProclamationToast;
|
|
segmentValuesLimit?: number;
|
|
strategySegmentsLimit?: number;
|
|
frontendApiOrigins?: string[];
|
|
}
|
|
|
|
export interface IProclamationToast {
|
|
message: string;
|
|
id: string;
|
|
severity: 'success' | 'info' | 'warning' | 'error';
|
|
link: string;
|
|
}
|
|
|
|
export type UiFlags = {
|
|
P: boolean;
|
|
RE: boolean;
|
|
EEA?: boolean;
|
|
SE?: boolean;
|
|
T?: boolean;
|
|
UNLEASH_CLOUD?: boolean;
|
|
UG?: boolean;
|
|
embedProxyFrontend?: boolean;
|
|
maintenanceMode?: boolean;
|
|
messageBanner?: Variant;
|
|
banner?: Variant;
|
|
featuresExportImport?: boolean;
|
|
caseInsensitiveInOperators?: boolean;
|
|
notifications?: boolean;
|
|
personalAccessTokensKillSwitch?: boolean;
|
|
demo?: boolean;
|
|
googleAuthEnabled?: boolean;
|
|
disableBulkToggle?: boolean;
|
|
disableNotifications?: boolean;
|
|
advancedPlayground?: boolean;
|
|
strategyVariant?: boolean;
|
|
doraMetrics?: boolean;
|
|
dependentFeatures?: boolean;
|
|
newStrategyConfiguration?: boolean;
|
|
signals?: boolean;
|
|
automatedActions?: boolean;
|
|
celebrateUnleash?: boolean;
|
|
increaseUnleashWidth?: boolean;
|
|
featureSearchFeedback?: Variant;
|
|
enableLicense?: boolean;
|
|
newStrategyConfigurationFeedback?: boolean;
|
|
extendedUsageMetricsUI?: boolean;
|
|
adminTokenKillSwitch?: boolean;
|
|
executiveDashboardUI?: boolean;
|
|
feedbackComments?: Variant;
|
|
displayUpgradeEdgeBanner?: boolean;
|
|
showInactiveUsers?: boolean;
|
|
featureSearchFeedbackPosting?: boolean;
|
|
userAccessUIEnabled?: boolean;
|
|
sdkReporting?: boolean;
|
|
outdatedSdksBanner?: boolean;
|
|
projectOverviewRefactor?: string;
|
|
collectTrafficDataUsage?: boolean;
|
|
};
|
|
|
|
export interface IVersionInfo {
|
|
instanceId: string;
|
|
isLatest: boolean;
|
|
latest: Partial<IVersion>;
|
|
current: IVersion;
|
|
}
|
|
|
|
export interface IVersion {
|
|
oss: string;
|
|
enterprise: string;
|
|
}
|
|
|
|
export interface ILinks {
|
|
value: string;
|
|
icon: ReactNode;
|
|
href: string;
|
|
title: string;
|
|
}
|