mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-09 13:47:13 +02:00
chore: remove registerFrontendClient flag, keep feature
This commit is contained in:
parent
76b201e40e
commit
4106a3a917
@ -16,7 +16,6 @@ import WarningAmberRounded from '@mui/icons-material/WarningAmberRounded';
|
|||||||
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
|
import { TimeAgo } from 'component/common/TimeAgo/TimeAgo';
|
||||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||||
import { getApplicationIssues } from './ApplicationIssues/ApplicationIssues.tsx';
|
import { getApplicationIssues } from './ApplicationIssues/ApplicationIssues.tsx';
|
||||||
import { useUiFlag } from 'hooks/useUiFlag';
|
|
||||||
|
|
||||||
const StyledTable = styled('table')(({ theme }) => ({
|
const StyledTable = styled('table')(({ theme }) => ({
|
||||||
fontSize: theme.fontSizes.smallerBody,
|
fontSize: theme.fontSizes.smallerBody,
|
||||||
@ -197,7 +196,6 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
|||||||
const { elementRef, width } = useElementWidth();
|
const { elementRef, width } = useElementWidth();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const registerFrontendClientEnabled = useUiFlag('registerFrontendClient');
|
|
||||||
|
|
||||||
const mode = getApplicationIssues(data);
|
const mode = getApplicationIssues(data);
|
||||||
|
|
||||||
@ -296,23 +294,8 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
|||||||
{environment.instanceCount}
|
{environment.instanceCount}
|
||||||
</StyledCell>
|
</StyledCell>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<StyledCell>
|
<StyledCell>
|
||||||
Backend SDK:
|
Backend SDK:
|
||||||
@ -329,8 +312,7 @@ export const ApplicationChart = ({ data }: IApplicationChartProps) => {
|
|||||||
</tr>
|
</tr>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{registerFrontendClientEnabled &&
|
{environment.frontendSdks.length > 0 ? (
|
||||||
environment.frontendSdks.length > 0 ? (
|
|
||||||
<tr>
|
<tr>
|
||||||
<StyledCell>
|
<StyledCell>
|
||||||
Frontend SDK:
|
Frontend SDK:
|
||||||
|
@ -88,7 +88,6 @@ export type UiFlags = {
|
|||||||
edgeObservability?: boolean;
|
edgeObservability?: boolean;
|
||||||
addEditStrategy?: boolean;
|
addEditStrategy?: boolean;
|
||||||
cleanupReminder?: boolean;
|
cleanupReminder?: boolean;
|
||||||
registerFrontendClient?: boolean;
|
|
||||||
featureLinks?: boolean;
|
featureLinks?: boolean;
|
||||||
projectLinkTemplates?: boolean;
|
projectLinkTemplates?: boolean;
|
||||||
};
|
};
|
||||||
|
@ -137,8 +137,7 @@ export class FrontendApiService {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
metrics.instanceId &&
|
metrics.instanceId &&
|
||||||
typeof sdkVersion === 'string' &&
|
typeof sdkVersion === 'string'
|
||||||
this.flagResolver.isEnabled('registerFrontendClient')
|
|
||||||
) {
|
) {
|
||||||
const client = {
|
const client = {
|
||||||
appName: metrics.appName,
|
appName: metrics.appName,
|
||||||
|
@ -46,9 +46,7 @@ let destroy: () => Promise<void>;
|
|||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
const setup = await getSetup({
|
const setup = await getSetup({
|
||||||
experimental: {
|
experimental: {
|
||||||
flags: {
|
flags: {},
|
||||||
registerFrontendClient: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
request = setup.request;
|
request = setup.request;
|
||||||
|
@ -228,20 +228,14 @@ export default class ClientMetricsController extends Controller {
|
|||||||
app.sdkType === 'frontend' &&
|
app.sdkType === 'frontend' &&
|
||||||
typeof app.sdkVersion === 'string'
|
typeof app.sdkVersion === 'string'
|
||||||
) {
|
) {
|
||||||
if (
|
this.clientInstanceService.registerFrontendClient({
|
||||||
this.flagResolver.isEnabled(
|
appName: app.appName,
|
||||||
'registerFrontendClient',
|
instanceId: app.instanceId,
|
||||||
)
|
|
||||||
) {
|
|
||||||
this.clientInstanceService.registerFrontendClient({
|
|
||||||
appName: app.appName,
|
|
||||||
instanceId: app.instanceId,
|
|
||||||
environment: app.environment,
|
environment: app.environment,
|
||||||
sdkType: app.sdkType,
|
sdkType: app.sdkType,
|
||||||
sdkVersion: app.sdkVersion,
|
sdkVersion: app.sdkVersion,
|
||||||
projects: app.projects,
|
projects: app.projects,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
promises.push(
|
promises.push(
|
||||||
this.clientInstanceService.registerBackendClient(
|
this.clientInstanceService.registerBackendClient(
|
||||||
|
@ -59,7 +59,6 @@ export type IFlagKey =
|
|||||||
| 'addEditStrategy'
|
| 'addEditStrategy'
|
||||||
| 'cleanupReminder'
|
| 'cleanupReminder'
|
||||||
| 'removeInactiveApplications'
|
| 'removeInactiveApplications'
|
||||||
| 'registerFrontendClient'
|
|
||||||
| 'featureLinks'
|
| 'featureLinks'
|
||||||
| 'projectLinkTemplates'
|
| 'projectLinkTemplates'
|
||||||
| 'reportUnknownFlags'
|
| 'reportUnknownFlags'
|
||||||
@ -283,10 +282,6 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_REMOVE_INACTIVE_APPLICATIONS,
|
process.env.UNLEASH_EXPERIMENTAL_REMOVE_INACTIVE_APPLICATIONS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
registerFrontendClient: parseEnvVarBoolean(
|
|
||||||
process.env.UNLEASH_EXPERIMENTAL_REGISTER_FRONTEND_CLIENT,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
featureLinks: parseEnvVarBoolean(
|
featureLinks: parseEnvVarBoolean(
|
||||||
process.env.UNLEASH_EXPERIMENTAL_FEATURE_LINKS,
|
process.env.UNLEASH_EXPERIMENTAL_FEATURE_LINKS,
|
||||||
false,
|
false,
|
||||||
|
@ -53,7 +53,6 @@ process.nextTick(async () => {
|
|||||||
addEditStrategy: true,
|
addEditStrategy: true,
|
||||||
cleanupReminder: true,
|
cleanupReminder: true,
|
||||||
strictSchemaValidation: true,
|
strictSchemaValidation: true,
|
||||||
registerFrontendClient: true,
|
|
||||||
featureLinks: true,
|
featureLinks: true,
|
||||||
projectLinkTemplates: true,
|
projectLinkTemplates: true,
|
||||||
reportUnknownFlags: true,
|
reportUnknownFlags: true,
|
||||||
|
@ -54,7 +54,6 @@ beforeAll(async () => {
|
|||||||
experimental: {
|
experimental: {
|
||||||
flags: {
|
flags: {
|
||||||
strictSchemaValidation: true,
|
strictSchemaValidation: true,
|
||||||
registerFrontendClient: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user