From 73ea4dc4120415144105ee061b7ecda420b0d615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Enrique=20Colina=20Rodr=C3=ADguez?= Date: Tue, 27 Feb 2024 16:29:37 +0100 Subject: [PATCH 1/4] #27286 Removing cli deployment step. (#27726) Co-authored-by: Daniel Colina --- .github/workflows/maven-cicd-pipeline.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/maven-cicd-pipeline.yml b/.github/workflows/maven-cicd-pipeline.yml index be1e4f235c2f..92632b1dfdee 100644 --- a/.github/workflows/maven-cicd-pipeline.yml +++ b/.github/workflows/maven-cicd-pipeline.yml @@ -735,18 +735,6 @@ jobs: name: workflow-data path: ./workflow-data.json - linux-cli-deploy: - needs: [ prepare-report-data ] - if: ${{ github.event_name == 'push' && needs.prepare-report-data.outputs.aggregate_status == 'SUCCESS' }} - name: CLI Build and Deploy - uses: ./.github/workflows/cli-build-artifacts.yml - with: - skipTests: true - buildNativeImage: false - uploadArtifacts: true - branch: ${{ github.ref_name }} - secrets: inherit - final-status: name: Final Status needs: prepare-report-data From 0cf70daa08285fc36e17b22e2db1897a304878a2 Mon Sep 17 00:00:00 2001 From: Manuel Rojas Date: Tue, 27 Feb 2024 11:26:51 -0600 Subject: [PATCH 2/4] fix(announcements): directive update handling of nonexistent feature flags (#27709) * #27708 Updating directive * #27708 Updating directive * #27708 PR feedback * #27708 PR feedback * #27708 PR feedback * #27708 PR feedback * Adding feature flag --- .../dot-properties.service.spec.ts | 19 ++++++++++++++++++- .../dot-properties/dot-properties.service.ts | 7 ++++--- .../resources/dotmarketing-config.properties | 4 ++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.spec.ts b/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.spec.ts index 1c8cb4b2d41b..4b97e2652abb 100644 --- a/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.spec.ts +++ b/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.spec.ts @@ -96,7 +96,7 @@ describe('DotPropertiesService', () => { const apiResponse = { entity: { [FeaturedFlags.DOTFAVORITEPAGE_FEATURE_ENABLE]: 'true', - [FeaturedFlags.FEATURE_FLAG_EDIT_URL_CONTENT_MAP]: 'NOT_FOUND' + [FeaturedFlags.FEATURE_FLAG_EDIT_URL_CONTENT_MAP]: FEATURE_FLAG_NOT_FOUND } }; @@ -112,6 +112,23 @@ describe('DotPropertiesService', () => { req.flush(apiResponse); }); + it('should get feature flag value as true when not found', (done) => { + const featureFlag = FeaturedFlags.FEATURE_FLAG_ANNOUNCEMENTS; + const apiResponse = { + entity: { + [FeaturedFlags.FEATURE_FLAG_ANNOUNCEMENTS]: 'NOT_FOUND' + } + }; + + service.getFeatureFlag(featureFlag).subscribe((response) => { + expect(response).toEqual(true); + done(); + }); + const req = httpMock.expectOne(`/api/v1/configuration/config?keys=${featureFlag}`); + expect(req.request.method).toBe('GET'); + req.flush(apiResponse); + }); + afterEach(() => { httpMock.verify(); }); diff --git a/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.ts b/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.ts index ede8e4f202b2..b907676f7769 100644 --- a/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.ts +++ b/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.ts @@ -5,7 +5,7 @@ import { Injectable } from '@angular/core'; import { map, pluck, take } from 'rxjs/operators'; -import { FeaturedFlags } from '@dotcms/dotcms-models'; +import { FEATURE_FLAG_NOT_FOUND, FeaturedFlags } from '@dotcms/dotcms-models'; @Injectable({ providedIn: 'root' @@ -57,13 +57,14 @@ export class DotPropertiesService { /** * Get the value of specific feature flag - * * @param {FeaturedFlags} key * @return {*} {Observable} * @memberof DotPropertiesService */ getFeatureFlag(key: FeaturedFlags): Observable { - return this.getKey(key).pipe(map((value) => value === 'true')); + return this.getKey(key).pipe( + map((value) => (value === FEATURE_FLAG_NOT_FOUND ? true : value === 'true')) + ); } /** diff --git a/dotcms-integration/src/test/resources/dotmarketing-config.properties b/dotcms-integration/src/test/resources/dotmarketing-config.properties index 443105863e84..fe4035711f7a 100644 --- a/dotcms-integration/src/test/resources/dotmarketing-config.properties +++ b/dotcms-integration/src/test/resources/dotmarketing-config.properties @@ -879,3 +879,7 @@ DELETE_CONTENT_TYPE_ASYNC=true DELETE_CONTENT_TYPE_ASYNC_WITH_JOB=false secrets.scripting.enabled=true + +#Feature Flags for the new Edit Page and Content Editor +FEATURE_FLAG_NEW_EDIT_PAGE=false +CONTENT_EDITOR2_ENABLED=false From 7c5de48a68097ad06083255ad82915665d74e30c Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 27 Feb 2024 14:03:38 -0600 Subject: [PATCH 3/4] #27744 fix for js endpoint (#27745) --- .../src/main/java/com/dotcms/rendering/js/JsResource.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotCMS/src/main/java/com/dotcms/rendering/js/JsResource.java b/dotCMS/src/main/java/com/dotcms/rendering/js/JsResource.java index 64a8b0bb2a1f..4dd594382859 100644 --- a/dotCMS/src/main/java/com/dotcms/rendering/js/JsResource.java +++ b/dotCMS/src/main/java/com/dotcms/rendering/js/JsResource.java @@ -550,9 +550,11 @@ private Map toObjectObjectMap (final Map map) { final Map objectObjectMap = new HashMap<>(); - for (final Map.Entry entry : map.entrySet()) { + if (Objects.nonNull(map)) { + for (final Map.Entry entry : map.entrySet()) { - objectObjectMap.put(entry.getKey(), entry.getValue()); + objectObjectMap.put(entry.getKey(), entry.getValue()); + } } return objectObjectMap; From 1f25cc65a0437dd09fe9f24a7056008e76d80786 Mon Sep 17 00:00:00 2001 From: Manuel Rojas Date: Wed, 28 Feb 2024 08:29:13 -0600 Subject: [PATCH 4/4] fix(license): Needs license message needs some styling help (#27747) * #27672 Fixing label * #27672 Fixing label --- .../components/dot-not-license/dot-not-license.component.html | 2 +- .../dot-not-license/dot-not-license.component.spec.ts | 2 +- dotCMS/src/main/webapp/WEB-INF/messages/Language.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core-web/libs/ui/src/lib/components/dot-not-license/dot-not-license.component.html b/core-web/libs/ui/src/lib/components/dot-not-license/dot-not-license.component.html index 9d40337e90ed..5124a5a790f9 100644 --- a/core-web/libs/ui/src/lib/components/dot-not-license/dot-not-license.component.html +++ b/core-web/libs/ui/src/lib/components/dot-not-license/dot-not-license.component.html @@ -12,7 +12,7 @@

{{ unlicenseData.titleKey | dm }}