mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-27 01:19:00 +02:00
chore(1-3811): use real data for lifecycle trends (#10117)
Connects the lifecycle trends UI to the API and adds a functioning projects filter. This PR also includes the generated orval models. <img width="1534" alt="image" src="https://github.com/user-attachments/assets/6da748d1-3625-4e36-86ee-295ab79e7ccb" />
This commit is contained in:
parent
75a8b49609
commit
e010f31a15
@ -2,9 +2,6 @@ import { usePersistentTableState } from 'hooks/usePersistentTableState';
|
||||
import type { FC } from 'react';
|
||||
import { FilterItemParam } from 'utils/serializeQueryParams';
|
||||
import { InsightsSection } from 'component/insights/sections/InsightsSection';
|
||||
import { InsightsFilters } from 'component/insights/InsightsFilters';
|
||||
import { allOption } from 'component/common/ProjectSelect/ProjectSelect';
|
||||
import { useInsights } from 'hooks/api/getters/useInsights/useInsights';
|
||||
import { LifecycleChart } from '../components/LifecycleChart/LifecycleChart.tsx';
|
||||
import { styled, useTheme } from '@mui/material';
|
||||
import {
|
||||
@ -14,31 +11,11 @@ import {
|
||||
import { FeatureLifecycleStageIcon } from 'component/common/FeatureLifecycle/FeatureLifecycleStageIcon.tsx';
|
||||
import { normalizeDays } from './normalize-days.ts';
|
||||
import useLoading from 'hooks/useLoading.ts';
|
||||
|
||||
type LifecycleTrend = {
|
||||
totalFlags: number;
|
||||
averageTimeInStageDays: number;
|
||||
categories: {
|
||||
experimental: {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
||||
release: {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
||||
permanent: {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
type LifecycleInsights = {
|
||||
develop: LifecycleTrend;
|
||||
production: LifecycleTrend;
|
||||
cleanup: LifecycleTrend;
|
||||
};
|
||||
import {
|
||||
type LifecycleTrend,
|
||||
useLifecycleInsights,
|
||||
} from 'hooks/api/getters/useLifecycleInsights/useLifecycleInsights.ts';
|
||||
import { InsightsFilters } from '../InsightsFilters.tsx';
|
||||
|
||||
const useChartColors = () => {
|
||||
const theme = useTheme();
|
||||
@ -141,13 +118,13 @@ export const LifecycleInsights: FC = () => {
|
||||
);
|
||||
|
||||
const loadingLabel = 'lifecycle-trend-charts';
|
||||
// todo (lifecycleMetrics): use data from the actual endpoint when we have something useful to return
|
||||
const projects = state[`${statePrefix}project`]?.values ?? [allOption.id];
|
||||
const { insights, loading } = useInsights();
|
||||
const projects = state[`${statePrefix}project`]?.values ?? [];
|
||||
const {
|
||||
data: { lifecycleTrends },
|
||||
loading,
|
||||
} = useLifecycleInsights(projects);
|
||||
const loadingRef = useLoading(loading, `[data-loading="${loadingLabel}"]`);
|
||||
|
||||
const { lifecycleTrends } = insights;
|
||||
|
||||
return (
|
||||
<InsightsSection
|
||||
ref={loadingRef}
|
||||
@ -161,7 +138,7 @@ export const LifecycleInsights: FC = () => {
|
||||
}
|
||||
>
|
||||
<ChartRow>
|
||||
{Object.entries(mockData).map(([stage, data]) => {
|
||||
{Object.entries(lifecycleTrends).map(([stage, data]) => {
|
||||
return (
|
||||
<LifecycleTile key={stage}>
|
||||
<TileHeader>
|
||||
@ -193,7 +170,7 @@ export const LifecycleInsights: FC = () => {
|
||||
</dt>
|
||||
<dd data-loading={loadingLabel}>
|
||||
{normalizeDays(
|
||||
data.averageTimeInStageDays,
|
||||
data.medianDaysInCurrentStage,
|
||||
)}
|
||||
</dd>
|
||||
</StatRow>
|
||||
@ -204,7 +181,7 @@ export const LifecycleInsights: FC = () => {
|
||||
</dt>
|
||||
<dd data-loading={loadingLabel}>
|
||||
{normalizeDays(
|
||||
data.averageTimeInStageDays,
|
||||
data.medianDaysHistorically,
|
||||
)}
|
||||
</dd>
|
||||
</StatRow>
|
||||
@ -308,60 +285,3 @@ const Chart: React.FC<{ stage: string; data: LifecycleTrend }> = ({
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const mockData: LifecycleInsights = {
|
||||
develop: {
|
||||
totalFlags: 35,
|
||||
averageTimeInStageDays: 28,
|
||||
categories: {
|
||||
experimental: {
|
||||
flagsOlderThanWeek: 11,
|
||||
newFlagsThisWeek: 4,
|
||||
},
|
||||
release: {
|
||||
flagsOlderThanWeek: 12,
|
||||
newFlagsThisWeek: 1,
|
||||
},
|
||||
permanent: {
|
||||
flagsOlderThanWeek: 7,
|
||||
newFlagsThisWeek: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
production: {
|
||||
totalFlags: 10,
|
||||
averageTimeInStageDays: 14,
|
||||
categories: {
|
||||
experimental: {
|
||||
flagsOlderThanWeek: 2,
|
||||
newFlagsThisWeek: 3,
|
||||
},
|
||||
release: {
|
||||
flagsOlderThanWeek: 1,
|
||||
newFlagsThisWeek: 1,
|
||||
},
|
||||
permanent: {
|
||||
flagsOlderThanWeek: 3,
|
||||
newFlagsThisWeek: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
cleanup: {
|
||||
totalFlags: 5,
|
||||
averageTimeInStageDays: 16,
|
||||
categories: {
|
||||
experimental: {
|
||||
flagsOlderThanWeek: 0,
|
||||
newFlagsThisWeek: 3,
|
||||
},
|
||||
release: {
|
||||
flagsOlderThanWeek: 0,
|
||||
newFlagsThisWeek: 1,
|
||||
},
|
||||
permanent: {
|
||||
flagsOlderThanWeek: 1,
|
||||
newFlagsThisWeek: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -27,7 +27,6 @@ export const useInsights = (
|
||||
return {
|
||||
insights:
|
||||
data ||
|
||||
/* @ts-expect-error FIXME (lifecycleMetrics): lifecycle trends */
|
||||
({
|
||||
userTrends: [],
|
||||
flagTrends: [],
|
||||
|
@ -0,0 +1,77 @@
|
||||
import useSWR, { mutate, type SWRConfiguration } from 'swr';
|
||||
import { useCallback } from 'react';
|
||||
import { formatApiPath } from 'utils/formatPath';
|
||||
import handleErrorResponses from '../httpErrorResponseHandler.js';
|
||||
import type {
|
||||
LifecycleTrendsSchema,
|
||||
LifecycleTrendsSchemaLifecycleTrendsCleanup,
|
||||
LifecycleTrendsSchemaLifecycleTrendsDevelop,
|
||||
LifecycleTrendsSchemaLifecycleTrendsProduction,
|
||||
} from 'openapi';
|
||||
|
||||
const emptyTrendData = {
|
||||
categories: {
|
||||
experimental: {
|
||||
flagsOlderThanWeek: 0,
|
||||
newFlagsThisWeek: 0,
|
||||
},
|
||||
permanent: {
|
||||
flagsOlderThanWeek: 0,
|
||||
newFlagsThisWeek: 0,
|
||||
},
|
||||
release: {
|
||||
flagsOlderThanWeek: 0,
|
||||
newFlagsThisWeek: 0,
|
||||
},
|
||||
},
|
||||
medianDaysHistorically: 0,
|
||||
medianDaysInCurrentStage: 0,
|
||||
totalFlags: 0,
|
||||
};
|
||||
|
||||
const emptyLifecycleTrends: LifecycleTrendsSchema = {
|
||||
lifecycleTrends: {
|
||||
cleanup: emptyTrendData,
|
||||
develop: emptyTrendData,
|
||||
production: emptyTrendData,
|
||||
},
|
||||
};
|
||||
|
||||
export type LifecycleTrend =
|
||||
| LifecycleTrendsSchemaLifecycleTrendsCleanup
|
||||
| LifecycleTrendsSchemaLifecycleTrendsDevelop
|
||||
| LifecycleTrendsSchemaLifecycleTrendsProduction;
|
||||
|
||||
export const useLifecycleInsights = (
|
||||
projects?: string[],
|
||||
options?: SWRConfiguration,
|
||||
) => {
|
||||
const path = formatApiPath(
|
||||
`api/admin/insights/lifecycle?projects=${projects?.join(',')}`,
|
||||
);
|
||||
|
||||
const { data, error } = useSWR<LifecycleTrendsSchema>(
|
||||
path,
|
||||
fetchLifecycleInsights,
|
||||
options,
|
||||
);
|
||||
|
||||
const refetchInsights = useCallback(() => {
|
||||
mutate(path).catch(console.warn);
|
||||
}, [path]);
|
||||
|
||||
return {
|
||||
data: data || emptyLifecycleTrends,
|
||||
refetchInsights,
|
||||
loading: !error && !data,
|
||||
error,
|
||||
};
|
||||
};
|
||||
|
||||
const fetchLifecycleInsights = (
|
||||
path: string,
|
||||
): Promise<LifecycleTrendsSchema> => {
|
||||
return fetch(path)
|
||||
.then(handleErrorResponses('Lifecycle Insights data'))
|
||||
.then((res) => res.json());
|
||||
};
|
@ -16,7 +16,7 @@ export interface ApiTokenSchema {
|
||||
alias?: string | null;
|
||||
/** When the token was created. */
|
||||
createdAt: string;
|
||||
/** The environment the token has access to. `*` if it has access to all environments. */
|
||||
/** The environment the token has access to. */
|
||||
environment?: string;
|
||||
/**
|
||||
* The token's expiration date. NULL if the token doesn't have an expiration set.
|
||||
|
12
frontend/src/openapi/models/getLifecycleTrendsParams.ts
Normal file
12
frontend/src/openapi/models/getLifecycleTrendsParams.ts
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type GetLifecycleTrendsParams = {
|
||||
/**
|
||||
* Comma-separated list of project IDs to filter lifecycle trends
|
||||
*/
|
||||
projects?: string;
|
||||
};
|
@ -751,6 +751,7 @@ export * from './getIntegrationEvents401.js';
|
||||
export * from './getIntegrationEvents403.js';
|
||||
export * from './getIntegrationEvents404.js';
|
||||
export * from './getIntegrationEventsParams.js';
|
||||
export * from './getLifecycleTrendsParams.js';
|
||||
export * from './getLoginHistory401.js';
|
||||
export * from './getLoginHistory404.js';
|
||||
export * from './getMaintenance401.js';
|
||||
@ -888,22 +889,6 @@ export * from './instanceAdminStatsSchemaProductionChanges.js';
|
||||
export * from './instanceInsightsSchema.js';
|
||||
export * from './instanceInsightsSchemaEnvironmentTypeTrendsItem.js';
|
||||
export * from './instanceInsightsSchemaFlagTrendsItem.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrends.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsCleanup.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsCleanupCategories.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsCleanupCategoriesExperimental.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsCleanupCategoriesPermanent.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsCleanupCategoriesRelease.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsDevelop.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsDevelopCategories.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsDevelopCategoriesExperimental.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsDevelopCategoriesPermanent.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsDevelopCategoriesRelease.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsProduction.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsProductionCategories.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsProductionCategoriesExperimental.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsProductionCategoriesPermanent.js';
|
||||
export * from './instanceInsightsSchemaLifecycleTrendsProductionCategoriesRelease.js';
|
||||
export * from './instanceInsightsSchemaMetricsSummaryTrendsItem.js';
|
||||
export * from './instanceInsightsSchemaProjectFlagTrendsItem.js';
|
||||
export * from './instanceInsightsSchemaUserTrendsItem.js';
|
||||
@ -921,6 +906,23 @@ export * from './licenseUpdateSchema.js';
|
||||
export * from './licensedUserSchema.js';
|
||||
export * from './licensedUsersSchema.js';
|
||||
export * from './licensedUsersSchemaLicensedUsers.js';
|
||||
export * from './lifecycleTrendsSchema.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrends.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsCleanup.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategories.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsDevelop.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategories.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsProduction.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsProductionCategories.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent.js';
|
||||
export * from './lifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease.js';
|
||||
export * from './listParentOptions401.js';
|
||||
export * from './listParentOptions403.js';
|
||||
export * from './listParentOptions404.js';
|
||||
|
@ -5,7 +5,6 @@
|
||||
*/
|
||||
import type { InstanceInsightsSchemaEnvironmentTypeTrendsItem } from './instanceInsightsSchemaEnvironmentTypeTrendsItem.js';
|
||||
import type { InstanceInsightsSchemaFlagTrendsItem } from './instanceInsightsSchemaFlagTrendsItem.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrends } from './instanceInsightsSchemaLifecycleTrends.js';
|
||||
import type { InstanceInsightsSchemaMetricsSummaryTrendsItem } from './instanceInsightsSchemaMetricsSummaryTrendsItem.js';
|
||||
import type { InstanceInsightsSchemaProjectFlagTrendsItem } from './instanceInsightsSchemaProjectFlagTrendsItem.js';
|
||||
import type { InstanceInsightsSchemaUserTrendsItem } from './instanceInsightsSchemaUserTrendsItem.js';
|
||||
@ -18,8 +17,6 @@ export interface InstanceInsightsSchema {
|
||||
environmentTypeTrends: InstanceInsightsSchemaEnvironmentTypeTrendsItem[];
|
||||
/** How number of flags changed over time */
|
||||
flagTrends: InstanceInsightsSchemaFlagTrendsItem[];
|
||||
/** Aggregated view of feature flag lifecycle across environments */
|
||||
lifecycleTrends: InstanceInsightsSchemaLifecycleTrends;
|
||||
/** How metrics data per project changed over time */
|
||||
metricsSummaryTrends: InstanceInsightsSchemaMetricsSummaryTrendsItem[];
|
||||
/** How number of flags per project changed over time */
|
||||
|
@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsCleanup } from './instanceInsightsSchemaLifecycleTrendsCleanup.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsDevelop } from './instanceInsightsSchemaLifecycleTrendsDevelop.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsProduction } from './instanceInsightsSchemaLifecycleTrendsProduction.js';
|
||||
|
||||
/**
|
||||
* Aggregated view of feature flag lifecycle across environments
|
||||
*/
|
||||
export type InstanceInsightsSchemaLifecycleTrends = {
|
||||
cleanup: InstanceInsightsSchemaLifecycleTrendsCleanup;
|
||||
develop: InstanceInsightsSchemaLifecycleTrendsDevelop;
|
||||
production: InstanceInsightsSchemaLifecycleTrendsProduction;
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsCleanupCategories } from './instanceInsightsSchemaLifecycleTrendsCleanupCategories.js';
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsCleanup = {
|
||||
averageTimeInStageDays: number;
|
||||
categories: InstanceInsightsSchemaLifecycleTrendsCleanupCategories;
|
||||
totalFlags: number;
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesExperimental } from './instanceInsightsSchemaLifecycleTrendsCleanupCategoriesExperimental.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesPermanent } from './instanceInsightsSchemaLifecycleTrendsCleanupCategoriesPermanent.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesRelease } from './instanceInsightsSchemaLifecycleTrendsCleanupCategoriesRelease.js';
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsCleanupCategories = {
|
||||
experimental: InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesExperimental;
|
||||
permanent: InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesPermanent;
|
||||
release: InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesRelease;
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsDevelopCategories } from './instanceInsightsSchemaLifecycleTrendsDevelopCategories.js';
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsDevelop = {
|
||||
averageTimeInStageDays: number;
|
||||
categories: InstanceInsightsSchemaLifecycleTrendsDevelopCategories;
|
||||
totalFlags: number;
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesExperimental } from './instanceInsightsSchemaLifecycleTrendsDevelopCategoriesExperimental.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesPermanent } from './instanceInsightsSchemaLifecycleTrendsDevelopCategoriesPermanent.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesRelease } from './instanceInsightsSchemaLifecycleTrendsDevelopCategoriesRelease.js';
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsDevelopCategories = {
|
||||
experimental: InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesExperimental;
|
||||
permanent: InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesPermanent;
|
||||
release: InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesRelease;
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsProductionCategories } from './instanceInsightsSchemaLifecycleTrendsProductionCategories.js';
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsProduction = {
|
||||
averageTimeInStageDays: number;
|
||||
categories: InstanceInsightsSchemaLifecycleTrendsProductionCategories;
|
||||
totalFlags: number;
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsProductionCategoriesExperimental } from './instanceInsightsSchemaLifecycleTrendsProductionCategoriesExperimental.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsProductionCategoriesPermanent } from './instanceInsightsSchemaLifecycleTrendsProductionCategoriesPermanent.js';
|
||||
import type { InstanceInsightsSchemaLifecycleTrendsProductionCategoriesRelease } from './instanceInsightsSchemaLifecycleTrendsProductionCategoriesRelease.js';
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsProductionCategories = {
|
||||
experimental: InstanceInsightsSchemaLifecycleTrendsProductionCategoriesExperimental;
|
||||
permanent: InstanceInsightsSchemaLifecycleTrendsProductionCategoriesPermanent;
|
||||
release: InstanceInsightsSchemaLifecycleTrendsProductionCategoriesRelease;
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsProductionCategoriesRelease = {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
14
frontend/src/openapi/models/lifecycleTrendsSchema.ts
Normal file
14
frontend/src/openapi/models/lifecycleTrendsSchema.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrends } from './lifecycleTrendsSchemaLifecycleTrends.js';
|
||||
|
||||
/**
|
||||
* Aggregated view of feature flag lifecycle trends across environments
|
||||
*/
|
||||
export interface LifecycleTrendsSchema {
|
||||
/** Aggregated view of feature flag lifecycle across environments */
|
||||
lifecycleTrends: LifecycleTrendsSchemaLifecycleTrends;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsCleanup } from './lifecycleTrendsSchemaLifecycleTrendsCleanup.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsDevelop } from './lifecycleTrendsSchemaLifecycleTrendsDevelop.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsProduction } from './lifecycleTrendsSchemaLifecycleTrendsProduction.js';
|
||||
|
||||
/**
|
||||
* Aggregated view of feature flag lifecycle across environments
|
||||
*/
|
||||
export type LifecycleTrendsSchemaLifecycleTrends = {
|
||||
cleanup: LifecycleTrendsSchemaLifecycleTrendsCleanup;
|
||||
develop: LifecycleTrendsSchemaLifecycleTrendsDevelop;
|
||||
production: LifecycleTrendsSchemaLifecycleTrendsProduction;
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsCleanupCategories } from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategories.js';
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsCleanup = {
|
||||
categories: LifecycleTrendsSchemaLifecycleTrendsCleanupCategories;
|
||||
medianDaysHistorically: number;
|
||||
medianDaysInCurrentStage: number;
|
||||
totalFlags: number;
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental } from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent } from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease } from './lifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease.js';
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsCleanupCategories = {
|
||||
experimental: LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental;
|
||||
permanent: LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent;
|
||||
release: LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesExperimental =
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental =
|
||||
{
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesPermanent = {
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent = {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesRelease = {
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease = {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsDevelopCategories } from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategories.js';
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsDevelop = {
|
||||
categories: LifecycleTrendsSchemaLifecycleTrendsDevelopCategories;
|
||||
medianDaysHistorically: number;
|
||||
medianDaysInCurrentStage: number;
|
||||
totalFlags: number;
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental } from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent } from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease } from './lifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease.js';
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsDevelopCategories = {
|
||||
experimental: LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental;
|
||||
permanent: LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent;
|
||||
release: LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsProductionCategoriesPermanent =
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental =
|
||||
{
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesPermanent = {
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent = {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsDevelopCategoriesRelease = {
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease = {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsProductionCategories } from './lifecycleTrendsSchemaLifecycleTrendsProductionCategories.js';
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsProduction = {
|
||||
categories: LifecycleTrendsSchemaLifecycleTrendsProductionCategories;
|
||||
medianDaysHistorically: number;
|
||||
medianDaysInCurrentStage: number;
|
||||
totalFlags: number;
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental } from './lifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent } from './lifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent.js';
|
||||
import type { LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease } from './lifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease.js';
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsProductionCategories = {
|
||||
experimental: LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental;
|
||||
permanent: LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent;
|
||||
release: LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease;
|
||||
};
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsProductionCategoriesExperimental =
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental =
|
||||
{
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
@ -4,7 +4,7 @@
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type InstanceInsightsSchemaLifecycleTrendsCleanupCategoriesExperimental =
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent =
|
||||
{
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease = {
|
||||
flagsOlderThanWeek: number;
|
||||
newFlagsThisWeek: number;
|
||||
};
|
Loading…
Reference in New Issue
Block a user