From b2dc4ce435e25f2c126e508edfc320e6c5f8b9c7 Mon Sep 17 00:00:00 2001 From: Fredrik Oseberg Date: Tue, 30 Jan 2024 14:09:30 +0100 Subject: [PATCH] chore: orval types --- .../executiveDashboard/ExecutiveDashboard.tsx | 5 ++--- .../openapi/models/executiveSummarySchema.ts | 3 +++ .../executiveSummarySchemaFlagTrendsItem.ts | 2 +- ...utiveSummarySchemaProjectFlagTrendsItem.ts | 20 +++++++++++++++++++ frontend/src/openapi/models/index.ts | 1 + 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 frontend/src/openapi/models/executiveSummarySchemaProjectFlagTrendsItem.ts diff --git a/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx b/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx index d337223d0b12..5c7dbca7d6c1 100644 --- a/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx +++ b/frontend/src/component/executiveDashboard/ExecutiveDashboard.tsx @@ -6,7 +6,7 @@ import { FlagsChart } from './FlagsChart/FlagsChart'; import { useExecutiveDashboard } from 'hooks/api/getters/useExecutiveSummary/useExecutiveSummary'; import { UserStats } from './UserStats/UserStats'; import { FlagStats } from './FlagStats/FlagStats'; -import FlagsProjectChart from './FlagsProjectChart/FlagsProjectChartComponent'; +import { FlagsProjectChart } from './FlagsProjectChart/FlagsProjectChart'; const StyledGrid = styled(Box)(({ theme }) => ({ display: 'grid', @@ -32,8 +32,6 @@ export const ExecutiveDashboard: VFC = () => { ).toFixed(1); }; - console.log(executiveDashboardData); - return ( <> ({ paddingBottom: theme.spacing(4) })}> @@ -54,6 +52,7 @@ export const ExecutiveDashboard: VFC = () => { + diff --git a/frontend/src/openapi/models/executiveSummarySchema.ts b/frontend/src/openapi/models/executiveSummarySchema.ts index fec4155686d8..65dcad10bc54 100644 --- a/frontend/src/openapi/models/executiveSummarySchema.ts +++ b/frontend/src/openapi/models/executiveSummarySchema.ts @@ -5,6 +5,7 @@ */ import type { ExecutiveSummarySchemaFlags } from './executiveSummarySchemaFlags'; import type { ExecutiveSummarySchemaFlagTrendsItem } from './executiveSummarySchemaFlagTrendsItem'; +import type { ExecutiveSummarySchemaProjectFlagTrendsItem } from './executiveSummarySchemaProjectFlagTrendsItem'; import type { ExecutiveSummarySchemaUsers } from './executiveSummarySchemaUsers'; import type { ExecutiveSummarySchemaUserTrendsItem } from './executiveSummarySchemaUserTrendsItem'; @@ -16,6 +17,8 @@ export interface ExecutiveSummarySchema { flags: ExecutiveSummarySchemaFlags; /** How number of flags changed over time */ flagTrends: ExecutiveSummarySchemaFlagTrendsItem[]; + /** How number of flags per project changed over time */ + projectFlagTrends: ExecutiveSummarySchemaProjectFlagTrendsItem[]; /** High level user count statistics */ users: ExecutiveSummarySchemaUsers; /** How number of users changed over time */ diff --git a/frontend/src/openapi/models/executiveSummarySchemaFlagTrendsItem.ts b/frontend/src/openapi/models/executiveSummarySchemaFlagTrendsItem.ts index 72de2a78497b..a3e836004112 100644 --- a/frontend/src/openapi/models/executiveSummarySchemaFlagTrendsItem.ts +++ b/frontend/src/openapi/models/executiveSummarySchemaFlagTrendsItem.ts @@ -10,7 +10,7 @@ export type ExecutiveSummarySchemaFlagTrendsItem = { /** A UTC date when the stats were captured. Time is the very end of a given day. */ date: string; /** The number of time calculated potentially stale flags on a particular day */ - potentiallyStale?: number; + potentiallyStale: number; /** The number of user marked stale flags on a particular day */ stale: number; /** The number of all flags on a particular day */ diff --git a/frontend/src/openapi/models/executiveSummarySchemaProjectFlagTrendsItem.ts b/frontend/src/openapi/models/executiveSummarySchemaProjectFlagTrendsItem.ts new file mode 100644 index 000000000000..3d6b70a15d45 --- /dev/null +++ b/frontend/src/openapi/models/executiveSummarySchemaProjectFlagTrendsItem.ts @@ -0,0 +1,20 @@ +/** + * Generated by Orval + * Do not edit manually. + * See `gen:api` script in package.json + */ + +export type ExecutiveSummarySchemaProjectFlagTrendsItem = { + /** The number of active flags on a particular day */ + active: number; + /** A UTC date when the stats were captured. Time is the very end of a given day. */ + date: string; + /** The number of time calculated potentially stale flags on a particular day */ + potentiallyStale: number; + /** Project id of the project the flag trends belong to */ + project: string; + /** The number of user marked stale flags on a particular day */ + stale: number; + /** The number of all flags on a particular day */ + total: number; +}; diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 3732a99d7e33..55b9ed1edf3a 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -497,6 +497,7 @@ export * from './eventsSchemaVersion'; export * from './executiveSummarySchema'; export * from './executiveSummarySchemaFlagTrendsItem'; export * from './executiveSummarySchemaFlags'; +export * from './executiveSummarySchemaProjectFlagTrendsItem'; export * from './executiveSummarySchemaUserTrendsItem'; export * from './executiveSummarySchemaUsers'; export * from './exportFeatures404';