diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json
index cd19e083008..0c1e7546431 100644
--- a/apps/web/src/locales/en/messages.json
+++ b/apps/web/src/locales/en/messages.json
@@ -2105,6 +2105,9 @@
"flagValue": {
"message": "Flag value"
},
+ "copyData": {
+ "message": "Copy data"
+ },
"domainRules": {
"message": "Domain rules"
},
diff --git a/libs/angular/src/platform/feature-flags/feature-flags.component.html b/libs/angular/src/platform/feature-flags/feature-flags.component.html
index 90696f6d39d..75bd0f11ce3 100644
--- a/libs/angular/src/platform/feature-flags/feature-flags.component.html
+++ b/libs/angular/src/platform/feature-flags/feature-flags.component.html
@@ -3,11 +3,21 @@
} @else {
-
+
+
-
+
+
();
+ featureStates: { [key: string]: AllowedFeatureFlagTypes } | undefined = undefined;
+
searchText = "";
constructor(
private destroyRef: DestroyRef,
private configService: ConfigService,
+ private platformUtilsService: PlatformUtilsService,
+ private toastService: ToastService,
+ private i18nService: I18nService,
) {}
ngOnInit() {
this.configService.featureStates$
.pipe(
takeUntilDestroyed(this.destroyRef),
+ tap((states) => {
+ this.featureStates = states;
+ }),
map((states) => {
if (!states) {
return [];
@@ -71,4 +82,12 @@ export class FeatureFlagsComponent implements OnInit {
refresh() {
this.configService.refreshServerConfig();
}
+
+ copyJsonToClipboard() {
+ this.platformUtilsService.copyToClipboard(JSON.stringify(this.featureStates));
+ this.toastService.showToast({
+ variant: "success",
+ message: this.i18nService.t("copySuccessful"),
+ });
+ }
}