From 94e60d2d67570a3b893bd98748c0fd3306a3336f Mon Sep 17 00:00:00 2001 From: SylvieChen <75071455+yini-chen@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:34:37 +0800 Subject: [PATCH] fix: Guide special products to web debugging. (#83) --- .../APIPage/APIDebugger/APIDebugger.tsx | 37 +++++++++++-------- media/src/utils/utils.ts | 1 + 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/media/src/components/APIPage/APIDebugger/APIDebugger.tsx b/media/src/components/APIPage/APIDebugger/APIDebugger.tsx index 1f9703d..91d4259 100644 --- a/media/src/components/APIPage/APIDebugger/APIDebugger.tsx +++ b/media/src/components/APIPage/APIDebugger/APIDebugger.tsx @@ -10,6 +10,7 @@ import { APIPageContext } from "../context"; import { APIGuide } from "./APIGuide"; import RegionSelector from "./RegionSelector"; import { xconsoleWidgets } from "./widgets/xconsole"; +import { debugForbiddenProducts } from "../../../utils/utils"; export class APIDebuggerProps {} @@ -53,21 +54,27 @@ export const APIDebugger: React.FC = (props) => { > {I18N.main.explorer.empty} - + {debugForbiddenProducts?.includes(`${product}__${version}`) ? ( + + + + ) : ( + + )} ); diff --git a/media/src/utils/utils.ts b/media/src/utils/utils.ts index 80871a1..55fddb0 100644 --- a/media/src/utils/utils.ts +++ b/media/src/utils/utils.ts @@ -54,3 +54,4 @@ export const getSpecInfoFromName = (name: string): SpecInfo => { }; }; +export const debugForbiddenProducts = ["Kms__2016-01-20", "Oss__2019-05-17", "pds__2022-03-01", "Sls__2020-12-30"];