mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
chore: remove registerFrontendClient flag ws-swe1 [keep]
This commit is contained in:
parent
ef3ffc4d94
commit
ac8ed86347
@ -2,7 +2,7 @@ import { Box, Divider, styled, Typography, useTheme } from '@mui/material';
|
||||
import { ArcherContainer, ArcherElement } from 'react-archer';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import type React from 'react';
|
||||
import { type FC, useLayoutEffect, useRef, useState } from 'react';
|
||||
import { useRef, useState, useLayoutEffect } from 'react';
|
||||
import type {
|
||||
ApplicationOverviewEnvironmentSchema,
|
||||
ApplicationOverviewSchema,
|
||||
@ -16,7 +16,6 @@ import WarningAmberRounded from '@mui/icons-material/WarningAmberRounded';
|
||||
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
|
||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||
import { getApplicationIssues } from './ApplicationIssues/ApplicationIssues.tsx';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
|
||||
const StyledTable = styled('table')(({ theme }) => ({
|
||||
fontSize: theme.fontSizes.smallerBody,
|
||||
@ -141,7 +140,7 @@ const SuccessStatus = () => (
|
||||
</StyledStatus>
|
||||
);
|
||||
|
||||
const WarningStatus: FC<{ children?: React.ReactNode }> = ({ children }) => (
|
||||
const WarningStatus = ({ children }: { children?: React.ReactNode }) => (
|
||||
<StyledStatus mode='warning'>
|
||||
<WarningAmberRounded
|
||||
sx={(theme) => ({
|
||||
@ -197,8 +196,6 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
||||
const { elementRef, width } = useElementWidth();
|
||||
const navigate = useNavigate();
|
||||
const theme = useTheme();
|
||||
const registerFrontendClientEnabled = useUiFlag('registerFrontendClient');
|
||||
|
||||
const mode = getApplicationIssues(data);
|
||||
|
||||
return (
|
||||
@ -296,23 +293,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
||||
{environment.instanceCount}
|
||||
</StyledCell>
|
||||
</tr>
|
||||
{!registerFrontendClientEnabled ? (
|
||||
<tr>
|
||||
<StyledCell>SDK:</StyledCell>
|
||||
<StyledCell>
|
||||
{environment.sdks.map(
|
||||
(sdk) => (
|
||||
<div key={sdk}>
|
||||
{sdk}
|
||||
</div>
|
||||
),
|
||||
)}
|
||||
</StyledCell>
|
||||
</tr>
|
||||
) : null}
|
||||
|
||||
{registerFrontendClientEnabled &&
|
||||
environment.backendSdks.length > 0 ? (
|
||||
{environment.backendSdks.length > 0 && (
|
||||
<tr>
|
||||
<StyledCell>
|
||||
Backend SDK:
|
||||
@ -327,10 +308,10 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
||||
)}
|
||||
</StyledCell>
|
||||
</tr>
|
||||
) : null}
|
||||
)}
|
||||
|
||||
{registerFrontendClientEnabled &&
|
||||
environment.frontendSdks.length > 0 ? (
|
||||
{environment.frontendSdks.length >
|
||||
0 && (
|
||||
<tr>
|
||||
<StyledCell>
|
||||
Frontend SDK:
|
||||
@ -345,7 +326,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
||||
)}
|
||||
</StyledCell>
|
||||
</tr>
|
||||
) : null}
|
||||
)}
|
||||
|
||||
<tr>
|
||||
<StyledCell>Last seen:</StyledCell>
|
||||
|
@ -85,7 +85,6 @@ export type UiFlags = {
|
||||
showUserDeviceCount?: boolean;
|
||||
consumptionModel?: boolean;
|
||||
edgeObservability?: boolean;
|
||||
registerFrontendClient?: boolean;
|
||||
customMetrics?: boolean;
|
||||
lifecycleMetrics?: boolean;
|
||||
createFlagDialogCache?: boolean;
|
||||
|
@ -135,11 +135,7 @@ export class FrontendApiService {
|
||||
ip,
|
||||
);
|
||||
|
||||
if (
|
||||
metrics.instanceId &&
|
||||
typeof sdkVersion === 'string' &&
|
||||
this.flagResolver.isEnabled('registerFrontendClient')
|
||||
) {
|
||||
if (metrics.instanceId && typeof sdkVersion === 'string') {
|
||||
const client = {
|
||||
appName: metrics.appName,
|
||||
instanceId: metrics.instanceId,
|
||||
|
@ -45,13 +45,7 @@ let services: IUnleashServices;
|
||||
let destroy: () => Promise<void>;
|
||||
|
||||
beforeAll(async () => {
|
||||
const setup = await getSetup({
|
||||
experimental: {
|
||||
flags: {
|
||||
registerFrontendClient: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
const setup = await getSetup();
|
||||
request = setup.request;
|
||||
stores = setup.stores;
|
||||
destroy = setup.destroy;
|
||||
|
@ -226,20 +226,14 @@ export default class ClientMetricsController extends Controller {
|
||||
app.sdkType === 'frontend' &&
|
||||
typeof app.sdkVersion === 'string'
|
||||
) {
|
||||
if (
|
||||
this.flagResolver.isEnabled(
|
||||
'registerFrontendClient',
|
||||
)
|
||||
) {
|
||||
this.clientInstanceService.registerFrontendClient({
|
||||
appName: app.appName,
|
||||
instanceId: app.instanceId,
|
||||
environment: app.environment,
|
||||
sdkType: app.sdkType,
|
||||
sdkVersion: app.sdkVersion,
|
||||
projects: app.projects,
|
||||
});
|
||||
}
|
||||
this.clientInstanceService.registerFrontendClient({
|
||||
appName: app.appName,
|
||||
instanceId: app.instanceId,
|
||||
environment: app.environment,
|
||||
sdkType: app.sdkType,
|
||||
sdkVersion: app.sdkVersion,
|
||||
projects: app.projects,
|
||||
});
|
||||
} else {
|
||||
promises.push(
|
||||
this.clientInstanceService.registerBackendClient(
|
||||
|
@ -55,7 +55,6 @@ export type IFlagKey =
|
||||
| 'uniqueSdkTracking'
|
||||
| 'consumptionModel'
|
||||
| 'edgeObservability'
|
||||
| 'registerFrontendClient'
|
||||
| 'reportUnknownFlags'
|
||||
| 'lastSeenBulkQuery'
|
||||
| 'lifecycleMetrics'
|
||||
@ -264,10 +263,6 @@ const flags: IFlags = {
|
||||
process.env.EXPERIMENTAL_EDGE_OBSERVABILITY,
|
||||
false,
|
||||
),
|
||||
registerFrontendClient: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_REGISTER_FRONTEND_CLIENT,
|
||||
false,
|
||||
),
|
||||
reportUnknownFlags: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_REPORT_UNKNOWN_FLAGS,
|
||||
false,
|
||||
|
@ -51,7 +51,6 @@ process.nextTick(async () => {
|
||||
deltaApi: true,
|
||||
uniqueSdkTracking: true,
|
||||
strictSchemaValidation: true,
|
||||
registerFrontendClient: true,
|
||||
reportUnknownFlags: true,
|
||||
customMetrics: true,
|
||||
lifecycleMetrics: true,
|
||||
|
@ -55,7 +55,6 @@ beforeAll(async () => {
|
||||
experimental: {
|
||||
flags: {
|
||||
strictSchemaValidation: true,
|
||||
registerFrontendClient: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user