mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-30 15:24:22 +00:00
chore(ui): drop the unused deployment-mode variable (#12131)
This commit is contained in:
1 parent
43de7709cb
commit
0c0f150cd4
2 files changed
+1
-18
No files matched your search
@@ -0,0 +1 @@
|
||||
Removed the unused `NEXT_PUBLIC_PROWLER_DEPLOYMENT_MODE` variable and its `getDeploymentMode` helper; no build ever set it and nothing read the result, so Cloud versus self-hosted behavior is decided solely by the runtime `UI_CLOUD_ENABLED` flag
|
||||
@@ -1,23 +1,5 @@
|
||||
import { isCloud } from "./shared/env";
|
||||
|
||||
export const DEPLOYMENT_MODE = {
|
||||
CLOUD: "cloud",
|
||||
ON_PREMISE: "onpremise",
|
||||
} as const;
|
||||
|
||||
export const PROWLER_CLOUD_ONLY_TOOLTIP = "Available only in Prowler Cloud";
|
||||
|
||||
export type DeploymentMode =
|
||||
(typeof DEPLOYMENT_MODE)[keyof typeof DEPLOYMENT_MODE];
|
||||
|
||||
export const getDeploymentMode = (): DeploymentMode | undefined => {
|
||||
const mode = process.env.NEXT_PUBLIC_PROWLER_DEPLOYMENT_MODE;
|
||||
|
||||
if (mode === DEPLOYMENT_MODE.CLOUD || mode === DEPLOYMENT_MODE.ON_PREMISE) {
|
||||
return mode;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
export const isGroupedJiraDispatchEnabled = (): boolean => isCloud();
|
||||
Reference in new issue
Block a user