feat (dashboard): don't show deprecated plans (#2458)
This commit is contained in:
5
.changeset/sour-fishes-talk.md
Normal file
5
.changeset/sour-fishes-talk.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@nhost/dashboard': minor
|
||||
---
|
||||
|
||||
feat: don't show deprecated plans
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -23,7 +23,7 @@ node_modules/
|
||||
tmp/
|
||||
.pnpm-store
|
||||
.turbo
|
||||
.env
|
||||
.env*
|
||||
.secrets
|
||||
out/
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ export default function OverviewTopBar() {
|
||||
<div className="mt-1 inline-grid grid-flow-col items-center justify-start gap-2 md:mt-0">
|
||||
<Chip
|
||||
size="small"
|
||||
label={isPro ? 'Pro' : 'Starter'}
|
||||
label={currentProject.plan.name}
|
||||
color={isPro ? 'primary' : 'default'}
|
||||
/>
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ function AllWorkspaceApps() {
|
||||
|
||||
<Chip
|
||||
size="small"
|
||||
label={project.plan.isFree ? 'Starter' : 'Pro'}
|
||||
label={project.plan.name}
|
||||
color={project.plan.isFree ? 'default' : 'primary'}
|
||||
/>
|
||||
</ListItem.Button>
|
||||
|
||||
@@ -32,7 +32,7 @@ query PrefetchNewApp {
|
||||
regions(order_by: { city: asc }) {
|
||||
...PrefetchNewAppRegions
|
||||
}
|
||||
plans(order_by: { sort: asc }) {
|
||||
plans(order_by: {sort: asc}, where: {deprecated: {_eq: false}}) {
|
||||
...PrefetchNewAppPlans
|
||||
}
|
||||
workspaces {
|
||||
|
||||
33
dashboard/src/utils/__generated__/graphql.ts
generated
33
dashboard/src/utils/__generated__/graphql.ts
generated
@@ -14948,6 +14948,7 @@ export type Plans = {
|
||||
/** An aggregate relationship */
|
||||
apps_aggregate: Apps_Aggregate;
|
||||
createdAt: Scalars['timestamptz'];
|
||||
deprecated: Scalars['Boolean'];
|
||||
featureBackupEnabled: Scalars['Boolean'];
|
||||
featureCustomDomainsEnabled: Scalars['Boolean'];
|
||||
featureCustomEmailTemplatesEnabled: Scalars['Boolean'];
|
||||
@@ -14961,6 +14962,7 @@ export type Plans = {
|
||||
/** Max number of functions to deploy per git deployment */
|
||||
featureMaxNumberOfFunctionsPerDeployment: Scalars['Int'];
|
||||
id: Scalars['uuid'];
|
||||
individual: Scalars['Boolean'];
|
||||
isDefault: Scalars['Boolean'];
|
||||
isFree: Scalars['Boolean'];
|
||||
isPublic: Scalars['Boolean'];
|
||||
@@ -15048,6 +15050,7 @@ export type Plans_Bool_Exp = {
|
||||
apps?: InputMaybe<Apps_Bool_Exp>;
|
||||
apps_aggregate?: InputMaybe<Apps_Aggregate_Bool_Exp>;
|
||||
createdAt?: InputMaybe<Timestamptz_Comparison_Exp>;
|
||||
deprecated?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
featureBackupEnabled?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
featureCustomDomainsEnabled?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
featureCustomEmailTemplatesEnabled?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
@@ -15058,6 +15061,7 @@ export type Plans_Bool_Exp = {
|
||||
featureMaxFilesSize?: InputMaybe<Int_Comparison_Exp>;
|
||||
featureMaxNumberOfFunctionsPerDeployment?: InputMaybe<Int_Comparison_Exp>;
|
||||
id?: InputMaybe<Uuid_Comparison_Exp>;
|
||||
individual?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
isDefault?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
isFree?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
isPublic?: InputMaybe<Boolean_Comparison_Exp>;
|
||||
@@ -15096,6 +15100,7 @@ export type Plans_Inc_Input = {
|
||||
export type Plans_Insert_Input = {
|
||||
apps?: InputMaybe<Apps_Arr_Rel_Insert_Input>;
|
||||
createdAt?: InputMaybe<Scalars['timestamptz']>;
|
||||
deprecated?: InputMaybe<Scalars['Boolean']>;
|
||||
featureBackupEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
featureCustomDomainsEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
featureCustomEmailTemplatesEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
@@ -15109,6 +15114,7 @@ export type Plans_Insert_Input = {
|
||||
/** Max number of functions to deploy per git deployment */
|
||||
featureMaxNumberOfFunctionsPerDeployment?: InputMaybe<Scalars['Int']>;
|
||||
id?: InputMaybe<Scalars['uuid']>;
|
||||
individual?: InputMaybe<Scalars['Boolean']>;
|
||||
isDefault?: InputMaybe<Scalars['Boolean']>;
|
||||
isFree?: InputMaybe<Scalars['Boolean']>;
|
||||
isPublic?: InputMaybe<Scalars['Boolean']>;
|
||||
@@ -15200,6 +15206,7 @@ export type Plans_On_Conflict = {
|
||||
export type Plans_Order_By = {
|
||||
apps_aggregate?: InputMaybe<Apps_Aggregate_Order_By>;
|
||||
createdAt?: InputMaybe<Order_By>;
|
||||
deprecated?: InputMaybe<Order_By>;
|
||||
featureBackupEnabled?: InputMaybe<Order_By>;
|
||||
featureCustomDomainsEnabled?: InputMaybe<Order_By>;
|
||||
featureCustomEmailTemplatesEnabled?: InputMaybe<Order_By>;
|
||||
@@ -15210,6 +15217,7 @@ export type Plans_Order_By = {
|
||||
featureMaxFilesSize?: InputMaybe<Order_By>;
|
||||
featureMaxNumberOfFunctionsPerDeployment?: InputMaybe<Order_By>;
|
||||
id?: InputMaybe<Order_By>;
|
||||
individual?: InputMaybe<Order_By>;
|
||||
isDefault?: InputMaybe<Order_By>;
|
||||
isFree?: InputMaybe<Order_By>;
|
||||
isPublic?: InputMaybe<Order_By>;
|
||||
@@ -15236,6 +15244,8 @@ export enum Plans_Select_Column {
|
||||
/** column name */
|
||||
CreatedAt = 'createdAt',
|
||||
/** column name */
|
||||
Deprecated = 'deprecated',
|
||||
/** column name */
|
||||
FeatureBackupEnabled = 'featureBackupEnabled',
|
||||
/** column name */
|
||||
FeatureCustomDomainsEnabled = 'featureCustomDomainsEnabled',
|
||||
@@ -15256,6 +15266,8 @@ export enum Plans_Select_Column {
|
||||
/** column name */
|
||||
Id = 'id',
|
||||
/** column name */
|
||||
Individual = 'individual',
|
||||
/** column name */
|
||||
IsDefault = 'isDefault',
|
||||
/** column name */
|
||||
IsFree = 'isFree',
|
||||
@@ -15288,6 +15300,7 @@ export enum Plans_Select_Column {
|
||||
/** input type for updating data in table "plans" */
|
||||
export type Plans_Set_Input = {
|
||||
createdAt?: InputMaybe<Scalars['timestamptz']>;
|
||||
deprecated?: InputMaybe<Scalars['Boolean']>;
|
||||
featureBackupEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
featureCustomDomainsEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
featureCustomEmailTemplatesEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
@@ -15301,6 +15314,7 @@ export type Plans_Set_Input = {
|
||||
/** Max number of functions to deploy per git deployment */
|
||||
featureMaxNumberOfFunctionsPerDeployment?: InputMaybe<Scalars['Int']>;
|
||||
id?: InputMaybe<Scalars['uuid']>;
|
||||
individual?: InputMaybe<Scalars['Boolean']>;
|
||||
isDefault?: InputMaybe<Scalars['Boolean']>;
|
||||
isFree?: InputMaybe<Scalars['Boolean']>;
|
||||
isPublic?: InputMaybe<Scalars['Boolean']>;
|
||||
@@ -15367,6 +15381,7 @@ export type Plans_Stream_Cursor_Input = {
|
||||
/** Initial value of the column from where the streaming should start */
|
||||
export type Plans_Stream_Cursor_Value_Input = {
|
||||
createdAt?: InputMaybe<Scalars['timestamptz']>;
|
||||
deprecated?: InputMaybe<Scalars['Boolean']>;
|
||||
featureBackupEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
featureCustomDomainsEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
featureCustomEmailTemplatesEnabled?: InputMaybe<Scalars['Boolean']>;
|
||||
@@ -15380,6 +15395,7 @@ export type Plans_Stream_Cursor_Value_Input = {
|
||||
/** Max number of functions to deploy per git deployment */
|
||||
featureMaxNumberOfFunctionsPerDeployment?: InputMaybe<Scalars['Int']>;
|
||||
id?: InputMaybe<Scalars['uuid']>;
|
||||
individual?: InputMaybe<Scalars['Boolean']>;
|
||||
isDefault?: InputMaybe<Scalars['Boolean']>;
|
||||
isFree?: InputMaybe<Scalars['Boolean']>;
|
||||
isPublic?: InputMaybe<Scalars['Boolean']>;
|
||||
@@ -15414,6 +15430,8 @@ export enum Plans_Update_Column {
|
||||
/** column name */
|
||||
CreatedAt = 'createdAt',
|
||||
/** column name */
|
||||
Deprecated = 'deprecated',
|
||||
/** column name */
|
||||
FeatureBackupEnabled = 'featureBackupEnabled',
|
||||
/** column name */
|
||||
FeatureCustomDomainsEnabled = 'featureCustomDomainsEnabled',
|
||||
@@ -15434,6 +15452,8 @@ export enum Plans_Update_Column {
|
||||
/** column name */
|
||||
Id = 'id',
|
||||
/** column name */
|
||||
Individual = 'individual',
|
||||
/** column name */
|
||||
IsDefault = 'isDefault',
|
||||
/** column name */
|
||||
IsFree = 'isFree',
|
||||
@@ -15700,6 +15720,12 @@ export type Query_Root = {
|
||||
getLogsVolume: Metrics;
|
||||
getPostgresVolumeCapacity: Metrics;
|
||||
getPostgresVolumeUsage: Metrics;
|
||||
/**
|
||||
* Returns list of label values for a given label within a range of time.
|
||||
*
|
||||
* If `from` and `to` are not provided, they default to 6 hour ago and now, respectively.
|
||||
*/
|
||||
getServiceLabelValues: Array<Scalars['String']>;
|
||||
getTotalRequests: Metrics;
|
||||
getUsageAll: Array<UsageSummary>;
|
||||
/** fetch data from the table: "github_app_installations" using primary key columns */
|
||||
@@ -16544,6 +16570,11 @@ export type Query_RootGetPostgresVolumeUsageArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootGetServiceLabelValuesArgs = {
|
||||
appID: Scalars['String'];
|
||||
};
|
||||
|
||||
|
||||
export type Query_RootGetTotalRequestsArgs = {
|
||||
appID: Scalars['String'];
|
||||
from?: InputMaybe<Scalars['Timestamp']>;
|
||||
@@ -24465,7 +24496,7 @@ export const PrefetchNewAppDocument = gql`
|
||||
regions(order_by: {city: asc}) {
|
||||
...PrefetchNewAppRegions
|
||||
}
|
||||
plans(order_by: {sort: asc}) {
|
||||
plans(order_by: {sort: asc}, where: {deprecated: {_eq: false}}) {
|
||||
...PrefetchNewAppPlans
|
||||
}
|
||||
workspaces {
|
||||
|
||||
Reference in New Issue
Block a user