Skip to content

Commit

Permalink
Merge branch 'master' into issue-27603-sdk-experiment-fetch-store-data-2
Browse files Browse the repository at this point in the history
  • Loading branch information
oidacra authored Feb 28, 2024
2 parents c558590 + 1f25cc6 commit 1df9506
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 21 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/maven-cicd-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
};

Expand All @@ -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();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -57,13 +57,14 @@ export class DotPropertiesService {

/**
* Get the value of specific feature flag
*
* @param {FeaturedFlags} key
* @return {*} {Observable<boolean>}
* @memberof DotPropertiesService
*/
getFeatureFlag(key: FeaturedFlags): Observable<boolean> {
return this.getKey(key).pipe(map((value) => value === 'true'));
return this.getKey(key).pipe(
map((value) => (value === FEATURE_FLAG_NOT_FOUND ? true : value === 'true'))
);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h4 data-testId="title">{{ unlicenseData.titleKey | dm }}</h4>

<div class="actions">
<a target="_blank" data-testId="contact-us" href="https://dotcms.com/contact-us/">
{{ 'announcements_knowledge_contact_us' | dm }}
{{ 'contact-us-for-more-information' | dm }}
</a>

<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { MockDotMessageService } from '@dotcms/utils-testing';
const messageServiceMock = new MockDotMessageService({
'portlet.title': 'Enterprise Portlet',
'request.a.trial.license': 'Request License',
'Contact-Us-for-more-Information': 'Contact Us',
'contact-us-for-more-information': 'Contact Us',
'Learn-more-about-dotCMS-Enterprise': 'Learn More',
'only-available-in': 'is only available in',
'dotcms-enterprise-edition': 'otCMS Enterprise Editions',
Expand Down
6 changes: 4 additions & 2 deletions dotCMS/src/main/java/com/dotcms/rendering/js/JsResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,11 @@ private Map<Object, Object> toObjectObjectMap (final Map<String, Object> map) {

final Map<Object, Object> objectObjectMap = new HashMap<>();

for (final Map.Entry<String, Object> entry : map.entrySet()) {
if (Objects.nonNull(map)) {
for (final Map.Entry<String, Object> entry : map.entrySet()) {

objectObjectMap.put(entry.getKey(), entry.getValue());
objectObjectMap.put(entry.getKey(), entry.getValue());
}
}

return objectObjectMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ confirm.containers.delete.containers=Are you sure you want to delete this Contai
Confirm=Confirm
Constant-Field=Constant Field
Constrain=Constrain
Contact-Us-for-more-Information=Contact us for more information
contact-us-for-more-information=Contact us for more information
container-already-exists=The Container that you want to add already exists in this section of the Template.
Container-Information=Container Information
container-used-templates=This Container is currently used by one or more Templates. Please remove the Container from all Templates before attempting to delete it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1df9506

Please sign in to comment.