diff --git a/front/components/poke/plugins/RunPluginDialog.tsx b/front/components/poke/plugins/RunPluginDialog.tsx index 3c0f5258afa2..8de9128e5a08 100644 --- a/front/components/poke/plugins/RunPluginDialog.tsx +++ b/front/components/poke/plugins/RunPluginDialog.tsx @@ -107,6 +107,12 @@ export function RunPluginDialog({ manifest={manifest} onSubmit={onSubmit} /> + {manifest.warning && ( + + Warning + {manifest.warning} + + )} )} diff --git a/front/lib/api/poke/plugins/global/batch_downgrade.ts b/front/lib/api/poke/plugins/global/batch_downgrade.ts index b857c4d1e0df..7b73eac65130 100644 --- a/front/lib/api/poke/plugins/global/batch_downgrade.ts +++ b/front/lib/api/poke/plugins/global/batch_downgrade.ts @@ -1,8 +1,8 @@ import { Err, Ok } from "@dust-tt/types"; +import { Op } from "sequelize"; import { createPlugin } from "@app/lib/api/poke/types"; import { Workspace } from "@app/lib/models/workspace"; -import { Op } from "sequelize"; import { internalSubscribeWorkspaceToFreeNoPlan } from "@app/lib/plans/subscription"; import { launchScheduleWorkspaceScrubWorkflow } from "@app/temporal/scrub_workspace/client"; @@ -10,6 +10,8 @@ export const batchDowngradePlugin = createPlugin( { id: "batch-downgrade", name: "Batch Downgrade Workspaces", + warning: + "Downgrading workspaces will block access, make sure all workspaces from your list should really be downgraded.", description: "Downgrade a list of workspaces to NO_PLAN, used to block access to fraudulent users", resourceTypes: ["global"], diff --git a/front/lib/api/poke/plugins/global/index.ts b/front/lib/api/poke/plugins/global/index.ts index b595fd5f362e..1b5a6a85ff33 100644 --- a/front/lib/api/poke/plugins/global/index.ts +++ b/front/lib/api/poke/plugins/global/index.ts @@ -1,2 +1,2 @@ -export * from "./create_workspace"; -export * from "./batch_downgrade"; \ No newline at end of file +export * from "./batch_downgrade"; +export * from "./create_workspace"; \ No newline at end of file diff --git a/types/src/front/lib/poke/plugins.ts b/types/src/front/lib/poke/plugins.ts index d4161027b00c..bbbfbc694fed 100644 --- a/types/src/front/lib/poke/plugins.ts +++ b/types/src/front/lib/poke/plugins.ts @@ -48,6 +48,7 @@ export interface PluginManifest { id: string; name: string; resourceTypes: string[]; + warning?: string; } export interface PluginWorkspaceResource {