mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
[dashboard] Remove superfluous usage_view feature flag (#17285)
This commit is contained in:
parent
ae37d8c1ab
commit
0058d68f5e
@ -20,7 +20,6 @@ type FeatureFlagsType = {
|
||||
|
||||
const defaultFeatureFlags = {
|
||||
startWithOptions: false,
|
||||
showUsageView: false,
|
||||
showUseLastSuccessfulPrebuild: false,
|
||||
usePublicApiWorkspacesService: false,
|
||||
enablePersonalAccessTokens: false,
|
||||
@ -40,7 +39,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
|
||||
const { project } = useContext(ProjectContext);
|
||||
const currentOrg = useCurrentOrg();
|
||||
const [startWithOptions, setStartWithOptions] = useState<boolean>(false);
|
||||
const [showUsageView, setShowUsageView] = useState<boolean>(false);
|
||||
const [showUseLastSuccessfulPrebuild, setShowUseLastSuccessfulPrebuild] = useState<boolean>(false);
|
||||
const [enablePersonalAccessTokens, setPersonalAccessTokensEnabled] = useState<boolean>(false);
|
||||
const [usePublicApiWorkspacesService, setUsePublicApiWorkspacesService] = useState<boolean>(false);
|
||||
@ -55,7 +53,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
|
||||
(async () => {
|
||||
const featureFlags: FeatureFlagConfig = {
|
||||
start_with_options: { defaultValue: false, setter: setStartWithOptions },
|
||||
usage_view: { defaultValue: false, setter: setShowUsageView },
|
||||
showUseLastSuccessfulPrebuild: { defaultValue: false, setter: setShowUseLastSuccessfulPrebuild },
|
||||
personalAccessTokensEnabled: { defaultValue: false, setter: setPersonalAccessTokensEnabled },
|
||||
publicApiExperimentalWorkspaceService: {
|
||||
@ -107,7 +104,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
|
||||
const flags = useMemo(() => {
|
||||
return {
|
||||
startWithOptions,
|
||||
showUsageView,
|
||||
showUseLastSuccessfulPrebuild,
|
||||
enablePersonalAccessTokens,
|
||||
usePublicApiWorkspacesService,
|
||||
@ -123,7 +119,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
|
||||
newSignupFlow,
|
||||
oidcServiceEnabled,
|
||||
orgGitAuthProviders,
|
||||
showUsageView,
|
||||
showUseLastSuccessfulPrebuild,
|
||||
startWithOptions,
|
||||
usePublicApiWorkspacesService,
|
||||
|
||||
@ -10,7 +10,6 @@ import { OrgIcon, OrgIconProps } from "../components/org-icon/OrgIcon";
|
||||
import { useCurrentUser } from "../user-context";
|
||||
import { BillingMode } from "@gitpod/gitpod-protocol/lib/billing-mode";
|
||||
import { useUserBillingMode } from "../data/billing-mode/user-billing-mode-query";
|
||||
import { useFeatureFlags } from "../contexts/FeatureFlagContext";
|
||||
import { useCurrentOrg, useOrganizations } from "../data/organizations/orgs-query";
|
||||
import { useOrgBillingMode } from "../data/billing-mode/org-billing-mode-query";
|
||||
import { useLocation } from "react-router";
|
||||
@ -23,7 +22,6 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) {
|
||||
const currentOrg = useCurrentOrg();
|
||||
const { data: userBillingMode } = useUserBillingMode();
|
||||
const { data: orgBillingMode } = useOrgBillingMode();
|
||||
const { showUsageView } = useFeatureFlags();
|
||||
const getOrgURL = useGetOrgURL();
|
||||
|
||||
const userFullName = user?.fullName || user?.name || "...";
|
||||
@ -74,7 +72,7 @@ export default function OrganizationSelector(p: OrganizationSelectorProps) {
|
||||
BillingMode.showUsageBasedBilling(userBillingMode) &&
|
||||
!user?.additionalData?.isMigratedToTeamOnlyAttribution;
|
||||
|
||||
const showUsageForOrg = currentOrg.data?.isOwner && (orgBillingMode?.mode === "usage-based" || showUsageView);
|
||||
const showUsageForOrg = currentOrg.data?.isOwner && orgBillingMode?.mode === "usage-based";
|
||||
|
||||
if (showUsageForPersonalAccount || showUsageForOrg) {
|
||||
linkEntries.push({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user